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

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

Issue 7327007: Moving notification types which are chrome specific to a new header file chrome_notification_type... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 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 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "chrome/browser/profiles/profile_manager.h" 47 #include "chrome/browser/profiles/profile_manager.h"
48 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h" 48 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate. h"
49 #include "chrome/browser/safe_browsing/client_side_detection_service.h" 49 #include "chrome/browser/safe_browsing/client_side_detection_service.h"
50 #include "chrome/browser/safe_browsing/safe_browsing_service.h" 50 #include "chrome/browser/safe_browsing/safe_browsing_service.h"
51 #include "chrome/browser/shell_integration.h" 51 #include "chrome/browser/shell_integration.h"
52 #include "chrome/browser/sidebar/sidebar_manager.h" 52 #include "chrome/browser/sidebar/sidebar_manager.h"
53 #include "chrome/browser/status_icons/status_tray.h" 53 #include "chrome/browser/status_icons/status_tray.h"
54 #include "chrome/browser/tab_closeable_state_watcher.h" 54 #include "chrome/browser/tab_closeable_state_watcher.h"
55 #include "chrome/browser/ui/browser_list.h" 55 #include "chrome/browser/ui/browser_list.h"
56 #include "chrome/common/chrome_constants.h" 56 #include "chrome/common/chrome_constants.h"
57 #include "chrome/common/chrome_notification_types.h"
57 #include "chrome/common/chrome_paths.h" 58 #include "chrome/common/chrome_paths.h"
58 #include "chrome/common/chrome_switches.h" 59 #include "chrome/common/chrome_switches.h"
59 #include "chrome/common/default_plugin.h" 60 #include "chrome/common/default_plugin.h"
60 #include "chrome/common/extensions/extension_l10n_util.h" 61 #include "chrome/common/extensions/extension_l10n_util.h"
61 #include "chrome/common/extensions/extension_resource.h" 62 #include "chrome/common/extensions/extension_resource.h"
62 #include "chrome/common/json_pref_store.h" 63 #include "chrome/common/json_pref_store.h"
63 #include "chrome/common/pref_names.h" 64 #include "chrome/common/pref_names.h"
64 #include "chrome/common/switch_utils.h" 65 #include "chrome/common/switch_utils.h"
65 #include "chrome/common/url_constants.h" 66 #include "chrome/common/url_constants.h"
66 #include "chrome/installer/util/google_update_constants.h" 67 #include "chrome/installer/util/google_update_constants.h"
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 return safe_browsing_detection_service_.get(); 625 return safe_browsing_detection_service_.get();
625 } 626 }
626 627
627 bool BrowserProcessImpl::plugin_finder_disabled() const { 628 bool BrowserProcessImpl::plugin_finder_disabled() const {
628 return *plugin_finder_disabled_pref_; 629 return *plugin_finder_disabled_pref_;
629 } 630 }
630 631
631 void BrowserProcessImpl::Observe(NotificationType type, 632 void BrowserProcessImpl::Observe(NotificationType type,
632 const NotificationSource& source, 633 const NotificationSource& source,
633 const NotificationDetails& details) { 634 const NotificationDetails& details) {
634 if (type == NotificationType::PREF_CHANGED) { 635 if (type == chrome::PREF_CHANGED) {
635 std::string* pref = Details<std::string>(details).ptr(); 636 std::string* pref = Details<std::string>(details).ptr();
636 if (*pref == prefs::kDefaultBrowserSettingEnabled) { 637 if (*pref == prefs::kDefaultBrowserSettingEnabled) {
637 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) 638 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled))
638 ShellIntegration::SetAsDefaultBrowser(); 639 ShellIntegration::SetAsDefaultBrowser();
639 } else if (*pref == prefs::kDisabledSchemes) { 640 } else if (*pref == prefs::kDisabledSchemes) {
640 ApplyDisabledSchemesPolicy(); 641 ApplyDisabledSchemesPolicy();
641 } else if (*pref == prefs::kAllowCrossOriginAuthPrompt) { 642 } else if (*pref == prefs::kAllowCrossOriginAuthPrompt) {
642 ApplyAllowCrossOriginAuthPromptPolicy(); 643 ApplyAllowCrossOriginAuthPromptPolicy();
643 } 644 }
644 } else { 645 } else {
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
1108 } 1109 }
1109 1110
1110 void BrowserProcessImpl::OnAutoupdateTimer() { 1111 void BrowserProcessImpl::OnAutoupdateTimer() {
1111 if (CanAutorestartForUpdate()) { 1112 if (CanAutorestartForUpdate()) {
1112 DLOG(WARNING) << "Detected update. Restarting browser."; 1113 DLOG(WARNING) << "Detected update. Restarting browser.";
1113 RestartPersistentInstance(); 1114 RestartPersistentInstance();
1114 } 1115 }
1115 } 1116 }
1116 1117
1117 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1118 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698