Index: chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc |
diff --git a/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc b/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc |
index 2d755b360db082781c9cb42794435f2ce433f8d7..ab62162c14e806cb1f6f966d167522170dd4b1f2 100644 |
--- a/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc |
+++ b/chrome/browser/chromeos/drive/file_system/get_file_for_saving_operation_unittest.cc |
@@ -25,28 +25,25 @@ namespace { |
// If OnCacheFileUploadNeededByOperation is called, records the local ID and |
// calls |quit_closure|. |
-class TestObserver : public OperationObserver { |
+class TestDelegate : public OperationDelegate { |
public: |
void set_quit_closure(const base::Closure& quit_closure) { |
quit_closure_ = quit_closure; |
} |
- const std::string& observerd_local_id() const { |
- return observed_local_id_; |
+ const std::string& updated_local_id() const { |
+ return updated_local_id_; |
} |
- // OperationObserver overrides. |
- virtual void OnFileChangedByOperation( |
- const FileChange& changed_file) OVERRIDE {} |
- |
+ // OperationDelegate overrides. |
virtual void OnEntryUpdatedByOperation(const std::string& local_id) OVERRIDE { |
- observed_local_id_ = local_id; |
+ updated_local_id_ = local_id; |
if (!quit_closure_.is_null()) |
quit_closure_.Run(); |
} |
private: |
- std::string observed_local_id_; |
+ std::string updated_local_id_; |
base::Closure quit_closure_; |
}; |
@@ -63,12 +60,12 @@ class GetFileForSavingOperationTest : public OperationTestBase { |
OperationTestBase::SetUp(); |
operation_.reset(new GetFileForSavingOperation( |
- logger(), blocking_task_runner(), &observer_, scheduler(), metadata(), |
+ logger(), blocking_task_runner(), &delegate_, scheduler(), metadata(), |
cache(), temp_dir())); |
operation_->file_write_watcher_for_testing()->DisableDelayForTesting(); |
} |
- TestObserver observer_; |
+ TestDelegate delegate_; |
scoped_ptr<GetFileForSavingOperation> operation_; |
}; |
@@ -99,10 +96,10 @@ TEST_F(GetFileForSavingOperationTest, GetFileForSaving_Exist) { |
// Write something to the cache and checks that the event is reported. |
{ |
base::RunLoop run_loop; |
- observer_.set_quit_closure(run_loop.QuitClosure()); |
+ delegate_.set_quit_closure(run_loop.QuitClosure()); |
google_apis::test_util::WriteStringToFile(local_path, "hello"); |
run_loop.Run(); |
- EXPECT_EQ(GetLocalId(drive_path), observer_.observerd_local_id()); |
+ EXPECT_EQ(GetLocalId(drive_path), delegate_.updated_local_id()); |
} |
} |