1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_SYNC_OBSERVER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_SYNC_OBSERVER_H_
10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h"
12 #include "chrome/browser/sync/profile_sync_service_observer.h"
13 #include "components/browser_context_keyed_service/browser_context_keyed_service.h"
19 // This class is responsible for detecting authentication problems reported
20 // by sync service and
21 class AuthSyncObserver
: public BrowserContextKeyedService
,
22 public ProfileSyncServiceObserver
{
24 explicit AuthSyncObserver(Profile
* user_profile
);
25 virtual ~AuthSyncObserver();
27 void StartObserving();
30 friend class AuthSyncObserverFactory
;
32 // BrowserContextKeyedService implementation.
33 virtual void Shutdown() OVERRIDE
;
35 // ProfileSyncServiceObserver implementation.
36 virtual void OnStateChanged() OVERRIDE
;
40 DISALLOW_COPY_AND_ASSIGN(AuthSyncObserver
);
43 } // namespace chromeos
45 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_SYNC_OBSERVER_H_