Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 104673003: Pepper: Send dev/canary channel status to plugins. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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;
bbudge 2013/12/11 18:32:18 I think the direction of the inequality should be
2669 #else
2670 return false;
2671 #endif
2672 }
2673
2674
2658 } // namespace chrome 2675 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.h ('k') | content/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698