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

Unified Diff: chrome/browser/net/predictor_api.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/net/net_pref_observer.cc ('k') | chrome/browser/net/pref_proxy_config_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor_api.cc
===================================================================
--- chrome/browser/net/predictor_api.cc (revision 91968)
+++ chrome/browser/net/predictor_api.cc (working copy)
@@ -25,6 +25,7 @@
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "content/browser/browser_thread.h"
#include "content/common/notification_registrar.h"
@@ -304,24 +305,24 @@
void Register() {
// TODO(pkasting): This test should not be necessary. See crbug.com/12475.
if (registrar_.IsEmpty()) {
- registrar_.Add(this, NotificationType::BROWSER_CLOSED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSED,
NotificationService::AllSources());
- registrar_.Add(this, NotificationType::BROWSER_OPENED,
+ registrar_.Add(this, chrome::NOTIFICATION_BROWSER_OPENED,
NotificationService::AllSources());
}
}
- void Observe(NotificationType type, const NotificationSource& source,
+ void Observe(int type, const NotificationSource& source,
const NotificationDetails& details) {
- switch (type.value) {
- case NotificationType::BROWSER_OPENED:
+ switch (type) {
+ case chrome::NOTIFICATION_BROWSER_OPENED:
if (!Source<Browser>(source)->profile()->IsOffTheRecord())
break;
++count_off_the_record_windows_;
OnTheRecord(false);
break;
- case NotificationType::BROWSER_CLOSED:
+ case chrome::NOTIFICATION_BROWSER_CLOSED:
if (!Source<Browser>(source)->profile()->IsOffTheRecord())
break; // Ignore ordinary windows.
DCHECK_LT(0, count_off_the_record_windows_);
« no previous file with comments | « chrome/browser/net/net_pref_observer.cc ('k') | chrome/browser/net/pref_proxy_config_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698