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_WAPI_FEED_PROCESSOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_PROCESSOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_PROCESSOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_PROCESSOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 ~GDataWapiFeedProcessor(); | 42 ~GDataWapiFeedProcessor(); |
43 | 43 |
44 // Applies the documents feeds to the file system using |resource_metadata_|. | 44 // Applies the documents feeds to the file system using |resource_metadata_|. |
45 // | 45 // |
46 // |start_changestamp| determines the type of feed to process. The value is | 46 // |start_changestamp| determines the type of feed to process. The value is |
47 // set to zero for the root feeds, every other value is for the delta feeds. | 47 // set to zero for the root feeds, every other value is for the delta feeds. |
48 // | 48 // |
49 // In the case of processing the root feeds |root_feed_changestamp| is used | 49 // In the case of processing the root feeds |root_feed_changestamp| is used |
50 // as its initial changestamp value. The value comes from | 50 // as its initial changestamp value. The value comes from |
51 // AccountMetadataFeed. | 51 // AccountMetadataFeed. |
52 GDataFileError ApplyFeeds(const std::vector<DocumentFeed*>& feed_list, | 52 DriveFileError ApplyFeeds(const std::vector<DocumentFeed*>& feed_list, |
53 int64 start_changestamp, | 53 int64 start_changestamp, |
54 int64 root_feed_changestamp, | 54 int64 root_feed_changestamp, |
55 std::set<FilePath>* changed_dirs); | 55 std::set<FilePath>* changed_dirs); |
56 | 56 |
57 // Converts list of document feeds from collected feeds into | 57 // Converts list of document feeds from collected feeds into |
58 // FileResourceIdMap. | 58 // FileResourceIdMap. |
59 GDataFileError FeedToFileResourceMap( | 59 DriveFileError FeedToFileResourceMap( |
60 const std::vector<DocumentFeed*>& feed_list, | 60 const std::vector<DocumentFeed*>& feed_list, |
61 FileResourceIdMap* file_map, | 61 FileResourceIdMap* file_map, |
62 int64* feed_changestamp, | 62 int64* feed_changestamp, |
63 FeedToFileResourceMapUmaStats* uma_stats); | 63 FeedToFileResourceMapUmaStats* uma_stats); |
64 | 64 |
65 private: | 65 private: |
66 // Updates UMA histograms about file counts. | 66 // Updates UMA histograms about file counts. |
67 void UpdateFileCountUmaHistograms( | 67 void UpdateFileCountUmaHistograms( |
68 const FeedToFileResourceMapUmaStats& uma_stats) const; | 68 const FeedToFileResourceMapUmaStats& uma_stats) const; |
69 | 69 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 const FileResourceIdMap& file_map, | 102 const FileResourceIdMap& file_map, |
103 DriveResourceMetadata* orphaned_ressources); | 103 DriveResourceMetadata* orphaned_ressources); |
104 | 104 |
105 DriveResourceMetadata* resource_metadata_; // Not owned. | 105 DriveResourceMetadata* resource_metadata_; // Not owned. |
106 DISALLOW_COPY_AND_ASSIGN(GDataWapiFeedProcessor); | 106 DISALLOW_COPY_AND_ASSIGN(GDataWapiFeedProcessor); |
107 }; | 107 }; |
108 | 108 |
109 } // namespace gdata | 109 } // namespace gdata |
110 | 110 |
111 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_PROCESSOR_H_ | 111 #endif // CHROME_BROWSER_CHROMEOS_GDATA_GDATA_WAPI_FEED_PROCESSOR_H_ |
OLD | NEW |