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

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: Add uma logging for new api 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
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(crash_keys::kEnrolledToDomain,
317 base::win::IsEnrolledToDomain() ? "yes" : "no"); 317 base::win::IsEnterpriseUser() ? "yes" : "no");
318 318
319 int rv = ChromeBrowserMainParts::PreCreateThreads(); 319 int rv = ChromeBrowserMainParts::PreCreateThreads();
320 320
321 // TODO(viettrungluu): why don't we run this earlier? 321 // TODO(viettrungluu): why don't we run this earlier?
322 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && 322 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) &&
323 base::win::GetVersion() < base::win::VERSION_XP) { 323 base::win::GetVersion() < base::win::VERSION_XP) {
324 chrome::ShowWarningMessageBox( 324 chrome::ShowWarningMessageBox(
325 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 325 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
326 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); 326 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP));
327 } 327 }
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 if (resource_id) 538 if (resource_id)
539 return l10n_util::GetStringUTF16(resource_id); 539 return l10n_util::GetStringUTF16(resource_id);
540 return base::string16(); 540 return base::string16();
541 } 541 }
542 542
543 // static 543 // static
544 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 544 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
545 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 545 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
546 installer::SetTranslationDelegate(&delegate); 546 installer::SetTranslationDelegate(&delegate);
547 } 547 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698