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

Issue 8937001: Fixes for the kWasRestarted pref. (Closed)

Created:
9 years ago by marja
Modified:
9 years ago
CC:
chromium-reviews, robertshield, kkania, Paweł Hajdan Jr., jochen (gone - plz use gerrit), sky
Visibility:
Public.

Description

Fixes for the kWasRestarted pref. Reset the kWasRestarted pref upon successful restart. Set it only when restarting. Write the persistent preferences after setting it. The preference was introduced in http://codereview.chromium.org/8745015. BUG=106948 TEST=see bug Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=114213

Patch Set 1 #

Total comments: 4

Patch Set 2 : Code review. #

Total comments: 1

Patch Set 3 : Test build fix. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -24 lines) Patch
M chrome/browser/automation/testing_automation_provider.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/background/background_mode_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/browser_process_impl.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chrome_browser_main_posix.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/browser_init.h View 1 2 chunks +10 lines, -0 lines 1 comment Download
M chrome/browser/ui/browser_init.cc View 1 3 chunks +15 lines, -2 lines 1 comment Download
M chrome/browser/ui/browser_list.h View 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_list.cc View 5 chunks +12 lines, -11 lines 0 comments Download
M chrome/test/base/in_process_browser_test.cc View 1 2 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
marja
Hi, I got the kWasRestarted preference adding badly wrong in http://codereview.chromium.org/8745015 and this CL tries ...
9 years ago (2011-12-13 10:02:34 UTC) #1
Finnur
This LGTM but I think you should probably consult someone who knows the shutdown sequence ...
9 years ago (2011-12-13 10:53:03 UTC) #2
Miranda Callahan
profiles/* LGTM w/comment nit. http://codereview.chromium.org/8937001/diff/1/chrome/browser/ui/browser_init.h File chrome/browser/ui/browser_init.h (right): http://codereview.chromium.org/8937001/diff/1/chrome/browser/ui/browser_init.h#newcode255 chrome/browser/ui/browser_init.h:255: static bool was_restarted_read_; could you ...
9 years ago (2011-12-13 10:59:15 UTC) #3
marja
Thanks for comments! http://codereview.chromium.org/8937001/diff/1/chrome/browser/ui/browser_init.h File chrome/browser/ui/browser_init.h (right): http://codereview.chromium.org/8937001/diff/1/chrome/browser/ui/browser_init.h#newcode77 chrome/browser/ui/browser_init.h:77: static bool was_restarted(); On 2011/12/13 10:53:04, ...
9 years ago (2011-12-13 11:09:10 UTC) #4
Jói
LGTM http://codereview.chromium.org/8937001/diff/7001/chrome/browser/ui/browser_list.cc File chrome/browser/ui/browser_list.cc (right): http://codereview.chromium.org/8937001/diff/7001/chrome/browser/ui/browser_list.cc#newcode523 chrome/browser/ui/browser_list.cc:523: pref_service->ScheduleSavePersistentPrefs(); I was slightly concerned that this might ...
9 years ago (2011-12-13 11:27:41 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/marja@chromium.org/8937001/1013
9 years ago (2011-12-13 12:01:00 UTC) #6
commit-bot: I haz the power
Change committed as 114213
9 years ago (2011-12-13 14:16:08 UTC) #7
sky
Any chance of a test here to make sure wasrestarted is set correctly and unset ...
9 years ago (2011-12-13 16:54:41 UTC) #8
marja
9 years ago (2011-12-14 12:36:37 UTC) #9
sky, thanks for comments, I created a new CL for addressing them:
http://codereview.chromium.org/8929027

On 2011/12/13 16:54:41, sky wrote:
> Any chance of a test here to make sure wasrestarted is set correctly and unset
> correctly?
> 
>
http://codereview.chromium.org/8937001/diff/1013/chrome/browser/ui/browser_in...
> File chrome/browser/ui/browser_init.cc (right):
> 
>
http://codereview.chromium.org/8937001/diff/1013/chrome/browser/ui/browser_in...
> chrome/browser/ui/browser_init.cc:501: bool BrowserInit::was_restarted_ =
false;
> Since these are only used in WasRestarted, why not make them static there?
> 
>
http://codereview.chromium.org/8937001/diff/1013/chrome/browser/ui/browser_in...
> File chrome/browser/ui/browser_init.h (right):
> 
>
http://codereview.chromium.org/8937001/diff/1013/chrome/browser/ui/browser_in...
> chrome/browser/ui/browser_init.h:260: // True if we have already read and
reset
> the preference kWasRestarted.
> nit: newline between 259 and 260.

Powered by Google App Engine
This is Rietveld 408576698