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

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

Issue 106053008: [Mac] Passwords: Don't always prompt to access passwords saved by other browsers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix yet another compile failure. Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/password_manager/test_password_store.cc ('k') | 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 (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 "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/synchronization/waitable_event.h" 10 #include "base/synchronization/waitable_event.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 store->UpdateLogin(form); 86 store->UpdateLogin(form);
87 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event)); 87 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event));
88 wait_event.Wait(); 88 wait_event.Wait();
89 } 89 }
90 90
91 void GetLogins(PasswordStore* store, std::vector<PasswordForm>& matches) { 91 void GetLogins(PasswordStore* store, std::vector<PasswordForm>& matches) {
92 ASSERT_TRUE(store); 92 ASSERT_TRUE(store);
93 PasswordForm matcher_form; 93 PasswordForm matcher_form;
94 matcher_form.signon_realm = kFakeSignonRealm; 94 matcher_form.signon_realm = kFakeSignonRealm;
95 PasswordStoreConsumerHelper consumer(&matches); 95 PasswordStoreConsumerHelper consumer(&matches);
96 store->GetLogins(matcher_form, &consumer); 96 store->GetLogins(matcher_form, PasswordStore::DISALLOW_PROMPT, &consumer);
97 content::RunMessageLoop(); 97 content::RunMessageLoop();
98 } 98 }
99 99
100 void RemoveLogin(PasswordStore* store, const PasswordForm& form) { 100 void RemoveLogin(PasswordStore* store, const PasswordForm& form) {
101 ASSERT_TRUE(store); 101 ASSERT_TRUE(store);
102 base::WaitableEvent wait_event(true, false); 102 base::WaitableEvent wait_event(true, false);
103 store->RemoveLogin(form); 103 store->RemoveLogin(form);
104 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event)); 104 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event));
105 wait_event.Wait(); 105 wait_event.Wait();
106 } 106 }
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 PasswordForm form; 216 PasswordForm form;
217 form.signon_realm = kFakeSignonRealm; 217 form.signon_realm = kFakeSignonRealm;
218 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index)); 218 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index));
219 form.username_value = ASCIIToUTF16(base::StringPrintf("username%d", index)); 219 form.username_value = ASCIIToUTF16(base::StringPrintf("username%d", index));
220 form.password_value = ASCIIToUTF16(base::StringPrintf("password%d", index)); 220 form.password_value = ASCIIToUTF16(base::StringPrintf("password%d", index));
221 form.date_created = base::Time::Now(); 221 form.date_created = base::Time::Now();
222 return form; 222 return form;
223 } 223 }
224 224
225 } // namespace passwords_helper 225 } // namespace passwords_helper
OLDNEW
« no previous file with comments | « chrome/browser/password_manager/test_password_store.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698