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

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

Issue 9158005: RFC: Add an interface for having the browser open a pnacl support file (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a test, do some tweaks. Created 8 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
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/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/bundle_locations.h" 10 #include "base/mac/bundle_locations.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 case chrome::FILE_PDF_PLUGIN: 258 case chrome::FILE_PDF_PLUGIN:
259 if (!GetInternalPluginsDirectory(&cur)) 259 if (!GetInternalPluginsDirectory(&cur))
260 return false; 260 return false;
261 cur = cur.Append(kInternalPDFPluginFileName); 261 cur = cur.Append(kInternalPDFPluginFileName);
262 break; 262 break;
263 case chrome::FILE_NACL_PLUGIN: 263 case chrome::FILE_NACL_PLUGIN:
264 if (!GetInternalPluginsDirectory(&cur)) 264 if (!GetInternalPluginsDirectory(&cur))
265 return false; 265 return false;
266 cur = cur.Append(kInternalNaClPluginFileName); 266 cur = cur.Append(kInternalNaClPluginFileName);
267 break; 267 break;
268 case chrome::FILE_PNACL_COMPONENT: 268 case chrome::DIR_PNACL_COMPONENT:
269 // TODO(jvoung): Do we want a default value or just the ability to
270 // override immediately when testing on bots to avoid race conditions?
271 return false; 269 return false;
272 #if defined(OS_POSIX) && !defined(OS_MACOSX) 270 #if defined(OS_POSIX) && !defined(OS_MACOSX)
273 case chrome::FILE_NACL_HELPER: 271 case chrome::FILE_NACL_HELPER:
274 if (!PathService::Get(base::DIR_MODULE, &cur)) 272 if (!PathService::Get(base::DIR_MODULE, &cur))
275 return false; 273 return false;
276 cur = cur.Append(kInternalNaClHelperFileName); 274 cur = cur.Append(kInternalNaClHelperFileName);
277 break; 275 break;
278 case chrome::FILE_NACL_HELPER_BOOTSTRAP: 276 case chrome::FILE_NACL_HELPER_BOOTSTRAP:
279 if (!PathService::Get(base::DIR_MODULE, &cur)) 277 if (!PathService::Get(base::DIR_MODULE, &cur))
280 return false; 278 return false;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 return true; 441 return true;
444 } 442 }
445 443
446 // This cannot be done as a static initializer sadly since Visual Studio will 444 // This cannot be done as a static initializer sadly since Visual Studio will
447 // eliminate this object file if there is no direct entry point into it. 445 // eliminate this object file if there is no direct entry point into it.
448 void RegisterPathProvider() { 446 void RegisterPathProvider() {
449 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 447 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
450 } 448 }
451 449
452 } // namespace chrome 450 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698