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

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

Issue 7147015: Move user cloud policy to BrowserProcess (was 6979011) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit_test include breakage 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/policy/configuration_policy_store_interface.h"
6
7 #include "base/values.h"
8
9 namespace {
10
11 bool IsProxyPolicy(policy::ConfigurationPolicyType policy) {
12 return policy == policy::kPolicyProxyMode ||
13 policy == policy::kPolicyProxyServerMode ||
14 policy == policy::kPolicyProxyServer ||
15 policy == policy::kPolicyProxyPacUrl ||
16 policy == policy::kPolicyProxyBypassList;
17 }
18
19 } // namespace
20
21 namespace policy {
22
23 void ObservingPolicyStoreInterface::Apply(ConfigurationPolicyType policy,
24 Value* value) {
25 next_->Apply(policy, value);
26
27 if (IsProxyPolicy(policy))
28 proxy_policy_applied_ = true;
29 }
30
31 void FilteringPolicyStoreInterface::Apply(ConfigurationPolicyType policy,
32 Value* value) {
33 // Apply() takes ownership of |value|.
34 if (IsProxyPolicy(policy) && apply_proxy_policies_)
35 next_->Apply(policy, value);
36 else
37 delete value;
38 }
39
40 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698