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

Issue 7046096: Refactor UpgradeDetector. (Closed)

Created:
9 years, 6 months ago by xiyuan
Modified:
9 years, 6 months ago
Reviewers:
Finnur, stevenjb, DaveMoore
CC:
chromium-reviews, davemoore+watch_chromium.org
Visibility:
Public.

Description

Refactor UpgradeDetector. - Move peroidically timer based detection code into UpgradeDetectorImpl for use on non-ChromeOS platform; - Implement ChromeOS upgrade detection via UpdateLibrary observer and apply a slightly different advisory timing for showing the badges (show green arrow immediately on upgrade detected, then 2, 4, 7 days for yellow, red and orange color); BUG=chromium-os:16146 TEST=Verify fix for chromium-os:16146. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=88800

Patch Set 1 #

Patch Set 2 : fix clang bots #

Total comments: 9

Patch Set 3 : sync and address finnur's comments in set 2 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+226 lines, -358 lines) Patch
A chrome/browser/chromeos/upgrade_detector_chromeos.h View 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/upgrade_detector_chromeos.cc View 1 2 1 chunk +78 lines, -0 lines 0 comments Download
M chrome/browser/upgrade_detector.h View 1 2 3 chunks +15 lines, -29 lines 0 comments Download
M chrome/browser/upgrade_detector.cc View 1 2 chunks +3 lines, -256 lines 0 comments Download
A chrome/browser/upgrade_detector_impl.h View 1 1 chunk +57 lines, -0 lines 0 comments Download
A + chrome/browser/upgrade_detector_impl.cc View 1 9 chunks +27 lines, -73 lines 0 comments Download
M chrome/chrome_browser.gypi View 3 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
xiyuan
9 years, 6 months ago (2011-06-10 22:44:03 UTC) #1
Finnur
LGTM, with a question. http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.cc File chrome/browser/chromeos/upgrade_detector_chromeos.cc (right): http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.cc#newcode47 chrome/browser/chromeos/upgrade_detector_chromeos.cc:47: const int kSevereThreshold = 7 ...
9 years, 6 months ago (2011-06-12 12:07:43 UTC) #2
xiyuan
Thanks for reviewing. http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.cc File chrome/browser/chromeos/upgrade_detector_chromeos.cc (right): http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.cc#newcode47 chrome/browser/chromeos/upgrade_detector_chromeos.cc:47: const int kSevereThreshold = 7 * ...
9 years, 6 months ago (2011-06-12 21:02:06 UTC) #3
xiyuan
+davemoore Dave, please approve this for merging into 782.
9 years, 6 months ago (2011-06-12 21:03:33 UTC) #4
Finnur
http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.h File chrome/browser/chromeos/upgrade_detector_chromeos.h (right): http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.h#newcode28 chrome/browser/chromeos/upgrade_detector_chromeos.h:28: virtual void UpdateStatusChanged(chromeos::UpdateLibrary* library); Oh, then you should probably ...
9 years, 6 months ago (2011-06-12 22:19:21 UTC) #5
xiyuan
http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.h File chrome/browser/chromeos/upgrade_detector_chromeos.h (right): http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.h#newcode28 chrome/browser/chromeos/upgrade_detector_chromeos.h:28: virtual void UpdateStatusChanged(chromeos::UpdateLibrary* library); On 2011/06/12 22:19:21, Finnur wrote: ...
9 years, 6 months ago (2011-06-12 22:31:23 UTC) #6
Finnur
http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.h File chrome/browser/chromeos/upgrade_detector_chromeos.h (right): http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgrade_detector_chromeos.h#newcode28 chrome/browser/chromeos/upgrade_detector_chromeos.h:28: virtual void UpdateStatusChanged(chromeos::UpdateLibrary* library); Hmm... Good question. I don't ...
9 years, 6 months ago (2011-06-12 22:38:29 UTC) #7
stevenjb
9 years, 6 months ago (2011-06-13 19:35:20 UTC) #8
Sorry I didn't get a few in on Friday, but lgtm.

For future reference, OVERRIDE is a good thing to add to any inherited virtual
function, regardless of whether or not the parent function is a pure virtual.
OVERRIDE helps detect when the signature changes (which would be detected
anyways when inheriting from a pure virtual) and when the parent function is
removed (which would not otherwise be detected, although clang now detects
that). It also helps serve as documentation.


On 2011/06/12 22:38:29, Finnur wrote:
>
http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgr...
> File chrome/browser/chromeos/upgrade_detector_chromeos.h (right):
> 
>
http://codereview.chromium.org/7046096/diff/1008/chrome/browser/chromeos/upgr...
> chrome/browser/chromeos/upgrade_detector_chromeos.h:28: virtual void
> UpdateStatusChanged(chromeos::UpdateLibrary* library);
> Hmm... Good question. I don't know. You can probably just ignore my comment
here
> and go ahead.
> 
> PS. Don't know how I missed that comment there on what interface you are
> implementing there. :) 
> 
> On 2011/06/12 22:31:24, xiyuan wrote:
> > On 2011/06/12 22:19:21, Finnur wrote:
> > > Oh, then you should probably add OVERRIDE?
> > 
> > Even for pure virtual function?

Powered by Google App Engine
This is Rietveld 408576698