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

Unified Diff: content/browser/host_zoom_map.h

Issue 7058003: Take out pref watching from HostZoomMap, in preparation of removing Profile from it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/host_zoom_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/host_zoom_map.h
===================================================================
--- content/browser/host_zoom_map.h (revision 86148)
+++ content/browser/host_zoom_map.h (working copy)
@@ -16,13 +16,11 @@
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h"
-#include "chrome/browser/prefs/pref_change_registrar.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_observer.h"
#include "content/common/notification_registrar.h"
class GURL;
-class PrefService;
class Profile;
// HostZoomMap needs to be deleted on the UI thread because it listens
@@ -34,8 +32,6 @@
public:
explicit HostZoomMap(Profile* profile);
- static void RegisterUserPrefs(PrefService* prefs);
-
// Returns the zoom level for a given url. The zoom level is determined by
// the host portion of the URL, or (in the absence of a host) the complete
// spec of the URL. In most cases, there is no custom zoom level, and this
@@ -73,6 +69,8 @@
const NotificationSource& source,
const NotificationDetails& details);
+ void set_default_zoom_level(double level) { default_zoom_level_ = level; }
+
private:
friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
friend class DeleteTask<HostZoomMap>;
@@ -81,13 +79,6 @@
~HostZoomMap();
- // Reads the zoom levels from the preferences service.
- void Load();
-
- // Removes dependencies on the profile so we can live longer than
- // the profile without crashing.
- void Shutdown();
-
// The profile we're associated with.
Profile* profile_;
@@ -109,12 +100,7 @@
// |temporary_zoom_levels_| to guarantee thread safety.
mutable base::Lock lock_;
- // Whether we are currently updating preferences, this is used to ignore
- // notifications from the preference service that we triggered ourself.
- bool updating_preferences_;
-
NotificationRegistrar registrar_;
- PrefChangeRegistrar pref_change_registrar_;
DISALLOW_COPY_AND_ASSIGN(HostZoomMap);
};
« no previous file with comments | « chrome/chrome_tests.gypi ('k') | content/browser/host_zoom_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698