Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(881)

Side by Side Diff: chrome/browser/chromeos/drive/resource_metadata.h

Issue 23571006: drive: Stop using resource ID to access local metadata in CreateDirectoryOperation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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_RESOURCE_METADATA_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 const base::FilePath& second_path, 157 const base::FilePath& second_path,
158 const GetResourceEntryPairCallback& callback); 158 const GetResourceEntryPairCallback& callback);
159 159
160 // Replaces an existing entry whose ID is |id| with |entry|. 160 // Replaces an existing entry whose ID is |id| with |entry|.
161 FileError RefreshEntry(const std::string& id, const ResourceEntry& entry); 161 FileError RefreshEntry(const std::string& id, const ResourceEntry& entry);
162 162
163 // Recursively gets directories under the entry pointed to by |id|. 163 // Recursively gets directories under the entry pointed to by |id|.
164 void GetSubDirectoriesRecursively(const std::string& id, 164 void GetSubDirectoriesRecursively(const std::string& id,
165 std::set<base::FilePath>* sub_directories); 165 std::set<base::FilePath>* sub_directories);
166 166
167 // Returns the resource id of the resource named |base_name| directly under 167 // Returns the id of the resource named |base_name| directly under
168 // the directory with |parent_local_id|. 168 // the directory with |parent_local_id|.
169 // If not found, empty string will be returned. 169 // If not found, empty string will be returned.
170 std::string GetChildResourceId(const std::string& parent_local_id, 170 std::string GetChildId(const std::string& parent_local_id,
171 const std::string& base_name); 171 const std::string& base_name);
172 172
173 // Returns an object to iterate over entries. 173 // Returns an object to iterate over entries.
174 scoped_ptr<Iterator> GetIterator(); 174 scoped_ptr<Iterator> GetIterator();
175 175
176 // Returns virtual file path of the entry. 176 // Returns virtual file path of the entry.
177 base::FilePath GetFilePath(const std::string& id); 177 base::FilePath GetFilePath(const std::string& id);
178 178
179 // Returns ID of the entry at the given path. 179 // Returns ID of the entry at the given path.
180 FileError GetIdByPath(const base::FilePath& file_path, std::string* out_id); 180 FileError GetIdByPath(const base::FilePath& file_path, std::string* out_id);
181 181
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // invalidate its weak pointers before other members are destroyed. 231 // invalidate its weak pointers before other members are destroyed.
232 base::WeakPtrFactory<ResourceMetadata> weak_ptr_factory_; 232 base::WeakPtrFactory<ResourceMetadata> weak_ptr_factory_;
233 233
234 DISALLOW_COPY_AND_ASSIGN(ResourceMetadata); 234 DISALLOW_COPY_AND_ASSIGN(ResourceMetadata);
235 }; 235 };
236 236
237 } // namespace internal 237 } // namespace internal
238 } // namespace drive 238 } // namespace drive
239 239
240 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_ 240 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_RESOURCE_METADATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698