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

Unified Diff: chrome/browser/content_settings/content_settings_details.h

Issue 579673003: Move content_settings_observer.h, content_settings_provider.h, content_settings_rule.* to the compo… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: last comment Created 6 years, 3 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
Index: chrome/browser/content_settings/content_settings_details.h
diff --git a/chrome/browser/content_settings/content_settings_details.h b/chrome/browser/content_settings/content_settings_details.h
deleted file mode 100644
index 9677560fa99f47e3d2e4650cdda62648f9c238ec..0000000000000000000000000000000000000000
--- a/chrome/browser/content_settings/content_settings_details.h
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright (c) 2011 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_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_
-#define CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_
-
-#include <string>
-
-#include "base/basictypes.h"
-#include "components/content_settings/core/common/content_settings.h"
-#include "components/content_settings/core/common/content_settings_pattern.h"
-#include "components/content_settings/core/common/content_settings_types.h"
-
-// Details for the CONTENT_SETTINGS_CHANGED notification. This is sent when
-// content settings change for at least one host. If settings change for more
-// than one pattern in one user interaction, this will usually send a single
-// notification with update_all() returning true instead of one notification
-// for each pattern.
-class ContentSettingsDetails {
- public:
- // Update the setting that matches this pattern/content type/resource.
- ContentSettingsDetails(const ContentSettingsPattern& primary_pattern,
- const ContentSettingsPattern& secondary_pattern,
- ContentSettingsType type,
- const std::string& resource_identifier);
-
- // The item pattern whose settings have changed.
- const ContentSettingsPattern& primary_pattern() const {
- return primary_pattern_;
- }
-
- // The top level frame pattern whose settings have changed.
- const ContentSettingsPattern& secondary_pattern() const {
- return secondary_pattern_;
- }
-
- // True if all settings should be updated for the given type.
- bool update_all() const {
- return primary_pattern_.ToString().empty() &&
- secondary_pattern_.ToString().empty();
- }
-
- // The type of the pattern whose settings have changed.
- ContentSettingsType type() const { return type_; }
-
- // The resource identifier for the settings type that has changed.
- const std::string& resource_identifier() const {
- return resource_identifier_;
- }
-
- // True if all types should be updated. If update_all() is false, this will
- // be false as well (although the reverse does not hold true).
- bool update_all_types() const {
- return CONTENT_SETTINGS_TYPE_DEFAULT == type_;
- }
-
- private:
- ContentSettingsPattern primary_pattern_;
- ContentSettingsPattern secondary_pattern_;
- ContentSettingsType type_;
- std::string resource_identifier_;
-
- DISALLOW_COPY_AND_ASSIGN(ContentSettingsDetails);
-};
-
-#endif // CHROME_BROWSER_CONTENT_SETTINGS_CONTENT_SETTINGS_DETAILS_H_

Powered by Google App Engine
This is Rietveld 408576698