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

Side by Side Diff: components/offline_pages/core/prefetch/get_operation_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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_GET_OPERATION_REQUEST_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_GET_OPERATION_REQUEST_H_
7
8 #include <vector>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "components/offline_pages/core/prefetch/prefetch_types.h"
13
14 namespace net {
15 class URLRequestContextGetter;
16 }
17
18 namespace offline_pages {
19
20 class PrefetchRequestFetcher;
21
22 // Sends this request to find out the current state of an operation that is
23 // triggered by GeneratePageBundleRequest but not finished at that time.
24 class GetOperationRequest {
25 public:
26 // |name| identifies the operation triggered by the GeneratePageBundleRequest.
27 // It is retrieved from the operation data returned in the
28 // GeneratePageBundleRequest response.
29 GetOperationRequest(const std::string& name,
30 net::URLRequestContextGetter* request_context_getter,
31 const PrefetchRequestFinishedCallback& callback);
32 ~GetOperationRequest();
33
34 private:
35 void OnCompleted(PrefetchRequestStatus status, const std::string& data);
36
37 PrefetchRequestFinishedCallback callback_;
38 std::unique_ptr<PrefetchRequestFetcher> fetcher_;
39
40 DISALLOW_COPY_AND_ASSIGN(GetOperationRequest);
41 };
42
43 } // namespace offline_pages
44
45 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_GET_OPERATION_REQUEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698