Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(76)

Side by Side Diff: chrome/browser/chromeos/file_system_provider/service.cc

Issue 663713002: [fsp] Extract ObservedEntry and ObservedEntries to a separate file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: Added missing files. Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698