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/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 return shell_browser_context->CreateRequestContextForStoragePartition( | 205 return shell_browser_context->CreateRequestContextForStoragePartition( |
206 partition_path, | 206 partition_path, |
207 in_memory, | 207 in_memory, |
208 protocol_handlers, | 208 protocol_handlers, |
209 request_interceptors.Pass()); | 209 request_interceptors.Pass()); |
210 } | 210 } |
211 | 211 |
212 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { | 212 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { |
213 if (!url.is_valid()) | 213 if (!url.is_valid()) |
214 return false; | 214 return false; |
215 DCHECK_EQ(url.scheme(), StringToLowerASCII(url.scheme())); | 215 DCHECK_EQ(url.scheme(), base::StringToLowerASCII(url.scheme())); |
216 // Keep in sync with ProtocolHandlers added by | 216 // Keep in sync with ProtocolHandlers added by |
217 // ShellURLRequestContextGetter::GetURLRequestContext(). | 217 // ShellURLRequestContextGetter::GetURLRequestContext(). |
218 static const char* const kProtocolList[] = { | 218 static const char* const kProtocolList[] = { |
219 url::kBlobScheme, | 219 url::kBlobScheme, |
220 url::kFileSystemScheme, | 220 url::kFileSystemScheme, |
221 kChromeUIScheme, | 221 kChromeUIScheme, |
222 kChromeDevToolsScheme, | 222 kChromeDevToolsScheme, |
223 url::kDataScheme, | 223 url::kDataScheme, |
224 url::kFileScheme, | 224 url::kFileScheme, |
225 }; | 225 }; |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 ShellBrowserContext* | 418 ShellBrowserContext* |
419 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 419 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
420 BrowserContext* content_browser_context) { | 420 BrowserContext* content_browser_context) { |
421 if (content_browser_context == browser_context()) | 421 if (content_browser_context == browser_context()) |
422 return browser_context(); | 422 return browser_context(); |
423 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 423 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
424 return off_the_record_browser_context(); | 424 return off_the_record_browser_context(); |
425 } | 425 } |
426 | 426 |
427 } // namespace content | 427 } // namespace content |
OLD | NEW |