OLD | NEW |
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_FILES_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
| 13 #include "base/gtest_prod_util.h" |
13 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/memory/singleton.h" |
14 #include "base/memory/weak_ptr.h" | 16 #include "base/memory/weak_ptr.h" |
15 #include "base/platform_file.h" | 17 #include "base/platform_file.h" |
| 18 #include "base/synchronization/lock.h" |
| 19 #include "chrome/browser/chromeos/gdata/gdata_uploader.h" |
16 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h" | 20 #include "chrome/browser/chromeos/gdata/gdata_wapi_parser.h" |
| 21 #include "chrome/browser/profiles/profile_keyed_service.h" |
| 22 #include "chrome/browser/profiles/profile_keyed_service_factory.h" |
| 23 |
| 24 namespace base { |
| 25 class SequencedTaskRunner; |
| 26 } |
17 | 27 |
18 namespace gdata { | 28 namespace gdata { |
19 | 29 |
| 30 struct CreateDBParams; |
20 class GDataFile; | 31 class GDataFile; |
21 class GDataDirectory; | 32 class GDataDirectory; |
22 class GDataDirectoryService; | 33 class GDataDirectoryService; |
| 34 class ResourceMetadataDB; |
23 | 35 |
24 class GDataEntryProto; | 36 class GDataEntryProto; |
25 class GDataDirectoryProto; | 37 class GDataDirectoryProto; |
26 class GDataRootDirectoryProto; | 38 class GDataRootDirectoryProto; |
27 class PlatformFileInfoProto; | 39 class PlatformFileInfoProto; |
28 | 40 |
| 41 // File type on the gdata file system can be either a regular file or |
| 42 // a hosted document. |
| 43 enum GDataFileType { |
| 44 REGULAR_FILE, |
| 45 HOSTED_DOCUMENT, |
| 46 }; |
| 47 |
29 // Used to read a directory from the file system. | 48 // Used to read a directory from the file system. |
30 // If |error| is not GDATA_FILE_OK, |entries| is set to NULL. | 49 // If |error| is not GDATA_FILE_OK, |entries| is set to NULL. |
31 // |entries| are contents, both files and directories, of the directory. | 50 // |entries| are contents, both files and directories, of the directory. |
32 typedef std::vector<GDataEntryProto> GDataEntryProtoVector; | 51 typedef std::vector<GDataEntryProto> GDataEntryProtoVector; |
33 | 52 |
34 // Base class for representing files and directories in gdata virtual file | 53 // Base class for representing files and directories in gdata virtual file |
35 // system. | 54 // system. |
36 class GDataEntry { | 55 class GDataEntry { |
37 public: | 56 public: |
38 virtual ~GDataEntry(); | 57 virtual ~GDataEntry(); |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 // Collection of children GDataEntry items. | 300 // Collection of children GDataEntry items. |
282 GDataFileCollection child_files_; | 301 GDataFileCollection child_files_; |
283 GDataDirectoryCollection child_directories_; | 302 GDataDirectoryCollection child_directories_; |
284 | 303 |
285 DISALLOW_COPY_AND_ASSIGN(GDataDirectory); | 304 DISALLOW_COPY_AND_ASSIGN(GDataDirectory); |
286 }; | 305 }; |
287 | 306 |
288 } // namespace gdata | 307 } // namespace gdata |
289 | 308 |
290 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ | 309 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
OLD | NEW |