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

Side by Side Diff: chrome/browser/chromeos/upgrade_detector_chromeos.cc

Issue 7825026: Revert "Currently, base/timer.cc calls PostTask with FROM_HERE as the Location, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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/chromeos/upgrade_detector_chromeos.h" 5 #include "chrome/browser/chromeos/upgrade_detector_chromeos.h"
6 6
7 #include "base/memory/singleton.h" 7 #include "base/memory/singleton.h"
8 #include "chrome/browser/chromeos/cros/cros_library.h" 8 #include "chrome/browser/chromeos/cros/cros_library.h"
9 9
10 namespace { 10 namespace {
(...skipping 19 matching lines...) Expand all
30 if (library->status().status != chromeos::UPDATE_STATUS_UPDATED_NEED_REBOOT) 30 if (library->status().status != chromeos::UPDATE_STATUS_UPDATED_NEED_REBOOT)
31 return; 31 return;
32 32
33 NotifyUpgradeDetected(); 33 NotifyUpgradeDetected();
34 34
35 // ChromeOS shows upgrade arrow once the upgrade becomes available. 35 // ChromeOS shows upgrade arrow once the upgrade becomes available.
36 NotifyOnUpgrade(); 36 NotifyOnUpgrade();
37 37
38 // Setup timer to to move along the upgrade advisory system. 38 // Setup timer to to move along the upgrade advisory system.
39 upgrade_notification_timer_.Start( 39 upgrade_notification_timer_.Start(
40 FROM_HERE, base::TimeDelta::FromMilliseconds(kNotifyCycleTimeMs), 40 base::TimeDelta::FromMilliseconds(kNotifyCycleTimeMs),
41 this, &UpgradeDetectorChromeos::NotifyOnUpgrade); 41 this, &UpgradeDetectorChromeos::NotifyOnUpgrade);
42 } 42 }
43 43
44 void UpgradeDetectorChromeos::NotifyOnUpgrade() { 44 void UpgradeDetectorChromeos::NotifyOnUpgrade() {
45 base::TimeDelta delta = base::Time::Now() - upgrade_detected_time(); 45 base::TimeDelta delta = base::Time::Now() - upgrade_detected_time();
46 int64 time_passed = delta.InDays(); 46 int64 time_passed = delta.InDays();
47 47
48 const int kSevereThreshold = 7; 48 const int kSevereThreshold = 7;
49 const int kHighThreshold = 4; 49 const int kHighThreshold = 4;
50 const int kElevatedThreshold = 2; 50 const int kElevatedThreshold = 2;
(...skipping 20 matching lines...) Expand all
71 71
72 // static 72 // static
73 UpgradeDetectorChromeos* UpgradeDetectorChromeos::GetInstance() { 73 UpgradeDetectorChromeos* UpgradeDetectorChromeos::GetInstance() {
74 return Singleton<UpgradeDetectorChromeos>::get(); 74 return Singleton<UpgradeDetectorChromeos>::get();
75 } 75 }
76 76
77 // static 77 // static
78 UpgradeDetector* UpgradeDetector::GetInstance() { 78 UpgradeDetector* UpgradeDetector::GetInstance() {
79 return UpgradeDetectorChromeos::GetInstance(); 79 return UpgradeDetectorChromeos::GetInstance();
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/memory_menu_button.cc ('k') | chrome/browser/component_updater/component_updater_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698