Index: chrome/browser/content_settings/content_settings_usages_state.h |
diff --git a/chrome/browser/geolocation/geolocation_settings_state.h b/chrome/browser/content_settings/content_settings_usages_state.h |
similarity index 67% |
rename from chrome/browser/geolocation/geolocation_settings_state.h |
rename to chrome/browser/content_settings/content_settings_usages_state.h |
index c5f994897c61ed392273a365dbf30530a0994a3e..0b82aeea764c830d6e1babe483c48755bb9fb48d 100644 |
--- a/chrome/browser/geolocation/geolocation_settings_state.h |
+++ b/chrome/browser/content_settings/content_settings_usages_state.h |
@@ -1,14 +1,15 @@ |
-// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_ |
-#define CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_ |
+#ifndef CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_USAGES_STATE_H_ |
+#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_USAGES_STATE_H_ |
#include <map> |
#include <set> |
#include "chrome/common/content_settings.h" |
+#include "chrome/common/content_settings_types.h" |
#include "url/gurl.h" |
class Profile; |
@@ -17,12 +18,12 @@ namespace content { |
struct LoadCommittedDetails; |
} |
-// This class manages the geolocation state per tab, and provides information |
-// and presentation data about the geolocation usage. |
-class GeolocationSettingsState { |
+// This class manages a content setting state per tab, and provides information |
bulach
2013/07/18 08:56:50
nit: perhaps "per tab for a given |ContentSettings
Takashi Toyoshima
2013/07/22 12:59:18
Done.
|
+// and presentation data about a content setting usage. |
+class ContentSettingsUsagesState { |
public: |
- explicit GeolocationSettingsState(Profile* profile); |
- virtual ~GeolocationSettingsState(); |
+ ContentSettingsUsagesState(Profile* profile, ContentSettingsType type); |
+ virtual ~ContentSettingsUsagesState(); |
typedef std::map<GURL, ContentSetting> StateMap; |
const StateMap& state_map() const { |
@@ -30,7 +31,7 @@ class GeolocationSettingsState { |
} |
// Sets the state for |requesting_origin|. |
- void OnGeolocationPermissionSet(const GURL& requesting_origin, bool allowed); |
+ void OnPermissionSet(const GURL& requesting_origin, bool allowed); |
// Delegated by WebContents to indicate a navigation has happened and we |
// may need to clear our settings. |
@@ -62,10 +63,11 @@ class GeolocationSettingsState { |
std::string GURLToFormattedHost(const GURL& url) const; |
Profile* profile_; |
+ ContentSettingsType type_; |
StateMap state_map_; |
GURL embedder_url_; |
- DISALLOW_COPY_AND_ASSIGN(GeolocationSettingsState); |
+ DISALLOW_COPY_AND_ASSIGN(ContentSettingsUsagesState); |
}; |
-#endif // CHROME_BROWSER_GEOLOCATION_GEOLOCATION_SETTINGS_STATE_H_ |
+#endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_USAGES_STATE_H_ |