Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: components/os_crypt/key_storage_libsecret.cc

Issue 2272143002: M53: Fix branding/official build confusion in os_crypt. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/os_crypt/key_storage_libsecret.h" 5 #include "components/os_crypt/key_storage_libsecret.h"
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/rand_util.h" 8 #include "base/rand_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "components/os_crypt/libsecret_util_linux.h" 10 #include "components/os_crypt/libsecret_util_linux.h"
11 11
12 namespace { 12 namespace {
13 13
14 #if defined(OFFICIAL_BUILD) 14 #if defined(GOOGLE_CHROME_BUILD)
15 const char kKeyStorageEntryName[] = "Chrome Safe Storage"; 15 const char kKeyStorageEntryName[] = "Chrome Safe Storage";
16 #else 16 #else
17 const char kKeyStorageEntryName[] = "Chromium Safe Storage"; 17 const char kKeyStorageEntryName[] = "Chromium Safe Storage";
18 #endif 18 #endif
19 19
20 const SecretSchema kKeystoreSchema = { 20 const SecretSchema kKeystoreSchema = {
21 "chrome_libsecret_os_crypt_password", 21 "chrome_libsecret_os_crypt_password",
22 SECRET_SCHEMA_NONE, 22 SECRET_SCHEMA_NONE,
23 { 23 {
24 {nullptr, SECRET_SCHEMA_ATTRIBUTE_STRING}, 24 {nullptr, SECRET_SCHEMA_ATTRIBUTE_STRING},
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 } 57 }
58 std::string password( 58 std::string password(
59 LibsecretLoader::secret_value_get_text(password_libsecret)); 59 LibsecretLoader::secret_value_get_text(password_libsecret));
60 LibsecretLoader::secret_value_unref(password_libsecret); 60 LibsecretLoader::secret_value_unref(password_libsecret);
61 return password; 61 return password;
62 } 62 }
63 63
64 bool KeyStorageLibsecret::Init() { 64 bool KeyStorageLibsecret::Init() {
65 return LibsecretLoader::EnsureLibsecretLoaded(); 65 return LibsecretLoader::EnsureLibsecretLoaded();
66 } 66 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698