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

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

Issue 11275088: Remove implicit scoped_refptr operator T* Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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/autofill_helper.h" 5 #include "chrome/browser/sync/test/integration/autofill_helper.h"
6 6
7 #include "chrome/browser/autofill/autofill_common_test.h" 7 #include "chrome/browser/autofill/autofill_common_test.h"
8 #include "chrome/browser/autofill/autofill_profile.h" 8 #include "chrome/browser/autofill/autofill_profile.h"
9 #include "chrome/browser/autofill/autofill_type.h" 9 #include "chrome/browser/autofill/autofill_type.h"
10 #include "chrome/browser/autofill/personal_data_manager.h" 10 #include "chrome/browser/autofill/personal_data_manager.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 std::set<AutofillEntry> keys = GetAllKeys(profile); 191 std::set<AutofillEntry> keys = GetAllKeys(profile);
192 for (std::set<AutofillEntry>::const_iterator it = keys.begin(); 192 for (std::set<AutofillEntry>::const_iterator it = keys.begin();
193 it != keys.end(); ++it) { 193 it != keys.end(); ++it) {
194 RemoveKeyDontBlockForSync(profile, it->key()); 194 RemoveKeyDontBlockForSync(profile, it->key());
195 } 195 }
196 BlockForPendingDBThreadTasks(); 196 BlockForPendingDBThreadTasks();
197 } 197 }
198 198
199 std::set<AutofillEntry> GetAllKeys(int profile) { 199 std::set<AutofillEntry> GetAllKeys(int profile) {
200 scoped_refptr<WebDataService> wds = GetWebDataService(profile); 200 scoped_refptr<WebDataService> wds = GetWebDataService(profile);
201 std::vector<AutofillEntry> all_entries = GetAllAutofillEntries(wds); 201 std::vector<AutofillEntry> all_entries = GetAllAutofillEntries(wds.get());
202 std::set<AutofillEntry> all_keys; 202 std::set<AutofillEntry> all_keys;
203 for (std::vector<AutofillEntry>::const_iterator it = all_entries.begin(); 203 for (std::vector<AutofillEntry>::const_iterator it = all_entries.begin();
204 it != all_entries.end(); ++it) { 204 it != all_entries.end(); ++it) {
205 all_keys.insert(*it); 205 all_keys.insert(*it);
206 } 206 }
207 return all_keys; 207 return all_keys;
208 } 208 }
209 209
210 bool KeysMatch(int profile_a, int profile_b) { 210 bool KeysMatch(int profile_a, int profile_b) {
211 return GetAllKeys(profile_a) == GetAllKeys(profile_b); 211 return GetAllKeys(profile_a) == GetAllKeys(profile_b);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 if (!ProfilesMatch(0, i)) { 327 if (!ProfilesMatch(0, i)) {
328 LOG(ERROR) << "Profile " << i << "does not contain the same autofill " 328 LOG(ERROR) << "Profile " << i << "does not contain the same autofill "
329 "profiles as profile 0."; 329 "profiles as profile 0.";
330 return false; 330 return false;
331 } 331 }
332 } 332 }
333 return true; 333 return true;
334 } 334 }
335 335
336 } // namespace autofill_helper 336 } // namespace autofill_helper
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/typed_url_data_type_controller.cc ('k') | chrome/browser/sync/test/integration/bookmarks_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698