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

Side by Side Diff: chrome/browser/policy/browser_policy_connector.cc

Issue 25242002: Support policies referencing external data for device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years, 1 month 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
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/policy/browser_policy_connector.h" 5 #include "chrome/browser/policy/browser_policy_connector.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 301
302 CommandLine* command_line = CommandLine::ForCurrentProcess(); 302 CommandLine* command_line = CommandLine::ForCurrentProcess();
303 if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) { 303 if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) {
304 device_local_account_policy_service_.reset( 304 device_local_account_policy_service_.reset(
305 new DeviceLocalAccountPolicyService( 305 new DeviceLocalAccountPolicyService(
306 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), 306 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
307 chromeos::DeviceSettingsService::Get(), 307 chromeos::DeviceSettingsService::Get(),
308 chromeos::CrosSettings::Get(), 308 chromeos::CrosSettings::Get(),
309 GetBackgroundTaskRunner(), 309 GetBackgroundTaskRunner(),
310 GetBackgroundTaskRunner())); 310 GetBackgroundTaskRunner(),
311 GetBackgroundTaskRunner(),
312 content::BrowserThread::GetMessageLoopProxyForThread(
313 content::BrowserThread::IO),
314 request_context));
311 device_local_account_policy_service_->Connect( 315 device_local_account_policy_service_->Connect(
312 device_management_service_.get()); 316 device_management_service_.get());
313 } 317 }
314 318
315 GetAppPackUpdater(); 319 GetAppPackUpdater();
316 320
317 SetTimezoneIfPolicyAvailable(); 321 SetTimezoneIfPolicyAvailable();
318 #endif 322 #endif
319 323
320 policy_statistics_collector_.reset( 324 policy_statistics_collector_.reset(
(...skipping 30 matching lines...) Expand all
351 #if defined(OS_CHROMEOS) 355 #if defined(OS_CHROMEOS)
352 // The AppPackUpdater may be observing the |device_cloud_policy_subsystem_|. 356 // The AppPackUpdater may be observing the |device_cloud_policy_subsystem_|.
353 // Delete it first. 357 // Delete it first.
354 app_pack_updater_.reset(); 358 app_pack_updater_.reset();
355 359
356 network_configuration_updater_.reset(); 360 network_configuration_updater_.reset();
357 361
358 if (device_cloud_policy_manager_) 362 if (device_cloud_policy_manager_)
359 device_cloud_policy_manager_->Shutdown(); 363 device_cloud_policy_manager_->Shutdown();
360 if (device_local_account_policy_service_) 364 if (device_local_account_policy_service_)
361 device_local_account_policy_service_->Disconnect(); 365 device_local_account_policy_service_->Shutdown();
362 global_user_cloud_policy_provider_.Shutdown(); 366 global_user_cloud_policy_provider_.Shutdown();
363 #endif 367 #endif
364 368
365 device_management_service_.reset(); 369 device_management_service_.reset();
366 370
367 request_context_ = NULL; 371 request_context_ = NULL;
368 } 372 }
369 373
370 PolicyService* BrowserPolicyConnector::GetPolicyService() { 374 PolicyService* BrowserPolicyConnector::GetPolicyService() {
371 if (!policy_service_) { 375 if (!policy_service_) {
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 return new AsyncPolicyProvider(loader.Pass()); 594 return new AsyncPolicyProvider(loader.Pass());
591 } else { 595 } else {
592 return NULL; 596 return NULL;
593 } 597 }
594 #else 598 #else
595 return NULL; 599 return NULL;
596 #endif 600 #endif
597 } 601 }
598 602
599 } // namespace policy 603 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698