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

Side by Side Diff: chrome/utility/utility_main.cc

Issue 5947002: As the first step in an effort to improve robustness of the cloud print proxy... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Review comments Created 10 years 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/service/service_utility_process_host.cc ('k') | chrome/utility/utility_thread.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "app/app_switches.h" 5 #include "app/app_switches.h"
6 #include "app/hi_res_timer_manager.h" 6 #include "app/hi_res_timer_manager.h"
7 #include "app/system_monitor.h" 7 #include "app/system_monitor.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 27 matching lines...) Expand all
38 #if defined(OS_WIN) 38 #if defined(OS_WIN)
39 // Load the pdf plugin before the sandbox is turned on. This is for Windows 39 // Load the pdf plugin before the sandbox is turned on. This is for Windows
40 // only because we need this DLL only on Windows. 40 // only because we need this DLL only on Windows.
41 FilePath pdf; 41 FilePath pdf;
42 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && 42 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) &&
43 file_util::PathExists(pdf)) { 43 file_util::PathExists(pdf)) {
44 bool rv = !!LoadLibrary(pdf.value().c_str()); 44 bool rv = !!LoadLibrary(pdf.value().c_str());
45 DCHECK(rv) << "Couldn't load PDF plugin"; 45 DCHECK(rv) << "Couldn't load PDF plugin";
46 } 46 }
47 47
48 sandbox::TargetServices* target_services = 48 bool no_sandbox = parameters.command_line_.HasSwitch(switches::kNoSandbox);
49 parameters.sandbox_info_.TargetServices(); 49 if (!no_sandbox) {
50 if (!target_services) 50 sandbox::TargetServices* target_services =
51 return false; 51 parameters.sandbox_info_.TargetServices();
52 52 if (!target_services)
53 target_services->LowerToken(); 53 return false;
54 target_services->LowerToken();
55 }
54 #endif 56 #endif
55 57
56 CommandLine* command_line = CommandLine::ForCurrentProcess(); 58 CommandLine* command_line = CommandLine::ForCurrentProcess();
57 std::string lang = command_line->GetSwitchValueASCII(switches::kLang); 59 std::string lang = command_line->GetSwitchValueASCII(switches::kLang);
58 if (!lang.empty()) 60 if (!lang.empty())
59 extension_l10n_util::SetProcessLocale(lang); 61 extension_l10n_util::SetProcessLocale(lang);
60 62
61 MessageLoop::current()->Run(); 63 MessageLoop::current()->Run();
62 64
63 return 0; 65 return 0;
64 } 66 }
OLDNEW
« no previous file with comments | « chrome/service/service_utility_process_host.cc ('k') | chrome/utility/utility_thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698