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

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

Issue 28128: Fix all places where we used the GetWinVersion function... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « base/win_util_unittest.cc ('k') | chrome/browser/browser_main_win.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"
11 #include "base/debug_on_start.h" 11 #include "base/debug_on_start.h"
12 #include "base/process_util.h" 12 #include "base/process_util.h"
13 #include "base/win_util.h" 13 #include "base/win_util.h"
14 #include "chrome/app/breakpad.h" 14 #include "chrome/app/breakpad.h"
15 #include "chrome/app/client_util.h" 15 #include "chrome/app/client_util.h"
16 #include "chrome/app/google_update_client.h" 16 #include "chrome/app/google_update_client.h"
17 #include "chrome/app/result_codes.h" 17 #include "chrome/app/result_codes.h"
18 #include "chrome/common/chrome_switches.h" 18 #include "chrome/common/chrome_switches.h"
19 #include "sandbox/src/sandbox_factory.h" 19 #include "sandbox/src/sandbox_factory.h"
20 #include "sandbox/src/dep.h" 20 #include "sandbox/src/dep.h"
21 21
22 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance, 22 int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev_instance,
23 wchar_t* command_line, int) { 23 wchar_t* command_line, int) {
24 base::EnableTerminationOnHeapCorruption(); 24 base::EnableTerminationOnHeapCorruption();
25 25
26 // The exit manager is in charge of calling the dtors of singletons. 26 // The exit manager is in charge of calling the dtors of singletons.
27 base::AtExitManager exit_manager; 27 base::AtExitManager exit_manager;
28 28
29 win_util::WinVersion win_version = win_util::GetWinVersion(); 29 win_util::WinVersion win_version = win_util::GetWinVersion();
30 if (win_version == win_util::WINVERSION_XP || 30 if (win_version < win_util::WINVERSION_VISTA) {
31 win_version == win_util::WINVERSION_SERVER_2003) {
32 // On Vista, this is unnecessary since it is controlled through the 31 // On Vista, this is unnecessary since it is controlled through the
33 // /NXCOMPAT linker flag. 32 // /NXCOMPAT linker flag.
34 // Enforces strong DEP support. 33 // Enforces strong DEP support.
35 sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED); 34 sandbox::SetCurrentProcessDEP(sandbox::DEP_ENABLED);
36 } 35 }
37 36
38 // Get the interface pointer to the BrokerServices or TargetServices, 37 // Get the interface pointer to the BrokerServices or TargetServices,
39 // depending who we are. 38 // depending who we are.
40 sandbox::SandboxInterfaceInfo sandbox_info = {0}; 39 sandbox::SandboxInterfaceInfo sandbox_info = {0};
41 sandbox_info.broker_services = sandbox::SandboxFactory::GetBrokerServices(); 40 sandbox_info.broker_services = sandbox::SandboxFactory::GetBrokerServices();
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>( 99 client_util::DLL_MAIN entry = reinterpret_cast<client_util::DLL_MAIN>(
101 ::GetProcAddress(dll_handle, "ChromeMain")); 100 ::GetProcAddress(dll_handle, "ChromeMain"));
102 if (NULL != entry) 101 if (NULL != entry)
103 return (entry)(instance, &sandbox_info, command_line); 102 return (entry)(instance, &sandbox_info, command_line);
104 } 103 }
105 #endif 104 #endif
106 105
107 return ResultCodes::GOOGLE_UPDATE_LAUNCH_FAILED; 106 return ResultCodes::GOOGLE_UPDATE_LAUNCH_FAILED;
108 } 107 }
109 108
OLDNEW
« no previous file with comments | « base/win_util_unittest.cc ('k') | chrome/browser/browser_main_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698