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

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

Issue 53793002: Initial implementation of Chrome Early Loading Framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
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" 13 #include "base/lazy_instance.h"
14 #include "chrome/app/chrome_breakpad_client.h" 14 #include "chrome/app/chrome_breakpad_client.h"
15 #include "chrome/app/client_util.h" 15 #include "chrome/app/client_util.h"
16 #include "chrome/app/metro_driver_win.h" 16 #include "chrome/app/metro_driver_win.h"
17 #include "chrome/browser/chrome_process_finder_win.h" 17 #include "chrome/browser/chrome_process_finder_win.h"
18 #include "chrome/browser/policy/policy_path_parser.h" 18 #include "chrome/browser/policy/policy_path_parser.h"
19 #include "chrome/common/chrome_paths_internal.h" 19 #include "chrome/common/chrome_paths_internal.h"
20 #include "chrome/common/chrome_switches.h" 20 #include "chrome/common/chrome_switches.h"
21 #include "chrome_elf/chrome_elf_main.h"
21 #include "components/breakpad/app/breakpad_client.h" 22 #include "components/breakpad/app/breakpad_client.h"
22 #include "components/breakpad/app/breakpad_win.h" 23 #include "components/breakpad/app/breakpad_win.h"
23 #include "content/public/app/startup_helper_win.h" 24 #include "content/public/app/startup_helper_win.h"
24 #include "content/public/common/result_codes.h" 25 #include "content/public/common/result_codes.h"
25 #include "sandbox/win/src/sandbox_factory.h" 26 #include "sandbox/win/src/sandbox_factory.h"
26 27
27 namespace { 28 namespace {
28 29
29 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky 30 base::LazyInstance<chrome::ChromeBreakpadClient>::Leaky
30 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER; 31 g_chrome_breakpad_client = LAZY_INSTANCE_INITIALIZER;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 } 99 }
99 100
100 } // namespace 101 } // namespace
101 102
102 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) { 103 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) {
103 // Initialize the commandline singleton from the environment. 104 // Initialize the commandline singleton from the environment.
104 CommandLine::Init(0, NULL); 105 CommandLine::Init(0, NULL);
105 // The exit manager is in charge of calling the dtors of singletons. 106 // The exit manager is in charge of calling the dtors of singletons.
106 base::AtExitManager exit_manager; 107 base::AtExitManager exit_manager;
107 108
109
110 // The purpose of this call is to force the addition of an entry in the IAT
111 // for chrome_elf.dll to force the load time dependency.
gab 2013/11/12 18:24:10 s/the load time.../a load time... Please also add
112 InitChromeElf();
gab 2013/11/12 18:24:10 Why move this back before AttemptFastNotify()?
113
108 if (AttemptFastNotify(*CommandLine::ForCurrentProcess())) 114 if (AttemptFastNotify(*CommandLine::ForCurrentProcess()))
109 return 0; 115 return 0;
110 116
111 MetroDriver metro_driver; 117 MetroDriver metro_driver;
112 if (metro_driver.in_metro_mode()) 118 if (metro_driver.in_metro_mode())
113 return metro_driver.RunInMetro(instance, &RunChrome); 119 return metro_driver.RunInMetro(instance, &RunChrome);
114 // Not in metro mode, proceed as normal. 120 // Not in metro mode, proceed as normal.
115 return RunChrome(instance); 121 return RunChrome(instance);
116 } 122 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698