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

Side by Side Diff: chrome/app/chrome_exe_main_win.cc

Issue 19697015: Move dependency on env_vars.h to breakpad client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome_breakpad_client.cc ('k') | chrome/app/client_util.cc » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 <windows.h> 5 #include <windows.h>
6 #include <tchar.h> 6 #include <tchar.h>
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/files/file_path.h" 12 #include "base/files/file_path.h"
13 #include "base/lazy_instance.h"
14 #include "chrome/app/chrome_breakpad_client.h"
13 #include "chrome/app/breakpad_win.h" 15 #include "chrome/app/breakpad_win.h"
14 #include "chrome/app/client_util.h" 16 #include "chrome/app/client_util.h"
15 #include "chrome/app/metro_driver_win.h" 17 #include "chrome/app/metro_driver_win.h"
16 #include "chrome/browser/chrome_process_finder_win.h" 18 #include "chrome/browser/chrome_process_finder_win.h"
17 #include "chrome/browser/policy/policy_path_parser.h" 19 #include "chrome/browser/policy/policy_path_parser.h"
18 #include "chrome/common/chrome_paths_internal.h" 20 #include "chrome/common/chrome_paths_internal.h"
19 #include "chrome/common/chrome_switches.h" 21 #include "chrome/common/chrome_switches.h"
22 #include "components/breakpad/breakpad_client.h"
20 #include "content/public/app/startup_helper_win.h" 23 #include "content/public/app/startup_helper_win.h"
21 #include "content/public/common/result_codes.h" 24 #include "content/public/common/result_codes.h"
22 #include "sandbox/win/src/sandbox_factory.h" 25 #include "sandbox/win/src/sandbox_factory.h"
23 26
24 namespace { 27 namespace {
25 28
29 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky
30 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER;
31
26 int RunChrome(HINSTANCE instance) { 32 int RunChrome(HINSTANCE instance) {
33 breakpad::SetBreakpadClient(g_chrome_breakpad_client.Pointer());
34
27 bool exit_now = true; 35 bool exit_now = true;
28 // We restarted because of a previous crash. Ask user if we should relaunch. 36 // We restarted because of a previous crash. Ask user if we should relaunch.
29 if (ShowRestartDialogIfCrashed(&exit_now)) { 37 if (ShowRestartDialogIfCrashed(&exit_now)) {
30 if (exit_now) 38 if (exit_now)
31 return content::RESULT_CODE_NORMAL_EXIT; 39 return content::RESULT_CODE_NORMAL_EXIT;
32 } 40 }
33 41
34 // Initialize the sandbox services. 42 // Initialize the sandbox services.
35 sandbox::SandboxInterfaceInfo sandbox_info = {0}; 43 sandbox::SandboxInterfaceInfo sandbox_info = {0};
36 content::InitializeSandboxInfo(&sandbox_info); 44 content::InitializeSandboxInfo(&sandbox_info);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 107
100 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) 108 if (AttemptFastNotify(*CommandLine::ForCurrentProcess()))
101 return 0; 109 return 0;
102 110
103 MetroDriver metro_driver; 111 MetroDriver metro_driver;
104 if (metro_driver.in_metro_mode()) 112 if (metro_driver.in_metro_mode())
105 return metro_driver.RunInMetro(instance, &RunChrome); 113 return metro_driver.RunInMetro(instance, &RunChrome);
106 // Not in metro mode, proceed as normal. 114 // Not in metro mode, proceed as normal.
107 return RunChrome(instance); 115 return RunChrome(instance);
108 } 116 }
OLDNEW
« no previous file with comments | « chrome/app/chrome_breakpad_client.cc ('k') | chrome/app/client_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698