| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 using breakpad::IsCrashReporterEnabled; | 258 using breakpad::IsCrashReporterEnabled; |
| 259 #endif | 259 #endif |
| 260 | 260 |
| 261 namespace { | 261 namespace { |
| 262 | 262 |
| 263 // Cached version of the locale so we can return the locale on the I/O | 263 // Cached version of the locale so we can return the locale on the I/O |
| 264 // thread. | 264 // thread. |
| 265 base::LazyInstance<std::string> g_io_thread_application_locale; | 265 base::LazyInstance<std::string> g_io_thread_application_locale; |
| 266 | 266 |
| 267 #if defined(ENABLE_PLUGINS) | 267 #if defined(ENABLE_PLUGINS) |
| 268 const char* kPredefinedAllowedFileHandleOrigins[] = { |
| 269 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/234789 |
| 270 "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see crbug.com/234789 |
| 271 }; |
| 272 |
| 268 const char* kPredefinedAllowedSocketOrigins[] = { | 273 const char* kPredefinedAllowedSocketOrigins[] = { |
| 269 "okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client | 274 "okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client |
| 270 "pnhechapfaindjhompbnflcldabbghjo", // HTerm App (SSH Client) | 275 "pnhechapfaindjhompbnflcldabbghjo", // HTerm App (SSH Client) |
| 271 "bglhmjfplikpjnfoegeomebmfnkjomhe", // see crbug.com/122126 | 276 "bglhmjfplikpjnfoegeomebmfnkjomhe", // see crbug.com/122126 |
| 272 "gbchcmhmhahfdphkhkmpfmihenigjmpp", // Chrome Remote Desktop | 277 "gbchcmhmhahfdphkhkmpfmihenigjmpp", // Chrome Remote Desktop |
| 273 "kgngmbheleoaphbjbaiobfdepmghbfah", // Pre-release Chrome Remote Desktop | 278 "kgngmbheleoaphbjbaiobfdepmghbfah", // Pre-release Chrome Remote Desktop |
| 274 "odkaodonbgfohohmklejpjiejmcipmib", // Dogfood Chrome Remote Desktop | 279 "odkaodonbgfohohmklejpjiejmcipmib", // Dogfood Chrome Remote Desktop |
| 275 "ojoimpklfciegopdfgeenehpalipignm", // Chromoting canary | 280 "ojoimpklfciegopdfgeenehpalipignm", // Chromoting canary |
| 276 "cbkkbcmdlboombapidmoeolnmdacpkch", // see crbug.com/129089 | 281 "cbkkbcmdlboombapidmoeolnmdacpkch", // see crbug.com/129089 |
| 277 "hhnbmknkdabfoieppbbljkhkfjcmcbjh", // see crbug.com/134099 | 282 "hhnbmknkdabfoieppbbljkhkfjcmcbjh", // see crbug.com/134099 |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params); | 599 SingleTabModeTabHelper::FromWebContents(web_contents)->HandleOpenUrl(params); |
| 595 } | 600 } |
| 596 #endif // defined(OS_ANDROID) | 601 #endif // defined(OS_ANDROID) |
| 597 | 602 |
| 598 } // namespace | 603 } // namespace |
| 599 | 604 |
| 600 namespace chrome { | 605 namespace chrome { |
| 601 | 606 |
| 602 ChromeContentBrowserClient::ChromeContentBrowserClient() { | 607 ChromeContentBrowserClient::ChromeContentBrowserClient() { |
| 603 #if defined(ENABLE_PLUGINS) | 608 #if defined(ENABLE_PLUGINS) |
| 609 for (size_t i = 0; i < arraysize(kPredefinedAllowedFileHandleOrigins); ++i) |
| 610 allowed_file_handle_origins_.insert(kPredefinedAllowedFileHandleOrigins[i]); |
| 604 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) | 611 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) |
| 605 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); | 612 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); |
| 606 #endif | 613 #endif |
| 607 | 614 |
| 608 permissions_policy_delegate_.reset( | 615 permissions_policy_delegate_.reset( |
| 609 new extensions::BrowserPermissionsPolicyDelegate()); | 616 new extensions::BrowserPermissionsPolicyDelegate()); |
| 610 } | 617 } |
| 611 | 618 |
| 612 ChromeContentBrowserClient::~ChromeContentBrowserClient() { | 619 ChromeContentBrowserClient::~ChromeContentBrowserClient() { |
| 613 } | 620 } |
| (...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2609 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2616 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
| 2610 allowed_file_handle_origins_) || | 2617 allowed_file_handle_origins_) || |
| 2611 IsHostAllowedByCommandLine(url, extension_set, | 2618 IsHostAllowedByCommandLine(url, extension_set, |
| 2612 switches::kAllowNaClFileHandleAPI); | 2619 switches::kAllowNaClFileHandleAPI); |
| 2613 #else | 2620 #else |
| 2614 return false; | 2621 return false; |
| 2615 #endif | 2622 #endif |
| 2616 } | 2623 } |
| 2617 | 2624 |
| 2618 } // namespace chrome | 2625 } // namespace chrome |
| OLD | NEW |