Index: chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h |
diff --git a/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h b/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h |
index 7bdaabd5f4b846167f19f2f5ac367ef9082dde9d..016ba9efa973e4b3d92d3d054d6deb17ce723192 100644 |
--- a/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h |
+++ b/chrome/browser/chromeos/gdata/gdata_wapi_feed_loader.h |
@@ -10,8 +10,7 @@ |
#include "base/observer_list.h" |
#include "chrome/browser/chromeos/gdata/gdata_directory_service.h" |
#include "chrome/browser/chromeos/gdata/gdata_errorcode.h" |
- |
-class GURL; |
+#include "googleurl/src/gurl.h" |
namespace base { |
class Value; |
@@ -74,6 +73,39 @@ typedef base::Callback<void(GetDocumentsParams* params, |
GDataFileError error)> |
LoadDocumentFeedCallback; |
+// Defines set of parameters for calling GDataWapiFeedLoader::LoadFromServer(). |
+// Value of |start_changestamp| determines the type of feed to load - 0 means |
+// root feed, every other value would trigger delta feed. |
+// In the case of loading the root feed we use |root_feed_changestamp| as its |
+// initial changestamp value since it does not come with that info. |
+// |
+// When all feeds are loaded, |feed_load_callback| is invoked with the retrieved |
+// feeds. Then |load_finished_callback| is invoked with the error code. |
+// |
+// |should_fetch_multiple_feeds| is true iff don't want to stop feed loading |
+// after we retrieve first feed chunk. |
+// If invoked as a part of content search, query will be set in |search_query|. |
+// If |feed_to_load| is set, this is feed url that will be used to load feed. |
+// |
+// |load_finished_callback| may be null. |
+// |feed_load_callback| must not be null. |
+struct LoadFeedParams { |
+ LoadFeedParams(ContentOrigin initial_origin, |
+ const LoadDocumentFeedCallback& feed_load_callback); |
+ ~LoadFeedParams(); |
+ |
+ ContentOrigin initial_origin; |
+ int64 start_changestamp; |
+ int64 root_feed_changestamp; |
+ bool should_fetch_multiple_feeds; |
+ FilePath search_file_path; |
+ std::string search_query; |
+ GURL feed_to_load; |
+ std::string directory_resource_id; |
+ FileOperationCallback load_finished_callback; |
+ const LoadDocumentFeedCallback feed_load_callback; |
+}; |
satorux1
2012/08/16 10:56:29
hmm, rather than just putting a bunch of parameter
|
+ |
// GDataWapiFeedLoader is used to load feeds from WAPI (codename for |
// Documents List API) and load the cached proto file. |
class GDataWapiFeedLoader { |
@@ -123,34 +155,8 @@ class GDataWapiFeedLoader { |
void LoadFromCache(bool should_load_from_server, |
const FileOperationCallback& callback); |
- // Starts root feed load from the server. Value of |start_changestamp| |
- // determines the type of feed to load - 0 means root feed, every other |
- // value would trigger delta feed. |
- // In the case of loading the root feed we use |root_feed_changestamp| as its |
- // initial changestamp value since it does not come with that info. |
- // |
- // When all feeds are loaded, |feed_load_callback| is invoked with the |
- // retrieved feeds. Then |load_finished_callback| is invoked with the error |
- // code. |
- // |
- // |should_fetch_multiple_feeds| is true iff don't want to stop feed loading |
- // after we retrieve first feed chunk. |
- // If invoked as a part of content search, query will be set in |
- // |search_query|. |
- // If |feed_to_load| is set, this is feed url that will be used to load feed. |
- // |
- // |load_finished_callback| may be null. |
- // |feed_load_callback| must not be null. |
- void LoadFromServer( |
- ContentOrigin initial_origin, |
- int64 start_changestamp, |
- int64 root_feed_changestamp, |
- bool should_fetch_multiple_feeds, |
- const std::string& search_query, |
- const GURL& feed_to_load, |
- const std::string& directory_resource_id, |
- const FileOperationCallback& load_finished_callback, |
- const LoadDocumentFeedCallback& feed_load_callback); |
+ // Starts root feed load from the server, with detail specified in |param|. |
+ void LoadFromServer(const LoadFeedParams& param); |
// Retrieves account metadata and determines from the last change timestamp |
// if the feed content loading from the server needs to be initiated. |