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

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

Issue 2234873004: Have the RequestCoordinator generate the offline_id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile warning about const Created 4 years, 4 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/android/application_status_listener.h" 10 #include "base/android/application_status_listener.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 46
47 void SetApplicationStateForTesting( 47 void SetApplicationStateForTesting(
48 base::android::ApplicationState application_state); 48 base::android::ApplicationState application_state);
49 49
50 protected: 50 protected:
51 // Internal method for requesting OfflinePageModel to save page. 51 // Internal method for requesting OfflinePageModel to save page.
52 // Exposed for unit testing. 52 // Exposed for unit testing.
53 // TODO(dougarnett): Consider making OfflinePageModel mockable instead. 53 // TODO(dougarnett): Consider making OfflinePageModel mockable instead.
54 virtual void SavePage(const GURL& url, 54 virtual void SavePage(const GURL& url,
55 const ClientId& client_id, 55 const ClientId& client_id,
56 int64_t offline_id,
Dmitry Titov 2016/08/16 02:25:00 Naming suggestion: maybe proposed_offline_id? To c
Pete Williamson 2016/08/16 18:54:56 Done.
56 std::unique_ptr<OfflinePageArchiver> archiver, 57 std::unique_ptr<OfflinePageArchiver> archiver,
57 const SavePageCallback& save_callback); 58 const SavePageCallback& save_callback);
58 59
59 private: 60 private:
60 // Callback logic for PrerenderingLoader::LoadPage(). 61 // Callback logic for PrerenderingLoader::LoadPage().
61 void OnLoadPageDone(const SavePageRequest& request, 62 void OnLoadPageDone(const SavePageRequest& request,
62 Offliner::RequestStatus load_status, 63 Offliner::RequestStatus load_status,
63 content::WebContents* web_contents); 64 content::WebContents* web_contents);
64 65
65 // Callback logic for OfflinePageModel::SavePage(). 66 // Callback logic for OfflinePageModel::SavePage().
(...skipping 23 matching lines...) Expand all
89 // ApplicationStatusListener to monitor if the Chrome moves to the foreground. 90 // ApplicationStatusListener to monitor if the Chrome moves to the foreground.
90 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_; 91 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_;
91 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_; 92 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_;
92 93
93 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner); 94 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner);
94 }; 95 };
95 96
96 } // namespace offline_pages 97 } // namespace offline_pages
97 98
98 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 99 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698