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

Side by Side Diff: chrome/browser/sync/test/integration/passwords_helper.cc

Issue 2354613002: [Sync] Fix namespaces for the browser_sync component. (Closed)
Patch Set: Address comments. Created 4 years, 2 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/sync/test/integration/passwords_helper.h" 5 #include "chrome/browser/sync/test/integration/passwords_helper.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 wait_event.Wait(); 116 wait_event.Wait();
117 } 117 }
118 118
119 void RemoveLogins(PasswordStore* store) { 119 void RemoveLogins(PasswordStore* store) {
120 std::vector<std::unique_ptr<PasswordForm>> forms = GetLogins(store); 120 std::vector<std::unique_ptr<PasswordForm>> forms = GetLogins(store);
121 for (const auto& form : forms) { 121 for (const auto& form : forms) {
122 RemoveLogin(store, *form); 122 RemoveLogin(store, *form);
123 } 123 }
124 } 124 }
125 125
126 void SetEncryptionPassphrase(int index, 126 void SetEncryptionPassphrase(
127 const std::string& passphrase, 127 int index,
128 ProfileSyncService::PassphraseType type) { 128 const std::string& passphrase,
129 browser_sync::ProfileSyncService::PassphraseType type) {
129 ProfileSyncServiceFactory::GetForProfile( 130 ProfileSyncServiceFactory::GetForProfile(
130 test()->GetProfile(index))->SetEncryptionPassphrase(passphrase, type); 131 test()->GetProfile(index))->SetEncryptionPassphrase(passphrase, type);
131 } 132 }
132 133
133 bool SetDecryptionPassphrase(int index, const std::string& passphrase) { 134 bool SetDecryptionPassphrase(int index, const std::string& passphrase) {
134 return ProfileSyncServiceFactory::GetForProfile( 135 return ProfileSyncServiceFactory::GetForProfile(
135 test()->GetProfile(index))->SetDecryptionPassphrase(passphrase); 136 test()->GetProfile(index))->SetDecryptionPassphrase(passphrase);
136 } 137 }
137 138
138 PasswordStore* GetPasswordStore(int index) { 139 PasswordStore* GetPasswordStore(int index) {
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index)); 354 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index));
354 form.username_value = 355 form.username_value =
355 base::ASCIIToUTF16(base::StringPrintf("username%d", index)); 356 base::ASCIIToUTF16(base::StringPrintf("username%d", index));
356 form.password_value = 357 form.password_value =
357 base::ASCIIToUTF16(base::StringPrintf("password%d", index)); 358 base::ASCIIToUTF16(base::StringPrintf("password%d", index));
358 form.date_created = base::Time::Now(); 359 form.date_created = base::Time::Now();
359 return form; 360 return form;
360 } 361 }
361 362
362 } // namespace passwords_helper 363 } // namespace passwords_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698