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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 const ProvidedFileSystemInfo& file_system_info, | 330 const ProvidedFileSystemInfo& file_system_info, |
331 const base::FilePath& observed_path, | 331 const base::FilePath& observed_path, |
332 ChangeType change_type, | 332 ChangeType change_type, |
333 const ChildChanges& child_changes, | 333 const ChildChanges& child_changes, |
334 const base::Closure& callback) { | 334 const base::Closure& callback) { |
335 callback.Run(); | 335 callback.Run(); |
336 } | 336 } |
337 | 337 |
338 void Service::OnObservedEntryTagUpdated( | 338 void Service::OnObservedEntryTagUpdated( |
339 const ProvidedFileSystemInfo& file_system_info, | 339 const ProvidedFileSystemInfo& file_system_info, |
340 const base::FilePath& observed_path) { | 340 const base::FilePath& observed_path, |
| 341 const std::string& tag) { |
341 // TODO(mtomasz): Store tags of observed entries in preferences, or better | 342 // TODO(mtomasz): Store tags of observed entries in preferences, or better |
342 // in leveldb. | 343 // in leveldb. |
343 } | 344 } |
344 | 345 |
345 void Service::OnObservedEntryListChanged( | 346 void Service::OnObservedEntryListChanged( |
346 const ProvidedFileSystemInfo& file_system_info) { | 347 const ProvidedFileSystemInfo& file_system_info, |
| 348 const ObservedEntries& observed_entries) { |
347 // TODO(mtomasz): Store observed entries in preferences or leveldb. | 349 // TODO(mtomasz): Store observed entries in preferences or leveldb. |
348 } | 350 } |
349 | 351 |
350 void Service::RememberFileSystem( | 352 void Service::RememberFileSystem( |
351 const ProvidedFileSystemInfo& file_system_info) { | 353 const ProvidedFileSystemInfo& file_system_info) { |
352 base::DictionaryValue* file_system = new base::DictionaryValue(); | 354 base::DictionaryValue* file_system = new base::DictionaryValue(); |
353 file_system->SetStringWithoutPathExpansion(kPrefKeyFileSystemId, | 355 file_system->SetStringWithoutPathExpansion(kPrefKeyFileSystemId, |
354 file_system_info.file_system_id()); | 356 file_system_info.file_system_id()); |
355 file_system->SetStringWithoutPathExpansion(kPrefKeyDisplayName, | 357 file_system->SetStringWithoutPathExpansion(kPrefKeyDisplayName, |
356 file_system_info.display_name()); | 358 file_system_info.display_name()); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
455 << ", " << display_name << "."; | 457 << ", " << display_name << "."; |
456 // Since remounting of the file system failed, then remove it from | 458 // Since remounting of the file system failed, then remove it from |
457 // preferences to avoid remounting it over and over again with a failure. | 459 // preferences to avoid remounting it over and over again with a failure. |
458 ForgetFileSystem(extension_id, file_system_id); | 460 ForgetFileSystem(extension_id, file_system_id); |
459 } | 461 } |
460 } | 462 } |
461 } | 463 } |
462 | 464 |
463 } // namespace file_system_provider | 465 } // namespace file_system_provider |
464 } // namespace chromeos | 466 } // namespace chromeos |
OLD | NEW |