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

Unified Diff: components/offline_pages/core/prefetch/generate_page_bundle_request.h

Issue 2889453003: [Offline Prefetech] Send GetOperationReqest to the server (Closed)
Patch Set: Rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/offline_pages/core/prefetch/generate_page_bundle_request.h
diff --git a/components/offline_pages/core/prefetch/generate_page_bundle_request.h b/components/offline_pages/core/prefetch/generate_page_bundle_request.h
index 45350499792ce7586ff1dc4afc710e65d8b448a1..4311313516915929b3ce0ff0576d19b31830a2ad 100644
--- a/components/offline_pages/core/prefetch/generate_page_bundle_request.h
+++ b/components/offline_pages/core/prefetch/generate_page_bundle_request.h
@@ -9,7 +9,6 @@
#include "base/callback.h"
#include "base/macros.h"
-#include "base/memory/ref_counted.h"
#include "components/offline_pages/core/prefetch/prefetch_types.h"
namespace net {
@@ -19,34 +18,22 @@ class URLRequestContextGetter;
namespace offline_pages {
class PrefetchRequestFetcher;
-namespace proto {
-class Any;
-class Operation;
-} // namespace proto
class GeneratePageBundleRequest {
public:
- using FinishedCallback =
- base::Callback<void(PrefetchRequestStatus status,
- const std::vector<RenderPageInfo>& pages)>;
-
GeneratePageBundleRequest(
const std::string& user_agent,
const std::string& gcm_registration_id,
int max_bundle_size_bytes,
const std::vector<std::string>& page_urls,
net::URLRequestContextGetter* request_context_getter,
- const FinishedCallback& callback);
+ const PrefetchRequestFinishedCallback& callback);
~GeneratePageBundleRequest();
private:
void OnCompleted(PrefetchRequestStatus status, const std::string& data);
- void ParseDoneOperationResponse(const proto::Operation& operation);
- void ParsePendingOperationResponse(const proto::Operation& operation);
- void ParseAnyData(const proto::Any& any_data);
- void NotifyParsingFailure();
- FinishedCallback callback_;
+ PrefetchRequestFinishedCallback callback_;
std::unique_ptr<PrefetchRequestFetcher> fetcher_;
DISALLOW_COPY_AND_ASSIGN(GeneratePageBundleRequest);

Powered by Google App Engine
This is Rietveld 408576698