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

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

Issue 109743002: Move policy code into components/policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moar fixes Created 7 years 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/cloud/cloud_external_data_manager.h"
6
7 #include "chrome/browser/policy/cloud/cloud_policy_store.h"
8 #include "net/url_request/url_request_context_getter.h"
9
10 namespace policy {
11
12 CloudExternalDataManager::MetadataEntry::MetadataEntry() {
13 }
14
15 CloudExternalDataManager::MetadataEntry::MetadataEntry(const std::string& url,
16 const std::string& hash)
17 : url(url),
18 hash(hash) {
19 }
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 weak_factory_.InvalidateWeakPtrs();
35 policy_store_ = policy_store;
36 if (policy_store_)
37 policy_store_->SetExternalDataManager(weak_factory_.GetWeakPtr());
38 }
39
40 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/cloud/cloud_external_data_manager.h ('k') | chrome/browser/policy/cloud/cloud_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698