OLD | NEW |
1 // Copyright (c) 2010 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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/scoped_ptr.h" |
10 #include "base/singleton.h" | 11 #include "base/singleton.h" |
11 #include "base/scoped_ptr.h" | |
12 #include "base/time.h" | |
13 #include "base/task.h" | |
14 #include "base/string_number_conversions.h" | 12 #include "base/string_number_conversions.h" |
15 #include "base/string_util.h" | 13 #include "base/string_util.h" |
| 14 #include "base/task.h" |
| 15 #include "base/time.h" |
16 #include "base/utf_string_conversions.h" | 16 #include "base/utf_string_conversions.h" |
17 #include "chrome/browser/platform_util.h" | 17 #include "chrome/browser/platform_util.h" |
18 #include "chrome/browser/prefs/pref_service.h" | 18 #include "chrome/browser/prefs/pref_service.h" |
19 #include "chrome/common/chrome_switches.h" | 19 #include "chrome/common/chrome_switches.h" |
20 #include "chrome/common/chrome_version_info.h" | 20 #include "chrome/common/chrome_version_info.h" |
21 #include "chrome/common/notification_service.h" | |
22 #include "chrome/common/notification_type.h" | |
23 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
24 #include "chrome/installer/util/browser_distribution.h" | 22 #include "chrome/installer/util/browser_distribution.h" |
25 #include "content/browser/browser_thread.h" | 23 #include "content/browser/browser_thread.h" |
| 24 #include "content/common/notification_service.h" |
| 25 #include "content/common/notification_type.h" |
26 | 26 |
27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
28 #include "chrome/installer/util/install_util.h" | 28 #include "chrome/installer/util/install_util.h" |
29 #elif defined(OS_MACOSX) | 29 #elif defined(OS_MACOSX) |
30 #include "chrome/browser/cocoa/keystone_glue.h" | 30 #include "chrome/browser/cocoa/keystone_glue.h" |
31 #elif defined(OS_POSIX) | 31 #elif defined(OS_POSIX) |
32 #include "base/process_util.h" | 32 #include "base/process_util.h" |
33 #include "base/version.h" | 33 #include "base/version.h" |
34 #endif | 34 #endif |
35 | 35 |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 } | 202 } |
203 | 203 |
204 void UpgradeDetector::NotifyOnUpgrade() { | 204 void UpgradeDetector::NotifyOnUpgrade() { |
205 notify_upgrade_ = true; | 205 notify_upgrade_ = true; |
206 | 206 |
207 NotificationService::current()->Notify( | 207 NotificationService::current()->Notify( |
208 NotificationType::UPGRADE_RECOMMENDED, | 208 NotificationType::UPGRADE_RECOMMENDED, |
209 Source<UpgradeDetector>(this), | 209 Source<UpgradeDetector>(this), |
210 NotificationService::NoDetails()); | 210 NotificationService::NoDetails()); |
211 } | 211 } |
OLD | NEW |