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

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

Issue 8493019: Refactor PluginService to take PluginList as a dependency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment Created 9 years, 1 month 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) 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
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 780
781 void BrowserProcessImpl::CreateIOThread() { 781 void BrowserProcessImpl::CreateIOThread() {
782 DCHECK(!created_io_thread_ && io_thread_.get() == NULL); 782 DCHECK(!created_io_thread_ && io_thread_.get() == NULL);
783 created_io_thread_ = true; 783 created_io_thread_ = true;
784 784
785 // Prior to starting the io thread, we create the plugin service as 785 // Prior to starting the io thread, we create the plugin service as
786 // it is predominantly used from the io thread, but must be created 786 // it is predominantly used from the io thread, but must be created
787 // on the main thread. The service ctor is inexpensive and does not 787 // on the main thread. The service ctor is inexpensive and does not
788 // invoke the io_thread() accessor. 788 // invoke the io_thread() accessor.
789 PluginService* plugin_service = PluginService::GetInstance(); 789 PluginService* plugin_service = PluginService::GetInstance();
790 plugin_service->Init();
790 plugin_service->set_filter(ChromePluginServiceFilter::GetInstance()); 791 plugin_service->set_filter(ChromePluginServiceFilter::GetInstance());
791 plugin_service->StartWatchingPlugins(); 792 plugin_service->StartWatchingPlugins();
792 793
793 // Register the internal Flash if available. 794 // Register the internal Flash if available.
794 FilePath path; 795 FilePath path;
795 if (!CommandLine::ForCurrentProcess()->HasSwitch( 796 if (!CommandLine::ForCurrentProcess()->HasSwitch(
796 switches::kDisableInternalFlash) && 797 switches::kDisableInternalFlash) &&
797 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { 798 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
798 plugin_service->AddExtraPluginPath(path); 799 plugin_service->AddExtraPluginPath(path);
799 } 800 }
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 } 1150 }
1150 1151
1151 void BrowserProcessImpl::OnAutoupdateTimer() { 1152 void BrowserProcessImpl::OnAutoupdateTimer() {
1152 if (CanAutorestartForUpdate()) { 1153 if (CanAutorestartForUpdate()) {
1153 DLOG(WARNING) << "Detected update. Restarting browser."; 1154 DLOG(WARNING) << "Detected update. Restarting browser.";
1154 RestartBackgroundInstance(); 1155 RestartBackgroundInstance();
1155 } 1156 }
1156 } 1157 }
1157 1158
1158 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1159 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | content/browser/plugin_loader_posix.cc » ('j') | content/browser/plugin_service.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698