| 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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 #include "extensions/common/manifest_handlers/shared_module_info.h" | 133 #include "extensions/common/manifest_handlers/shared_module_info.h" |
| 134 #include "extensions/common/permissions/permissions_data.h" | 134 #include "extensions/common/permissions/permissions_data.h" |
| 135 #include "extensions/common/switches.h" | 135 #include "extensions/common/switches.h" |
| 136 #include "grit/generated_resources.h" | 136 #include "grit/generated_resources.h" |
| 137 #include "grit/ui_resources.h" | 137 #include "grit/ui_resources.h" |
| 138 #include "net/base/mime_util.h" | 138 #include "net/base/mime_util.h" |
| 139 #include "net/cookies/canonical_cookie.h" | 139 #include "net/cookies/canonical_cookie.h" |
| 140 #include "net/cookies/cookie_options.h" | 140 #include "net/cookies/cookie_options.h" |
| 141 #include "net/ssl/ssl_cert_request_info.h" | 141 #include "net/ssl/ssl_cert_request_info.h" |
| 142 #include "ppapi/host/ppapi_host.h" | 142 #include "ppapi/host/ppapi_host.h" |
| 143 #include "ppapi/shared_impl/ppapi_switches.h" |
| 143 #include "ui/base/l10n/l10n_util.h" | 144 #include "ui/base/l10n/l10n_util.h" |
| 144 #include "ui/base/resource/resource_bundle.h" | 145 #include "ui/base/resource/resource_bundle.h" |
| 145 #include "ui/message_center/message_center_util.h" | 146 #include "ui/message_center/message_center_util.h" |
| 146 #include "webkit/browser/fileapi/external_mount_points.h" | 147 #include "webkit/browser/fileapi/external_mount_points.h" |
| 147 #include "webkit/common/webpreferences.h" | 148 #include "webkit/common/webpreferences.h" |
| 148 | 149 |
| 149 #if defined(OS_WIN) | 150 #if defined(OS_WIN) |
| 150 #include "chrome/browser/chrome_browser_main_win.h" | 151 #include "chrome/browser/chrome_browser_main_win.h" |
| 151 #include "sandbox/win/src/sandbox_policy.h" | 152 #include "sandbox/win/src/sandbox_policy.h" |
| 152 #elif defined(OS_MACOSX) | 153 #elif defined(OS_MACOSX) |
| (...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2648 // from the renderer to the browser. | 2649 // from the renderer to the browser. |
| 2649 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, | 2650 return IsExtensionOrSharedModuleWhitelisted(url, extension_set, |
| 2650 allowed_file_handle_origins_) || | 2651 allowed_file_handle_origins_) || |
| 2651 IsHostAllowedByCommandLine(url, extension_set, | 2652 IsHostAllowedByCommandLine(url, extension_set, |
| 2652 switches::kAllowNaClFileHandleAPI); | 2653 switches::kAllowNaClFileHandleAPI); |
| 2653 #else | 2654 #else |
| 2654 return false; | 2655 return false; |
| 2655 #endif | 2656 #endif |
| 2656 } | 2657 } |
| 2657 | 2658 |
| 2659 bool ChromeContentBrowserClient::IsPluginAllowedToUseDevChannelAPIs() { |
| 2660 #if defined(ENABLE_PLUGINS) |
| 2661 // Allow access for tests. |
| 2662 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 2663 switches::kEnablePepperTesting)) { |
| 2664 return true; |
| 2665 } |
| 2666 |
| 2667 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 2668 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
| 2669 #else |
| 2670 return false; |
| 2671 #endif |
| 2672 } |
| 2673 |
| 2674 |
| 2658 } // namespace chrome | 2675 } // namespace chrome |
| OLD | NEW |