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

Side by Side Diff: chrome/browser/chromeos/arc/arc_policy_bridge.cc

Issue 2273783002: Move policy generated files to components/policy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missed headers Created 4 years, 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/arc/arc_policy_bridge.h" 5 #include "chrome/browser/chromeos/arc/arc_policy_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
11 #include "base/json/json_string_value_serializer.h" 11 #include "base/json/json_string_value_serializer.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/ptr_util.h" 13 #include "base/memory/ptr_util.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/chromeos/profiles/profile_helper.h" 15 #include "chrome/browser/chromeos/profiles/profile_helper.h"
16 #include "chrome/browser/policy/profile_policy_connector.h" 16 #include "chrome/browser/policy/profile_policy_connector.h"
17 #include "chrome/browser/policy/profile_policy_connector_factory.h" 17 #include "chrome/browser/policy/profile_policy_connector_factory.h"
18 #include "chromeos/network/onc/onc_utils.h" 18 #include "chromeos/network/onc/onc_utils.h"
19 #include "components/onc/onc_constants.h" 19 #include "components/onc/onc_constants.h"
20 #include "components/policy/core/common/policy_map.h" 20 #include "components/policy/core/common/policy_map.h"
21 #include "components/policy/core/common/policy_namespace.h" 21 #include "components/policy/core/common/policy_namespace.h"
22 #include "components/policy/policy_constants.h"
22 #include "components/user_manager/user.h" 23 #include "components/user_manager/user.h"
23 #include "mojo/public/cpp/bindings/string.h" 24 #include "mojo/public/cpp/bindings/string.h"
24 #include "policy/policy_constants.h"
25 25
26 namespace arc { 26 namespace arc {
27 27
28 namespace { 28 namespace {
29 29
30 const char kArcGlobalAppRestrictions[] = "globalAppRestrictions"; 30 const char kArcGlobalAppRestrictions[] = "globalAppRestrictions";
31 const char kArcCaCerts[] = "caCerts"; 31 const char kArcCaCerts[] = "caCerts";
32 32
33 // invert_bool_value: If the Chrome policy and the ARC policy with boolean value 33 // invert_bool_value: If the Chrome policy and the ARC policy with boolean value
34 // have opposite semantics, set this to true so the bool is inverted before 34 // have opposite semantics, set this to true so the bool is inverted before
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 user_manager::UserManager::Get()->GetPrimaryUser(); 309 user_manager::UserManager::Get()->GetPrimaryUser();
310 Profile* const profile = 310 Profile* const profile =
311 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); 311 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user);
312 auto* profile_policy_connector = 312 auto* profile_policy_connector =
313 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile); 313 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile);
314 policy_service_ = profile_policy_connector->policy_service(); 314 policy_service_ = profile_policy_connector->policy_service();
315 is_managed_ = profile_policy_connector->IsManaged(); 315 is_managed_ = profile_policy_connector->IsManaged();
316 } 316 }
317 317
318 } // namespace arc 318 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698