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

Side by Side Diff: chrome/browser/browser_process_platform_part_chromeos.cc

Issue 1836433003: ChromeOS: Add SystemTimezoneAutomaticDetection policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/browser_process_platform_part_chromeos.h" 5 #include "chrome/browser/browser_process_platform_part_chromeos.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/time/default_tick_clock.h" 9 #include "base/time/default_tick_clock.h"
10 #include "base/time/tick_clock.h" 10 #include "base/time/tick_clock.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h" 12 #include "chrome/browser/chromeos/login/session/chrome_session_manager.h"
13 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h" 13 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
14 #include "chrome/browser/chromeos/net/delay_network_call.h" 14 #include "chrome/browser/chromeos/net/delay_network_call.h"
15 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" 15 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
16 #include "chrome/browser/chromeos/profiles/profile_helper.h" 16 #include "chrome/browser/chromeos/profiles/profile_helper.h"
17 #include "chrome/browser/chromeos/settings/cros_settings.h" 17 #include "chrome/browser/chromeos/settings/cros_settings.h"
18 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h" 18 #include "chrome/browser/chromeos/system/automatic_reboot_manager.h"
19 #include "chrome/browser/chromeos/system/device_disabling_manager.h" 19 #include "chrome/browser/chromeos/system/device_disabling_manager.h"
20 #include "chrome/browser/chromeos/system/device_disabling_manager_default_delega te.h" 20 #include "chrome/browser/chromeos/system/device_disabling_manager_default_delega te.h"
21 #include "chrome/browser/chromeos/system/system_clock.h" 21 #include "chrome/browser/chromeos/system/system_clock.h"
22 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h"
22 #include "chrome/browser/chromeos/system/timezone_util.h" 23 #include "chrome/browser/chromeos/system/timezone_util.h"
23 #include "chrome/browser/lifetime/keep_alive_types.h" 24 #include "chrome/browser/lifetime/keep_alive_types.h"
24 #include "chrome/browser/lifetime/scoped_keep_alive.h" 25 #include "chrome/browser/lifetime/scoped_keep_alive.h"
25 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/common/chrome_switches.h" 27 #include "chrome/common/chrome_switches.h"
27 #include "chromeos/geolocation/simple_geolocation_provider.h" 28 #include "chromeos/geolocation/simple_geolocation_provider.h"
28 #include "chromeos/timezone/timezone_resolver.h" 29 #include "chromeos/timezone/timezone_resolver.h"
29 #include "components/session_manager/core/session_manager.h" 30 #include "components/session_manager/core/session_manager.h"
30 #include "components/user_manager/user_manager.h" 31 #include "components/user_manager/user_manager.h"
31 32
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 CreateProfileHelper(); 111 CreateProfileHelper();
111 return profile_helper_.get(); 112 return profile_helper_.get();
112 } 113 }
113 114
114 policy::BrowserPolicyConnectorChromeOS* 115 policy::BrowserPolicyConnectorChromeOS*
115 BrowserProcessPlatformPart::browser_policy_connector_chromeos() { 116 BrowserProcessPlatformPart::browser_policy_connector_chromeos() {
116 return static_cast<policy::BrowserPolicyConnectorChromeOS*>( 117 return static_cast<policy::BrowserPolicyConnectorChromeOS*>(
117 g_browser_process->browser_policy_connector()); 118 g_browser_process->browser_policy_connector());
118 } 119 }
119 120
121 chromeos::system::TimeZoneResolverManager*
122 BrowserProcessPlatformPart::GetTimezoneResolverManager() {
123 if (!timezone_resolver_manager_.get()) {
124 timezone_resolver_manager_.reset(
125 new chromeos::system::TimeZoneResolverManager());
126 }
127 return timezone_resolver_manager_.get();
128 }
129
120 chromeos::TimeZoneResolver* BrowserProcessPlatformPart::GetTimezoneResolver() { 130 chromeos::TimeZoneResolver* BrowserProcessPlatformPart::GetTimezoneResolver() {
121 if (!timezone_resolver_.get()) { 131 if (!timezone_resolver_.get()) {
122 timezone_resolver_.reset(new chromeos::TimeZoneResolver( 132 timezone_resolver_.reset(new chromeos::TimeZoneResolver(
133 GetTimezoneResolverManager(),
123 g_browser_process->system_request_context(), 134 g_browser_process->system_request_context(),
124 chromeos::SimpleGeolocationProvider::DefaultGeolocationProviderURL(), 135 chromeos::SimpleGeolocationProvider::DefaultGeolocationProviderURL(),
125 base::Bind(&chromeos::system::ApplyTimeZone), 136 base::Bind(&chromeos::system::ApplyTimeZone),
126 base::Bind(&chromeos::DelayNetworkCall, 137 base::Bind(&chromeos::DelayNetworkCall,
127 base::TimeDelta::FromMilliseconds( 138 base::TimeDelta::FromMilliseconds(
128 chromeos::kDefaultNetworkRetryDelayMS)), 139 chromeos::kDefaultNetworkRetryDelayMS)),
129 g_browser_process->local_state())); 140 g_browser_process->local_state()));
130 } 141 }
131 return timezone_resolver_.get(); 142 return timezone_resolver_.get();
132 } 143 }
(...skipping 15 matching lines...) Expand all
148 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() { 159 BrowserProcessPlatformPart::CreateBrowserPolicyConnector() {
149 return scoped_ptr<policy::BrowserPolicyConnector>( 160 return scoped_ptr<policy::BrowserPolicyConnector>(
150 new policy::BrowserPolicyConnectorChromeOS()); 161 new policy::BrowserPolicyConnectorChromeOS());
151 } 162 }
152 163
153 void BrowserProcessPlatformPart::CreateProfileHelper() { 164 void BrowserProcessPlatformPart::CreateProfileHelper() {
154 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL); 165 DCHECK(!created_profile_helper_ && profile_helper_.get() == NULL);
155 created_profile_helper_ = true; 166 created_profile_helper_ = true;
156 profile_helper_.reset(new chromeos::ProfileHelper()); 167 profile_helper_.reset(new chromeos::ProfileHelper());
157 } 168 }
OLDNEW
« no previous file with comments | « chrome/browser/browser_process_platform_part_chromeos.h ('k') | chrome/browser/chromeos/login/ui/login_display_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698