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

Side by Side Diff: chrome/browser/chromeos/drive/fake_file_system.cc

Issue 18506002: drive/syncFS: Switch to ID based download URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase! 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/download_operation.cc » ('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 (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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), cache_path, 335 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), cache_path,
336 base::Closure()); 336 base::Closure());
337 completion_callback.Run(FILE_ERROR_OK); 337 completion_callback.Run(FILE_ERROR_OK);
338 return; 338 return;
339 } 339 }
340 340
341 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), base::FilePath(), 341 initialized_callback.Run(FILE_ERROR_OK, entry.Pass(), base::FilePath(),
342 base::Bind(&base::DoNothing)); 342 base::Bind(&base::DoNothing));
343 drive_service_->DownloadFile( 343 drive_service_->DownloadFile(
344 cache_path, 344 cache_path,
345 GURL(gdata_entry->download_url()), 345 gdata_entry->resource_id(),
346 base::Bind(&FakeFileSystem::GetFileContentByPathAfterDownloadFile, 346 base::Bind(&FakeFileSystem::GetFileContentByPathAfterDownloadFile,
347 weak_ptr_factory_.GetWeakPtr(), 347 weak_ptr_factory_.GetWeakPtr(),
348 completion_callback), 348 completion_callback),
349 get_content_callback, 349 get_content_callback,
350 google_apis::ProgressCallback()); 350 google_apis::ProgressCallback());
351 } 351 }
352 352
353 void FakeFileSystem::GetFileContentByPathAfterDownloadFile( 353 void FakeFileSystem::GetFileContentByPathAfterDownloadFile(
354 const FileOperationCallback& completion_callback, 354 const FileOperationCallback& completion_callback,
355 google_apis::GDataErrorCode gdata_error, 355 google_apis::GDataErrorCode gdata_error,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 callback.Run(FILE_ERROR_OK, entry.Pass()); 423 callback.Run(FILE_ERROR_OK, entry.Pass());
424 return; 424 return;
425 } 425 }
426 } 426 }
427 427
428 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>()); 428 callback.Run(FILE_ERROR_NOT_FOUND, scoped_ptr<ResourceEntry>());
429 } 429 }
430 430
431 } // namespace test_util 431 } // namespace test_util
432 } // namespace drive 432 } // namespace drive
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/file_system/download_operation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698