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

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

Issue 2514483002: Add a crash key to record whether a windows machine is domain joined. (Closed)
Patch Set: Merge ToT. 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
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_win.cc ('k') | chrome/common/crash_keys.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 25 matching lines...) Expand all
36 #include "chrome/browser/ui/simple_message_box.h" 36 #include "chrome/browser/ui/simple_message_box.h"
37 #include "chrome/browser/ui/uninstall_browser_prompt.h" 37 #include "chrome/browser/ui/uninstall_browser_prompt.h"
38 #include "chrome/browser/win/browser_util.h" 38 #include "chrome/browser/win/browser_util.h"
39 #include "chrome/browser/win/chrome_elf_init.h" 39 #include "chrome/browser/win/chrome_elf_init.h"
40 #include "chrome/chrome_watcher/chrome_watcher_main_api.h" 40 #include "chrome/chrome_watcher/chrome_watcher_main_api.h"
41 #include "chrome/common/chrome_constants.h" 41 #include "chrome/common/chrome_constants.h"
42 #include "chrome/common/chrome_paths.h" 42 #include "chrome/common/chrome_paths.h"
43 #include "chrome/common/chrome_result_codes.h" 43 #include "chrome/common/chrome_result_codes.h"
44 #include "chrome/common/chrome_switches.h" 44 #include "chrome/common/chrome_switches.h"
45 #include "chrome/common/chrome_utility_messages.h" 45 #include "chrome/common/chrome_utility_messages.h"
46 #include "chrome/common/crash_keys.h"
46 #include "chrome/common/env_vars.h" 47 #include "chrome/common/env_vars.h"
47 #include "chrome/grit/chromium_strings.h" 48 #include "chrome/grit/chromium_strings.h"
48 #include "chrome/grit/generated_resources.h" 49 #include "chrome/grit/generated_resources.h"
49 #include "chrome/installer/util/browser_distribution.h" 50 #include "chrome/installer/util/browser_distribution.h"
50 #include "chrome/installer/util/helper.h" 51 #include "chrome/installer/util/helper.h"
51 #include "chrome/installer/util/install_util.h" 52 #include "chrome/installer/util/install_util.h"
52 #include "chrome/installer/util/installer_util_strings.h" 53 #include "chrome/installer/util/installer_util_strings.h"
53 #include "chrome/installer/util/l10n_string_util.h" 54 #include "chrome/installer/util/l10n_string_util.h"
54 #include "chrome/installer/util/shell_util.h" 55 #include "chrome/installer/util/shell_util.h"
55 #include "content/public/browser/browser_thread.h" 56 #include "content/public/browser/browser_thread.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 SetupInstallerUtilStrings(); 283 SetupInstallerUtilStrings();
283 284
284 ChromeBrowserMainParts::PreMainMessageLoopStart(); 285 ChromeBrowserMainParts::PreMainMessageLoopStart();
285 if (!parameters().ui_task) { 286 if (!parameters().ui_task) {
286 // 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.
287 InitializeWindowProcExceptions(); 288 InitializeWindowProcExceptions();
288 } 289 }
289 } 290 }
290 291
291 int ChromeBrowserMainPartsWin::PreCreateThreads() { 292 int ChromeBrowserMainPartsWin::PreCreateThreads() {
293 // Record whether the machine is domain joined in a crash key. This will be used
294 // to better identify whether crashes are from enterprise users.
295 #if defined(OS_WIN)
sky 2016/12/06 23:23:43 These ifdefs should no longer be necessary (this f
Georges Khalil 2016/12/07 15:00:22 Oops, removed.
296 base::debug::SetCrashKeyValue(crash_keys::kEnrolledToDomain,
297 base::win::IsEnrolledToDomain() ? "yes" : "no");
298 #endif
299
292 int rv = ChromeBrowserMainParts::PreCreateThreads(); 300 int rv = ChromeBrowserMainParts::PreCreateThreads();
293 301
294 // TODO(viettrungluu): why don't we run this earlier? 302 // TODO(viettrungluu): why don't we run this earlier?
295 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) && 303 if (!parsed_command_line().HasSwitch(switches::kNoErrorDialogs) &&
296 base::win::GetVersion() < base::win::VERSION_XP) { 304 base::win::GetVersion() < base::win::VERSION_XP) {
297 chrome::ShowWarningMessageBox( 305 chrome::ShowWarningMessageBox(
298 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), 306 NULL, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME),
299 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP)); 307 l10n_util::GetStringUTF16(IDS_UNSUPPORTED_OS_PRE_WIN_XP));
300 } 308 }
301 309
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 if (resource_id) 527 if (resource_id)
520 return l10n_util::GetStringUTF16(resource_id); 528 return l10n_util::GetStringUTF16(resource_id);
521 return base::string16(); 529 return base::string16();
522 } 530 }
523 531
524 // static 532 // static
525 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() { 533 void ChromeBrowserMainPartsWin::SetupInstallerUtilStrings() {
526 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ()); 534 CR_DEFINE_STATIC_LOCAL(TranslationDelegate, delegate, ());
527 installer::SetTranslationDelegate(&delegate); 535 installer::SetTranslationDelegate(&delegate);
528 } 536 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_crash_reporter_client_win.cc ('k') | chrome/common/crash_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698