| 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_global_error.h" | 5 #include "chrome/browser/sync/sync_global_error.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 // Overridden from LoginUIService::LoginUI: | 48 // Overridden from LoginUIService::LoginUI: |
| 49 void FocusUI() override { ++focus_ui_call_count_; } | 49 void FocusUI() override { ++focus_ui_call_count_; } |
| 50 | 50 |
| 51 int focus_ui_call_count_; | 51 int focus_ui_call_count_; |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 std::unique_ptr<KeyedService> BuildMockLoginUIService( | 54 std::unique_ptr<KeyedService> BuildMockLoginUIService( |
| 55 content::BrowserContext* profile) { | 55 content::BrowserContext* profile) { |
| 56 return base::WrapUnique(new FakeLoginUIService()); | 56 return base::MakeUnique<FakeLoginUIService>(); |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to | 59 // Same as BrowserWithTestWindowTest, but uses MockBrowser to test calls to |
| 60 // ExecuteCommand method. | 60 // ExecuteCommand method. |
| 61 class SyncGlobalErrorTest : public BrowserWithTestWindowTest { | 61 class SyncGlobalErrorTest : public BrowserWithTestWindowTest { |
| 62 public: | 62 public: |
| 63 SyncGlobalErrorTest() {} | 63 SyncGlobalErrorTest() {} |
| 64 ~SyncGlobalErrorTest() override {} | 64 ~SyncGlobalErrorTest() override {} |
| 65 | 65 |
| 66 void SetUp() override { | 66 void SetUp() override { |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 .WillRepeatedly(Return(true)); | 165 .WillRepeatedly(Return(true)); |
| 166 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) | 166 EXPECT_CALL(service, IsPassphraseRequiredForDecryption()) |
| 167 .WillRepeatedly(Return(true)); | 167 .WillRepeatedly(Return(true)); |
| 168 VerifySyncGlobalErrorResult( | 168 VerifySyncGlobalErrorResult( |
| 169 &service, login_ui_service, browser(), &error, &global_error, | 169 &service, login_ui_service, browser(), &error, &global_error, |
| 170 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, | 170 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS, |
| 171 false /* not signed in */, false /* no error */); | 171 false /* not signed in */, false /* no error */); |
| 172 | 172 |
| 173 global_error.Shutdown(); | 173 global_error.Shutdown(); |
| 174 } | 174 } |
| OLD | NEW |