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

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

Issue 107293013: drive: Stop comparing resource ID against kDriveGrandRootLocalId (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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_CHANGE_LIST_PROCESSOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_
6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 15 matching lines...) Expand all
26 26
27 namespace internal { 27 namespace internal {
28 28
29 class ResourceMetadata; 29 class ResourceMetadata;
30 30
31 // Holds information needed to fetch contents of a directory. 31 // Holds information needed to fetch contents of a directory.
32 // This object is copyable. 32 // This object is copyable.
33 class DirectoryFetchInfo { 33 class DirectoryFetchInfo {
34 public: 34 public:
35 DirectoryFetchInfo() : changestamp_(0) {} 35 DirectoryFetchInfo() : changestamp_(0) {}
36 DirectoryFetchInfo(const std::string& resource_id, 36 DirectoryFetchInfo(const std::string& local_id,
37 const std::string& resource_id,
37 int64 changestamp) 38 int64 changestamp)
38 : resource_id_(resource_id), 39 : local_id_(local_id),
40 resource_id_(resource_id),
39 changestamp_(changestamp) { 41 changestamp_(changestamp) {
40 } 42 }
41 43
42 // Returns true if the object is empty. 44 // Returns true if the object is empty.
43 bool empty() const { return resource_id_.empty(); } 45 bool empty() const { return local_id_.empty(); }
46
47 // Local ID of the directory.
48 const std::string& local_id() const { return local_id_; }
44 49
45 // Resource ID of the directory. 50 // Resource ID of the directory.
46 const std::string& resource_id() const { return resource_id_; } 51 const std::string& resource_id() const { return resource_id_; }
47 52
48 // Changestamp of the directory. The changestamp is used to determine if 53 // Changestamp of the directory. The changestamp is used to determine if
49 // the directory contents should be fetched. 54 // the directory contents should be fetched.
50 int64 changestamp() const { return changestamp_; } 55 int64 changestamp() const { return changestamp_; }
51 56
52 // Returns a string representation of this object. 57 // Returns a string representation of this object.
53 std::string ToString() const; 58 std::string ToString() const;
54 59
55 private: 60 private:
61 const std::string local_id_;
56 const std::string resource_id_; 62 const std::string resource_id_;
57 const int64 changestamp_; 63 const int64 changestamp_;
58 }; 64 };
59 65
60 // Class to represent a change list. 66 // Class to represent a change list.
61 class ChangeList { 67 class ChangeList {
62 public: 68 public:
63 ChangeList(); // For tests. 69 ChangeList(); // For tests.
64 explicit ChangeList(const google_apis::ResourceList& resource_list); 70 explicit ChangeList(const google_apis::ResourceList& resource_list);
65 ~ChangeList(); 71 ~ChangeList();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 ParentResourceIdMap parent_resource_id_map_; 153 ParentResourceIdMap parent_resource_id_map_;
148 std::set<base::FilePath> changed_dirs_; 154 std::set<base::FilePath> changed_dirs_;
149 155
150 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor); 156 DISALLOW_COPY_AND_ASSIGN(ChangeListProcessor);
151 }; 157 };
152 158
153 } // namespace internal 159 } // namespace internal
154 } // namespace drive 160 } // namespace drive
155 161
156 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_ 162 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_CHANGE_LIST_PROCESSOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/drive/change_list_loader.cc ('k') | chrome/browser/chromeos/drive/change_list_processor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698