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

Side by Side Diff: components/offline_pages/core/prefetch/prefetch_proto_utils.h

Issue 2928243002: Return operation name in prefetch request callback and add internal page hookup (Closed)
Patch Set: Fix comment indent in JS Created 3 years, 6 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
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 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 COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_PROTO_UTILS_H_ 5 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_PROTO_UTILS_H_
6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_PROTO_UTILS_H_ 6 #define COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_PROTO_UTILS_H_
7 7
8 #include <string>
8 #include <vector> 9 #include <vector>
9 #include "components/offline_pages/core/prefetch/prefetch_types.h" 10 #include "components/offline_pages/core/prefetch/prefetch_types.h"
10 11
11 namespace offline_pages { 12 namespace offline_pages {
12 13
13 // The fully qualified type name for PageBundle defined in proto. 14 // The fully qualified type name for PageBundle defined in proto.
14 extern const char kPageBundleTypeURL[]; 15 extern const char kPageBundleTypeURL[];
15 16
16 // Used to parse the Operation serialized in binary proto |data|. 17 // Parse the Operation serialized in binary proto |data|. Returns the operation
17 bool ParseOperationResponse(const std::string& data, 18 // name if parsing succeeded. Otherwise, empty string is returned.
18 std::vector<RenderPageInfo>* pages); 19 std::string ParseOperationResponse(const std::string& data,
20 std::vector<RenderPageInfo>* pages);
19 21
20 } // namespace offline_pages 22 } // namespace offline_pages
21 23
22 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_PROTO_UTILS_H_ 24 #endif // COMPONENTS_OFFLINE_PAGES_CORE_PREFETCH_PREFETCH_PROTO_UTILS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698