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

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

Issue 19462006: Implement fetching, caching and retrieval of external policy data (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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 | 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/cloud_external_data_manager.h" 5 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h"
6 6
7 #include "chrome/browser/policy/cloud/cloud_policy_store.h"
8 #include "net/url_request/url_request_context_getter.h"
9
7 namespace policy { 10 namespace policy {
8 11
9 CloudExternalDataManager::MetadataEntry::MetadataEntry() { 12 CloudExternalDataManager::MetadataEntry::MetadataEntry() {
10 } 13 }
11 14
12 CloudExternalDataManager::MetadataEntry::MetadataEntry(const std::string& url, 15 CloudExternalDataManager::MetadataEntry::MetadataEntry(const std::string& url,
13 const std::string& hash) 16 const std::string& hash)
14 : url(url), 17 : url(url),
15 hash(hash) { 18 hash(hash) {
16 } 19 }
17 20
21 bool CloudExternalDataManager::MetadataEntry::operator!=(
22 const MetadataEntry& other) const {
23 return url != other.url || hash != other.hash;
24 }
25
26 CloudExternalDataManager::CloudExternalDataManager() : policy_store_(NULL),
27 weak_factory_(this) {
28 }
29
30 CloudExternalDataManager::~CloudExternalDataManager() {
31 }
32
33 void CloudExternalDataManager::SetPolicyStore(CloudPolicyStore* policy_store) {
34 policy_store_ = policy_store;
35 if (policy_store_)
36 policy_store_->SetExternalDataManager(weak_factory_.GetWeakPtr());
37 }
38
18 } // namespace policy 39 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698