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

Side by Side Diff: content/renderer/render_process_impl.cc

Issue 2581353002: Use the Windows MDM API to check if the machine is being managed. (Closed)
Patch Set: rebased Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/renderer/render_process_impl.h" 5 #include "content/renderer/render_process_impl.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <windows.h> 10 #include <windows.h>
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 namespace content { 132 namespace content {
133 133
134 RenderProcessImpl::RenderProcessImpl( 134 RenderProcessImpl::RenderProcessImpl(
135 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params, 135 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params,
136 base::TaskScheduler::WorkerPoolIndexForTraitsCallback 136 base::TaskScheduler::WorkerPoolIndexForTraitsCallback
137 worker_pool_index_for_traits_callback) 137 worker_pool_index_for_traits_callback)
138 : RenderProcess(worker_pool_params, 138 : RenderProcess(worker_pool_params,
139 std::move(worker_pool_index_for_traits_callback)), 139 std::move(worker_pool_index_for_traits_callback)),
140 enabled_bindings_(0) { 140 enabled_bindings_(0) {
141 #if defined(OS_WIN) 141 #if defined(OS_WIN)
142 // Record whether the machine is domain joined in a crash key. This will be 142 // Record whether the machine is enterprise managed in a crash key. This
143 // used to better identify whether crashes are from enterprise users. 143 // will be used to better identify whether crashes are from enterprise users.
144 // Note that this is done very early on so that crashes have the highest 144 // Note that this is done very early on so that crashes have the highest
145 // chance of getting tagged. 145 // chance of getting tagged.
146 base::debug::SetCrashKeyValue("enrolled-to-domain", 146 base::debug::SetCrashKeyValue(
147 base::win::IsEnrolledToDomain() ? "yes" : "no"); 147 "is-enterprise-managed", base::win::IsEnterpriseManaged() ? "yes" : "no");
148 148
149 // HACK: See http://b/issue?id=1024307 for rationale. 149 // HACK: See http://b/issue?id=1024307 for rationale.
150 if (GetModuleHandle(L"LPK.DLL") == NULL) { 150 if (GetModuleHandle(L"LPK.DLL") == NULL) {
151 // Makes sure lpk.dll is loaded by gdi32 to make sure ExtTextOut() works 151 // Makes sure lpk.dll is loaded by gdi32 to make sure ExtTextOut() works
152 // when buffering into a EMF buffer for printing. 152 // when buffering into a EMF buffer for printing.
153 typedef BOOL (__stdcall *GdiInitializeLanguagePack)(int LoadedShapingDLLs); 153 typedef BOOL (__stdcall *GdiInitializeLanguagePack)(int LoadedShapingDLLs);
154 GdiInitializeLanguagePack gdi_init_lpk = 154 GdiInitializeLanguagePack gdi_init_lpk =
155 reinterpret_cast<GdiInitializeLanguagePack>(GetProcAddress( 155 reinterpret_cast<GdiInitializeLanguagePack>(GetProcAddress(
156 GetModuleHandle(L"GDI32.DLL"), 156 GetModuleHandle(L"GDI32.DLL"),
157 "GdiInitializeLanguagePack")); 157 "GdiInitializeLanguagePack"));
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 void RenderProcessImpl::AddBindings(int bindings) { 234 void RenderProcessImpl::AddBindings(int bindings) {
235 enabled_bindings_ |= bindings; 235 enabled_bindings_ |= bindings;
236 } 236 }
237 237
238 int RenderProcessImpl::GetEnabledBindings() const { 238 int RenderProcessImpl::GetEnabledBindings() const {
239 return enabled_bindings_; 239 return enabled_bindings_;
240 } 240 }
241 241
242 } // namespace content 242 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698