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

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
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/browser_signin.h » ('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 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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 DCHECK(CalledOnValidThread()); 605 DCHECK(CalledOnValidThread());
605 if (!created_safe_browsing_detection_service_) 606 if (!created_safe_browsing_detection_service_)
606 CreateSafeBrowsingDetectionService(); 607 CreateSafeBrowsingDetectionService();
607 return safe_browsing_detection_service_.get(); 608 return safe_browsing_detection_service_.get();
608 } 609 }
609 610
610 bool BrowserProcessImpl::plugin_finder_disabled() const { 611 bool BrowserProcessImpl::plugin_finder_disabled() const {
611 return *plugin_finder_disabled_pref_; 612 return *plugin_finder_disabled_pref_;
612 } 613 }
613 614
614 void BrowserProcessImpl::Observe(NotificationType type, 615 void BrowserProcessImpl::Observe(int type,
615 const NotificationSource& source, 616 const NotificationSource& source,
616 const NotificationDetails& details) { 617 const NotificationDetails& details) {
617 if (type == NotificationType::PREF_CHANGED) { 618 if (type == chrome::NOTIFICATION_PREF_CHANGED) {
618 std::string* pref = Details<std::string>(details).ptr(); 619 std::string* pref = Details<std::string>(details).ptr();
619 if (*pref == prefs::kDefaultBrowserSettingEnabled) { 620 if (*pref == prefs::kDefaultBrowserSettingEnabled) {
620 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled)) 621 if (local_state_->GetBoolean(prefs::kDefaultBrowserSettingEnabled))
621 ShellIntegration::SetAsDefaultBrowser(); 622 ShellIntegration::SetAsDefaultBrowser();
622 } else if (*pref == prefs::kDisabledSchemes) { 623 } else if (*pref == prefs::kDisabledSchemes) {
623 ApplyDisabledSchemesPolicy(); 624 ApplyDisabledSchemesPolicy();
624 } else if (*pref == prefs::kAllowCrossOriginAuthPrompt) { 625 } else if (*pref == prefs::kAllowCrossOriginAuthPrompt) {
625 ApplyAllowCrossOriginAuthPromptPolicy(); 626 ApplyAllowCrossOriginAuthPromptPolicy();
626 } 627 }
627 } else { 628 } else {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } 1069 }
1069 1070
1070 void BrowserProcessImpl::OnAutoupdateTimer() { 1071 void BrowserProcessImpl::OnAutoupdateTimer() {
1071 if (CanAutorestartForUpdate()) { 1072 if (CanAutorestartForUpdate()) {
1072 DLOG(WARNING) << "Detected update. Restarting browser."; 1073 DLOG(WARNING) << "Detected update. Restarting browser.";
1073 RestartPersistentInstance(); 1074 RestartPersistentInstance();
1074 } 1075 }
1075 } 1076 }
1076 1077
1077 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1078 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_impl.h ('k') | chrome/browser/browser_signin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698