Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 | 26 |
| 27 class FindEntryDelegate; | 27 class FindEntryDelegate; |
| 28 class GDataFile; | 28 class GDataFile; |
| 29 class GDataDirectory; | 29 class GDataDirectory; |
| 30 class GDataRootDirectory; | 30 class GDataRootDirectory; |
| 31 | 31 |
| 32 class GDataEntryProto; | 32 class GDataEntryProto; |
| 33 class GDataFileProto; | 33 class GDataFileProto; |
| 34 class GDataDirectoryProto; | 34 class GDataDirectoryProto; |
| 35 class GDataRootDirectoryProto; | 35 class GDataRootDirectoryProto; |
| 36 class PlatformFileInfoProto; | |
|
achuithb
2012/04/30 23:51:33
I'd make this the first declaration in this proto
| |
| 36 | 37 |
| 37 // Directory content origin. | 38 // Directory content origin. |
| 38 enum ContentOrigin { | 39 enum ContentOrigin { |
| 39 UNINITIALIZED, | 40 UNINITIALIZED, |
| 40 // Directory content is currently loading from somewhere. needs to wait. | 41 // Directory content is currently loading from somewhere. needs to wait. |
| 41 INITIALIZING, | 42 INITIALIZING, |
| 42 // Directory content is initialized, but during refreshing. | 43 // Directory content is initialized, but during refreshing. |
| 43 REFRESHING, | 44 REFRESHING, |
| 44 // Directory content is initialized from disk cache. | 45 // Directory content is initialized from disk cache. |
| 45 FROM_CACHE, | 46 FROM_CACHE, |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 129 | 130 |
| 130 // Returns virtual file path representing this file system entry. This path | 131 // Returns virtual file path representing this file system entry. This path |
| 131 // corresponds to file path expected by public methods of GDataFileSyste | 132 // corresponds to file path expected by public methods of GDataFileSyste |
| 132 // class. | 133 // class. |
| 133 FilePath GetFilePath() const; | 134 FilePath GetFilePath() const; |
| 134 | 135 |
| 135 // Sets |file_name_| based on the value of |title_| without name | 136 // Sets |file_name_| based on the value of |title_| without name |
| 136 // de-duplication (see AddEntry() for details on de-duplication). | 137 // de-duplication (see AddEntry() for details on de-duplication). |
| 137 virtual void SetFileNameFromTitle(); | 138 virtual void SetFileNameFromTitle(); |
| 138 | 139 |
| 140 // Convert the proto representation to the platform file. | |
|
achuithb
2012/04/30 23:51:33
Can we keep all the proto methods grouped together
satorux1
2012/05/01 00:13:46
Done.
| |
| 141 static void ConvertProtoToPlatformFileInfo( | |
| 142 const PlatformFileInfoProto& proto, | |
| 143 base::PlatformFileInfo* file_info); | |
| 144 | |
| 145 // Converts the platform file info to the proto representation. | |
| 146 static void ConvertPlatformFileInfoToProto( | |
| 147 const base::PlatformFileInfo& file_info, | |
| 148 PlatformFileInfoProto* proto); | |
| 149 | |
| 139 protected: | 150 protected: |
| 140 // For access to SetParent from AddEntry. | 151 // For access to SetParent from AddEntry. |
| 141 friend class GDataDirectory; | 152 friend class GDataDirectory; |
| 142 | 153 |
| 143 // Sets the parent directory of this file system entry. | 154 // Sets the parent directory of this file system entry. |
| 144 // It is intended to be used by GDataDirectory::AddEntry() only. | 155 // It is intended to be used by GDataDirectory::AddEntry() only. |
| 145 void SetParent(GDataDirectory* parent); | 156 void SetParent(GDataDirectory* parent); |
| 146 | 157 |
| 147 base::PlatformFileInfo file_info_; | 158 base::PlatformFileInfo file_info_; |
| 148 // Title of this file (i.e. the 'title' attribute associated with a regular | 159 // Title of this file (i.e. the 'title' attribute associated with a regular |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 491 base::Time last_serialized_; | 502 base::Time last_serialized_; |
| 492 int largest_changestamp_; | 503 int largest_changestamp_; |
| 493 size_t serialized_size_; | 504 size_t serialized_size_; |
| 494 | 505 |
| 495 DISALLOW_COPY_AND_ASSIGN(GDataRootDirectory); | 506 DISALLOW_COPY_AND_ASSIGN(GDataRootDirectory); |
| 496 }; | 507 }; |
| 497 | 508 |
| 498 } // namespace gdata | 509 } // namespace gdata |
| 499 | 510 |
| 500 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ | 511 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_FILES_H_ |
| OLD | NEW |