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

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: Fix components tests Created 4 years 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 <windows.h> 9 #include <windows.h>
10 10
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 SetupInstallerUtilStrings(); 283 SetupInstallerUtilStrings();
284 284
285 ChromeBrowserMainParts::PreMainMessageLoopStart(); 285 ChromeBrowserMainParts::PreMainMessageLoopStart();
286 if (!parameters().ui_task) { 286 if (!parameters().ui_task) {
287 // Make sure that we know how to handle exceptions from the message loop. 287 // Make sure that we know how to handle exceptions from the message loop.
288 InitializeWindowProcExceptions(); 288 InitializeWindowProcExceptions();
289 } 289 }
290 } 290 }
291 291
292 int ChromeBrowserMainPartsWin::PreCreateThreads() { 292 int ChromeBrowserMainPartsWin::PreCreateThreads() {
293 // Record whether the machine is domain joined in a crash key. This will be used 293 // Record whether the machine is domain joined in a crash key. This will be
294 // to better identify whether crashes are from enterprise users. 294 // used to better identify whether crashes are from enterprise users.
295 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain, 295 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain,
296 base::win::IsEnrolledToDomain() ? "yes" : "no"); 296 base::win::IsEnterpriseUser() ? "yes" : "no");
297 297
298 int rv = ChromeBrowserMainParts::PreCreateThreads(); 298 int rv = ChromeBrowserMainParts::PreCreateThreads();
299 299
300 // TODO(viettrungluu): why don't we run this earlier? 300 // TODO(viettrungluu): why don't we run this earlier?
301 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && 301 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) &&
302 base::win::GetVersion() < base::win::VERSION_XP) { 302 base::win::GetVersion() < base::win::VERSION_XP) {
303 chrome::ShowWarningMessageBox( 303 chrome::ShowWarningMessageBox(
304 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 304 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
305 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); 305 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP));
306 } 306 }
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 if (resource_id) 525 if (resource_id)
526 return l10n_util::GetStringUTF16(resource_id); 526 return l10n_util::GetStringUTF16(resource_id);
527 return base::string16(); 527 return base::string16();
528 } 528 }
529 529
530 // static 530 // static
531 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 531 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
532 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 532 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
533 installer::SetTranslationDelegate(&delegate); 533 installer::SetTranslationDelegate(&delegate);
534 } 534 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698