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/signin/signin_tracker.h" | 5 #include "chrome/browser/signin/signin_tracker.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/profiles/profile.h" | 11 #include "chrome/browser/profiles/profile.h" |
11 #include "chrome/browser/signin/fake_auth_status_provider.h" | 12 #include "chrome/browser/signin/fake_auth_status_provider.h" |
12 #include "chrome/browser/signin/fake_signin_manager.h" | 13 #include "chrome/browser/signin/fake_signin_manager.h" |
13 #include "chrome/browser/signin/signin_manager.h" | 14 #include "chrome/browser/signin/signin_manager.h" |
14 #include "chrome/browser/signin/signin_manager_factory.h" | 15 #include "chrome/browser/signin/signin_manager_factory.h" |
15 #include "chrome/browser/signin/token_service.h" | 16 #include "chrome/browser/signin/token_service.h" |
16 #include "chrome/browser/signin/token_service_factory.h" | 17 #include "chrome/browser/signin/token_service_factory.h" |
17 #include "chrome/browser/sync/profile_sync_service_factory.h" | 18 #include "chrome/browser/sync/profile_sync_service_factory.h" |
18 #include "chrome/browser/sync/profile_sync_service_mock.h" | 19 #include "chrome/browser/sync/profile_sync_service_mock.h" |
19 #include "chrome/common/chrome_notification_types.h" | |
20 #include "content/public/browser/notification_service.h" | 20 #include "content/public/browser/notification_service.h" |
21 #include "content/public/test/test_browser_thread_bundle.h" | 21 #include "content/public/test/test_browser_thread_bundle.h" |
22 #include "google_apis/gaia/gaia_constants.h" | 22 #include "google_apis/gaia/gaia_constants.h" |
23 #include "google_apis/gaia/google_service_auth_error.h" | 23 #include "google_apis/gaia/google_service_auth_error.h" |
24 | 24 |
25 #include "testing/gmock/include/gmock/gmock.h" | 25 #include "testing/gmock/include/gmock/gmock.h" |
26 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
27 | 27 |
28 using ::testing::_; | 28 using ::testing::_; |
29 using ::testing::AnyNumber; | 29 using ::testing::AnyNumber; |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 GoogleServiceAuthError error( | 168 GoogleServiceAuthError error( |
169 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); | 169 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); |
170 EXPECT_CALL(observer_, SigninFailed(error)); | 170 EXPECT_CALL(observer_, SigninFailed(error)); |
171 TokenService::TokenRequestFailedDetails failed( | 171 TokenService::TokenRequestFailedDetails failed( |
172 GaiaConstants::kGaiaOAuth2LoginRefreshToken, error); | 172 GaiaConstants::kGaiaOAuth2LoginRefreshToken, error); |
173 content::NotificationService::current()->Notify( | 173 content::NotificationService::current()->Notify( |
174 chrome::NOTIFICATION_TOKEN_REQUEST_FAILED, | 174 chrome::NOTIFICATION_TOKEN_REQUEST_FAILED, |
175 content::Source<TokenService>(mock_token_service_), | 175 content::Source<TokenService>(mock_token_service_), |
176 content::Details<const TokenService::TokenRequestFailedDetails>(&failed)); | 176 content::Details<const TokenService::TokenRequestFailedDetails>(&failed)); |
177 } | 177 } |
OLD | NEW |