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

Side by Side Diff: chrome/browser/nacl_host/nacl_file_host.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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/browser/nacl_host/nacl_file_host.h" 5 #include "chrome/browser/nacl_host/nacl_file_host.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 void DoOpenPnaclFile( 101 void DoOpenPnaclFile(
102 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter, 102 scoped_refptr<NaClHostMessageFilter> nacl_host_message_filter,
103 const std::string& filename, 103 const std::string& filename,
104 IPC::Message* reply_msg) { 104 IPC::Message* reply_msg) {
105 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); 105 DCHECK(BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread());
106 base::FilePath full_filepath; 106 base::FilePath full_filepath;
107 107
108 // PNaCl must be installed. 108 // PNaCl must be installed.
109 base::FilePath pnacl_dir; 109 base::FilePath pnacl_dir;
110 if (!NaClBrowser::GetDelegate()->GetPnaclDirectory(&pnacl_dir) || 110 if (!NaClBrowser::GetDelegate()->GetPnaclDirectory(&pnacl_dir) ||
111 !file_util::PathExists(pnacl_dir)) { 111 !base::PathExists(pnacl_dir)) {
112 BrowserThread::PostTask( 112 BrowserThread::PostTask(
113 BrowserThread::UI, FROM_HERE, 113 BrowserThread::UI, FROM_HERE,
114 base::Bind(&TryInstallPnacl, 114 base::Bind(&TryInstallPnacl,
115 nacl_host_message_filter, 115 nacl_host_message_filter,
116 filename, 116 filename,
117 reply_msg)); 117 reply_msg));
118 return; 118 return;
119 } 119 }
120 120
121 // Do some validation. 121 // Do some validation.
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 base::Bind( 396 base::Bind(
397 &DoOpenNaClExecutableOnThreadPool, 397 &DoOpenNaClExecutableOnThreadPool,
398 nacl_host_message_filter, 398 nacl_host_message_filter,
399 extension_info_map, 399 extension_info_map,
400 file_url, reply_msg))) { 400 file_url, reply_msg))) {
401 NotifyRendererOfError(nacl_host_message_filter.get(), reply_msg); 401 NotifyRendererOfError(nacl_host_message_filter.get(), reply_msg);
402 } 402 }
403 } 403 }
404 404
405 } // namespace nacl_file_host 405 } // namespace nacl_file_host
OLDNEW
« no previous file with comments | « chrome/browser/media_galleries/fileapi/native_media_file_util.cc ('k') | chrome/browser/net/net_log_temp_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698