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

Side by Side Diff: chrome/browser/chromeos/login/auth_prewarmer.h

Issue 22264004: Remove ConnectivityStateHelper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 4 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 2013 The Chromium Authors. All rights reserved. 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 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_CHROMEOS_LOGIN_AUTH_PREWARMER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PREWARMER_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PREWARMER_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PREWARMER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "chrome/browser/chromeos/net/connectivity_state_helper_observer.h" 10 #include "chromeos/network/network_state_handler_observer.h"
11 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
12 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
13 13
14 namespace net { 14 namespace net {
15 class URLRequestContextGetter; 15 class URLRequestContextGetter;
16 } // namespace net 16 } // namespace net
17 17
18 namespace chromeos { 18 namespace chromeos {
19 19
20 // Class for prewarming authentication network connection. 20 // Class for prewarming authentication network connection.
21 class AuthPrewarmer : public ConnectivityStateHelperObserver, 21 class AuthPrewarmer : public NetworkStateHandlerObserver,
22 public content::NotificationObserver { 22 public content::NotificationObserver {
23 public: 23 public:
24 AuthPrewarmer(); 24 AuthPrewarmer();
25 virtual ~AuthPrewarmer(); 25 virtual ~AuthPrewarmer();
26 26
27 void PrewarmAuthentication(const base::Closure& completion_callback); 27 void PrewarmAuthentication(const base::Closure& completion_callback);
28 28
29 private: 29 private:
30 // chromeos::ConnectivityStateHelperObserver overrides. 30 // chromeos::NetworkStateHandlerObserver overrides.
31 virtual void NetworkManagerChanged() OVERRIDE; 31 virtual void NetworkManagerChanged() OVERRIDE;
32 virtual void DefaultNetworkChanged() OVERRIDE; 32 virtual void DefaultNetworkChanged() OVERRIDE;
33 33
34 // content::NotificationObserver overrides. 34 // content::NotificationObserver overrides.
35 virtual void Observe(int type, 35 virtual void Observe(int type,
36 const content::NotificationSource& source, 36 const content::NotificationSource& source,
37 const content::NotificationDetails& details) OVERRIDE; 37 const content::NotificationDetails& details) OVERRIDE;
38 38
39 bool IsNetworkConnected() const; 39 bool IsNetworkConnected() const;
40 net::URLRequestContextGetter* GetRequestContext() const; 40 net::URLRequestContextGetter* GetRequestContext() const;
41 void DoPrewarm(); 41 void DoPrewarm();
42 42
43 content::NotificationRegistrar registrar_; 43 content::NotificationRegistrar registrar_;
44 base::Closure completion_callback_; 44 base::Closure completion_callback_;
45 bool doing_prewarm_; 45 bool doing_prewarm_;
46 46
47 DISALLOW_COPY_AND_ASSIGN(AuthPrewarmer); 47 DISALLOW_COPY_AND_ASSIGN(AuthPrewarmer);
48 }; 48 };
49 49
50 } // namespace chromeos 50 } // namespace chromeos
51 51
52 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PREWARMER_H_ 52 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTH_PREWARMER_H_
53 53
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698