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

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

Issue 1885683005: Add module suffix in .mojom files for components/arc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase only Created 4 years, 8 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"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 arc_bridge_service()->RemoveObserver(this); 130 arc_bridge_service()->RemoveObserver(this);
131 } 131 }
132 132
133 void ArcPolicyBridge::OnPolicyInstanceReady() { 133 void ArcPolicyBridge::OnPolicyInstanceReady() {
134 VLOG(1) << "ArcPolicyBridge::OnPolicyInstanceReady"; 134 VLOG(1) << "ArcPolicyBridge::OnPolicyInstanceReady";
135 if (policy_service_ == nullptr) { 135 if (policy_service_ == nullptr) {
136 InitializePolicyService(); 136 InitializePolicyService();
137 } 137 }
138 policy_service_->AddObserver(policy::POLICY_DOMAIN_CHROME, this); 138 policy_service_->AddObserver(policy::POLICY_DOMAIN_CHROME, this);
139 139
140 PolicyInstance* const policy_instance = 140 mojom::PolicyInstance* const policy_instance =
141 arc_bridge_service()->policy_instance(); 141 arc_bridge_service()->policy_instance();
142 if (!policy_instance) { 142 if (!policy_instance) {
143 LOG(ERROR) << "OnPolicyInstanceReady called, but no policy instance found"; 143 LOG(ERROR) << "OnPolicyInstanceReady called, but no policy instance found";
144 return; 144 return;
145 } 145 }
146 146
147 policy_instance->Init(binding_.CreateInterfacePtrAndBind()); 147 policy_instance->Init(binding_.CreateInterfacePtrAndBind());
148 } 148 }
149 149
150 void ArcPolicyBridge::OnPolicyInstanceClosed() { 150 void ArcPolicyBridge::OnPolicyInstanceClosed() {
(...skipping 24 matching lines...) Expand all
175 const user_manager::User* const primary_user = 175 const user_manager::User* const primary_user =
176 user_manager::UserManager::Get()->GetPrimaryUser(); 176 user_manager::UserManager::Get()->GetPrimaryUser();
177 Profile* const profile = 177 Profile* const profile =
178 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user); 178 chromeos::ProfileHelper::Get()->GetProfileByUser(primary_user);
179 policy_service_ = 179 policy_service_ =
180 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile) 180 policy::ProfilePolicyConnectorFactory::GetForBrowserContext(profile)
181 ->policy_service(); 181 ->policy_service();
182 } 182 }
183 183
184 } // namespace arc 184 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_policy_bridge.h ('k') | chrome/browser/chromeos/arc/arc_process.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698