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

Side by Side Diff: chrome/browser/policy/cloud/policy_header_service_factory.cc

Issue 116273002: Added support for signed policy blobs on desktop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for ios. Created 6 years, 10 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/policy/cloud/policy_header_service_factory.h" 5 #include "chrome/browser/policy/cloud/policy_header_service_factory.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h" 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma nager.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 #endif 97 #endif
98 if (!manager) 98 if (!manager)
99 return NULL; 99 return NULL;
100 CloudPolicyStore* user_store = manager->core()->store(); 100 CloudPolicyStore* user_store = manager->core()->store();
101 CloudPolicyStore* device_store = NULL; 101 CloudPolicyStore* device_store = NULL;
102 #if defined(OS_CHROMEOS) 102 #if defined(OS_CHROMEOS)
103 device_store = connector->GetDeviceCloudPolicyManager()->core()->store(); 103 device_store = connector->GetDeviceCloudPolicyManager()->core()->store();
104 #endif 104 #endif
105 105
106 scoped_ptr<PolicyHeaderService> service = make_scoped_ptr( 106 scoped_ptr<PolicyHeaderService> service = make_scoped_ptr(
107 new PolicyHeaderService( 107 new PolicyHeaderService(device_management_service->GetServerUrl(),
108 device_management_service->GetServerUrl(), user_store, device_store)); 108 kPolicyVerificationKeyHash,
109 user_store,
110 device_store));
109 return new PolicyHeaderServiceWrapper(service.Pass()); 111 return new PolicyHeaderServiceWrapper(service.Pass());
110 } 112 }
111 113
112 // static 114 // static
113 PolicyHeaderServiceFactory* PolicyHeaderServiceFactory::GetInstance() { 115 PolicyHeaderServiceFactory* PolicyHeaderServiceFactory::GetInstance() {
114 return Singleton<PolicyHeaderServiceFactory>::get(); 116 return Singleton<PolicyHeaderServiceFactory>::get();
115 } 117 }
116 118
117 } // namespace policy 119 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698