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

Side by Side Diff: chrome/browser/sync/sync_setup_wizard_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
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/sync_setup_wizard.h" 5 #include "chrome/browser/sync/sync_setup_wizard.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 std::string username_; 89 std::string username_;
90 std::string password_; 90 std::string password_;
91 std::string captcha_; 91 std::string captcha_;
92 }; 92 };
93 93
94 // A PSS subtype to inject. 94 // A PSS subtype to inject.
95 class ProfileSyncServiceForWizardTest : public ProfileSyncService { 95 class ProfileSyncServiceForWizardTest : public ProfileSyncService {
96 public: 96 public:
97 virtual ~ProfileSyncServiceForWizardTest() {} 97 virtual ~ProfileSyncServiceForWizardTest() {}
98 98
99 static ProfileKeyedBase* BuildManual(Profile* profile) { 99 static ProfileKeyedService* BuildManual(Profile* profile) {
100 return new ProfileSyncServiceForWizardTest(profile, 100 return new ProfileSyncServiceForWizardTest(profile,
101 ProfileSyncService::MANUAL_START); 101 ProfileSyncService::MANUAL_START);
102 } 102 }
103 103
104 static ProfileKeyedBase* BuildAuto(Profile* profile) { 104 static ProfileKeyedService* BuildAuto(Profile* profile) {
105 return new ProfileSyncServiceForWizardTest(profile, 105 return new ProfileSyncServiceForWizardTest(profile,
106 ProfileSyncService::AUTO_START); 106 ProfileSyncService::AUTO_START);
107 } 107 }
108 108
109 virtual void OnUserChoseDatatypes( 109 virtual void OnUserChoseDatatypes(
110 bool sync_everything, syncable::ModelTypeSet chosen_types) OVERRIDE { 110 bool sync_everything, syncable::ModelTypeSet chosen_types) OVERRIDE {
111 user_chose_data_types_ = true; 111 user_chose_data_types_ = true;
112 chosen_data_types_ = chosen_types; 112 chosen_data_types_ = chosen_types;
113 } 113 }
114 114
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 class SyncSetupWizardCrosTest : public SyncSetupWizardTest { 410 class SyncSetupWizardCrosTest : public SyncSetupWizardTest {
411 public: 411 public:
412 virtual TestingProfile* BuildProfile() { 412 virtual TestingProfile* BuildProfile() {
413 TestingProfile* profile = new TestingProfile(); 413 TestingProfile* profile = new TestingProfile();
414 ProfileSyncServiceFactory* f = ProfileSyncServiceFactory::GetInstance(); 414 ProfileSyncServiceFactory* f = ProfileSyncServiceFactory::GetInstance();
415 f->SetTestingFactory(profile, ProfileSyncServiceForWizardTest::BuildAuto); 415 f->SetTestingFactory(profile, ProfileSyncServiceForWizardTest::BuildAuto);
416 f->GetForProfile(profile)->signin()->SetAuthenticatedUsername(kTestUser); 416 f->GetForProfile(profile)->signin()->SetAuthenticatedUsername(kTestUser);
417 return profile; 417 return profile;
418 } 418 }
419 }; 419 };
OLDNEW
« no previous file with comments | « chrome/browser/sync/profile_sync_service_password_unittest.cc ('k') | chrome/browser/tabs/pinned_tab_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698