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

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

Issue 18248: CommandLine API rework (Closed)
Patch Set: fixes Created 11 years, 11 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
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/app/chrome_main_uitest.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 24 matching lines...) Expand all
35 sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED); 35 sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED);
36 } 36 }
37 37
38 // Get the interface pointer to the BrokerServices or TargetServices, 38 // Get the interface pointer to the BrokerServices or TargetServices,
39 // depending who we are. 39 // depending who we are.
40 sandbox::SandboxInterfaceInfo sandbox_info = {0}; 40 sandbox::SandboxInterfaceInfo sandbox_info = {0};
41 sandbox_info.broker_services = sandbox::SandboxFactory::GetBrokerServices(); 41 sandbox_info.broker_services = sandbox::SandboxFactory::GetBrokerServices();
42 if (!sandbox_info.broker_services) 42 if (!sandbox_info.broker_services)
43 sandbox_info.target_services = sandbox::SandboxFactory::GetTargetServices(); 43 sandbox_info.target_services = sandbox::SandboxFactory::GetTargetServices();
44 44
45 CommandLine::Init(0, NULL);
46
45 const wchar_t* dll_name = L"chrome.dll"; 47 const wchar_t* dll_name = L"chrome.dll";
46 #if defined(GOOGLE_CHROME_BUILD) 48 #if defined(GOOGLE_CHROME_BUILD)
47 google_update::GoogleUpdateClient client; 49 google_update::GoogleUpdateClient client;
48 50
49 // TODO(erikkay): Get guid from build macros rather than hardcoding. 51 // TODO(erikkay): Get guid from build macros rather than hardcoding.
50 // TODO(erikkay): verify client.Init() return value for official builds 52 // TODO(erikkay): verify client.Init() return value for official builds
51 client.Init(L"{8A69D345-D564-463c-AFF1-A69D9E530F96}", dll_name); 53 client.Init(L"{8A69D345-D564-463c-AFF1-A69D9E530F96}", dll_name);
52 54
53 // Initialize the crash reporter. 55 // Initialize the crash reporter.
54 InitCrashReporter(client.GetDLLPath()); 56 InitCrashReporter(client.GetDLLPath());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>( 92 client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>(
91 ::GetProcAddress(dll_handle, "ChromeMain")); 93 ::GetProcAddress(dll_handle, "ChromeMain"));
92 if (NULL != entry) 94 if (NULL != entry)
93 return (entry)(instance, &sandbox_info, command_line); 95 return (entry)(instance, &sandbox_info, command_line);
94 } 96 }
95 #endif 97 #endif
96 98
97 return ResultCodes::GOOGLE_UPDATE_LAUNCH_FAILED; 99 return ResultCodes::GOOGLE_UPDATE_LAUNCH_FAILED;
98 } 100 }
99 101
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/app/chrome_main_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698