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

Side by Side Diff: chrome/browser/plugins/chrome_content_browser_client_plugins_part.cc

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/plugins/chrome_content_browser_client_plugins_part.h" 5 #include "chrome/browser/plugins/chrome_content_browser_client_plugins_part.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/plugins/plugin_info_message_filter.h" 8 #include "chrome/browser/plugins/plugin_info_message_filter.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" 10 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h"
11 #include "chrome/common/channel_info.h"
11 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
12 #include "chrome/common/chrome_version_info.h"
13 #include "chrome/common/pepper_permission_util.h" 13 #include "chrome/common/pepper_permission_util.h"
14 #include "components/version_info/version_info.h"
14 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
15 #include "ppapi/host/ppapi_host.h" 16 #include "ppapi/host/ppapi_host.h"
16 #include "ppapi/shared_impl/ppapi_switches.h" 17 #include "ppapi/shared_impl/ppapi_switches.h"
17 18
18 #if defined(ENABLE_EXTENSIONS) 19 #if defined(ENABLE_EXTENSIONS)
19 #include "chrome/browser/extensions/extension_service.h" 20 #include "chrome/browser/extensions/extension_service.h"
20 #include "extensions/browser/extension_registry.h" 21 #include "extensions/browser/extension_registry.h"
21 #include "extensions/common/constants.h" 22 #include "extensions/common/constants.h"
22 #include "extensions/common/permissions/permissions_data.h" 23 #include "extensions/common/permissions/permissions_data.h"
23 #include "extensions/common/permissions/socket_permission.h" 24 #include "extensions/common/permissions/socket_permission.h"
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 extension_set = 130 extension_set =
130 &extensions::ExtensionRegistry::Get(profile)->enabled_extensions(); 131 &extensions::ExtensionRegistry::Get(profile)->enabled_extensions();
131 } 132 }
132 133
133 // Allow access for whitelisted applications. 134 // Allow access for whitelisted applications.
134 if (chrome::IsExtensionOrSharedModuleWhitelisted( 135 if (chrome::IsExtensionOrSharedModuleWhitelisted(
135 url, extension_set, allowed_dev_channel_origins)) { 136 url, extension_set, allowed_dev_channel_origins)) {
136 return true; 137 return true;
137 } 138 }
138 #endif 139 #endif
139 version_info::Channel channel = chrome::VersionInfo::GetChannel(); 140 version_info::Channel channel = chrome::GetChannel();
140 // Allow dev channel APIs to be used on "Canary", "Dev", and "Unknown" 141 // Allow dev channel APIs to be used on "Canary", "Dev", and "Unknown"
141 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on 142 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on
142 // Chromium builds as well. 143 // Chromium builds as well.
143 return channel <= version_info::Channel::DEV; 144 return channel <= version_info::Channel::DEV;
144 } 145 }
145 146
146 void ChromeContentBrowserClientPluginsPart::DidCreatePpapiPlugin( 147 void ChromeContentBrowserClientPluginsPart::DidCreatePpapiPlugin(
147 content::BrowserPpapiHost* browser_host) { 148 content::BrowserPpapiHost* browser_host) {
148 browser_host->GetPpapiHost()->AddHostFactoryFilter( 149 browser_host->GetPpapiHost()->AddHostFactoryFilter(
149 scoped_ptr<ppapi::host::HostFactory>( 150 scoped_ptr<ppapi::host::HostFactory>(
150 new chrome::ChromeBrowserPepperHostFactory(browser_host))); 151 new chrome::ChromeBrowserPepperHostFactory(browser_host)));
151 } 152 }
152 153
153 } // namespace plugins 154 } // namespace plugins
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698