| 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 "base/files/file_util.h" | 5 #include "base/files/file_util.h" |
| 6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/signin/account_tracker_service_factory.h" | 9 #include "chrome/browser/signin/account_tracker_service_factory.h" |
| 10 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" | 10 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 TestProfileSyncServiceNoBackup( | 81 TestProfileSyncServiceNoBackup( |
| 82 scoped_ptr<sync_driver::SyncClient> sync_client, | 82 scoped_ptr<sync_driver::SyncClient> sync_client, |
| 83 Profile* profile, | 83 Profile* profile, |
| 84 scoped_ptr<SigninManagerWrapper> signin_wrapper, | 84 scoped_ptr<SigninManagerWrapper> signin_wrapper, |
| 85 ProfileOAuth2TokenService* oauth2_token_service, | 85 ProfileOAuth2TokenService* oauth2_token_service, |
| 86 browser_sync::ProfileSyncServiceStartBehavior start_behavior) | 86 browser_sync::ProfileSyncServiceStartBehavior start_behavior) |
| 87 : ProfileSyncService(sync_client.Pass(), | 87 : ProfileSyncService(sync_client.Pass(), |
| 88 profile, | 88 profile, |
| 89 signin_wrapper.Pass(), | 89 signin_wrapper.Pass(), |
| 90 oauth2_token_service, | 90 oauth2_token_service, |
| 91 start_behavior) {} | 91 start_behavior, |
| 92 base::Bind(&EmptyNetworkTimeUpdate)) {} |
| 92 | 93 |
| 93 protected: | 94 protected: |
| 94 bool NeedBackup() const override { return false; } | 95 bool NeedBackup() const override { return false; } |
| 95 }; | 96 }; |
| 96 | 97 |
| 97 class ProfileSyncServiceStartupTest : public testing::Test { | 98 class ProfileSyncServiceStartupTest : public testing::Test { |
| 98 public: | 99 public: |
| 99 ProfileSyncServiceStartupTest() | 100 ProfileSyncServiceStartupTest() |
| 100 : thread_bundle_(content::TestBrowserThreadBundle::REAL_DB_THREAD | | 101 : thread_bundle_(content::TestBrowserThreadBundle::REAL_DB_THREAD | |
| 101 content::TestBrowserThreadBundle::REAL_FILE_THREAD | | 102 content::TestBrowserThreadBundle::REAL_FILE_THREAD | |
| (...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 profile_->GetPrefs()->ClearPref(sync_driver::prefs::kSyncHasSetupCompleted); | 587 profile_->GetPrefs()->ClearPref(sync_driver::prefs::kSyncHasSetupCompleted); |
| 587 | 588 |
| 588 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); | 589 EXPECT_CALL(observer_, OnStateChanged()).Times(AnyNumber()); |
| 589 sync_->Initialize(); | 590 sync_->Initialize(); |
| 590 | 591 |
| 591 sync_->SetSetupInProgress(true); | 592 sync_->SetSetupInProgress(true); |
| 592 IssueTestTokens(account_id); | 593 IssueTestTokens(account_id); |
| 593 sync_->SetSetupInProgress(false); | 594 sync_->SetSetupInProgress(false); |
| 594 EXPECT_FALSE(sync_->IsSyncActive()); | 595 EXPECT_FALSE(sync_->IsSyncActive()); |
| 595 } | 596 } |
| OLD | NEW |