| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/shell/browser/shell_content_browser_client.h" | 5 #include "content/shell/browser/shell_content_browser_client.h" |
| 6 | 6 |
| 7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 return shell_browser_context->CreateRequestContextForStoragePartition( | 176 return shell_browser_context->CreateRequestContextForStoragePartition( |
| 177 partition_path, | 177 partition_path, |
| 178 in_memory, | 178 in_memory, |
| 179 protocol_handlers, | 179 protocol_handlers, |
| 180 request_interceptors.Pass()); | 180 request_interceptors.Pass()); |
| 181 } | 181 } |
| 182 | 182 |
| 183 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { | 183 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { |
| 184 if (!url.is_valid()) | 184 if (!url.is_valid()) |
| 185 return false; | 185 return false; |
| 186 DCHECK_EQ(url.scheme(), base::StringToLowerASCII(url.scheme())); | |
| 187 // Keep in sync with ProtocolHandlers added by | 186 // Keep in sync with ProtocolHandlers added by |
| 188 // ShellURLRequestContextGetter::GetURLRequestContext(). | 187 // ShellURLRequestContextGetter::GetURLRequestContext(). |
| 189 static const char* const kProtocolList[] = { | 188 static const char* const kProtocolList[] = { |
| 190 url::kBlobScheme, | 189 url::kBlobScheme, |
| 191 url::kFileSystemScheme, | 190 url::kFileSystemScheme, |
| 192 kChromeUIScheme, | 191 kChromeUIScheme, |
| 193 kChromeDevToolsScheme, | 192 kChromeDevToolsScheme, |
| 194 url::kDataScheme, | 193 url::kDataScheme, |
| 195 url::kFileScheme, | 194 url::kFileScheme, |
| 196 }; | 195 }; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 ShellBrowserContext* | 407 ShellBrowserContext* |
| 409 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 408 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 410 BrowserContext* content_browser_context) { | 409 BrowserContext* content_browser_context) { |
| 411 if (content_browser_context == browser_context()) | 410 if (content_browser_context == browser_context()) |
| 412 return browser_context(); | 411 return browser_context(); |
| 413 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 412 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 414 return off_the_record_browser_context(); | 413 return off_the_record_browser_context(); |
| 415 } | 414 } |
| 416 | 415 |
| 417 } // namespace content | 416 } // namespace content |
| OLD | NEW |