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

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

Issue 7298012: Consolidate data storage and notifications in the cloud policy subsystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/testing_cloud_policy_subsystem.h" 5 #include "chrome/browser/policy/testing_cloud_policy_subsystem.h"
6 6
7 #include "chrome/browser/policy/cloud_policy_controller.h" 7 #include "chrome/browser/policy/cloud_policy_controller.h"
8 #include "chrome/browser/policy/device_token_fetcher.h" 8 #include "chrome/browser/policy/device_token_fetcher.h"
9 #include "chrome/browser/policy/logging_work_scheduler.h" 9 #include "chrome/browser/policy/logging_work_scheduler.h"
10 10
11 namespace policy { 11 namespace policy {
12 12
13 TestingCloudPolicySubsystem::TestingCloudPolicySubsystem( 13 TestingCloudPolicySubsystem::TestingCloudPolicySubsystem(
14 CloudPolicyIdentityStrategy* identity_strategy, 14 CloudPolicyDataStore* data_store,
15 CloudPolicyCacheBase* policy_cache, 15 CloudPolicyCacheBase* policy_cache,
16 const std::string& device_management_url, 16 const std::string& device_management_url,
17 EventLogger* logger) 17 EventLogger* logger)
18 : CloudPolicySubsystem(), 18 : CloudPolicySubsystem(),
19 logger_(logger) { 19 logger_(logger) {
20 Initialize(identity_strategy, policy_cache, device_management_url); 20 Initialize(data_store, policy_cache, device_management_url);
21 } 21 }
22 22
23 void TestingCloudPolicySubsystem::CreateDeviceTokenFetcher() { 23 void TestingCloudPolicySubsystem::CreateDeviceTokenFetcher() {
24 device_token_fetcher_.reset( 24 device_token_fetcher_.reset(
25 new DeviceTokenFetcher(device_management_service_.get(), 25 new DeviceTokenFetcher(device_management_service_.get(),
26 cloud_policy_cache_.get(), 26 cloud_policy_cache_.get(),
27 data_store_,
27 notifier_.get(), 28 notifier_.get(),
28 new LoggingWorkScheduler(logger_))); 29 new LoggingWorkScheduler(logger_)));
29 } 30 }
30 31
31 void TestingCloudPolicySubsystem::CreateCloudPolicyController() { 32 void TestingCloudPolicySubsystem::CreateCloudPolicyController() {
32 cloud_policy_controller_.reset( 33 cloud_policy_controller_.reset(
33 new CloudPolicyController(device_management_service_.get(), 34 new CloudPolicyController(device_management_service_.get(),
34 cloud_policy_cache_.get(), 35 cloud_policy_cache_.get(),
35 device_token_fetcher_.get(), 36 device_token_fetcher_.get(),
36 identity_strategy_, 37 data_store_,
37 notifier_.get(), 38 notifier_.get(),
38 new LoggingWorkScheduler(logger_))); 39 new LoggingWorkScheduler(logger_)));
39 } 40 }
40 41
41 } // namespace policy 42 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/testing_cloud_policy_subsystem.h ('k') | chrome/browser/policy/user_policy_identity_strategy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698