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

Unified Diff: components/content_settings/core/common/embedder_variables.h

Issue 440423003: Clean content_settings_pattern_parser.* from unnecessary dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix CrOS tests Created 6 years, 4 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: components/content_settings/core/common/embedder_variables.h
diff --git a/components/content_settings/core/common/embedder_variables.h b/components/content_settings/core/common/embedder_variables.h
new file mode 100644
index 0000000000000000000000000000000000000000..a093b7524561d569915b2d0d31c2f9c9ec6cb9d0
--- /dev/null
+++ b/components/content_settings/core/common/embedder_variables.h
@@ -0,0 +1,24 @@
+// Copyright (c) 2014 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 COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_EMBEDDER_VARIABLES_H_
+#define COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_EMBEDDER_VARIABLES_H_
+
+#include <string>
+
+#include "base/macros.h"
+
+namespace content_settings {
+
+// Sets the scheme that doesn't support domain wildcard and port (that is,
+// extensions::kExtensionScheme).
Bernhard Bauer 2014/08/18 15:55:13 It's a bit weird to assume there is only ever goin
vasilii 2014/08/20 08:44:06 We don't need this complexity now. The implementat
vabr (Chromium) 2014/08/20 09:52:22 I support the API accepting a single scheme as not
vasilii 2014/08/21 14:58:02 Done.
+// Should be called by the embedder before using ContentSettingsPattern. The
+// caller is responsible for the lifetime of |scheme|.
+void SetNonPortScheme(const char* scheme);
+
+// Compares |scheme| against embedder's extension scheme.
+bool IsNonPortScheme(const std::string& scheme);
+
+} // namespace content_settings
+#endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_EMBEDDER_VARIABLES_H_

Powered by Google App Engine
This is Rietveld 408576698