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

Side by Side Diff: chrome/browser/chromeos/drive/fake_file_system.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/drive/fake_file_system.h" 5 #include "chrome/browser/chromeos/drive/fake_file_system.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 completion_callback.Run(error); 288 completion_callback.Run(error);
289 return; 289 return;
290 } 290 }
291 DCHECK(gdata_entry); 291 DCHECK(gdata_entry);
292 292
293 scoped_ptr<ResourceEntry> entry( 293 scoped_ptr<ResourceEntry> entry(
294 new ResourceEntry(ConvertToResourceEntry(*gdata_entry))); 294 new ResourceEntry(ConvertToResourceEntry(*gdata_entry)));
295 295
296 base::FilePath cache_path = 296 base::FilePath cache_path =
297 cache_dir_.path().AppendASCII(entry->resource_id()); 297 cache_dir_.path().AppendASCII(entry->resource_id());
298 if (file_util::PathExists(cache_path)) { 298 if (base::PathExists(cache_path)) {
299 // Cache file is found. 299 // Cache file is found.
300 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), cache_path, 300 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), cache_path,
301 base::Closure()); 301 base::Closure());
302 completion_callback.Run(FILE_ERROR_OK); 302 completion_callback.Run(FILE_ERROR_OK);
303 return; 303 return;
304 } 304 }
305 305
306 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), base::FilePath(), 306 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), base::FilePath(),
307 base::Bind(&base::DoNothing)); 307 base::Bind(&base::DoNothing));
308 drive_service_->DownloadFile( 308 drive_service_->DownloadFile(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 callback.Run(FILE_ERROR_OK, entry.Pass()); 388 callback.Run(FILE_ERROR_OK, entry.Pass());
389 return; 389 return;
390 } 390 }
391 } 391 }
392 392
393 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>()); 393 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>());
394 } 394 }
395 395
396 } // namespace test_util 396 } // namespace test_util
397 } // namespace drive 397 } // namespace drive
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/boot_times_loader.cc ('k') | chrome/browser/chromeos/drive/file_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698