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

Unified Diff: content/shell/shell_content_browser_client.cc

Issue 11931024: Removed static factories for data, ftp, file, and about jobs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync (r198785) Created 7 years, 7 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 | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_url_request_context_getter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell_content_browser_client.cc
diff --git a/content/shell/shell_content_browser_client.cc b/content/shell/shell_content_browser_client.cc
index d98100908d6edc340eed029ff8b1cdc43824fe5f..54c424a040689d093c28edeab8029b9ed65f9d7f 100644
--- a/content/shell/shell_content_browser_client.cc
+++ b/content/shell/shell_content_browser_client.cc
@@ -13,6 +13,7 @@
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/common/content_switches.h"
+#include "content/public/common/url_constants.h"
#include "content/shell/common/shell_messages.h"
#include "content/shell/common/shell_switches.h"
#include "content/shell/common/webkit_test_helpers.h"
@@ -112,6 +113,27 @@ ShellContentBrowserClient::CreateRequestContextForStoragePartition(
partition_path, in_memory, protocol_handlers);
}
+bool ShellContentBrowserClient::IsHandledURL(const GURL& url) {
+ if (!url.is_valid())
+ return false;
+ DCHECK_EQ(url.scheme(), StringToLowerASCII(url.scheme()));
+ // Keep in sync with ProtocolHandlers added by
+ // ShellURLRequestContextGetter::GetURLRequestContext().
+ static const char* const kProtocolList[] = {
+ chrome::kBlobScheme,
+ chrome::kFileSystemScheme,
+ chrome::kChromeUIScheme,
+ chrome::kChromeDevToolsScheme,
+ chrome::kDataScheme,
+ chrome::kFileScheme,
+ };
+ for (size_t i = 0; i < arraysize(kProtocolList); ++i) {
+ if (url.scheme() == kProtocolList[i])
+ return true;
+ }
+ return false;
+}
+
void ShellContentBrowserClient::AppendExtraCommandLineSwitches(
CommandLine* command_line, int child_process_id) {
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
« no previous file with comments | « content/shell/shell_content_browser_client.h ('k') | content/shell/shell_url_request_context_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698