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

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

Issue 7477044: Use PluginPrefs in ChromePluginServiceFilter to check whether a plugin is enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/file_util.h" 12 #include "base/file_util.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/synchronization/waitable_event.h" 14 #include "base/synchronization/waitable_event.h"
15 #include "base/task.h" 15 #include "base/task.h"
16 #include "base/threading/thread.h" 16 #include "base/threading/thread.h"
17 #include "base/threading/thread_restrictions.h" 17 #include "base/threading/thread_restrictions.h"
18 #include "chrome/browser/automation/automation_provider_list.h" 18 #include "chrome/browser/automation/automation_provider_list.h"
19 #include "chrome/browser/background/background_mode_manager.h" 19 #include "chrome/browser/background/background_mode_manager.h"
20 #include "chrome/browser/browser_main.h" 20 #include "chrome/browser/browser_main.h"
21 #include "chrome/browser/browser_process_sub_thread.h" 21 #include "chrome/browser/browser_process_sub_thread.h"
22 #include "chrome/browser/browser_trial.h" 22 #include "chrome/browser/browser_trial.h"
23 #include "chrome/browser/chrome_plugin_service_filter.h"
23 #include "chrome/browser/component_updater/component_updater_configurator.h" 24 #include "chrome/browser/component_updater/component_updater_configurator.h"
24 #include "chrome/browser/component_updater/component_updater_service.h" 25 #include "chrome/browser/component_updater/component_updater_service.h"
25 #include "chrome/browser/debugger/devtools_protocol_handler.h" 26 #include "chrome/browser/debugger/devtools_protocol_handler.h"
26 #include "chrome/browser/debugger/remote_debugging_server.h" 27 #include "chrome/browser/debugger/remote_debugging_server.h"
27 #include "chrome/browser/download/download_file_manager.h" 28 #include "chrome/browser/download/download_file_manager.h"
28 #include "chrome/browser/extensions/extension_event_router_forwarder.h" 29 #include "chrome/browser/extensions/extension_event_router_forwarder.h"
29 #include "chrome/browser/extensions/extension_tab_id_map.h" 30 #include "chrome/browser/extensions/extension_tab_id_map.h"
30 #include "chrome/browser/extensions/user_script_listener.h" 31 #include "chrome/browser/extensions/user_script_listener.h"
31 #include "chrome/browser/first_run/upgrade_util.h" 32 #include "chrome/browser/first_run/upgrade_util.h"
32 #include "chrome/browser/google/google_url_tracker.h" 33 #include "chrome/browser/google/google_url_tracker.h"
(...skipping 694 matching lines...) Expand 10 before | Expand all | Expand 10 after
727 } 728 }
728 729
729 void BrowserProcessImpl::CreateIOThread() { 730 void BrowserProcessImpl::CreateIOThread() {
730 DCHECK(!created_io_thread_ && io_thread_.get() == NULL); 731 DCHECK(!created_io_thread_ && io_thread_.get() == NULL);
731 created_io_thread_ = true; 732 created_io_thread_ = true;
732 733
733 // Prior to starting the io thread, we create the plugin service as 734 // Prior to starting the io thread, we create the plugin service as
734 // it is predominantly used from the io thread, but must be created 735 // it is predominantly used from the io thread, but must be created
735 // on the main thread. The service ctor is inexpensive and does not 736 // on the main thread. The service ctor is inexpensive and does not
736 // invoke the io_thread() accessor. 737 // invoke the io_thread() accessor.
737 PluginService::GetInstance(); 738 PluginService::GetInstance()->set_filter(
739 ChromePluginServiceFilter::GetInstance());
738 740
739 // Add the Chrome specific plugins. 741 // Add the Chrome specific plugins.
740 chrome::RegisterInternalDefaultPlugin(); 742 chrome::RegisterInternalDefaultPlugin();
741 743
742 // Register the internal Flash if available. 744 // Register the internal Flash if available.
743 FilePath path; 745 FilePath path;
744 if (!CommandLine::ForCurrentProcess()->HasSwitch( 746 if (!CommandLine::ForCurrentProcess()->HasSwitch(
745 switches::kDisableInternalFlash) && 747 switches::kDisableInternalFlash) &&
746 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { 748 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
747 webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); 749 webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 } 1120 }
1119 1121
1120 void BrowserProcessImpl::OnAutoupdateTimer() { 1122 void BrowserProcessImpl::OnAutoupdateTimer() {
1121 if (CanAutorestartForUpdate()) { 1123 if (CanAutorestartForUpdate()) {
1122 DLOG(WARNING) << "Detected update. Restarting browser."; 1124 DLOG(WARNING) << "Detected update. Restarting browser.";
1123 RestartPersistentInstance(); 1125 RestartPersistentInstance();
1124 } 1126 }
1125 } 1127 }
1126 1128
1127 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1129 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698