| 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 "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/prefs/scoped_user_pref_update.h" | 9 #include "base/prefs/scoped_user_pref_update.h" |
| 10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 // invoked, and observers notified, so there is no need to call them now. | 340 // invoked, and observers notified, so there is no need to call them now. |
| 341 if (error != base::File::FILE_OK) { | 341 if (error != base::File::FILE_OK) { |
| 342 FOR_EACH_OBSERVER(Observer, | 342 FOR_EACH_OBSERVER(Observer, |
| 343 observers_, | 343 observers_, |
| 344 OnProvidedFileSystemUnmount(file_system_info, error)); | 344 OnProvidedFileSystemUnmount(file_system_info, error)); |
| 345 } | 345 } |
| 346 } | 346 } |
| 347 | 347 |
| 348 void Service::OnWatcherChanged(const ProvidedFileSystemInfo& file_system_info, | 348 void Service::OnWatcherChanged(const ProvidedFileSystemInfo& file_system_info, |
| 349 const Watcher& watcher, | 349 const Watcher& watcher, |
| 350 ChangeType change_type, | 350 storage::WatcherManager::ChangeType change_type, |
| 351 const Changes& changes, | 351 const Changes& changes, |
| 352 const base::Closure& callback) { | 352 const base::Closure& callback) { |
| 353 callback.Run(); | 353 callback.Run(); |
| 354 } | 354 } |
| 355 | 355 |
| 356 void Service::OnWatcherTagUpdated( | 356 void Service::OnWatcherTagUpdated( |
| 357 const ProvidedFileSystemInfo& file_system_info, | 357 const ProvidedFileSystemInfo& file_system_info, |
| 358 const Watcher& watcher) { | 358 const Watcher& watcher) { |
| 359 PrefService* const pref_service = profile_->GetPrefs(); | 359 PrefService* const pref_service = profile_->GetPrefs(); |
| 360 DCHECK(pref_service); | 360 DCHECK(pref_service); |
| 361 | 361 |
| 362 registry_->UpdateWatcherTag(file_system_info, watcher); | 362 registry_->UpdateWatcherTag(file_system_info, watcher); |
| 363 } | 363 } |
| 364 | 364 |
| 365 void Service::OnWatcherListChanged( | 365 void Service::OnWatcherListChanged( |
| 366 const ProvidedFileSystemInfo& file_system_info, | 366 const ProvidedFileSystemInfo& file_system_info, |
| 367 const Watchers& watchers) { | 367 const Watchers& watchers) { |
| 368 registry_->RememberFileSystem(file_system_info, watchers); | 368 registry_->RememberFileSystem(file_system_info, watchers); |
| 369 } | 369 } |
| 370 | 370 |
| 371 } // namespace file_system_provider | 371 } // namespace file_system_provider |
| 372 } // namespace chromeos | 372 } // namespace chromeos |
| OLD | NEW |