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

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

Issue 11615002: Exclude PluginService for builds with enable_plugins==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.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) 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 local_state_->RegisterBooleanPref(prefs::kRestartSwitchMode, false); 777 local_state_->RegisterBooleanPref(prefs::kRestartSwitchMode, false);
778 #endif 778 #endif
779 } 779 }
780 780
781 void BrowserProcessImpl::PreCreateThreads() { 781 void BrowserProcessImpl::PreCreateThreads() {
782 io_thread_.reset(new IOThread(local_state(), policy_service(), net_log_.get(), 782 io_thread_.reset(new IOThread(local_state(), policy_service(), net_log_.get(),
783 extension_event_router_forwarder_.get())); 783 extension_event_router_forwarder_.get()));
784 } 784 }
785 785
786 void BrowserProcessImpl::PreMainMessageLoopRun() { 786 void BrowserProcessImpl::PreMainMessageLoopRun() {
787 #if defined(ENABLE_PLUGINS)
787 PluginService* plugin_service = PluginService::GetInstance(); 788 PluginService* plugin_service = PluginService::GetInstance();
788 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); 789 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance());
789 plugin_service->StartWatchingPlugins(); 790 plugin_service->StartWatchingPlugins();
790 791
791 // Register the internal Flash if available. 792 // Register the internal Flash if available.
792 FilePath path; 793 FilePath path;
793 if (!CommandLine::ForCurrentProcess()->HasSwitch( 794 if (!CommandLine::ForCurrentProcess()->HasSwitch(
794 switches::kDisableInternalFlash) && 795 switches::kDisableInternalFlash) &&
795 PathService::Get(chrome::FILE_FLASH_PLUGIN_EXISTING, &path)) { 796 PathService::Get(chrome::FILE_FLASH_PLUGIN_EXISTING, &path)) {
796 plugin_service->AddExtraPluginPath(path); 797 plugin_service->AddExtraPluginPath(path);
(...skipping 12 matching lines...) Expand all
809 810
810 #if defined(OS_POSIX) 811 #if defined(OS_POSIX)
811 // Also find plugins in a user-specific plugins dir, 812 // Also find plugins in a user-specific plugins dir,
812 // e.g. ~/.config/chromium/Plugins. 813 // e.g. ~/.config/chromium/Plugins.
813 FilePath user_data_dir; 814 FilePath user_data_dir;
814 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { 815 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
815 plugin_service->AddExtraPluginDir(user_data_dir.Append("Plugins")); 816 plugin_service->AddExtraPluginDir(user_data_dir.Append("Plugins"));
816 } 817 }
817 #endif 818 #endif
818 819
820 #endif // defined(ENABLE_PLUGINS)
821
819 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) 822 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled))
820 ApplyDefaultBrowserPolicy(); 823 ApplyDefaultBrowserPolicy();
821 824
822 // Triggers initialization of the singleton instance on UI thread. 825 // Triggers initialization of the singleton instance on UI thread.
823 PluginFinder::GetInstance()->Init(); 826 PluginFinder::GetInstance()->Init();
824 827
825 #if defined(ENABLE_PLUGIN_INSTALLATION) 828 #if defined(ENABLE_PLUGIN_INSTALLATION)
826 if (!plugins_resource_service_) { 829 if (!plugins_resource_service_) {
827 plugins_resource_service_ = new PluginsResourceService(local_state()); 830 plugins_resource_service_ = new PluginsResourceService(local_state());
828 plugins_resource_service_->StartAfterDelay(); 831 plugins_resource_service_->StartAfterDelay();
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 } 977 }
975 978
976 void BrowserProcessImpl::OnAutoupdateTimer() { 979 void BrowserProcessImpl::OnAutoupdateTimer() {
977 if (CanAutorestartForUpdate()) { 980 if (CanAutorestartForUpdate()) {
978 DLOG(WARNING) << "Detected update. Restarting browser."; 981 DLOG(WARNING) << "Detected update. Restarting browser.";
979 RestartBackgroundInstance(); 982 RestartBackgroundInstance();
980 } 983 }
981 } 984 }
982 985
983 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 986 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698