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

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

Issue 6475011: Implemented policy to disable plugin finder. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Finished the policy implementation. Created 9 years, 10 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 | 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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 safe_browsing::ClientSideDetectionService* 542 safe_browsing::ClientSideDetectionService*
543 BrowserProcessImpl::safe_browsing_detection_service() { 543 BrowserProcessImpl::safe_browsing_detection_service() {
544 DCHECK(CalledOnValidThread()); 544 DCHECK(CalledOnValidThread());
545 if (!created_safe_browsing_detection_service_) { 545 if (!created_safe_browsing_detection_service_) {
546 CreateSafeBrowsingDetectionService(); 546 CreateSafeBrowsingDetectionService();
547 } 547 }
548 return safe_browsing_detection_service_.get(); 548 return safe_browsing_detection_service_.get();
549 } 549 }
550 550
551 bool BrowserProcessImpl::disable_plugin_finder_pref() const {
552 return *disable_plugin_finder_pref_;
553 }
554
551 void BrowserProcessImpl::CheckForInspectorFiles() { 555 void BrowserProcessImpl::CheckForInspectorFiles() {
552 file_thread()->message_loop()->PostTask 556 file_thread()->message_loop()->PostTask
553 (FROM_HERE, 557 (FROM_HERE,
554 NewRunnableMethod(this, &BrowserProcessImpl::DoInspectorFilesCheck)); 558 NewRunnableMethod(this, &BrowserProcessImpl::DoInspectorFilesCheck));
555 } 559 }
556 560
557 void BrowserProcessImpl::Observe(NotificationType type, 561 void BrowserProcessImpl::Observe(NotificationType type,
558 const NotificationSource& source, 562 const NotificationSource& source,
559 const NotificationDetails& details) { 563 const NotificationDetails& details) {
560 if (type == NotificationType::APP_TERMINATING) { 564 if (type == NotificationType::APP_TERMINATING) {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 print_job_manager_.get()); 761 print_job_manager_.get());
758 762
759 // Initialize the notification for the default browser setting policy. 763 // Initialize the notification for the default browser setting policy.
760 local_state_->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, 764 local_state_->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled,
761 false); 765 false);
762 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) { 766 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) {
763 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) 767 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled))
764 ShellIntegration::SetAsDefaultBrowser(); 768 ShellIntegration::SetAsDefaultBrowser();
765 } 769 }
766 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); 770 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this);
771
772 // Initilialize the preference for the plugin finder policy.
773 // This preference is only needed on the IO thread so make it available there.
774 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false);
775 disable_plugin_finder_pref_.Init(prefs::kDisablePluginFinder,
776 local_state_.get(), NULL);
777 disable_plugin_finder_pref_.MoveToThread(BrowserThread::IO);
767 } 778 }
768 779
769 void BrowserProcessImpl::CreateIconManager() { 780 void BrowserProcessImpl::CreateIconManager() {
770 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); 781 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL);
771 created_icon_manager_ = true; 782 created_icon_manager_ = true;
772 icon_manager_.reset(new IconManager); 783 icon_manager_.reset(new IconManager);
773 } 784 }
774 785
775 void BrowserProcessImpl::CreateDevToolsManager() { 786 void BrowserProcessImpl::CreateDevToolsManager() {
776 DCHECK(devtools_manager_.get() == NULL); 787 DCHECK(devtools_manager_.get() == NULL);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
947 } 958 }
948 959
949 void BrowserProcessImpl::OnAutoupdateTimer() { 960 void BrowserProcessImpl::OnAutoupdateTimer() {
950 if (CanAutorestartForUpdate()) { 961 if (CanAutorestartForUpdate()) {
951 DLOG(WARNING) << "Detected update. Restarting browser."; 962 DLOG(WARNING) << "Detected update. Restarting browser.";
952 RestartPersistentInstance(); 963 RestartPersistentInstance();
953 } 964 }
954 } 965 }
955 966
956 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 967 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698