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

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

Issue 11577031: Exclude more plugins code for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 local_state_->RegisterBooleanPref(prefs::kRestartSwitchMode, false); 769 local_state_->RegisterBooleanPref(prefs::kRestartSwitchMode, false);
770 #endif 770 #endif
771 } 771 }
772 772
773 void BrowserProcessImpl::PreCreateThreads() { 773 void BrowserProcessImpl::PreCreateThreads() {
774 io_thread_.reset(new IOThread(local_state(), policy_service(), net_log_.get(), 774 io_thread_.reset(new IOThread(local_state(), policy_service(), net_log_.get(),
775 extension_event_router_forwarder_.get())); 775 extension_event_router_forwarder_.get()));
776 } 776 }
777 777
778 void BrowserProcessImpl::PreMainMessageLoopRun() { 778 void BrowserProcessImpl::PreMainMessageLoopRun() {
779 #if defined(ENABLE_PLUGINS)
779 PluginService* plugin_service = PluginService::GetInstance(); 780 PluginService* plugin_service = PluginService::GetInstance();
780 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); 781 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance());
781 plugin_service->StartWatchingPlugins(); 782 plugin_service->StartWatchingPlugins();
782 783
783 // Register the internal Flash if available. 784 // Register the internal Flash if available.
784 FilePath path; 785 FilePath path;
785 if (!CommandLine::ForCurrentProcess()->HasSwitch( 786 if (!CommandLine::ForCurrentProcess()->HasSwitch(
786 switches::kDisableInternalFlash) && 787 switches::kDisableInternalFlash) &&
787 PathService::Get(chrome::FILE_FLASH_PLUGIN_EXISTING, &path)) { 788 PathService::Get(chrome::FILE_FLASH_PLUGIN_EXISTING, &path)) {
788 plugin_service->AddExtraPluginPath(path); 789 plugin_service->AddExtraPluginPath(path);
(...skipping 11 matching lines...) Expand all
800 } 801 }
801 802
802 #if defined(OS_POSIX) 803 #if defined(OS_POSIX)
803 // Also find plugins in a user-specific plugins dir, 804 // Also find plugins in a user-specific plugins dir,
804 // e.g. ~/.config/chromium/Plugins. 805 // e.g. ~/.config/chromium/Plugins.
805 FilePath user_data_dir; 806 FilePath user_data_dir;
806 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { 807 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
807 plugin_service->AddExtraPluginDir(user_data_dir.Append("Plugins")); 808 plugin_service->AddExtraPluginDir(user_data_dir.Append("Plugins"));
808 } 809 }
809 #endif 810 #endif
811 #endif // defined(ENABLE_PLUGINS)
810 812
811 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) 813 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled))
812 ApplyDefaultBrowserPolicy(); 814 ApplyDefaultBrowserPolicy();
813 815
814 // Triggers initialization of the singleton instance on UI thread. 816 // Triggers initialization of the singleton instance on UI thread.
815 PluginFinder::GetInstance()->Init(); 817 PluginFinder::GetInstance()->Init();
816 818
817 #if defined(ENABLE_PLUGIN_INSTALLATION) 819 #if defined(ENABLE_PLUGIN_INSTALLATION)
818 if (!plugins_resource_service_) { 820 if (!plugins_resource_service_) {
819 plugins_resource_service_ = new PluginsResourceService(local_state()); 821 plugins_resource_service_ = new PluginsResourceService(local_state());
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 } 967 }
966 968
967 void BrowserProcessImpl::OnAutoupdateTimer() { 969 void BrowserProcessImpl::OnAutoupdateTimer() {
968 if (CanAutorestartForUpdate()) { 970 if (CanAutorestartForUpdate()) {
969 DLOG(WARNING) << "Detected update. Restarting browser."; 971 DLOG(WARNING) << "Detected update. Restarting browser.";
970 RestartBackgroundInstance(); 972 RestartBackgroundInstance();
971 } 973 }
972 } 974 }
973 975
974 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 976 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_service.cc » ('j') | content/browser/plugin_service_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698