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

Issue 10689175: Refactored code for timezone settings. (Closed)

Created:
8 years, 5 months ago by pneubeck2
Modified:
8 years, 5 months ago
CC:
chromium-reviews, oshima+watch_chromium.org, stevenjb+watch_chromium.org, nkostylev+watch_chromium.org, davemoore+watch_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Refactored code for timezone settings. Moved ui specific stuff to webui/options2. Ensure that only known timezones are stored in TimezoneSettings. BUG=chromium-os:27206 TEST=Set symlink /var/lib/timezone/localtime to an unknown timezone (i.e. not in |kTimeZones|) but with the same rules as a known timezone. The settings UI must show one of these equivalent timezones. Change the timezone in the settings and observe both the clock and the symlink being updated. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147242

Patch Set 1 #

Patch Set 2 : Removed correction of wrong filesystem link in TimezoneSettings constructor. #

Patch Set 3 : Added comment referring to initialization in ui.conf. #

Total comments: 54

Patch Set 4 : Worked on comments. #

Total comments: 4

Patch Set 5 : Fixed a comment and annotation. #

Total comments: 2

Patch Set 6 : Addressed comments. Moved chromeos specific code from browser_options_handler to separate file. #

Total comments: 6

Patch Set 7 : Addressed nits. Added shared_ptr. #

Patch Set 8 : Rebased to current master. No other changes. #

Patch Set 9 : Added missing include in a unittest cc. #

Total comments: 2

Patch Set 10 : Added missing comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+492 lines, -394 lines) Patch
M chrome/browser/chromeos/device_settings_provider.h View 1 2 3 4 5 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/chromeos/device_settings_provider.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/login/base_login_display_host.cc View 1 2 3 4 5 6 7 3 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/chromeos/system/timezone_settings.h View 1 2 3 2 chunks +12 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/system/timezone_settings.cc View 1 2 3 4 5 chunks +275 lines, -83 lines 0 comments Download
M chrome/browser/chromeos/system_settings_provider.h View 2 chunks +0 lines, -27 lines 0 comments Download
M chrome/browser/chromeos/system_settings_provider.cc View 1 2 3 3 chunks +12 lines, -266 lines 0 comments Download
M chrome/browser/policy/cloud_policy_validator.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/policy/cloud_policy_validator.cc View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/policy/device_policy_cache.h View 1 2 3 4 5 1 chunk +6 lines, -1 line 0 comments Download
M chrome/browser/policy/device_policy_cache.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/device_policy_cache_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/policy/policy_builder.h View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/policy/policy_builder.cc View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/ui/webui/options2/browser_options_handler.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -6 lines 0 comments Download
A chrome/browser/ui/webui/options2/chromeos/timezone_options_util.h View 1 2 3 4 5 6 1 chunk +21 lines, -0 lines 0 comments Download
A chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc View 1 2 3 4 5 6 7 8 9 1 chunk +143 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
pneubeck2
Second larger refactoring. Please review and don't hold yourself back :-)
8 years, 5 months ago (2012-07-12 15:00:10 UTC) #1
Joao da Silva
First round of comments. https://chromiumcodereview.appspot.com/10689175/diff/5001/chrome/browser/chromeos/system/timezone_settings.cc File chrome/browser/chromeos/system/timezone_settings.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/5001/chrome/browser/chromeos/system/timezone_settings.cc#newcode202 chrome/browser/chromeos/system/timezone_settings.cc:202: virtual const std::vector<icu::TimeZone*> &GetTimezoneList() const; ...
8 years, 5 months ago (2012-07-12 18:34:09 UTC) #2
pneubeck2
Fixed all of the comments. https://chromiumcodereview.appspot.com/10689175/diff/5001/chrome/browser/chromeos/system/timezone_settings.cc File chrome/browser/chromeos/system/timezone_settings.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/5001/chrome/browser/chromeos/system/timezone_settings.cc#newcode202 chrome/browser/chromeos/system/timezone_settings.cc:202: virtual const std::vector<icu::TimeZone*> &GetTimezoneList() ...
8 years, 5 months ago (2012-07-13 10:31:39 UTC) #3
Joao da Silva
LGTM after fixing the remaining nits. https://chromiumcodereview.appspot.com/10689175/diff/1009/chrome/browser/chromeos/system/timezone_settings.cc File chrome/browser/chromeos/system/timezone_settings.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/1009/chrome/browser/chromeos/system/timezone_settings.cc#newcode322 chrome/browser/chromeos/system/timezone_settings.cc:322: // It's safe ...
8 years, 5 months ago (2012-07-13 13:05:30 UTC) #4
pneubeck2
James, could you please review this second refactoring of the timezone code. After this refactoring ...
8 years, 5 months ago (2012-07-13 13:20:45 UTC) #5
James Hawkins
https://chromiumcodereview.appspot.com/10689175/diff/4004/chrome/browser/ui/webui/options2/browser_options_handler.cc File chrome/browser/ui/webui/options2/browser_options_handler.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/4004/chrome/browser/ui/webui/options2/browser_options_handler.cc#newcode115 chrome/browser/ui/webui/options2/browser_options_handler.cc:115: #if defined(OS_CHROMEOS) I'm not a fan of having this ...
8 years, 5 months ago (2012-07-13 14:25:04 UTC) #6
pneubeck2
Moved the code to a chromeos file. On the way I found a few places ...
8 years, 5 months ago (2012-07-16 11:32:38 UTC) #7
Joao da Silva
Still lgtm with a couple of nits https://chromiumcodereview.appspot.com/10689175/diff/16010/chrome/browser/chromeos/device_settings_provider.cc File chrome/browser/chromeos/device_settings_provider.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/16010/chrome/browser/chromeos/device_settings_provider.cc#newcode31 chrome/browser/chromeos/device_settings_provider.cc:31: Nit: remove ...
8 years, 5 months ago (2012-07-16 11:44:53 UTC) #8
pneubeck2
Fixed the nits. Wrapped the returned TimezoneList in a scoped_ptr. https://chromiumcodereview.appspot.com/10689175/diff/16010/chrome/browser/chromeos/device_settings_provider.cc File chrome/browser/chromeos/device_settings_provider.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/16010/chrome/browser/chromeos/device_settings_provider.cc#newcode31 ...
8 years, 5 months ago (2012-07-16 12:21:45 UTC) #9
pneubeck2
James, I splitted the files as you suggested. Does the rest look good to you, ...
8 years, 5 months ago (2012-07-17 11:16:05 UTC) #10
James Hawkins
LGTM with nit. https://chromiumcodereview.appspot.com/10689175/diff/23009/chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc File chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/23009/chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc#newcode35 chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc:35: string16 GetExemplarCity(const icu::TimeZone& zone) { nit: ...
8 years, 5 months ago (2012-07-17 14:10:46 UTC) #11
pneubeck2
Fixed the last nit. Thanks for the review. https://chromiumcodereview.appspot.com/10689175/diff/23009/chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc File chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc (right): https://chromiumcodereview.appspot.com/10689175/diff/23009/chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc#newcode35 chrome/browser/ui/webui/options2/chromeos/timezone_options_util.cc:35: string16 ...
8 years, 5 months ago (2012-07-18 12:08:54 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@google.com/10689175/18009
8 years, 5 months ago (2012-07-18 12:09:11 UTC) #13
commit-bot: I haz the power
Try job failure for 10689175-18009 (retry) on linux_clang for step "compile" (clobber build). It's a ...
8 years, 5 months ago (2012-07-18 12:29:14 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pneubeck@google.com/10689175/18009
8 years, 5 months ago (2012-07-18 14:27:37 UTC) #15
commit-bot: I haz the power
8 years, 5 months ago (2012-07-18 15:36:08 UTC) #16
Change committed as 147242

Powered by Google App Engine
This is Rietveld 408576698