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

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: @vabr and @bauerb comments addressed 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..c48116957c8ddb63dfa655fd625c2025d34ef6b6
--- /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.
+// Needs to be called by the embedder before using ContentSettingsPattern.
+// |scheme| can't be NULL, and the pointed string must remain alive until the
blundell 2014/08/26 09:16:57 Is there a reason not to have a global variable in
vasilii 2014/08/26 12:18:19 The reason for that is we dislike global objects w
Bernhard Bauer 2014/08/26 12:32:08 FWIW, you could still leak the string at shutdown
+// Chrome terminates.
+void SetNonWildcardDomainNonPortScheme(const char* scheme);
+
+// Compares |scheme| against the scheme set by the embedder.
+bool IsNonWildcardDomainNonPortScheme(const std::string& scheme);
blundell 2014/08/26 09:16:57 is this function used outside of ContentSettingsPa
vasilii 2014/08/26 12:18:18 In content_settings_pattern_parser.cc. I see that
blundell 2014/08/26 12:21:38 Hmm, is the usage in the latter two files the same
vasilii 2014/08/27 11:39:32 Removed the files.
+
+} // namespace content_settings
+#endif // COMPONENTS_CONTENT_SETTINGS_CORE_COMMON_EMBEDDER_VARIABLES_H_

Powered by Google App Engine
This is Rietveld 408576698