| 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 CompareChangestampsAndLoadIfNeeded( |
| 126 const FileOperationCallback& callback, |
| 127 int64 remote_changestamp, |
| 128 int64 local_changestamp); |
| 129 |
| 122 // Callback for handling response from |DriveAPIService::GetApplicationInfo|. | 130 // Callback for handling response from |DriveAPIService::GetApplicationInfo|. |
| 123 // If the application list is successfully parsed, passes the list to | 131 // If the application list is successfully parsed, passes the list to |
| 124 // Drive webapps registry. | 132 // Drive webapps registry. |
| 125 void OnGetApplicationList(google_apis::GDataErrorCode status, | 133 void OnGetApplicationList(google_apis::GDataErrorCode status, |
| 126 scoped_ptr<base::Value> json); | 134 scoped_ptr<base::Value> json); |
| 127 | 135 |
| 128 // Callback for handling feed content fetching while searching for file info. | 136 // Callback for handling feed content fetching while searching for file info. |
| 129 // This callback is invoked after async feed fetch operation that was | 137 // This callback is invoked after async feed fetch operation that was |
| 130 // invoked by StartDirectoryRefresh() completes. This callback will update | 138 // invoked by StartDirectoryRefresh() completes. This callback will update |
| 131 // the content of the refreshed directory object and continue initially | 139 // the content of the refreshed directory object and continue initially |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 178 |
| 171 // Note: This should remain the last member so it'll be destroyed and | 179 // Note: This should remain the last member so it'll be destroyed and |
| 172 // invalidate its weak pointers before any other members are destroyed. | 180 // invalidate its weak pointers before any other members are destroyed. |
| 173 base::WeakPtrFactory<DriveFeedLoader> weak_ptr_factory_; | 181 base::WeakPtrFactory<DriveFeedLoader> weak_ptr_factory_; |
| 174 DISALLOW_COPY_AND_ASSIGN(DriveFeedLoader); | 182 DISALLOW_COPY_AND_ASSIGN(DriveFeedLoader); |
| 175 }; | 183 }; |
| 176 | 184 |
| 177 } // namespace drive | 185 } // namespace drive |
| 178 | 186 |
| 179 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ | 187 #endif // CHROME_BROWSER_CHROMEOS_DRIVE_DRIVE_FEED_LOADER_H_ |
| OLD | NEW |