Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 552 | 552 |
| 553 safe_browsing::ClientSideDetectionService* | 553 safe_browsing::ClientSideDetectionService* |
| 554 BrowserProcessImpl::safe_browsing_detection_service() { | 554 BrowserProcessImpl::safe_browsing_detection_service() { |
| 555 DCHECK(CalledOnValidThread()); | 555 DCHECK(CalledOnValidThread()); |
| 556 if (!created_safe_browsing_detection_service_) { | 556 if (!created_safe_browsing_detection_service_) { |
| 557 CreateSafeBrowsingDetectionService(); | 557 CreateSafeBrowsingDetectionService(); |
| 558 } | 558 } |
| 559 return safe_browsing_detection_service_.get(); | 559 return safe_browsing_detection_service_.get(); |
| 560 } | 560 } |
| 561 | 561 |
| 562 bool BrowserProcessImpl::disable_plugin_finder_pref() const { | |
| 563 return *disable_plugin_finder_pref_; | |
| 564 } | |
| 565 | |
| 562 void BrowserProcessImpl::CheckForInspectorFiles() { | 566 void BrowserProcessImpl::CheckForInspectorFiles() { |
| 563 file_thread()->message_loop()->PostTask | 567 file_thread()->message_loop()->PostTask |
| 564 (FROM_HERE, | 568 (FROM_HERE, |
| 565 NewRunnableMethod(this, &BrowserProcessImpl::DoInspectorFilesCheck)); | 569 NewRunnableMethod(this, &BrowserProcessImpl::DoInspectorFilesCheck)); |
| 566 } | 570 } |
| 567 | 571 |
| 568 void BrowserProcessImpl::Observe(NotificationType type, | 572 void BrowserProcessImpl::Observe(NotificationType type, |
| 569 const NotificationSource& source, | 573 const NotificationSource& source, |
| 570 const NotificationDetails& details) { | 574 const NotificationDetails& details) { |
| 571 if (type == NotificationType::APP_TERMINATING) { | 575 if (type == NotificationType::APP_TERMINATING) { |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 778 print_job_manager_.get()); | 782 print_job_manager_.get()); |
| 779 | 783 |
| 780 // Initialize the notification for the default browser setting policy. | 784 // Initialize the notification for the default browser setting policy. |
| 781 local_state_->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 785 local_state_->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
| 782 false); | 786 false); |
| 783 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) { | 787 if (local_state_->IsManagedPreference(prefs::kDefaultBrowserSettingEnabled)) { |
| 784 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) | 788 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) |
| 785 ShellIntegration::SetAsDefaultBrowser(); | 789 ShellIntegration::SetAsDefaultBrowser(); |
| 786 } | 790 } |
| 787 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); | 791 pref_change_registrar_.Add(prefs::kDefaultBrowserSettingEnabled, this); |
| 792 | |
| 793 // Initilialize the preference for the plugin finder policy. | |
|
Bernhard Bauer
2011/02/24 10:37:07
Nit: Initialize
pastarmovj
2011/02/24 16:02:20
Done.
| |
| 794 // This preference is only needed on the IO thread so make it available there. | |
| 795 local_state_->RegisterBooleanPref(prefs::kDisablePluginFinder, false); | |
| 796 disable_plugin_finder_pref_.Init(prefs::kDisablePluginFinder, | |
| 797 local_state_.get(), NULL); | |
| 798 disable_plugin_finder_pref_.MoveToThread(BrowserThread::IO); | |
| 788 } | 799 } |
| 789 | 800 |
| 790 void BrowserProcessImpl::CreateIconManager() { | 801 void BrowserProcessImpl::CreateIconManager() { |
| 791 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); | 802 DCHECK(!created_icon_manager_ && icon_manager_.get() == NULL); |
| 792 created_icon_manager_ = true; | 803 created_icon_manager_ = true; |
| 793 icon_manager_.reset(new IconManager); | 804 icon_manager_.reset(new IconManager); |
| 794 } | 805 } |
| 795 | 806 |
| 796 void BrowserProcessImpl::CreateDevToolsManager() { | 807 void BrowserProcessImpl::CreateDevToolsManager() { |
| 797 DCHECK(devtools_manager_.get() == NULL); | 808 DCHECK(devtools_manager_.get() == NULL); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 968 } | 979 } |
| 969 | 980 |
| 970 void BrowserProcessImpl::OnAutoupdateTimer() { | 981 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 971 if (CanAutorestartForUpdate()) { | 982 if (CanAutorestartForUpdate()) { |
| 972 DLOG(WARNING) << "Detected update. Restarting browser."; | 983 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 973 RestartPersistentInstance(); | 984 RestartPersistentInstance(); |
| 974 } | 985 } |
| 975 } | 986 } |
| 976 | 987 |
| 977 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 988 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |