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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 using extensions::Manifest; | 255 using extensions::Manifest; |
256 using message_center::NotifierId; | 256 using message_center::NotifierId; |
257 | 257 |
258 namespace { | 258 namespace { |
259 | 259 |
260 // Cached version of the locale so we can return the locale on the I/O | 260 // Cached version of the locale so we can return the locale on the I/O |
261 // thread. | 261 // thread. |
262 base::LazyInstance<std::string> g_io_thread_application_locale; | 262 base::LazyInstance<std::string> g_io_thread_application_locale; |
263 | 263 |
264 #if defined(ENABLE_PLUGINS) | 264 #if defined(ENABLE_PLUGINS) |
| 265 const char* kPredefinedAllowedFileHandleOrigins[] = { |
| 266 "6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F", // see crbug.com/234789 |
| 267 "4EB74897CB187C7633357C2FE832E0AD6A44883A" // see crbug.com/234789 |
| 268 }; |
| 269 |
265 const char* kPredefinedAllowedSocketOrigins[] = { | 270 const char* kPredefinedAllowedSocketOrigins[] = { |
266 "okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client | 271 "okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client |
267 "pnhechapfaindjhompbnflcldabbghjo", // HTerm App (SSH Client) | 272 "pnhechapfaindjhompbnflcldabbghjo", // HTerm App (SSH Client) |
268 "bglhmjfplikpjnfoegeomebmfnkjomhe", // see crbug.com/122126 | 273 "bglhmjfplikpjnfoegeomebmfnkjomhe", // see crbug.com/122126 |
269 "gbchcmhmhahfdphkhkmpfmihenigjmpp", // Chrome Remote Desktop | 274 "gbchcmhmhahfdphkhkmpfmihenigjmpp", // Chrome Remote Desktop |
270 "kgngmbheleoaphbjbaiobfdepmghbfah", // Pre-release Chrome Remote Desktop | 275 "kgngmbheleoaphbjbaiobfdepmghbfah", // Pre-release Chrome Remote Desktop |
271 "odkaodonbgfohohmklejpjiejmcipmib", // Dogfood Chrome Remote Desktop | 276 "odkaodonbgfohohmklejpjiejmcipmib", // Dogfood Chrome Remote Desktop |
272 "ojoimpklfciegopdfgeenehpalipignm", // Chromoting canary | 277 "ojoimpklfciegopdfgeenehpalipignm", // Chromoting canary |
273 "cbkkbcmdlboombapidmoeolnmdacpkch", // see crbug.com/129089 | 278 "cbkkbcmdlboombapidmoeolnmdacpkch", // see crbug.com/129089 |
274 "hhnbmknkdabfoieppbbljkhkfjcmcbjh", // see crbug.com/134099 | 279 "hhnbmknkdabfoieppbbljkhkfjcmcbjh", // see crbug.com/134099 |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 } | 622 } |
618 | 623 |
619 #endif // defined(OS_ANDROID) | 624 #endif // defined(OS_ANDROID) |
620 | 625 |
621 } // namespace | 626 } // namespace |
622 | 627 |
623 namespace chrome { | 628 namespace chrome { |
624 | 629 |
625 ChromeContentBrowserClient::ChromeContentBrowserClient() { | 630 ChromeContentBrowserClient::ChromeContentBrowserClient() { |
626 #if defined(ENABLE_PLUGINS) | 631 #if defined(ENABLE_PLUGINS) |
| 632 for (size_t i = 0; i < arraysize(kPredefinedAllowedFileHandleOrigins); ++i) |
| 633 allowed_file_handle_origins_.insert(kPredefinedAllowedFileHandleOrigins[i]); |
627 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) | 634 for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) |
628 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); | 635 allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); |
629 #endif | 636 #endif |
630 | 637 |
631 permissions_policy_delegate_.reset( | 638 permissions_policy_delegate_.reset( |
632 new extensions::BrowserPermissionsPolicyDelegate()); | 639 new extensions::BrowserPermissionsPolicyDelegate()); |
633 } | 640 } |
634 | 641 |
635 ChromeContentBrowserClient::~ChromeContentBrowserClient() { | 642 ChromeContentBrowserClient::~ChromeContentBrowserClient() { |
636 } | 643 } |
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2632 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2639 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
2633 allowed_file_handle_origins_) || | 2640 allowed_file_handle_origins_) || |
2634 IsHostAllowedByCommandLine(url, extension_set, | 2641 IsHostAllowedByCommandLine(url, extension_set, |
2635 switches::kAllowNaClFileHandleAPI); | 2642 switches::kAllowNaClFileHandleAPI); |
2636 #else | 2643 #else |
2637 return false; | 2644 return false; |
2638 #endif | 2645 #endif |
2639 } | 2646 } |
2640 | 2647 |
2641 } // namespace chrome | 2648 } // namespace chrome |
OLD | NEW |