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

Side by Side Diff: chrome/browser/chromeos/settings/system_settings_provider.cc

Issue 251613002: Broadcast NotifyTimezoneChange to all RenderProcessHosts when the system time zone changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase (267223) Created 6 years, 7 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
« no previous file with comments | « no previous file | content/browser/android/browser_jni_registrar.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/settings/system_settings_provider.h" 5 #include "chrome/browser/chromeos/settings/system_settings_provider.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chromeos/login/login_state.h" 10 #include "chromeos/login/login_state.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 56
57 bool SystemSettingsProvider::HandlesSetting(const std::string& path) const { 57 bool SystemSettingsProvider::HandlesSetting(const std::string& path) const {
58 return path == kSystemTimezone; 58 return path == kSystemTimezone;
59 } 59 }
60 60
61 void SystemSettingsProvider::TimezoneChanged(const icu::TimeZone& timezone) { 61 void SystemSettingsProvider::TimezoneChanged(const icu::TimeZone& timezone) {
62 // Fires system setting change notification. 62 // Fires system setting change notification.
63 timezone_value_.reset(new base::StringValue( 63 timezone_value_.reset(new base::StringValue(
64 system::TimezoneSettings::GetTimezoneID(timezone))); 64 system::TimezoneSettings::GetTimezoneID(timezone)));
65 NotifyObservers(kSystemTimezone); 65 NotifyObservers(kSystemTimezone);
66
67 // Notify renderers
68 for (content::RenderProcessHost::iterator it(
69 content::RenderProcessHost::AllHostsIterator());
70 !it.IsAtEnd();
71 it.Advance()) {
72 it.GetCurrentValue()->NotifyTimezoneChange();
73 }
74 } 66 }
75 67
76 } // namespace chromeos 68 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | content/browser/android/browser_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698