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

Side by Side Diff: chrome/browser/upgrade_detector.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/upgrade_detector.h" 5 #include "chrome/browser/upgrade_detector.h"
6 6
7 #include "chrome/browser/prefs/pref_service.h" 7 #include "chrome/browser/prefs/pref_service.h"
8 #include "chrome/common/chrome_notification_types.h"
8 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
9 #include "content/common/notification_service.h" 10 #include "content/common/notification_service.h"
10 #include "content/common/notification_type.h"
11 #include "grit/theme_resources.h" 11 #include "grit/theme_resources.h"
12 12
13 // static 13 // static
14 void UpgradeDetector::RegisterPrefs(PrefService* prefs) { 14 void UpgradeDetector::RegisterPrefs(PrefService* prefs) {
15 prefs->RegisterBooleanPref(prefs::kRestartLastSessionOnShutdown, false); 15 prefs->RegisterBooleanPref(prefs::kRestartLastSessionOnShutdown, false);
16 } 16 }
17 17
18 int UpgradeDetector::GetIconResourceID(UpgradeNotificationIconType type) { 18 int UpgradeDetector::GetIconResourceID(UpgradeNotificationIconType type) {
19 bool badge = type == UPGRADE_ICON_TYPE_BADGE; 19 bool badge = type == UPGRADE_ICON_TYPE_BADGE;
20 switch (upgrade_notification_stage_) { 20 switch (upgrade_notification_stage_) {
(...skipping 15 matching lines...) Expand all
36 notify_upgrade_(false) { 36 notify_upgrade_(false) {
37 } 37 }
38 38
39 UpgradeDetector::~UpgradeDetector() { 39 UpgradeDetector::~UpgradeDetector() {
40 } 40 }
41 41
42 void UpgradeDetector::NotifyUpgradeDetected() { 42 void UpgradeDetector::NotifyUpgradeDetected() {
43 upgrade_detected_time_ = base::Time::Now(); 43 upgrade_detected_time_ = base::Time::Now();
44 44
45 NotificationService::current()->Notify( 45 NotificationService::current()->Notify(
46 NotificationType::UPGRADE_DETECTED, 46 chrome::NOTIFICATION_UPGRADE_DETECTED,
47 Source<UpgradeDetector>(this), 47 Source<UpgradeDetector>(this),
48 NotificationService::NoDetails()); 48 NotificationService::NoDetails());
49 } 49 }
50 50
51 void UpgradeDetector::NotifyUpgradeRecommended() { 51 void UpgradeDetector::NotifyUpgradeRecommended() {
52 notify_upgrade_ = true; 52 notify_upgrade_ = true;
53 53
54 NotificationService::current()->Notify( 54 NotificationService::current()->Notify(
55 NotificationType::UPGRADE_RECOMMENDED, 55 chrome::NOTIFICATION_UPGRADE_RECOMMENDED,
56 Source<UpgradeDetector>(this), 56 Source<UpgradeDetector>(this),
57 NotificationService::NoDetails()); 57 NotificationService::NoDetails());
58 } 58 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/web_ui_test_handler.cc ('k') | chrome/browser/user_style_sheet_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698