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_DRIVE_DRIVE_RESOURCE_METADATA_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_H_ |
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 std::string FindDirectoryChild(DriveEntryProto* directory, | 355 std::string FindDirectoryChild(DriveEntryProto* directory, |
356 const base::FilePath::StringType& file_name); | 356 const base::FilePath::StringType& file_name); |
357 | 357 |
358 // Removes the entry from its children without destroying the | 358 // Removes the entry from its children without destroying the |
359 // entry instance. | 359 // entry instance. |
360 void DetachEntryFromDirectory(DriveEntryProto* directory, | 360 void DetachEntryFromDirectory(DriveEntryProto* directory, |
361 DriveEntryProto* entry); | 361 DriveEntryProto* entry); |
362 | 362 |
363 // Removes child elements of directory. | 363 // Removes child elements of directory. |
364 void RemoveDirectoryChildren(DriveEntryProto* directory); | 364 void RemoveDirectoryChildren(DriveEntryProto* directory); |
365 void RemoveDirectoryChildFiles(DriveEntryProto* directory); | |
366 void RemoveDirectoryChildDirectories(DriveEntryProto* directory); | |
367 | 365 |
368 // Converts directory to proto, and vice versa. | 366 // Converts directory to proto, and vice versa. |
369 void ProtoToDirectory(const DriveDirectoryProto& proto, | 367 void ProtoToDirectory(const DriveDirectoryProto& proto, |
370 DriveEntryProto* directory); | 368 DriveEntryProto* directory); |
371 void DirectoryToProto(DriveEntryProto* directory, | 369 void DirectoryToProto(DriveEntryProto* directory, |
372 DriveDirectoryProto* proto); | 370 DriveDirectoryProto* proto); |
373 | 371 |
374 // Converts the children as a vector of DriveEntryProto. | 372 // Converts the children as a vector of DriveEntryProto. |
375 scoped_ptr<DriveEntryProtoVector> DirectoryChildrenToProtoVector( | 373 scoped_ptr<DriveEntryProtoVector> DirectoryChildrenToProtoVector( |
376 DriveEntryProto* directory); | 374 DriveEntryProto* directory); |
(...skipping 15 matching lines...) Expand all Loading... |
392 // This should remain the last member so it'll be destroyed first and | 390 // This should remain the last member so it'll be destroyed first and |
393 // invalidate its weak pointers before other members are destroyed. | 391 // invalidate its weak pointers before other members are destroyed. |
394 base::WeakPtrFactory<DriveResourceMetadata> weak_ptr_factory_; | 392 base::WeakPtrFactory<DriveResourceMetadata> weak_ptr_factory_; |
395 | 393 |
396 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadata); | 394 DISALLOW_COPY_AND_ASSIGN(DriveResourceMetadata); |
397 }; | 395 }; |
398 | 396 |
399 } // namespace drive | 397 } // namespace drive |
400 | 398 |
401 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_H_ | 399 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_RESOURCE_METADATA_H_ |
OLD | NEW |