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

Side by Side Diff: chrome/browser/chromeos/file_manager/open_with_browser.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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
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 "chrome/browser/chromeos/file_manager/open_with_browser.h" 5 #include "chrome/browser/chromeos/file_manager/open_with_browser.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 base::FilePath plugin_path; 89 base::FilePath plugin_path;
90 PathService::Get(chrome::FILE_PDF_PLUGIN, &plugin_path); 90 PathService::Get(chrome::FILE_PDF_PLUGIN, &plugin_path);
91 return IsPepperPluginEnabled(profile, plugin_path); 91 return IsPepperPluginEnabled(profile, plugin_path);
92 } 92 }
93 93
94 bool IsFlashPluginEnabled(Profile* profile) { 94 bool IsFlashPluginEnabled(Profile* profile) {
95 DCHECK(profile); 95 DCHECK(profile);
96 96
97 base::FilePath plugin_path( 97 base::FilePath plugin_path(
98 CommandLine::ForCurrentProcess()->GetSwitchValueNative( 98 base::CommandLine::ForCurrentProcess()->GetSwitchValueNative(
99 switches::kPpapiFlashPath)); 99 switches::kPpapiFlashPath));
100 if (plugin_path.empty()) 100 if (plugin_path.empty())
101 PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin_path); 101 PathService::Get(chrome::FILE_PEPPER_FLASH_PLUGIN, &plugin_path);
102 return IsPepperPluginEnabled(profile, plugin_path); 102 return IsPepperPluginEnabled(profile, plugin_path);
103 } 103 }
104 104
105 void OpenNewTab(Profile* profile, const GURL& url) { 105 void OpenNewTab(Profile* profile, const GURL& url) {
106 DCHECK_CURRENTLY_ON(BrowserThread::UI); 106 DCHECK_CURRENTLY_ON(BrowserThread::UI);
107 107
108 // Check the validity of the pointer so that the closure from 108 // Check the validity of the pointer so that the closure from
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 base::FilePath::FromUTF8Unsafe("dummy").AddExtension(file_extension); 190 base::FilePath::FromUTF8Unsafe("dummy").AddExtension(file_extension);
191 if (file_path.MatchesExtension(kPdfExtension)) 191 if (file_path.MatchesExtension(kPdfExtension))
192 return IsPdfPluginEnabled(profile); 192 return IsPdfPluginEnabled(profile);
193 if (file_path.MatchesExtension(kSwfExtension)) 193 if (file_path.MatchesExtension(kSwfExtension))
194 return IsFlashPluginEnabled(profile); 194 return IsFlashPluginEnabled(profile);
195 return false; 195 return false;
196 } 196 }
197 197
198 } // namespace util 198 } // namespace util
199 } // namespace file_manager 199 } // namespace file_manager
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/file_manager/file_tasks_unittest.cc ('k') | chrome/browser/chromeos/first_run/first_run.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698