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

Side by Side Diff: chrome/browser/autofill/autofill_manager_unittest.cc

Issue 9703038: Profiles: Really fix refcounted services. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Forgot to save a file. >_< Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/content_settings/cookie_settings.h » ('j') | 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 <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 std::vector<int> > AutofillParam; 61 std::vector<int> > AutofillParam;
62 62
63 class TestPersonalDataManager : public PersonalDataManager { 63 class TestPersonalDataManager : public PersonalDataManager {
64 public: 64 public:
65 TestPersonalDataManager() { 65 TestPersonalDataManager() {
66 CreateTestAutofillProfiles(&web_profiles_); 66 CreateTestAutofillProfiles(&web_profiles_);
67 CreateTestCreditCards(&credit_cards_); 67 CreateTestCreditCards(&credit_cards_);
68 } 68 }
69 69
70 // Factory method for keyed service. PersonalDataManager is NULL for testing. 70 // Factory method for keyed service. PersonalDataManager is NULL for testing.
71 static ProfileKeyedBase* Build(Profile* profile) { 71 static ProfileKeyedService* Build(Profile* profile) {
72 return NULL; 72 return NULL;
73 } 73 }
74 74
75 MOCK_METHOD1(SaveImportedProfile, void(const AutofillProfile&)); 75 MOCK_METHOD1(SaveImportedProfile, void(const AutofillProfile&));
76 76
77 AutofillProfile* GetProfileWithGUID(const char* guid) { 77 AutofillProfile* GetProfileWithGUID(const char* guid) {
78 for (std::vector<AutofillProfile *>::iterator it = web_profiles_.begin(); 78 for (std::vector<AutofillProfile *>::iterator it = web_profiles_.begin();
79 it != web_profiles_.end(); ++it) { 79 it != web_profiles_.end(); ++it) {
80 if (!(*it)->guid().compare(guid)) 80 if (!(*it)->guid().compare(guid))
81 return *it; 81 return *it;
(...skipping 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2921 2921
2922 AutofillManager* autofill_manager = contents_wrapper()->autofill_manager(); 2922 AutofillManager* autofill_manager = contents_wrapper()->autofill_manager();
2923 EXPECT_TRUE(autofill_manager->external_delegate()); 2923 EXPECT_TRUE(autofill_manager->external_delegate());
2924 2924
2925 AutocompleteHistoryManager* autocomplete_history_manager = 2925 AutocompleteHistoryManager* autocomplete_history_manager =
2926 contents_wrapper()->autocomplete_history_manager(); 2926 contents_wrapper()->autocomplete_history_manager();
2927 EXPECT_TRUE(autocomplete_history_manager->external_delegate()); 2927 EXPECT_TRUE(autocomplete_history_manager->external_delegate());
2928 } 2928 }
2929 2929
2930 #endif // OS_ANDROID 2930 #endif // OS_ANDROID
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/content_settings/cookie_settings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698