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

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

Issue 1730313004: Remove PasswordStore::AuthorizationPromptPolicy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 store->UpdateLogin(form); 87 store->UpdateLogin(form);
88 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event)); 88 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event));
89 wait_event.Wait(); 89 wait_event.Wait();
90 } 90 }
91 91
92 ScopedVector<PasswordForm> GetLogins(PasswordStore* store) { 92 ScopedVector<PasswordForm> GetLogins(PasswordStore* store) {
93 EXPECT_TRUE(store); 93 EXPECT_TRUE(store);
94 PasswordForm matcher_form; 94 PasswordForm matcher_form;
95 matcher_form.signon_realm = kFakeSignonRealm; 95 matcher_form.signon_realm = kFakeSignonRealm;
96 PasswordStoreConsumerHelper consumer; 96 PasswordStoreConsumerHelper consumer;
97 store->GetLogins(matcher_form, PasswordStore::DISALLOW_PROMPT, &consumer); 97 store->GetLogins(matcher_form, &consumer);
98 content::RunMessageLoop(); 98 content::RunMessageLoop();
99 return consumer.result(); 99 return consumer.result();
100 } 100 }
101 101
102 void RemoveLogin(PasswordStore* store, const PasswordForm& form) { 102 void RemoveLogin(PasswordStore* store, const PasswordForm& form) {
103 ASSERT_TRUE(store); 103 ASSERT_TRUE(store);
104 base::WaitableEvent wait_event(true, false); 104 base::WaitableEvent wait_event(true, false);
105 store->RemoveLogin(form); 105 store->RemoveLogin(form);
106 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event)); 106 store->ScheduleTask(base::Bind(&PasswordStoreCallback, &wait_event));
107 wait_event.Wait(); 107 wait_event.Wait();
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index)); 344 form.origin = GURL(base::StringPrintf(kIndexedFakeOrigin, index));
345 form.username_value = 345 form.username_value =
346 base::ASCIIToUTF16(base::StringPrintf("username%d", index)); 346 base::ASCIIToUTF16(base::StringPrintf("username%d", index));
347 form.password_value = 347 form.password_value =
348 base::ASCIIToUTF16(base::StringPrintf("password%d", index)); 348 base::ASCIIToUTF16(base::StringPrintf("password%d", index));
349 form.date_created = base::Time::Now(); 349 form.date_created = base::Time::Now();
350 return form; 350 return form;
351 } 351 }
352 352
353 } // namespace passwords_helper 353 } // namespace passwords_helper
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698