Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / components / password_manager / core / browser / login_database_posix.cc
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "components/password_manager/core/browser/login_database.h"
6
7 #include "base/strings/utf_string_conversions.h"
8
9 namespace password_manager {
10
11 // TODO: Actually encrypt passwords on Linux.
12
13 LoginDatabase::EncryptionResult LoginDatabase::EncryptedString(
14     const base::string16& plain_text,
15     std::string* cipher_text) const {
16   *cipher_text = base::UTF16ToUTF8(plain_text);
17   return ENCRYPTION_RESULT_SUCCESS;
18 }
19
20 LoginDatabase::EncryptionResult LoginDatabase::DecryptedString(
21     const std::string& cipher_text,
22     base::string16* plain_text) const {
23   *plain_text = base::UTF8ToUTF16(cipher_text);
24   return ENCRYPTION_RESULT_SUCCESS;
25 }
26
27 }  // namespace password_manager