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

Side by Side Diff: chrome/browser/extensions/app_host_stub_main.cc

Issue 10559090: Initial commit of the App Host stub. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 6 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 | « no previous file | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "base/at_exit.h"
6 #include "base/command_line.h"
7 #include "base/file_path.h"
8 #include "base/logging.h"
9 #include "base/process_util.h"
10 #include "chrome/installer/launcher_support/chrome_launcher_support.h"
11
12 namespace {
13
14 const wchar_t kChromeExe[] = L"chrome.exe";
miket_OOO 2012/07/19 18:01:02 I'm looking for confirmation that the wchar_t type
15
16 } // namespace
17
18 int main(int /* argc */, char* /* argv[] */) {
19 base::AtExitManager exit_manager;
20
21 // Initialize the commandline singleton from the environment.
22 CommandLine::Init(0, NULL);
23
24 FilePath chrome_exe(chrome_launcher_support::GetAnyChromePath());
25
26 if (chrome_exe.empty()) {
27 LOG(ERROR) << "No Chrome executable could be found.";
28 // TODO(erikwright): install Chrome.
29 return 1;
30 }
31
32 CommandLine chrome_exe_command_line(chrome_exe);
33 chrome_exe_command_line.AppendArguments(
34 *CommandLine::ForCurrentProcess(), false);
35
36 if (base::LaunchProcess(chrome_exe_command_line,
37 base::LaunchOptions(),
38 NULL)) {
39 LOG(INFO) << "Delegated to Chrome executable at " << chrome_exe.value();
40 return 0;
41 } else {
42 LOG(INFO) << "Failed to launch Chrome executable at " << chrome_exe.value();
43 return 1;
44 }
45 }
OLDNEW
« no previous file with comments | « no previous file | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698