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

Side by Side Diff: chrome/common/chrome_paths.cc

Issue 17198013: Don't use PathService for the location of nacl_helper and nacl_helper_bootstrap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bring nacl_paths back Created 7 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
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/nacl_paths.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) 2012 The Chromium Authors. All rights reserved. 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 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 "chrome/common/chrome_paths.h" 5 #include "chrome/common/chrome_paths.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 #if defined(OS_WIN) 58 #if defined(OS_WIN)
59 FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll"); 59 FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.dll");
60 #elif defined(OS_MACOSX) 60 #elif defined(OS_MACOSX)
61 // TODO(noelallen) Please verify this extention name is correct. 61 // TODO(noelallen) Please verify this extention name is correct.
62 FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin"); 62 FILE_PATH_LITERAL("ppGoogleNaClPluginChrome.plugin");
63 #else // Linux and Chrome OS 63 #else // Linux and Chrome OS
64 FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so"); 64 FILE_PATH_LITERAL("libppGoogleNaClPluginChrome.so");
65 #endif 65 #endif
66 66
67 #if defined(OS_POSIX) && !defined(OS_MACOSX) 67 #if defined(OS_POSIX) && !defined(OS_MACOSX)
68 // File name of the nacl_helper and nacl_helper_bootstrap, Linux only.
69 const base::FilePath::CharType kInternalNaClHelperFileName[] =
70 FILE_PATH_LITERAL("nacl_helper");
71 const base::FilePath::CharType kInternalNaClHelperBootstrapFileName[] =
72 FILE_PATH_LITERAL("nacl_helper_bootstrap");
73 #endif
74
75
76 #if defined(OS_POSIX) && !defined(OS_MACOSX)
77 68
78 const base::FilePath::CharType kO3DPluginFileName[] = 69 const base::FilePath::CharType kO3DPluginFileName[] =
79 FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so"); 70 FILE_PATH_LITERAL("pepper/libppo3dautoplugin.so");
80 71
81 const base::FilePath::CharType kO1DPluginFileName[] = 72 const base::FilePath::CharType kO1DPluginFileName[] =
82 FILE_PATH_LITERAL("pepper/libppo1d.so"); 73 FILE_PATH_LITERAL("pepper/libppo1d.so");
83 74
84 const base::FilePath::CharType kGTalkPluginFileName[] = 75 const base::FilePath::CharType kGTalkPluginFileName[] =
85 FILE_PATH_LITERAL("pepper/libppgoogletalk.so"); 76 FILE_PATH_LITERAL("pepper/libppgoogletalk.so");
86 77
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 cur = cur.DirName(); 295 cur = cur.DirName();
305 cur = cur.DirName(); 296 cur = cur.DirName();
306 } 297 }
307 #else 298 #else
308 if (!GetInternalPluginsDirectory(&cur)) 299 if (!GetInternalPluginsDirectory(&cur))
309 return false; 300 return false;
310 #endif 301 #endif
311 cur = cur.Append(FILE_PATH_LITERAL("pnacl")); 302 cur = cur.Append(FILE_PATH_LITERAL("pnacl"));
312 break; 303 break;
313 #if defined(OS_POSIX) && !defined(OS_MACOSX) 304 #if defined(OS_POSIX) && !defined(OS_MACOSX)
314 case chrome::FILE_NACL_HELPER:
315 if (!PathService::Get(base::DIR_MODULE, &cur))
316 return false;
317 cur = cur.Append(kInternalNaClHelperFileName);
318 break;
319 case chrome::FILE_NACL_HELPER_BOOTSTRAP:
320 if (!PathService::Get(base::DIR_MODULE, &cur))
321 return false;
322 cur = cur.Append(kInternalNaClHelperBootstrapFileName);
323 break;
324 case chrome::FILE_O3D_PLUGIN: 305 case chrome::FILE_O3D_PLUGIN:
325 if (!PathService::Get(base::DIR_MODULE, &cur)) 306 if (!PathService::Get(base::DIR_MODULE, &cur))
326 return false; 307 return false;
327 cur = cur.Append(kO3DPluginFileName); 308 cur = cur.Append(kO3DPluginFileName);
328 break; 309 break;
329 case chrome::FILE_O1D_PLUGIN: 310 case chrome::FILE_O1D_PLUGIN:
330 if (!PathService::Get(base::DIR_MODULE, &cur)) 311 if (!PathService::Get(base::DIR_MODULE, &cur))
331 return false; 312 return false;
332 cur = cur.Append(kO1DPluginFileName); 313 cur = cur.Append(kO1DPluginFileName);
333 break; 314 break;
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 512
532 // This cannot be done as a static initializer sadly since Visual Studio will 513 // This cannot be done as a static initializer sadly since Visual Studio will
533 // eliminate this object file if there is no direct entry point into it. 514 // eliminate this object file if there is no direct entry point into it.
534 void RegisterPathProvider() { 515 void RegisterPathProvider() {
535 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 516 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
536 PathService::RegisterProvider( 517 PathService::RegisterProvider(
537 PathProvider, breakpad::PATH_START, breakpad::PATH_END); 518 PathProvider, breakpad::PATH_START, breakpad::PATH_END);
538 } 519 }
539 520
540 } // namespace chrome 521 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/common/chrome_paths.h ('k') | chrome/common/nacl_paths.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698