| OLD | NEW | 
|    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  Loading... | 
|   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  Loading... | 
|  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 }; | 
| OLD | NEW |