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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // tests are unaffected, but STATUS_CASE_AUTHENTICATING can't exist in both | 183 // tests are unaffected, but STATUS_CASE_AUTHENTICATING can't exist in both |
184 // versions, so it we will require two separate tests, one using SigninManager | 184 // versions, so it we will require two separate tests, one using SigninManager |
185 // and one using SigninManagerBase (which require different setup procedures. | 185 // and one using SigninManagerBase (which require different setup procedures. |
186 class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase { | 186 class FakeSigninManagerForSyncUIUtilTest : public FakeSigninManagerBase { |
187 public: | 187 public: |
188 explicit FakeSigninManagerForSyncUIUtilTest(Profile* profile) | 188 explicit FakeSigninManagerForSyncUIUtilTest(Profile* profile) |
189 : FakeSigninManagerBase( | 189 : FakeSigninManagerBase( |
190 ChromeSigninClientFactory::GetForProfile(profile), | 190 ChromeSigninClientFactory::GetForProfile(profile), |
191 AccountTrackerServiceFactory::GetForProfile(profile)), | 191 AccountTrackerServiceFactory::GetForProfile(profile)), |
192 auth_in_progress_(false) { | 192 auth_in_progress_(false) { |
193 Initialize(NULL); | 193 Initialize(nullptr); |
194 } | 194 } |
195 | 195 |
196 ~FakeSigninManagerForSyncUIUtilTest() override {} | 196 ~FakeSigninManagerForSyncUIUtilTest() override {} |
197 | 197 |
198 bool AuthInProgress() const override { return auth_in_progress_; } | 198 bool AuthInProgress() const override { return auth_in_progress_; } |
199 | 199 |
200 void set_auth_in_progress() { | 200 void set_auth_in_progress() { |
201 auth_in_progress_ = true; | 201 auth_in_progress_ = true; |
202 } | 202 } |
203 | 203 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 // from previous one. | 432 // from previous one. |
433 status.sync_protocol_error.action = syncer::UPGRADE_CLIENT; | 433 status.sync_protocol_error.action = syncer::UPGRADE_CLIENT; |
434 EXPECT_CALL(service, QueryDetailedSyncStatus(_)) | 434 EXPECT_CALL(service, QueryDetailedSyncStatus(_)) |
435 .WillOnce(DoAll(SetArgPointee<0>(status), Return(true))); | 435 .WillOnce(DoAll(SetArgPointee<0>(status), Return(true))); |
436 base::string16 upgrade_client_status_label; | 436 base::string16 upgrade_client_status_label; |
437 sync_ui_util::GetStatusLabels(profile.get(), &service, *signin, | 437 sync_ui_util::GetStatusLabels(profile.get(), &service, *signin, |
438 sync_ui_util::PLAIN_TEXT, | 438 sync_ui_util::PLAIN_TEXT, |
439 &upgrade_client_status_label, &link_label); | 439 &upgrade_client_status_label, &link_label); |
440 EXPECT_NE(unrecoverable_error_status_label, upgrade_client_status_label); | 440 EXPECT_NE(unrecoverable_error_status_label, upgrade_client_status_label); |
441 } | 441 } |
OLD | NEW |