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

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

Issue 1862513003: Remove NPAPI from browser and utility (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) 1019 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled))
1020 ApplyDefaultBrowserPolicy(); 1020 ApplyDefaultBrowserPolicy();
1021 1021
1022 #if !defined(OS_ANDROID) 1022 #if !defined(OS_ANDROID)
1023 ApplyMetricsReportingPolicy(); 1023 ApplyMetricsReportingPolicy();
1024 #endif 1024 #endif
1025 1025
1026 #if defined(ENABLE_PLUGINS) 1026 #if defined(ENABLE_PLUGINS)
1027 PluginService* plugin_service = PluginService::GetInstance(); 1027 PluginService* plugin_service = PluginService::GetInstance();
1028 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance()); 1028 plugin_service->SetFilter(ChromePluginServiceFilter::GetInstance());
1029 plugin_service->StartWatchingPlugins();
1030
1031 #if defined(OS_POSIX)
1032 // Also find plugins in a user-specific plugins dir,
1033 // e.g. ~/.config/chromium/Plugins.
1034 const base::CommandLine& cmd_line = *base::CommandLine::ForCurrentProcess();
1035 if (!cmd_line.HasSwitch(switches::kDisablePluginsDiscovery)) {
1036 base::FilePath user_data_dir;
1037 if (PathService::Get(chrome::DIR_USER_DATA, &user_data_dir))
1038 plugin_service->AddExtraPluginDir(user_data_dir.Append("Plugins"));
1039 }
1040 #endif
1041 1029
1042 // Triggers initialization of the singleton instance on UI thread. 1030 // Triggers initialization of the singleton instance on UI thread.
1043 PluginFinder::GetInstance()->Init(); 1031 PluginFinder::GetInstance()->Init();
1044 1032
1045 #if defined(ENABLE_PLUGIN_INSTALLATION) 1033 #if defined(ENABLE_PLUGIN_INSTALLATION)
1046 DCHECK(!plugins_resource_service_.get()); 1034 DCHECK(!plugins_resource_service_.get());
1047 plugins_resource_service_.reset(new PluginsResourceService(local_state())); 1035 plugins_resource_service_.reset(new PluginsResourceService(local_state()));
1048 plugins_resource_service_->Init(); 1036 plugins_resource_service_->Init();
1049 #endif 1037 #endif
1050 #endif // defined(ENABLE_PLUGINS) 1038 #endif // defined(ENABLE_PLUGINS)
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1289 }
1302 1290
1303 void BrowserProcessImpl::OnAutoupdateTimer() { 1291 void BrowserProcessImpl::OnAutoupdateTimer() {
1304 if (CanAutorestartForUpdate()) { 1292 if (CanAutorestartForUpdate()) {
1305 DLOG(WARNING) << "Detected update. Restarting browser."; 1293 DLOG(WARNING) << "Detected update. Restarting browser.";
1306 RestartBackgroundInstance(); 1294 RestartBackgroundInstance();
1307 } 1295 }
1308 } 1296 }
1309 1297
1310 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1298 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698