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

Unified Diff: chrome/common/content_settings.h

Issue 541813002: Componentize chrome/common/content_settings files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GN fix 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
« no previous file with comments | « chrome/common/common_param_traits_macros.h ('k') | chrome/common/content_settings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/content_settings.h
diff --git a/chrome/common/content_settings.h b/chrome/common/content_settings.h
deleted file mode 100644
index 7ab2ca1209c95e807880fa8df713dae816fa26fd..0000000000000000000000000000000000000000
--- a/chrome/common/content_settings.h
+++ /dev/null
@@ -1,76 +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_COMMON_CONTENT_SETTINGS_H_
-#define CHROME_COMMON_CONTENT_SETTINGS_H_
-
-#include <string>
-#include <vector>
-
-#include "components/content_settings/core/common/content_settings_pattern.h"
-
-// Different settings that can be assigned for a particular content type. We
-// give the user the ability to set these on a global and per-origin basis.
-enum ContentSetting {
- CONTENT_SETTING_DEFAULT = 0,
- CONTENT_SETTING_ALLOW,
- CONTENT_SETTING_BLOCK,
- CONTENT_SETTING_ASK,
- CONTENT_SETTING_SESSION_ONLY,
- CONTENT_SETTING_NUM_SETTINGS
-};
-
-// Range-checked conversion of an int to a ContentSetting, for use when reading
-// prefs off disk.
-ContentSetting IntToContentSetting(int content_setting);
-
-struct ContentSettingPatternSource {
- ContentSettingPatternSource(const ContentSettingsPattern& primary_pattern,
- const ContentSettingsPattern& secondary_patttern,
- ContentSetting setting,
- const std::string& source,
- bool incognito);
- ContentSettingPatternSource();
- ContentSettingsPattern primary_pattern;
- ContentSettingsPattern secondary_pattern;
- ContentSetting setting;
- std::string source;
- bool incognito;
-};
-
-typedef std::vector<ContentSettingPatternSource> ContentSettingsForOneType;
-
-struct RendererContentSettingRules {
- RendererContentSettingRules();
- ~RendererContentSettingRules();
- ContentSettingsForOneType image_rules;
- ContentSettingsForOneType script_rules;
-};
-
-namespace content_settings {
-
-// Enum containing the various source for content settings. Settings can be
-// set by policy, extension or the user. Certain (internal) schemes are
-// whilelisted. For whilelisted schemes the source is
-// |SETTING_SOURCE_WHITELIST|.
-enum SettingSource {
- SETTING_SOURCE_NONE,
- SETTING_SOURCE_POLICY,
- SETTING_SOURCE_EXTENSION,
- SETTING_SOURCE_USER,
- SETTING_SOURCE_WHITELIST,
-};
-
-// |SettingInfo| provides meta data for content setting values. |source|
-// contains the source of a value. |primary_pattern| and |secondary_pattern|
-// contains the patterns of the appling rule.
-struct SettingInfo {
- SettingSource source;
- ContentSettingsPattern primary_pattern;
- ContentSettingsPattern secondary_pattern;
-};
-
-} // namespace content_settings
-
-#endif // CHROME_COMMON_CONTENT_SETTINGS_H_
« no previous file with comments | « chrome/common/common_param_traits_macros.h ('k') | chrome/common/content_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698