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

Side by Side Diff: chrome/browser/chrome_browser_main_win.cc

Issue 2581353002: Use the Windows MDM API to check if the machine is being managed. (Closed)
Patch Set: Address review comments 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 "chrome/browser/chrome_browser_main_win.h" 5 #include "chrome/browser/chrome_browser_main_win.h"
6 6
7 #include <shellapi.h> 7 #include <shellapi.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <windows.h> 10 #include <windows.h>
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 SetupInstallerUtilStrings(); 304 SetupInstallerUtilStrings();
305 305
306 ChromeBrowserMainParts::PreMainMessageLoopStart(); 306 ChromeBrowserMainParts::PreMainMessageLoopStart();
307 if (!parameters().ui_task) { 307 if (!parameters().ui_task) {
308 // Make sure that we know how to handle exceptions from the message loop. 308 // Make sure that we know how to handle exceptions from the message loop.
309 InitializeWindowProcExceptions(); 309 InitializeWindowProcExceptions();
310 } 310 }
311 } 311 }
312 312
313 int ChromeBrowserMainPartsWin::PreCreateThreads() { 313 int ChromeBrowserMainPartsWin::PreCreateThreads() {
314 // Record whether the machine is domain joined in a crash key. This will be used 314 // Record whether the machine is domain joined in a crash key. This will be
sky 2017/02/15 21:27:15 Update comment to say enterprise managed?
Roger Tawa OOO till Jul 10th 2017/02/17 19:20:13 Done.
315 // to better identify whether crashes are from enterprise users. 315 // used to better identify whether crashes are from enterprise users.
316 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain, 316 base::debug::SetCrashKeyValue(
317 base::win::IsEnrolledToDomain() ? "yes" : "no"); 317 crash_keys::kEnrolledToDomain,
sky 2017/02/15 21:27:15 Should this key be renamed to match?
Roger Tawa OOO till Jul 10th 2017/02/17 19:20:13 Done. Chatted with crash folks and they are good
318 base::win::IsEnterpriseManaged() ? "yes" : "no");
318 319
319 int rv = ChromeBrowserMainParts::PreCreateThreads(); 320 int rv = ChromeBrowserMainParts::PreCreateThreads();
320 321
321 // TODO(viettrungluu): why don't we run this earlier? 322 // TODO(viettrungluu): why don't we run this earlier?
322 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && 323 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) &&
323 base::win::GetVersion() < base::win::VERSION_XP) { 324 base::win::GetVersion() < base::win::VERSION_XP) {
324 chrome::ShowWarningMessageBox( 325 chrome::ShowWarningMessageBox(
325 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 326 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
326 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); 327 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP));
327 } 328 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (resource_id) 539 if (resource_id)
539 return l10n_util::GetStringUTF16(resource_id); 540 return l10n_util::GetStringUTF16(resource_id);
540 return base::string16(); 541 return base::string16();
541 } 542 }
542 543
543 // static 544 // static
544 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 545 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
545 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 546 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
546 installer::SetTranslationDelegate(&delegate); 547 installer::SetTranslationDelegate(&delegate);
547 } 548 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698