| 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/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { | 175 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { |
| 176 if (!url.is_valid()) | 176 if (!url.is_valid()) |
| 177 return false; | 177 return false; |
| 178 DCHECK_EQ(url.scheme(), StringToLowerASCII(url.scheme())); | 178 DCHECK_EQ(url.scheme(), StringToLowerASCII(url.scheme())); |
| 179 // Keep in sync with ProtocolHandlers added by | 179 // Keep in sync with ProtocolHandlers added by |
| 180 // ShellURLRequestContextGetter::GetURLRequestContext(). | 180 // ShellURLRequestContextGetter::GetURLRequestContext(). |
| 181 static const char* const kProtocolList[] = { | 181 static const char* const kProtocolList[] = { |
| 182 chrome::kBlobScheme, | 182 chrome::kBlobScheme, |
| 183 chrome::kFileSystemScheme, | 183 kFileSystemScheme, |
| 184 chrome::kChromeUIScheme, | 184 chrome::kChromeUIScheme, |
| 185 chrome::kChromeDevToolsScheme, | 185 chrome::kChromeDevToolsScheme, |
| 186 chrome::kDataScheme, | 186 chrome::kDataScheme, |
| 187 chrome::kFileScheme, | 187 chrome::kFileScheme, |
| 188 }; | 188 }; |
| 189 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { | 189 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { |
| 190 if (url.scheme() == kProtocolList[i]) | 190 if (url.scheme() == kProtocolList[i]) |
| 191 return true; | 191 return true; |
| 192 } | 192 } |
| 193 return false; | 193 return false; |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 330 ShellBrowserContext* | 330 ShellBrowserContext* |
| 331 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( | 331 ShellContentBrowserClient::ShellBrowserContextForBrowserContext( |
| 332 BrowserContext* content_browser_context) { | 332 BrowserContext* content_browser_context) { |
| 333 if (content_browser_context == browser_context()) | 333 if (content_browser_context == browser_context()) |
| 334 return browser_context(); | 334 return browser_context(); |
| 335 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); | 335 DCHECK_EQ(content_browser_context, off_the_record_browser_context()); |
| 336 return off_the_record_browser_context(); | 336 return off_the_record_browser_context(); |
| 337 } | 337 } |
| 338 | 338 |
| 339 } // namespace content | 339 } // namespace content |
| OLD | NEW |