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

Side by Side Diff: chrome/common/chrome_paths.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/common/child_process.cc ('k') | chrome/common/chrome_plugin_lib.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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #elif defined(OS_LINUX) 42 #elif defined(OS_LINUX)
43 // TODO(port): Decide what to do on linux. 43 // TODO(port): Decide what to do on linux.
44 NOTIMPLEMENTED(); 44 NOTIMPLEMENTED();
45 return false; 45 return false;
46 #endif // defined(OS_WIN) 46 #endif // defined(OS_WIN)
47 } 47 }
48 48
49 bool GetGearsPluginPathFromCommandLine(std::wstring *path) { 49 bool GetGearsPluginPathFromCommandLine(std::wstring *path) {
50 #ifndef NDEBUG 50 #ifndef NDEBUG
51 // for debugging, support a cmd line based override 51 // for debugging, support a cmd line based override
52 CommandLine command_line; 52 *path = CommandLine::ForCurrentProcess()->GetSwitchValue(
53 *path = command_line.GetSwitchValue(switches::kGearsPluginPathOverride); 53 switches::kGearsPluginPathOverride);
54 return !path->empty(); 54 return !path->empty();
55 #else 55 #else
56 return false; 56 return false;
57 #endif 57 #endif
58 } 58 }
59 59
60 bool PathProvider(int key, FilePath* result) { 60 bool PathProvider(int key, FilePath* result) {
61 // Some keys are just aliases... 61 // Some keys are just aliases...
62 switch (key) { 62 switch (key) {
63 case chrome::DIR_APP: 63 case chrome::DIR_APP:
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 } 257 }
258 258
259 // This cannot be done as a static initializer sadly since Visual Studio will 259 // This cannot be done as a static initializer sadly since Visual Studio will
260 // eliminate this object file if there is no direct entry point into it. 260 // eliminate this object file if there is no direct entry point into it.
261 void RegisterPathProvider() { 261 void RegisterPathProvider() {
262 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 262 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
263 } 263 }
264 264
265 } // namespace chrome 265 } // namespace chrome
266 266
OLDNEW
« no previous file with comments | « chrome/common/child_process.cc ('k') | chrome/common/chrome_plugin_lib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698