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

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

Issue 27548004: Cache force-installed apps/extensions in device-local accounts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Ready to reland after revert due to conflicting concurrent commit. Created 7 years, 2 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
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"
11 #include "base/bind_helpers.h" 11 #include "base/bind_helpers.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/message_loop/message_loop.h" 15 #include "base/message_loop/message_loop.h"
16 #include "base/message_loop/message_loop_proxy.h" 16 #include "base/message_loop/message_loop_proxy.h"
17 #include "base/path_service.h" 17 #include "base/path_service.h"
18 #include "base/prefs/pref_registry_simple.h" 18 #include "base/prefs/pref_registry_simple.h"
19 #include "base/prefs/pref_service.h" 19 #include "base/prefs/pref_service.h"
20 #include "base/sequenced_task_runner.h"
20 #include "base/strings/string_util.h" 21 #include "base/strings/string_util.h"
21 #include "base/strings/stringprintf.h" 22 #include "base/strings/stringprintf.h"
22 #include "base/strings/sys_string_conversions.h" 23 #include "base/strings/sys_string_conversions.h"
23 #include "base/strings/utf_string_conversions.h" 24 #include "base/strings/utf_string_conversions.h"
24 #include "base/sys_info.h" 25 #include "base/sys_info.h"
25 #include "base/threading/sequenced_worker_pool.h" 26 #include "base/threading/sequenced_worker_pool.h"
26 #include "chrome/browser/browser_process.h" 27 #include "chrome/browser/browser_process.h"
27 #include "chrome/browser/policy/async_policy_provider.h" 28 #include "chrome/browser/policy/async_policy_provider.h"
28 #include "chrome/browser/policy/cloud/cloud_policy_client.h" 29 #include "chrome/browser/policy/cloud/cloud_policy_client.h"
29 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h" 30 #include "chrome/browser/policy/cloud/cloud_policy_refresh_scheduler.h"
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 status_provider.Pass()); 288 status_provider.Pass());
288 } 289 }
289 290
290 CommandLine* command_line = CommandLine::ForCurrentProcess(); 291 CommandLine* command_line = CommandLine::ForCurrentProcess();
291 if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) { 292 if (!command_line->HasSwitch(chromeos::switches::kDisableLocalAccounts)) {
292 device_local_account_policy_service_.reset( 293 device_local_account_policy_service_.reset(
293 new DeviceLocalAccountPolicyService( 294 new DeviceLocalAccountPolicyService(
294 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(), 295 chromeos::DBusThreadManager::Get()->GetSessionManagerClient(),
295 chromeos::DeviceSettingsService::Get(), 296 chromeos::DeviceSettingsService::Get(),
296 chromeos::CrosSettings::Get(), 297 chromeos::CrosSettings::Get(),
298 GetBackgroundTaskRunner(),
297 GetBackgroundTaskRunner())); 299 GetBackgroundTaskRunner()));
298 device_local_account_policy_service_->Connect( 300 device_local_account_policy_service_->Connect(
299 device_management_service_.get()); 301 device_management_service_.get());
300 } 302 }
301 303
302 GetAppPackUpdater(); 304 GetAppPackUpdater();
303 305
304 SetTimezoneIfPolicyAvailable(); 306 SetTimezoneIfPolicyAvailable();
305 #endif 307 #endif
306 308
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 return new AsyncPolicyProvider(loader.Pass()); 573 return new AsyncPolicyProvider(loader.Pass());
572 } else { 574 } else {
573 return NULL; 575 return NULL;
574 } 576 }
575 #else 577 #else
576 return NULL; 578 return NULL;
577 #endif 579 #endif
578 } 580 }
579 581
580 } // namespace policy 582 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/extensions/external_provider_impl.cc ('k') | chrome/browser/policy/configuration_policy_handler_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698