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

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

Issue 8493026: Revert r108760 / reland r108744, r108753 w/ fix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename plugin list accessor to plugin_list() 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/gview_request_interceptor_unittest.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
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "chrome/browser/sidebar/sidebar_manager.h" 54 #include "chrome/browser/sidebar/sidebar_manager.h"
55 #include "chrome/browser/status_icons/status_tray.h" 55 #include "chrome/browser/status_icons/status_tray.h"
56 #include "chrome/browser/tab_closeable_state_watcher.h" 56 #include "chrome/browser/tab_closeable_state_watcher.h"
57 #include "chrome/browser/tab_contents/thumbnail_generator.h" 57 #include "chrome/browser/tab_contents/thumbnail_generator.h"
58 #include "chrome/browser/ui/browser_list.h" 58 #include "chrome/browser/ui/browser_list.h"
59 #include "chrome/browser/web_resource/gpu_blacklist_updater.h" 59 #include "chrome/browser/web_resource/gpu_blacklist_updater.h"
60 #include "chrome/common/chrome_constants.h" 60 #include "chrome/common/chrome_constants.h"
61 #include "chrome/common/chrome_notification_types.h" 61 #include "chrome/common/chrome_notification_types.h"
62 #include "chrome/common/chrome_paths.h" 62 #include "chrome/common/chrome_paths.h"
63 #include "chrome/common/chrome_switches.h" 63 #include "chrome/common/chrome_switches.h"
64 #include "chrome/common/default_plugin.h"
65 #include "chrome/common/extensions/extension_l10n_util.h" 64 #include "chrome/common/extensions/extension_l10n_util.h"
66 #include "chrome/common/extensions/extension_resource.h" 65 #include "chrome/common/extensions/extension_resource.h"
67 #include "chrome/common/json_pref_store.h" 66 #include "chrome/common/json_pref_store.h"
68 #include "chrome/common/pref_names.h" 67 #include "chrome/common/pref_names.h"
69 #include "chrome/common/switch_utils.h" 68 #include "chrome/common/switch_utils.h"
70 #include "chrome/common/url_constants.h" 69 #include "chrome/common/url_constants.h"
71 #include "chrome/installer/util/google_update_constants.h" 70 #include "chrome/installer/util/google_update_constants.h"
72 #include "content/browser/browser_child_process_host.h" 71 #include "content/browser/browser_child_process_host.h"
73 #include "content/browser/browser_process_sub_thread.h" 72 #include "content/browser/browser_process_sub_thread.h"
74 #include "content/browser/child_process_security_policy.h" 73 #include "content/browser/child_process_security_policy.h"
75 #include "content/browser/debugger/devtools_manager.h" 74 #include "content/browser/debugger/devtools_manager.h"
76 #include "content/browser/download/download_file_manager.h" 75 #include "content/browser/download/download_file_manager.h"
77 #include "content/browser/download/download_status_updater.h" 76 #include "content/browser/download/download_status_updater.h"
78 #include "content/browser/download/mhtml_generation_manager.h" 77 #include "content/browser/download/mhtml_generation_manager.h"
79 #include "content/browser/download/save_file_manager.h" 78 #include "content/browser/download/save_file_manager.h"
80 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 79 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
81 #include "content/browser/net/browser_online_state_observer.h" 80 #include "content/browser/net/browser_online_state_observer.h"
82 #include "content/browser/plugin_service.h" 81 #include "content/browser/plugin_service.h"
83 #include "content/browser/renderer_host/render_process_host.h" 82 #include "content/browser/renderer_host/render_process_host.h"
84 #include "content/browser/renderer_host/resource_dispatcher_host.h" 83 #include "content/browser/renderer_host/resource_dispatcher_host.h"
85 #include "content/public/browser/browser_thread.h" 84 #include "content/public/browser/browser_thread.h"
86 #include "content/public/browser/notification_details.h" 85 #include "content/public/browser/notification_details.h"
87 #include "content/public/common/url_fetcher.h" 86 #include "content/public/common/url_fetcher.h"
88 #include "ipc/ipc_logging.h" 87 #include "ipc/ipc_logging.h"
89 #include "net/socket/client_socket_pool_manager.h" 88 #include "net/socket/client_socket_pool_manager.h"
90 #include "net/url_request/url_request_context_getter.h" 89 #include "net/url_request/url_request_context_getter.h"
91 #include "ui/base/clipboard/clipboard.h" 90 #include "ui/base/clipboard/clipboard.h"
92 #include "ui/base/l10n/l10n_util.h" 91 #include "ui/base/l10n/l10n_util.h"
93 #include "webkit/plugins/npapi/plugin_list.h"
94 92
95 #if defined(OS_WIN) 93 #if defined(OS_WIN)
96 #include "views/focus/view_storage.h" 94 #include "views/focus/view_storage.h"
97 #elif defined(OS_MACOSX) 95 #elif defined(OS_MACOSX)
98 #include "chrome/browser/chrome_browser_main_mac.h" 96 #include "chrome/browser/chrome_browser_main_mac.h"
99 #endif 97 #endif
100 98
101 #if defined(IPC_MESSAGE_LOG_ENABLED) 99 #if defined(IPC_MESSAGE_LOG_ENABLED)
102 #include "content/common/child_process_messages.h" 100 #include "content/common/child_process_messages.h"
103 #endif 101 #endif
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 created_io_thread_ = true; 783 created_io_thread_ = true;
786 784
787 // 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
788 // 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
789 // 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
790 // invoke the io_thread() accessor. 788 // invoke the io_thread() accessor.
791 PluginService* plugin_service = PluginService::GetInstance(); 789 PluginService* plugin_service = PluginService::GetInstance();
792 plugin_service->set_filter(ChromePluginServiceFilter::GetInstance()); 790 plugin_service->set_filter(ChromePluginServiceFilter::GetInstance());
793 plugin_service->StartWatchingPlugins(); 791 plugin_service->StartWatchingPlugins();
794 792
795 // Add the Chrome specific plugins.
796 chrome::RegisterInternalDefaultPlugin();
797
798 // Register the internal Flash if available. 793 // Register the internal Flash if available.
799 FilePath path; 794 FilePath path;
800 if (!CommandLine::ForCurrentProcess()->HasSwitch( 795 if (!CommandLine::ForCurrentProcess()->HasSwitch(
801 switches::kDisableInternalFlash) && 796 switches::kDisableInternalFlash) &&
802 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { 797 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) {
803 webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path); 798 plugin_service->AddExtraPluginPath(path);
804 } 799 }
805 800
806 #if defined(OS_POSIX) 801 #if defined(OS_POSIX)
807 // Also find plugins in a user-specific plugins dir, 802 // Also find plugins in a user-specific plugins dir,
808 // e.g. ~/.config/chromium/Plugins. 803 // e.g. ~/.config/chromium/Plugins.
809 FilePath user_data_dir; 804 FilePath user_data_dir;
810 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { 805 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) {
811 webkit::npapi::PluginList::Singleton()->AddExtraPluginDir( 806 plugin_service->AddExtraPluginPath(user_data_dir.Append("Plugins"));
812 user_data_dir.Append("Plugins"));
813 } 807 }
814 #endif 808 #endif
815 809
816 scoped_ptr<IOThread> thread(new IOThread( 810 scoped_ptr<IOThread> thread(new IOThread(
817 local_state(), net_log_.get(), extension_event_router_forwarder_.get())); 811 local_state(), net_log_.get(), extension_event_router_forwarder_.get()));
818 base::Thread::Options options; 812 base::Thread::Options options;
819 options.message_loop_type = MessageLoop::TYPE_IO; 813 options.message_loop_type = MessageLoop::TYPE_IO;
820 if (!thread->StartWithOptions(options)) 814 if (!thread->StartWithOptions(options))
821 return; 815 return;
822 io_thread_.swap(thread); 816 io_thread_.swap(thread);
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
1154 } 1148 }
1155 1149
1156 void BrowserProcessImpl::OnAutoupdateTimer() { 1150 void BrowserProcessImpl::OnAutoupdateTimer() {
1157 if (CanAutorestartForUpdate()) { 1151 if (CanAutorestartForUpdate()) {
1158 DLOG(WARNING) << "Detected update. Restarting browser."; 1152 DLOG(WARNING) << "Detected update. Restarting browser.";
1159 RestartBackgroundInstance(); 1153 RestartBackgroundInstance();
1160 } 1154 }
1161 } 1155 }
1162 1156
1163 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1157 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/gview_request_interceptor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698