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

Side by Side Diff: chrome/browser/chromeos/drive/file_system/download_operation_unittest.cc

Issue 18948004: drive: Remove MD5 argument from FileCache::MarkDirty (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 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/drive/file_system/download_operation.h" 5 #include "chrome/browser/chromeos/drive/file_system/download_operation.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h" 8 #include "chrome/browser/chromeos/drive/fake_free_disk_space_getter.h"
9 #include "chrome/browser/chromeos/drive/file_cache.h" 9 #include "chrome/browser/chromeos/drive/file_cache.h"
10 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h" 10 #include "chrome/browser/chromeos/drive/file_system/operation_test_base.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 cache()->StoreOnUIThread( 407 cache()->StoreOnUIThread(
408 src_entry.resource_id(), 408 src_entry.resource_id(),
409 src_entry.file_specific_info().md5(), 409 src_entry.file_specific_info().md5(),
410 dirty_file, 410 dirty_file,
411 internal::FileCache::FILE_OPERATION_COPY, 411 internal::FileCache::FILE_OPERATION_COPY,
412 google_apis::test_util::CreateCopyResultCallback(&error)); 412 google_apis::test_util::CreateCopyResultCallback(&error));
413 test_util::RunBlockingPoolTask(); 413 test_util::RunBlockingPoolTask();
414 EXPECT_EQ(FILE_ERROR_OK, error); 414 EXPECT_EQ(FILE_ERROR_OK, error);
415 cache()->MarkDirtyOnUIThread( 415 cache()->MarkDirtyOnUIThread(
416 src_entry.resource_id(), 416 src_entry.resource_id(),
417 src_entry.file_specific_info().md5(),
418 google_apis::test_util::CreateCopyResultCallback(&error)); 417 google_apis::test_util::CreateCopyResultCallback(&error));
419 test_util::RunBlockingPoolTask(); 418 test_util::RunBlockingPoolTask();
420 EXPECT_EQ(FILE_ERROR_OK, error); 419 EXPECT_EQ(FILE_ERROR_OK, error);
421 420
422 // Record values passed to GetFileContentInitializedCallback(). 421 // Record values passed to GetFileContentInitializedCallback().
423 FileError init_error; 422 FileError init_error;
424 base::FilePath init_path; 423 base::FilePath init_path;
425 scoped_ptr<ResourceEntry> init_entry; 424 scoped_ptr<ResourceEntry> init_entry;
426 base::Closure cancel_callback; 425 base::Closure cancel_callback;
427 426
(...skipping 10 matching lines...) Expand all
438 test_util::RunBlockingPoolTask(); 437 test_util::RunBlockingPoolTask();
439 438
440 EXPECT_EQ(FILE_ERROR_OK, error); 439 EXPECT_EQ(FILE_ERROR_OK, error);
441 // Check that the result of local modification is propagated. 440 // Check that the result of local modification is propagated.
442 EXPECT_EQ(static_cast<int64>(dirty_size), init_entry->file_info().size()); 441 EXPECT_EQ(static_cast<int64>(dirty_size), init_entry->file_info().size());
443 EXPECT_EQ(static_cast<int64>(dirty_size), entry->file_info().size()); 442 EXPECT_EQ(static_cast<int64>(dirty_size), entry->file_info().size());
444 } 443 }
445 444
446 } // namespace file_system 445 } // namespace file_system
447 } // namespace drive 446 } // namespace drive
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698