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

Side by Side Diff: chrome/browser/android/offline_pages/prerendering_offliner.h

Issue 2048923002: Fixes for turning on offliner request. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Put const& back on LoadPageCallback param Created 4 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 PrerenderingLoader* GetOrCreateLoader(); 66 PrerenderingLoader* GetOrCreateLoader();
67 void SetPendingRequest(int64_t request_id); 67 void SetPendingRequest(int64_t request_id);
68 void ClearPendingRequest(); 68 void ClearPendingRequest();
69 69
70 // Not owned. 70 // Not owned.
71 content::BrowserContext* browser_context_; 71 content::BrowserContext* browser_context_;
72 // Not owned. 72 // Not owned.
73 OfflinePageModel* offline_page_model_; 73 OfflinePageModel* offline_page_model_;
74 // Lazily created. 74 // Lazily created.
75 std::unique_ptr<PrerenderingLoader> loader_; 75 std::unique_ptr<PrerenderingLoader> loader_;
76 // Tracks pending request, if any. Not owned. 76 // Tracks pending request, if any. Owned copy.
77 // May be used to ensure a callback applies to the pending request (e.g., in 77 // May be used to ensure a callback applies to the pending request (e.g., in
78 // case we receive a save page callback for an old, canceled request). 78 // case we receive a save page callback for an old, canceled request).
79 SavePageRequest const* pending_request_; 79 std::unique_ptr<SavePageRequest> pending_request_;
80 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_; 80 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_;
81 81
82 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner); 82 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner);
83 }; 83 };
84 84
85 } // namespace offline_pages 85 } // namespace offline_pages
86 86
87 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 87 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698