OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ |
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include "base/basictypes.h" | |
10 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/macros.h" |
11 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
12 #include "components/keyed_service/core/keyed_service.h" | 12 #include "components/keyed_service/core/keyed_service.h" |
13 #include "google_apis/gaia/google_service_auth_error.h" | 13 #include "google_apis/gaia/google_service_auth_error.h" |
14 | 14 |
15 // Keep track of auth errors and expose them to observers in the UI. Services | 15 // Keep track of auth errors and expose them to observers in the UI. Services |
16 // that wish to expose auth errors to the user should register an | 16 // that wish to expose auth errors to the user should register an |
17 // AuthStatusProvider to report their current authentication state, and should | 17 // AuthStatusProvider to report their current authentication state, and should |
18 // invoke AuthStatusChanged() when their authentication state may have changed. | 18 // invoke AuthStatusChanged() when their authentication state may have changed. |
19 class SigninErrorController : public KeyedService { | 19 class SigninErrorController : public KeyedService { |
20 public: | 20 public: |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 // The auth error detected the last time AuthStatusChanged() was invoked (or | 71 // The auth error detected the last time AuthStatusChanged() was invoked (or |
72 // NONE if AuthStatusChanged() has never been invoked). | 72 // NONE if AuthStatusChanged() has never been invoked). |
73 GoogleServiceAuthError auth_error_; | 73 GoogleServiceAuthError auth_error_; |
74 | 74 |
75 base::ObserverList<Observer, false> observer_list_; | 75 base::ObserverList<Observer, false> observer_list_; |
76 | 76 |
77 DISALLOW_COPY_AND_ASSIGN(SigninErrorController); | 77 DISALLOW_COPY_AND_ASSIGN(SigninErrorController); |
78 }; | 78 }; |
79 | 79 |
80 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ | 80 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_SIGNIN_ERROR_CONTROLLER_H_ |
OLD | NEW |