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

Unified Diff: content/public/browser/url_data_source.h

Issue 11896113: Add chrome-search: access from Instant overlay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Charlie's comments. Created 7 years, 10 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: content/public/browser/url_data_source.h
diff --git a/content/public/browser/url_data_source.h b/content/public/browser/url_data_source.h
index 7d8847cf0e3ff9853bbd999934e6c9a768b17e98..fbb8eaf6ea50d9195b307397d6b2bc8e9e79b415 100644
--- a/content/public/browser/url_data_source.h
+++ b/content/public/browser/url_data_source.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
-#define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
+#ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
+#define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
#include <string>
@@ -16,6 +16,10 @@ namespace base {
class RefCountedMemory;
}
+namespace net {
+class URLRequest;
+}
+
namespace content {
class BrowserContext;
@@ -95,8 +99,13 @@ class CONTENT_EXPORT URLDataSource {
// By default, the "X-Frame-Options: DENY" header is sent. To stop this from
// happening, return false. It is OK to return false as needed.
virtual bool ShouldDenyXFrameOptions() const;
+
+ // By default, only chrome: and chrome-devtools: requests are allowed.
+ // Override in specific data sources to enable for additional schemes or to
+ // implement fancier access control.
+ virtual bool ShouldServiceRequest(const net::URLRequest* request) const;
};
} // namespace content
-#endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_DELEGATE_H_
+#endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698