| OLD | NEW |
| 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/chromeos/drive/file_system.h" | 5 #include "chrome/browser/chromeos/drive/file_system.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 quit.Run(); | 53 quit.Run(); |
| 54 } | 54 } |
| 55 | 55 |
| 56 // This class is used to record directory changes and examine them later. | 56 // This class is used to record directory changes and examine them later. |
| 57 class MockDirectoryChangeObserver : public FileSystemObserver { | 57 class MockDirectoryChangeObserver : public FileSystemObserver { |
| 58 public: | 58 public: |
| 59 MockDirectoryChangeObserver() {} | 59 MockDirectoryChangeObserver() {} |
| 60 virtual ~MockDirectoryChangeObserver() {} | 60 virtual ~MockDirectoryChangeObserver() {} |
| 61 | 61 |
| 62 // FileSystemObserver overrides. | 62 // FileSystemObserver overrides. |
| 63 virtual void OnDirectoryChanged( | 63 virtual void OnDirectoryChanged(const base::FilePath& directory_path, |
| 64 const base::FilePath& directory_path) OVERRIDE { | 64 const FileChange* file_change) OVERRIDE { |
| 65 changed_directories_.push_back(directory_path); | 65 changed_directories_.push_back(directory_path); |
| 66 } | 66 } |
| 67 | 67 |
| 68 const std::vector<base::FilePath>& changed_directories() const { | 68 const std::vector<base::FilePath>& changed_directories() const { |
| 69 return changed_directories_; | 69 return changed_directories_; |
| 70 } | 70 } |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 std::vector<base::FilePath> changed_directories_; | 73 std::vector<base::FilePath> changed_directories_; |
| 74 DISALLOW_COPY_AND_ASSIGN(MockDirectoryChangeObserver); | 74 DISALLOW_COPY_AND_ASSIGN(MockDirectoryChangeObserver); |
| (...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 905 kEmbedOrigin, | 905 kEmbedOrigin, |
| 906 google_apis::test_util::CreateCopyResultCallback(&error, &share_url)); | 906 google_apis::test_util::CreateCopyResultCallback(&error, &share_url)); |
| 907 test_util::RunBlockingPoolTask(); | 907 test_util::RunBlockingPoolTask(); |
| 908 | 908 |
| 909 // Verify the share url to the sharing dialog. | 909 // Verify the share url to the sharing dialog. |
| 910 EXPECT_EQ(FILE_ERROR_OK, error); | 910 EXPECT_EQ(FILE_ERROR_OK, error); |
| 911 EXPECT_TRUE(share_url.is_valid()); | 911 EXPECT_TRUE(share_url.is_valid()); |
| 912 } | 912 } |
| 913 | 913 |
| 914 } // namespace drive | 914 } // namespace drive |
| OLD | NEW |