OLD | NEW |
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 Loading... |
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 |
OLD | NEW |