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

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

Issue 2608513002: Remove mojo::String. (Closed)
Patch Set: Created 3 years, 12 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/policy/arc_policy_bridge.h" 5 #include "chrome/browser/chromeos/arc/policy/arc_policy_bridge.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
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 "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
19 #include "chrome/browser/profiles/profile_manager.h" 19 #include "chrome/browser/profiles/profile_manager.h"
20 #include "chrome/common/pref_names.h" 20 #include "chrome/common/pref_names.h"
21 #include "chromeos/network/onc/onc_utils.h" 21 #include "chromeos/network/onc/onc_utils.h"
22 #include "components/arc/arc_bridge_service.h" 22 #include "components/arc/arc_bridge_service.h"
23 #include "components/onc/onc_constants.h" 23 #include "components/onc/onc_constants.h"
24 #include "components/policy/core/common/policy_map.h" 24 #include "components/policy/core/common/policy_map.h"
25 #include "components/policy/core/common/policy_namespace.h" 25 #include "components/policy/core/common/policy_namespace.h"
26 #include "components/policy/policy_constants.h" 26 #include "components/policy/policy_constants.h"
27 #include "components/prefs/pref_service.h" 27 #include "components/prefs/pref_service.h"
28 #include "components/safe_json/safe_json_parser.h" 28 #include "components/safe_json/safe_json_parser.h"
29 #include "components/user_manager/user.h" 29 #include "components/user_manager/user.h"
30 #include "mojo/public/cpp/bindings/string.h"
31 30
32 namespace arc { 31 namespace arc {
33 32
34 namespace { 33 namespace {
35 34
36 constexpr char kArcGlobalAppRestrictions[] = "globalAppRestrictions"; 35 constexpr char kArcGlobalAppRestrictions[] = "globalAppRestrictions";
37 constexpr char kArcCaCerts[] = "caCerts"; 36 constexpr char kArcCaCerts[] = "caCerts";
38 constexpr char kNonComplianceDetails[] = "nonComplianceDetails"; 37 constexpr char kNonComplianceDetails[] = "nonComplianceDetails";
39 constexpr char kNonComplianceReason[] = "nonComplianceReason"; 38 constexpr char kNonComplianceReason[] = "nonComplianceReason";
40 constexpr char kPolicyCompliantJson[] = "{ \"policyCompliant\": true }"; 39 constexpr char kPolicyCompliantJson[] = "{ \"policyCompliant\": true }";
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 user_manager::UserManager::Get()->GetPrimaryUser(); 378 user_manager::UserManager::Get()->GetPrimaryUser();
380 Profile* const profile = 379 Profile* const profile =
381 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); 380 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user);
382 auto* profile_policy_connector = 381 auto* profile_policy_connector =
383 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile); 382 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile);
384 policy_service_ = profile_policy_connector->policy_service(); 383 policy_service_ = profile_policy_connector->policy_service();
385 is_managed_ = profile_policy_connector->IsManaged(); 384 is_managed_ = profile_policy_connector->IsManaged();
386 } 385 }
387 386
388 } // namespace arc 387 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698