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

Side by Side Diff: chrome/browser/chromeos/gdata/gdata_file_system.h

Issue 10800092: Database support for GDataDirectoryService. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 17 matching lines...) Expand all
28 class SequencedTaskRunner; 28 class SequencedTaskRunner;
29 29
30 } // namespace base 30 } // namespace base
31 31
32 namespace gdata { 32 namespace gdata {
33 33
34 class DocumentsServiceInterface; 34 class DocumentsServiceInterface;
35 class DriveWebAppsRegistryInterface; 35 class DriveWebAppsRegistryInterface;
36 struct UploadFileInfo; 36 struct UploadFileInfo;
37 37
38 namespace {
39 struct LoadRootFeedParams;
40 } // namespace
41
42 // The production implementation of GDataFileSystemInterface. 38 // The production implementation of GDataFileSystemInterface.
43 class GDataFileSystem : public GDataFileSystemInterface, 39 class GDataFileSystem : public GDataFileSystemInterface,
44 public content::NotificationObserver { 40 public content::NotificationObserver {
45 public: 41 public:
46 GDataFileSystem(Profile* profile, 42 GDataFileSystem(Profile* profile,
47 GDataCache* cache, 43 GDataCache* cache,
48 DocumentsServiceInterface* documents_service, 44 DocumentsServiceInterface* documents_service,
49 GDataUploaderInterface* uploader, 45 GDataUploaderInterface* uploader,
50 DriveWebAppsRegistryInterface* webapps_registry, 46 DriveWebAppsRegistryInterface* webapps_registry,
51 base::SequencedTaskRunner* blocking_task_runner); 47 base::SequencedTaskRunner* blocking_task_runner);
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // initiate retrieval of the root feed from the server unless 594 // initiate retrieval of the root feed from the server unless
599 // |should_load_from_server| is set to false. |should_load_from_server| is 595 // |should_load_from_server| is set to false. |should_load_from_server| is
600 // false only for testing. 596 // false only for testing.
601 void LoadRootFeedFromCache(bool should_load_from_server, 597 void LoadRootFeedFromCache(bool should_load_from_server,
602 const FilePath& search_file_path, 598 const FilePath& search_file_path,
603 const FindEntryCallback& callback); 599 const FindEntryCallback& callback);
604 600
605 // Callback for handling root directory refresh from the cache. 601 // Callback for handling root directory refresh from the cache.
606 void OnProtoLoaded(LoadRootFeedParams* params); 602 void OnProtoLoaded(LoadRootFeedParams* params);
607 603
608 // Save filesystem as proto file. 604 // Continues handling root directory refresh after the directory service
609 void SaveFileSystemAsProto(); 605 // is fully loaded.
606 void ContinueWithInitializedDirectoryService(LoadRootFeedParams* params);
607
608 // Save filesystem to disk.
609 void SaveFileSystem();
610 610
611 // Notifies events to observers on UI thread. 611 // Notifies events to observers on UI thread.
612 void NotifyDirectoryChanged(const FilePath& directory_path); 612 void NotifyDirectoryChanged(const FilePath& directory_path);
613 void NotifyDocumentFeedFetched(int num_accumulated_entries); 613 void NotifyDocumentFeedFetched(int num_accumulated_entries);
614 614
615 // Runs the callback and notifies that the initial load is finished. 615 // Runs the callback and notifies that the initial load is finished.
616 void RunAndNotifyInitialLoadFinished( 616 void RunAndNotifyInitialLoadFinished(
617 const FindEntryCallback& callback, 617 const FindEntryCallback& callback,
618 GDataFileError error, 618 GDataFileError error,
619 GDataEntry* entry); 619 GDataEntry* entry);
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 base::WeakPtr<GDataFileSystem> ui_weak_ptr_; 883 base::WeakPtr<GDataFileSystem> ui_weak_ptr_;
884 884
885 ObserverList<Observer> observers_; 885 ObserverList<Observer> observers_;
886 886
887 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_; 887 scoped_refptr<base::SequencedTaskRunner> blocking_task_runner_;
888 }; 888 };
889 889
890 } // namespace gdata 890 } // namespace gdata
891 891
892 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_ 892 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILE_SYSTEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698