| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/file_system_provider/service.h" | 5 #include "chrome/browser/chromeos/file_system_provider/service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 | 144 |
| 145 void UpdateWatcherTag(const ProvidedFileSystemInfo& file_system_info, | 145 void UpdateWatcherTag(const ProvidedFileSystemInfo& file_system_info, |
| 146 const Watcher& watcher) override { | 146 const Watcher& watcher) override { |
| 147 ASSERT_TRUE(watchers_.get()); | 147 ASSERT_TRUE(watchers_.get()); |
| 148 const Watchers::iterator it = | 148 const Watchers::iterator it = |
| 149 watchers_->find(WatcherKey(watcher.entry_path, watcher.recursive)); | 149 watchers_->find(WatcherKey(watcher.entry_path, watcher.recursive)); |
| 150 ASSERT_NE(watchers_->end(), it); | 150 ASSERT_NE(watchers_->end(), it); |
| 151 it->second.last_tag = watcher.last_tag; | 151 it->second.last_tag = watcher.last_tag; |
| 152 } | 152 } |
| 153 | 153 |
| 154 ProvidedFileSystemInfo* const file_system_info() const { | 154 const ProvidedFileSystemInfo* file_system_info() const { |
| 155 return file_system_info_.get(); | 155 return file_system_info_.get(); |
| 156 } | 156 } |
| 157 Watchers* const watchers() const { return watchers_.get(); } | 157 const Watchers* watchers() const { return watchers_.get(); } |
| 158 | 158 |
| 159 private: | 159 private: |
| 160 scoped_ptr<ProvidedFileSystemInfo> file_system_info_; | 160 scoped_ptr<ProvidedFileSystemInfo> file_system_info_; |
| 161 scoped_ptr<Watchers> watchers_; | 161 scoped_ptr<Watchers> watchers_; |
| 162 | 162 |
| 163 DISALLOW_COPY_AND_ASSIGN(FakeRegistry); | 163 DISALLOW_COPY_AND_ASSIGN(FakeRegistry); |
| 164 }; | 164 }; |
| 165 | 165 |
| 166 // Creates a fake extension with the specified |extension_id|. | 166 // Creates a fake extension with the specified |extension_id|. |
| 167 scoped_refptr<extensions::Extension> CreateFakeExtension( | 167 scoped_refptr<extensions::Extension> CreateFakeExtension( |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 EXPECT_EQ(1u, observer.unmounts.size()); | 546 EXPECT_EQ(1u, observer.unmounts.size()); |
| 547 EXPECT_FALSE(registry_->file_system_info()); | 547 EXPECT_FALSE(registry_->file_system_info()); |
| 548 EXPECT_FALSE(registry_->watchers()); | 548 EXPECT_FALSE(registry_->watchers()); |
| 549 } | 549 } |
| 550 | 550 |
| 551 service_->RemoveObserver(&observer); | 551 service_->RemoveObserver(&observer); |
| 552 } | 552 } |
| 553 | 553 |
| 554 } // namespace file_system_provider | 554 } // namespace file_system_provider |
| 555 } // namespace chromeos | 555 } // namespace chromeos |
| OLD | NEW |