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