Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_sync_observer.h

Issue 2657673004: Add shutdown notification and service refs to SyncServiceObserver. (Closed)
Patch Set: Chromeos fix Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_
6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_ 6 #define CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/sync/driver/sync_service_observer.h" 10 #include "components/sync/driver/sync_service_observer.h"
(...skipping 19 matching lines...) Expand all
30 30
31 protected: 31 protected:
32 // Exposed for testing. 32 // Exposed for testing.
33 ~OneClickSigninSyncObserver() override; 33 ~OneClickSigninSyncObserver() override;
34 34
35 private: 35 private:
36 // content::WebContentsObserver: 36 // content::WebContentsObserver:
37 void WebContentsDestroyed() override; 37 void WebContentsDestroyed() override;
38 38
39 // syncer::SyncServiceObserver: 39 // syncer::SyncServiceObserver:
40 void OnStateChanged() override; 40 void OnStateChanged(syncer::SyncService* sync) override;
41 41
42 // Loads the |continue_url_| in the |web_contents()|. 42 // Loads the |continue_url_| in the |web_contents()|.
43 void LoadContinueUrl(); 43 void LoadContinueUrl();
44 44
45 // Returns the ProfileSyncService associated with the |web_contents|. 45 // Returns the ProfileSyncService associated with the |web_contents|.
46 // The returned value may be NULL. 46 // The returned value may be NULL.
47 browser_sync::ProfileSyncService* GetSyncService( 47 browser_sync::ProfileSyncService* GetSyncService(
48 content::WebContents* web_contents); 48 content::WebContents* web_contents);
49 49
50 // Deletes the |observer|. Intended to be used as a callback for base::Bind. 50 // Deletes the |observer|. Intended to be used as a callback for base::Bind.
51 static void DeleteObserver( 51 static void DeleteObserver(
52 base::WeakPtr<OneClickSigninSyncObserver> observer); 52 base::WeakPtr<OneClickSigninSyncObserver> observer);
53 53
54 // The URL to redirect to once Sync is initialized. 54 // The URL to redirect to once Sync is initialized.
55 const GURL continue_url_; 55 const GURL continue_url_;
56 56
57 base::WeakPtrFactory<OneClickSigninSyncObserver> weak_ptr_factory_; 57 base::WeakPtrFactory<OneClickSigninSyncObserver> weak_ptr_factory_;
58 58
59 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncObserver); 59 DISALLOW_COPY_AND_ASSIGN(OneClickSigninSyncObserver);
60 }; 60 };
61 61
62 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_ 62 #endif // CHROME_BROWSER_UI_SYNC_ONE_CLICK_SIGNIN_SYNC_OBSERVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/app_sync_ui_state.cc ('k') | chrome/browser/ui/sync/one_click_signin_sync_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698