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

Side by Side Diff: chrome/browser/chrome_to_mobile_service.h

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_
6 #define CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ 6 #define CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <queue> 9 #include <queue>
10 #include <set> 10 #include <set>
(...skipping 25 matching lines...) Expand all
36 namespace net { 36 namespace net {
37 class URLFetcher; 37 class URLFetcher;
38 } 38 }
39 39
40 namespace user_prefs { 40 namespace user_prefs {
41 class PrefRegistrySyncable; 41 class PrefRegistrySyncable;
42 } 42 }
43 43
44 // ChromeToMobileService connects to the cloud print service to enumerate 44 // ChromeToMobileService connects to the cloud print service to enumerate
45 // compatible mobiles owned by its profile and send URLs and MHTML snapshots. 45 // compatible mobiles owned by its profile and send URLs and MHTML snapshots.
46 class ChromeToMobileService : public ProfileKeyedService, 46 class ChromeToMobileService : public BrowserContextKeyedService,
47 public net::URLFetcherDelegate, 47 public net::URLFetcherDelegate,
48 public content::NotificationObserver, 48 public content::NotificationObserver,
49 public OAuth2AccessTokenConsumer, 49 public OAuth2AccessTokenConsumer,
50 public syncer::InvalidationHandler { 50 public syncer::InvalidationHandler {
51 public: 51 public:
52 class Observer { 52 class Observer {
53 public: 53 public:
54 Observer(); 54 Observer();
55 virtual ~Observer(); 55 virtual ~Observer();
56 56
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 Browser* browser, 127 Browser* browser,
128 base::WeakPtr<Observer> observer); 128 base::WeakPtr<Observer> observer);
129 129
130 // Delete the snapshot file (should be called on observer destruction). 130 // Delete the snapshot file (should be called on observer destruction).
131 // Virtual for unit test mocking. 131 // Virtual for unit test mocking.
132 virtual void DeleteSnapshot(const base::FilePath& snapshot); 132 virtual void DeleteSnapshot(const base::FilePath& snapshot);
133 133
134 // Opens the "Learn More" help article link in the supplied |browser|. 134 // Opens the "Learn More" help article link in the supplied |browser|.
135 void LearnMore(Browser* browser) const; 135 void LearnMore(Browser* browser) const;
136 136
137 // ProfileKeyedService method. 137 // BrowserContextKeyedService method.
138 virtual void Shutdown() OVERRIDE; 138 virtual void Shutdown() OVERRIDE;
139 139
140 // net::URLFetcherDelegate method. 140 // net::URLFetcherDelegate method.
141 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE; 141 virtual void OnURLFetchComplete(const net::URLFetcher* source) OVERRIDE;
142 142
143 // content::NotificationObserver method. 143 // content::NotificationObserver method.
144 virtual void Observe(int type, 144 virtual void Observe(int type,
145 const content::NotificationSource& source, 145 const content::NotificationSource& source,
146 const content::NotificationDetails& details) OVERRIDE; 146 const content::NotificationDetails& details) OVERRIDE;
147 147
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_; 228 base::OneShotTimer<ChromeToMobileService> auth_retry_timer_;
229 base::OneShotTimer<ChromeToMobileService> search_retry_timer_; 229 base::OneShotTimer<ChromeToMobileService> search_retry_timer_;
230 230
231 // A queue of tasks to perform after an access token is lazily initialized. 231 // A queue of tasks to perform after an access token is lazily initialized.
232 std::queue<base::Closure> task_queue_; 232 std::queue<base::Closure> task_queue_;
233 233
234 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService); 234 DISALLOW_COPY_AND_ASSIGN(ChromeToMobileService);
235 }; 235 };
236 236
237 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_ 237 #endif // CHROME_BROWSER_CHROME_TO_MOBILE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698