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

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

Issue 10800092: Database support for GDataDirectoryService. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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_SYSTEM_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_
7 7
8 #include <string>
9
8 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/singleton.h" 11 #include "base/memory/singleton.h"
10 #include "base/threading/sequenced_worker_pool.h" 12 #include "base/threading/sequenced_worker_pool.h"
11 #include "chrome/browser/profiles/profile_keyed_service.h" 13 #include "chrome/browser/profiles/profile_keyed_service.h"
12 #include "chrome/browser/profiles/profile_keyed_service_factory.h" 14 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
13 15
14 class FilePath; 16 class FilePath;
15 17
16 namespace gdata { 18 namespace gdata {
17 19
18 class DocumentsServiceInterface; 20 class DocumentsServiceInterface;
19 class DriveWebAppsRegistry; 21 class DriveWebAppsRegistry;
20 class GDataCache; 22 class GDataCache;
21 class GDataDownloadObserver; 23 class GDataDownloadObserver;
24 class GDataDirectoryService;
22 class GDataFileSystemInterface; 25 class GDataFileSystemInterface;
23 class GDataSyncClient; 26 class GDataSyncClient;
24 class GDataUploader; 27 class GDataUploader;
25 28
26 // GDataSystemService runs the GData system, including the GData file system 29 // GDataSystemService runs the GData system, including the GData file system
27 // implementation for the file manager, and some other sub systems. 30 // implementation for the file manager, and some other sub systems.
28 // 31 //
29 // The class is essentially a container that manages lifetime of the objects 32 // The class is essentially a container that manages lifetime of the objects
30 // that are used to run the GData system. The GDataSystemService object is 33 // that are used to run the GData system. The GDataSystemService object is
31 // created per-profile. 34 // created per-profile.
(...skipping 24 matching lines...) Expand all
56 // Initializes the object. This function should be called before any 59 // Initializes the object. This function should be called before any
57 // other functions. 60 // other functions.
58 void Initialize(DocumentsServiceInterface* documents_service, 61 void Initialize(DocumentsServiceInterface* documents_service,
59 const FilePath& cache_root); 62 const FilePath& cache_root);
60 63
61 // Registers remote file system proxy for drive mount point. 64 // Registers remote file system proxy for drive mount point.
62 void AddDriveMountPoint(); 65 void AddDriveMountPoint();
63 // Unregisters drive mount point from File API. 66 // Unregisters drive mount point from File API.
64 void RemoveDriveMountPoint(); 67 void RemoveDriveMountPoint();
65 68
69 scoped_refptr<base::SequencedTaskRunner> GetTaskRunner();
hashimoto 2012/07/24 08:41:51 How about replacing |sequence_token_| with a scope
70
66 friend class GDataSystemServiceFactory; 71 friend class GDataSystemServiceFactory;
67 72
68 Profile* profile_; 73 Profile* profile_;
69 const base::SequencedWorkerPool::SequenceToken sequence_token_; 74 const base::SequencedWorkerPool::SequenceToken sequence_token_;
70 GDataCache* cache_; 75 GDataCache* cache_;
71 scoped_ptr<DocumentsServiceInterface> documents_service_; 76 scoped_ptr<DocumentsServiceInterface> documents_service_;
72 scoped_ptr<GDataUploader> uploader_; 77 scoped_ptr<GDataUploader> uploader_;
73 scoped_ptr<DriveWebAppsRegistry> webapps_registry_; 78 scoped_ptr<DriveWebAppsRegistry> webapps_registry_;
79 scoped_ptr<GDataDirectoryService> directory_service_;
74 scoped_ptr<GDataFileSystemInterface> file_system_; 80 scoped_ptr<GDataFileSystemInterface> file_system_;
75 scoped_ptr<GDataDownloadObserver> download_observer_; 81 scoped_ptr<GDataDownloadObserver> download_observer_;
76 scoped_ptr<GDataSyncClient> sync_client_; 82 scoped_ptr<GDataSyncClient> sync_client_;
77 83
78 DISALLOW_COPY_AND_ASSIGN(GDataSystemService); 84 DISALLOW_COPY_AND_ASSIGN(GDataSystemService);
79 }; 85 };
80 86
81 // Singleton that owns all GDataSystemServices and associates them with 87 // Singleton that owns all GDataSystemServices and associates them with
82 // Profiles. 88 // Profiles.
83 class GDataSystemServiceFactory : public ProfileKeyedServiceFactory { 89 class GDataSystemServiceFactory : public ProfileKeyedServiceFactory {
(...skipping 29 matching lines...) Expand all
113 virtual ~GDataSystemServiceFactory(); 119 virtual ~GDataSystemServiceFactory();
114 120
115 // ProfileKeyedServiceFactory: 121 // ProfileKeyedServiceFactory:
116 virtual ProfileKeyedService* BuildServiceInstanceFor( 122 virtual ProfileKeyedService* BuildServiceInstanceFor(
117 Profile* profile) const OVERRIDE; 123 Profile* profile) const OVERRIDE;
118 }; 124 };
119 125
120 } // namespace gdata 126 } // namespace gdata
121 127
122 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_ 128 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_SYSTEM_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698