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 <stddef.h> | 7 #include <stddef.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 // trailing "/", which makes for cleaner wildcard patterns. | 166 // trailing "/", which makes for cleaner wildcard patterns. |
167 return base::MatchPattern(origin.Serialize(), pattern); | 167 return base::MatchPattern(origin.Serialize(), pattern); |
168 } | 168 } |
169 | 169 |
170 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { | 170 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { |
171 if (!url.is_valid()) | 171 if (!url.is_valid()) |
172 return false; | 172 return false; |
173 // Keep in sync with ProtocolHandlers added by | 173 // Keep in sync with ProtocolHandlers added by |
174 // ShellURLRequestContextGetter::GetURLRequestContext(). | 174 // ShellURLRequestContextGetter::GetURLRequestContext(). |
175 static const char* const kProtocolList[] = { | 175 static const char* const kProtocolList[] = { |
176 url::kBlobScheme, | 176 url::kBlobScheme, url::kFileSystemScheme, kChromeUIScheme, |
177 url::kFileSystemScheme, | 177 kChromeDevToolsScheme, url::kDataScheme, url::kFileScheme, |
178 kChromeUIScheme, | 178 url::kHttpScheme, url::kHttpsScheme, url::kWsScheme, |
179 kChromeDevToolsScheme, | 179 url::kWssScheme, |
180 url::kDataScheme, | |
181 url::kFileScheme, | |
182 }; | 180 }; |
183 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { | 181 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { |
184 if (url.scheme() == kProtocolList[i]) | 182 if (url.scheme() == kProtocolList[i]) |
185 return true; | 183 return true; |
186 } | 184 } |
187 return false; | 185 return false; |
188 } | 186 } |
189 | 187 |
190 void ShellContentBrowserClient::RegisterInProcessServices( | 188 void ShellContentBrowserClient::RegisterInProcessServices( |
191 StaticServiceMap* services) { | 189 StaticServiceMap* services) { |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 ShellBrowserContext* ShellContentBrowserClient::browser_context() { | 370 ShellBrowserContext* ShellContentBrowserClient::browser_context() { |
373 return shell_browser_main_parts_->browser_context(); | 371 return shell_browser_main_parts_->browser_context(); |
374 } | 372 } |
375 | 373 |
376 ShellBrowserContext* | 374 ShellBrowserContext* |
377 ShellContentBrowserClient::off_the_record_browser_context() { | 375 ShellContentBrowserClient::off_the_record_browser_context() { |
378 return shell_browser_main_parts_->off_the_record_browser_context(); | 376 return shell_browser_main_parts_->off_the_record_browser_context(); |
379 } | 377 } |
380 | 378 |
381 } // namespace content | 379 } // namespace content |
OLD | NEW |