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_DRIVE_DRIVE_FEED_LOADER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 DriveFileError error); | 112 DriveFileError error); |
| 113 | 113 |
| 114 // Helper callback for handling results of metadata retrieval initiated from | 114 // Helper callback for handling results of metadata retrieval initiated from |
| 115 // ReloadFromServerIfNeeded(). This method makes a decision about fetching | 115 // ReloadFromServerIfNeeded(). This method makes a decision about fetching |
| 116 // the content of the root feed during the root directory refresh process. | 116 // the content of the root feed during the root directory refresh process. |
| 117 void OnGetAccountMetadata( | 117 void OnGetAccountMetadata( |
| 118 const FileOperationCallback& callback, | 118 const FileOperationCallback& callback, |
| 119 google_apis::GDataErrorCode status, | 119 google_apis::GDataErrorCode status, |
| 120 scoped_ptr<google_apis::AccountMetadataFeed> account_metadata); | 120 scoped_ptr<google_apis::AccountMetadataFeed> account_metadata); |
| 121 | 121 |
| 122 // Callback for DriveResourceMetadata::GetLargestChangestamp. | |
| 123 // Compares |remote_changestamp| and |local_changestamp| and triggers | |
| 124 // LoadFromServer if necessary. | |
| 125 void CompareChangestamps(const FileOperationCallback& callback, | |
|
satorux1
2013/01/15 19:19:01
Maybe: CompareChangestampsAndLoadIfNeeded ?
achuithb
2013/01/15 22:19:15
Done.
| |
| 126 int64 remote_changestamp, | |
| 127 int64 local_changestamp); | |
| 128 | |
| 122 // Callback for handling response from |DriveAPIService::GetApplicationInfo|. | 129 // Callback for handling response from |DriveAPIService::GetApplicationInfo|. |
| 123 // If the application list is successfully parsed, passes the list to | 130 // If the application list is successfully parsed, passes the list to |
| 124 // Drive webapps registry. | 131 // Drive webapps registry. |
| 125 void OnGetApplicationList(google_apis::GDataErrorCode status, | 132 void OnGetApplicationList(google_apis::GDataErrorCode status, |
| 126 scoped_ptr<base::Value> json); | 133 scoped_ptr<base::Value> json); |
| 127 | 134 |
| 128 // Callback for handling feed content fetching while searching for file info. | 135 // Callback for handling feed content fetching while searching for file info. |
| 129 // This callback is invoked after async feed fetch operation that was | 136 // This callback is invoked after async feed fetch operation that was |
| 130 // invoked by StartDirectoryRefresh() completes. This callback will update | 137 // invoked by StartDirectoryRefresh() completes. This callback will update |
| 131 // the content of the refreshed directory object and continue initially | 138 // the content of the refreshed directory object and continue initially |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 170 | 177 |
| 171 // Note: This should remain the last member so it'll be destroyed and | 178 // Note: This should remain the last member so it'll be destroyed and |
| 172 // invalidate its weak pointers before any other members are destroyed. | 179 // invalidate its weak pointers before any other members are destroyed. |
| 173 base::WeakPtrFactory<DriveFeedLoader> weak_ptr_factory_; | 180 base::WeakPtrFactory<DriveFeedLoader> weak_ptr_factory_; |
| 174 DISALLOW_COPY_AND_ASSIGN(DriveFeedLoader); | 181 DISALLOW_COPY_AND_ASSIGN(DriveFeedLoader); |
| 175 }; | 182 }; |
| 176 | 183 |
| 177 } // namespace drive | 184 } // namespace drive |
| 178 | 185 |
| 179 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ | 186 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ |
| OLD | NEW |