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

Side by Side Diff: chrome/browser/net/net_pref_observer.h

Issue 7064033: Virtual destructors should have virtual keyword. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/net/net_log_logger.h ('k') | chrome/browser/net/passive_log_collector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_NET_NET_PREF_OBSERVER_H_ 5 #ifndef CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_
6 #define CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ 6 #define CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 // Monitors network-related preferences for changes and applies them. 21 // Monitors network-related preferences for changes and applies them.
22 // The supplied PrefService must outlive this NetPrefObserver. 22 // The supplied PrefService must outlive this NetPrefObserver.
23 // Must be used only on the UI thread. 23 // Must be used only on the UI thread.
24 class NetPrefObserver : public NotificationObserver { 24 class NetPrefObserver : public NotificationObserver {
25 public: 25 public:
26 // |prefs| must be non-NULL and |*prefs| must outlive this. 26 // |prefs| must be non-NULL and |*prefs| must outlive this.
27 // |prerender_manager| may be NULL. If not, |*prerender_manager| must 27 // |prerender_manager| may be NULL. If not, |*prerender_manager| must
28 // outlive this. 28 // outlive this.
29 NetPrefObserver(PrefService* prefs, 29 NetPrefObserver(PrefService* prefs,
30 prerender::PrerenderManager* prerender_manager); 30 prerender::PrerenderManager* prerender_manager);
31 ~NetPrefObserver(); 31 virtual ~NetPrefObserver();
32 32
33 // NotificationObserver 33 // NotificationObserver
34 virtual void Observe(NotificationType type, 34 virtual void Observe(NotificationType type,
35 const NotificationSource& source, 35 const NotificationSource& source,
36 const NotificationDetails& details); 36 const NotificationDetails& details);
37 37
38 static void RegisterPrefs(PrefService* prefs); 38 static void RegisterPrefs(PrefService* prefs);
39 39
40 private: 40 private:
41 // If |pref_name| is NULL, all monitored preferences will be applied. 41 // If |pref_name| is NULL, all monitored preferences will be applied.
42 void ApplySettings(const std::string* pref_name); 42 void ApplySettings(const std::string* pref_name);
43 43
44 BooleanPrefMember network_prediction_enabled_; 44 BooleanPrefMember network_prediction_enabled_;
45 BooleanPrefMember spdy_disabled_; 45 BooleanPrefMember spdy_disabled_;
46 BooleanPrefMember http_throttling_enabled_; 46 BooleanPrefMember http_throttling_enabled_;
47 prerender::PrerenderManager* prerender_manager_; 47 prerender::PrerenderManager* prerender_manager_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(NetPrefObserver); 49 DISALLOW_COPY_AND_ASSIGN(NetPrefObserver);
50 }; 50 };
51 51
52 #endif // CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_ 52 #endif // CHROME_BROWSER_NET_NET_PREF_OBSERVER_H_
53
OLDNEW
« no previous file with comments | « chrome/browser/net/net_log_logger.h ('k') | chrome/browser/net/passive_log_collector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698