| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 FROM_SERVER, | 49 FROM_SERVER, |
| 50 }; | 50 }; |
| 51 | 51 |
| 52 // File type on the gdata file system can be either a regular file or | 52 // File type on the gdata file system can be either a regular file or |
| 53 // a hosted document. | 53 // a hosted document. |
| 54 enum GDataFileType { | 54 enum GDataFileType { |
| 55 REGULAR_FILE, | 55 REGULAR_FILE, |
| 56 HOSTED_DOCUMENT, | 56 HOSTED_DOCUMENT, |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 // The root directory name used for the Google Drive file system tree. The |
| 60 // name is used in URLs for the file manager, hence user-visible. |
| 61 const FilePath::CharType kGDataRootDirectory[] = FILE_PATH_LITERAL("drive"); |
| 62 |
| 63 // The resource ID for the root directory is defined in the spec: |
| 64 // https://developers.google.com/google-apps/documents-list/ |
| 65 const char kGDataRootDirectoryResourceId[] = "folder:root"; |
| 66 |
| 59 // Base class for representing files and directories in gdata virtual file | 67 // Base class for representing files and directories in gdata virtual file |
| 60 // system. | 68 // system. |
| 61 class GDataEntry { | 69 class GDataEntry { |
| 62 public: | 70 public: |
| 63 explicit GDataEntry(GDataDirectory* parent, GDataRootDirectory* root); | 71 explicit GDataEntry(GDataDirectory* parent, GDataRootDirectory* root); |
| 64 virtual ~GDataEntry(); | 72 virtual ~GDataEntry(); |
| 65 | 73 |
| 66 virtual GDataFile* AsGDataFile(); | 74 virtual GDataFile* AsGDataFile(); |
| 67 virtual GDataDirectory* AsGDataDirectory(); | 75 virtual GDataDirectory* AsGDataDirectory(); |
| 68 virtual GDataRootDirectory* AsGDataRootDirectory(); | 76 virtual GDataRootDirectory* AsGDataRootDirectory(); |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 base::Time last_serialized_; | 545 base::Time last_serialized_; |
| 538 int largest_changestamp_; | 546 int largest_changestamp_; |
| 539 size_t serialized_size_; | 547 size_t serialized_size_; |
| 540 | 548 |
| 541 DISALLOW_COPY_AND_ASSIGN(GDataRootDirectory); | 549 DISALLOW_COPY_AND_ASSIGN(GDataRootDirectory); |
| 542 }; | 550 }; |
| 543 | 551 |
| 544 } // namespace gdata | 552 } // namespace gdata |
| 545 | 553 |
| 546 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ | 554 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
| OLD | NEW |