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

Side by Side Diff: components/nacl/common/nacl_paths.cc

Issue 1407443003: Non-SFI mode: Remove kUseNaClHelperNonSfi command line flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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/browser/chrome_content_browser_client.cc ('k') | components/nacl/common/nacl_switches.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/nacl/common/nacl_paths.h" 5 #include "components/nacl/common/nacl_paths.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "components/nacl/common/nacl_switches.h" 10 #include "components/nacl/common/nacl_switches.h"
(...skipping 22 matching lines...) Expand all
33 } // namespace 33 } // namespace
34 34
35 namespace nacl { 35 namespace nacl {
36 36
37 bool PathProvider(int key, base::FilePath* result) { 37 bool PathProvider(int key, base::FilePath* result) {
38 switch (key) { 38 switch (key) {
39 #if defined(OS_LINUX) 39 #if defined(OS_LINUX)
40 case FILE_NACL_HELPER: 40 case FILE_NACL_HELPER:
41 return GetNaClHelperPath(kInternalNaClHelperFileName, result); 41 return GetNaClHelperPath(kInternalNaClHelperFileName, result);
42 case FILE_NACL_HELPER_NONSFI: 42 case FILE_NACL_HELPER_NONSFI:
43 if (base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
44 switches::kUseNaClHelperNonSfi) == "false") {
45 // nacl_helper_nonsfi is disabled by the flag. So, use nacl_helper
46 // in Non-SFI mode instead. This is old behavior just in case.
47 // TODO(hidehiko): Remove this code path, when the old feature is
48 // cleaned after nacl_helper_nonsfi is officially launched and
49 // its stability is confirmed.
50 return GetNaClHelperPath(kInternalNaClHelperFileName, result);
51 }
52 return GetNaClHelperPath(kInternalNaClHelperNonSfiFileName, result); 43 return GetNaClHelperPath(kInternalNaClHelperNonSfiFileName, result);
53 case FILE_NACL_HELPER_BOOTSTRAP: 44 case FILE_NACL_HELPER_BOOTSTRAP:
54 return GetNaClHelperPath(kInternalNaClHelperBootstrapFileName, result); 45 return GetNaClHelperPath(kInternalNaClHelperBootstrapFileName, result);
55 #endif 46 #endif
56 default: 47 default:
57 return false; 48 return false;
58 } 49 }
59 } 50 }
60 51
61 // This cannot be done as a static initializer sadly since Visual Studio will 52 // This cannot be done as a static initializer sadly since Visual Studio will
62 // eliminate this object file if there is no direct entry point into it. 53 // eliminate this object file if there is no direct entry point into it.
63 void RegisterPathProvider() { 54 void RegisterPathProvider() {
64 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END); 55 PathService::RegisterProvider(PathProvider, PATH_START, PATH_END);
65 } 56 }
66 57
67 } // namespace nacl 58 } // namespace nacl
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | components/nacl/common/nacl_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698