| 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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 std::string origin = url::Origin(effective_url).Serialize(); | 156 std::string origin = url::Origin(effective_url).Serialize(); |
| 157 return base::MatchPattern(origin, pattern); | 157 return base::MatchPattern(origin, pattern); |
| 158 } | 158 } |
| 159 | 159 |
| 160 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { | 160 bool ShellContentBrowserClient::IsHandledURL(const GURL& url) { |
| 161 if (!url.is_valid()) | 161 if (!url.is_valid()) |
| 162 return false; | 162 return false; |
| 163 // Keep in sync with ProtocolHandlers added by | 163 // Keep in sync with ProtocolHandlers added by |
| 164 // ShellURLRequestContextGetter::GetURLRequestContext(). | 164 // ShellURLRequestContextGetter::GetURLRequestContext(). |
| 165 static const char* const kProtocolList[] = { | 165 static const char* const kProtocolList[] = { |
| 166 url::kBlobScheme, | 166 url::kBlobScheme, url::kFileSystemScheme, kChromeUIScheme, |
| 167 url::kFileSystemScheme, | 167 kChromeDevToolsScheme, url::kDataScheme, url::kFileScheme, |
| 168 kChromeUIScheme, | 168 url::kHttpScheme, url::kHttpsScheme, url::kWsScheme, |
| 169 kChromeDevToolsScheme, | 169 url::kWssScheme, |
| 170 url::kDataScheme, | |
| 171 url::kFileScheme, | |
| 172 }; | 170 }; |
| 173 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { | 171 for (size_t i = 0; i < arraysize(kProtocolList); ++i) { |
| 174 if (url.scheme() == kProtocolList[i]) | 172 if (url.scheme() == kProtocolList[i]) |
| 175 return true; | 173 return true; |
| 176 } | 174 } |
| 177 return false; | 175 return false; |
| 178 } | 176 } |
| 179 | 177 |
| 180 void ShellContentBrowserClient::RegisterInProcessMojoApplications( | 178 void ShellContentBrowserClient::RegisterInProcessMojoApplications( |
| 181 StaticMojoApplicationMap* apps) { | 179 StaticMojoApplicationMap* apps) { |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 ShellBrowserContext* | 348 ShellBrowserContext* |
| 351 ShellContentBrowserClient::off_the_record_browser_context() { | 349 ShellContentBrowserClient::off_the_record_browser_context() { |
| 352 return shell_browser_main_parts_->off_the_record_browser_context(); | 350 return shell_browser_main_parts_->off_the_record_browser_context(); |
| 353 } | 351 } |
| 354 | 352 |
| 355 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() { | 353 AccessTokenStore* ShellContentBrowserClient::CreateAccessTokenStore() { |
| 356 return new ShellAccessTokenStore(browser_context()); | 354 return new ShellAccessTokenStore(browser_context()); |
| 357 } | 355 } |
| 358 | 356 |
| 359 } // namespace content | 357 } // namespace content |
| OLD | NEW |