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

Side by Side Diff: chrome/browser/chromeos/policy/browser_policy_connector_chromeos.cc

Issue 2849823003: ChromeOS: implement per-user time zone preferences. (Closed)
Patch Set: Rebased. Created 3 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/policy/browser_policy_connector_chromeos.h" 5 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h" 29 #include "chrome/browser/chromeos/policy/device_cloud_policy_store_chromeos.h"
30 #include "chrome/browser/chromeos/policy/device_local_account.h" 30 #include "chrome/browser/chromeos/policy/device_local_account.h"
31 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" 31 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
32 #include "chrome/browser/chromeos/policy/device_network_configuration_updater.h" 32 #include "chrome/browser/chromeos/policy/device_network_configuration_updater.h"
33 #include "chrome/browser/chromeos/policy/enrollment_config.h" 33 #include "chrome/browser/chromeos/policy/enrollment_config.h"
34 #include "chrome/browser/chromeos/policy/remote_commands/affiliated_remote_comma nds_invalidator.h" 34 #include "chrome/browser/chromeos/policy/remote_commands/affiliated_remote_comma nds_invalidator.h"
35 #include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h" 35 #include "chrome/browser/chromeos/policy/server_backed_state_keys_broker.h"
36 #include "chrome/browser/chromeos/settings/cros_settings.h" 36 #include "chrome/browser/chromeos/settings/cros_settings.h"
37 #include "chrome/browser/chromeos/settings/device_settings_service.h" 37 #include "chrome/browser/chromeos/settings/device_settings_service.h"
38 #include "chrome/browser/chromeos/settings/install_attributes.h" 38 #include "chrome/browser/chromeos/settings/install_attributes.h"
39 #include "chrome/browser/chromeos/system/timezone_util.h"
39 #include "chrome/browser/policy/device_management_service_configuration.h" 40 #include "chrome/browser/policy/device_management_service_configuration.h"
40 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
41 #include "chromeos/attestation/attestation_flow.h" 42 #include "chromeos/attestation/attestation_flow.h"
42 #include "chromeos/chromeos_paths.h" 43 #include "chromeos/chromeos_paths.h"
43 #include "chromeos/chromeos_switches.h" 44 #include "chromeos/chromeos_switches.h"
44 #include "chromeos/cryptohome/async_method_caller.h" 45 #include "chromeos/cryptohome/async_method_caller.h"
45 #include "chromeos/cryptohome/system_salt_getter.h" 46 #include "chromeos/cryptohome/system_salt_getter.h"
46 #include "chromeos/dbus/cryptohome_client.h" 47 #include "chromeos/dbus/cryptohome_client.h"
47 #include "chromeos/dbus/dbus_thread_manager.h" 48 #include "chromeos/dbus/dbus_thread_manager.h"
48 #include "chromeos/dbus/upstart_client.h" 49 #include "chromeos/dbus/upstart_client.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 &BrowserPolicyConnectorChromeOS::SetTimezoneIfPolicyAvailable, 348 &BrowserPolicyConnectorChromeOS::SetTimezoneIfPolicyAvailable,
348 weak_ptr_factory_.GetWeakPtr())); 349 weak_ptr_factory_.GetWeakPtr()));
349 350
350 if (result != Provider::TRUSTED) 351 if (result != Provider::TRUSTED)
351 return; 352 return;
352 353
353 std::string timezone; 354 std::string timezone;
354 if (chromeos::CrosSettings::Get()->GetString(chromeos::kSystemTimezonePolicy, 355 if (chromeos::CrosSettings::Get()->GetString(chromeos::kSystemTimezonePolicy,
355 &timezone) && 356 &timezone) &&
356 !timezone.empty()) { 357 !timezone.empty()) {
357 chromeos::system::TimezoneSettings::GetInstance()->SetTimezoneFromID( 358 chromeos::system::SetSystemAndSigninScreenTimezone(timezone);
358 base::UTF8ToUTF16(timezone));
359 } 359 }
360 } 360 }
361 361
362 void BrowserPolicyConnectorChromeOS::RestartDeviceCloudPolicyInitializer() { 362 void BrowserPolicyConnectorChromeOS::RestartDeviceCloudPolicyInitializer() {
363 device_cloud_policy_initializer_ = 363 device_cloud_policy_initializer_ =
364 base::MakeUnique<DeviceCloudPolicyInitializer>( 364 base::MakeUnique<DeviceCloudPolicyInitializer>(
365 local_state_, device_management_service(), GetBackgroundTaskRunner(), 365 local_state_, device_management_service(), GetBackgroundTaskRunner(),
366 install_attributes_.get(), state_keys_broker_.get(), 366 install_attributes_.get(), state_keys_broker_.get(),
367 device_cloud_policy_manager_->device_store(), 367 device_cloud_policy_manager_->device_store(),
368 device_cloud_policy_manager_, 368 device_cloud_policy_manager_,
(...skipping 18 matching lines...) Expand all
387 device_cloud_policy_manager_->device_store()->policy(); 387 device_cloud_policy_manager_->device_store()->policy();
388 if (policy_data) { 388 if (policy_data) {
389 affiliation_ids.insert(policy_data->device_affiliation_ids().begin(), 389 affiliation_ids.insert(policy_data->device_affiliation_ids().begin(),
390 policy_data->device_affiliation_ids().end()); 390 policy_data->device_affiliation_ids().end());
391 } 391 }
392 } 392 }
393 return affiliation_ids; 393 return affiliation_ids;
394 } 394 }
395 395
396 } // namespace policy 396 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/wizard_controller.cc ('k') | chrome/browser/chromeos/preferences.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698