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

Side by Side Diff: chrome/browser/password_manager/native_backend_kwallet_x.cc

Issue 1734193003: CREDENTIAL: Disable auto sign-in by default for existing credentials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: vasilii@ Created 4 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/password_manager/native_backend_kwallet_x.h" 5 #include "chrome/browser/password_manager/native_backend_kwallet_x.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 19 matching lines...) Expand all
30 #include "ui/base/l10n/l10n_util.h" 30 #include "ui/base/l10n/l10n_util.h"
31 #include "url/origin.h" 31 #include "url/origin.h"
32 32
33 using autofill::PasswordForm; 33 using autofill::PasswordForm;
34 using content::BrowserThread; 34 using content::BrowserThread;
35 35
36 namespace { 36 namespace {
37 37
38 // In case the fields in the pickle ever change, version them so we can try to 38 // In case the fields in the pickle ever change, version them so we can try to
39 // read old pickles. (Note: do not eat old pickles past the expiration date.) 39 // read old pickles. (Note: do not eat old pickles past the expiration date.)
40 const int kPickleVersion = 7; 40 const int kPickleVersion = 8;
41 41
42 // We could localize this string, but then changing your locale would cause 42 // We could localize this string, but then changing your locale would cause
43 // you to lose access to all your stored passwords. Maybe best not to do that. 43 // you to lose access to all your stored passwords. Maybe best not to do that.
44 // Name of the folder to store passwords in. 44 // Name of the folder to store passwords in.
45 const char kKWalletFolder[] = "Chrome Form Data"; 45 const char kKWalletFolder[] = "Chrome Form Data";
46 46
47 // DBus service, path, and interface names for klauncher and kwalletd. 47 // DBus service, path, and interface names for klauncher and kwalletd.
48 const char kKWalletDName[] = "kwalletd"; 48 const char kKWalletDName[] = "kwalletd";
49 const char kKWalletD5Name[] = "kwalletd5"; 49 const char kKWalletD5Name[] = "kwalletd5";
50 const char kKWalletServiceName[] = "org.kde.kwalletd"; 50 const char kKWalletServiceName[] = "org.kde.kwalletd";
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 LogDeserializationWarning(version, signon_realm, false); 237 LogDeserializationWarning(version, signon_realm, false);
238 return false; 238 return false;
239 } 239 }
240 if (read_success) { 240 if (read_success) {
241 form->generation_upload_status = 241 form->generation_upload_status =
242 static_cast<PasswordForm::GenerationUploadStatus>( 242 static_cast<PasswordForm::GenerationUploadStatus>(
243 generation_upload_status); 243 generation_upload_status);
244 } 244 }
245 } 245 }
246 246
247 if (version == 7)
vasilii 2016/02/26 13:02:07 <= 7, I'd move it upper to the place where we actu
248 form->skip_zero_click = true;
249
247 converted_forms.push_back(std::move(form)); 250 converted_forms.push_back(std::move(form));
248 } 251 }
249 252
250 forms->swap(converted_forms); 253 forms->swap(converted_forms);
251 return true; 254 return true;
252 } 255 }
253 256
254 // Serializes a list of PasswordForms to be stored in the wallet. 257 // Serializes a list of PasswordForms to be stored in the wallet.
255 void SerializeValue(const std::vector<autofill::PasswordForm*>& forms, 258 void SerializeValue(const std::vector<autofill::PasswordForm*>& forms,
256 base::Pickle* pickle) { 259 base::Pickle* pickle) {
(...skipping 814 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 } 1074 }
1072 1075
1073 return handle; 1076 return handle;
1074 } 1077 }
1075 1078
1076 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const { 1079 std::string NativeBackendKWallet::GetProfileSpecificFolderName() const {
1077 // Originally, the folder name was always just "Chrome Form Data". 1080 // Originally, the folder name was always just "Chrome Form Data".
1078 // Now we use it to distinguish passwords for different profiles. 1081 // Now we use it to distinguish passwords for different profiles.
1079 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_); 1082 return base::StringPrintf("%s (%d)", kKWalletFolder, profile_id_);
1080 } 1083 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698