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

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

Issue 2683493002: Get signals working in the EXTRA_DATA section of MHTML (Closed)
Patch Set: FIx tests, add unit test Created 3 years, 9 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void SetApplicationStateForTesting( 49 void SetApplicationStateForTesting(
50 base::android::ApplicationState application_state); 50 base::android::ApplicationState application_state);
51 51
52 protected: 52 protected:
53 // Internal method for requesting OfflinePageModel to save page. Exposed for 53 // Internal method for requesting OfflinePageModel to save page. Exposed for
54 // unit testing. 54 // unit testing.
55 // TODO(dougarnett): Consider making OfflinePageModel mockable instead. 55 // TODO(dougarnett): Consider making OfflinePageModel mockable instead.
56 virtual void SavePage( 56 virtual void SavePage(
57 const OfflinePageModel::SavePageParams& save_page_params, 57 const OfflinePageModel::SavePageParams& save_page_params,
58 std::unique_ptr<OfflinePageArchiver> archiver, 58 std::unique_ptr<OfflinePageArchiver> archiver,
59 const std::string& signal_data,
59 const SavePageCallback& save_callback); 60 const SavePageCallback& save_callback);
60 61
61 private: 62 private:
62 // Progress callback for PrerenderingLoader::LoadPage(). 63 // Progress callback for PrerenderingLoader::LoadPage().
63 void OnNetworkProgress(const SavePageRequest& request, int64_t bytes); 64 void OnNetworkProgress(const SavePageRequest& request, int64_t bytes);
64 65
65 // Callback logic for PrerenderingLoader::LoadPage(). 66 // Callback logic for PrerenderingLoader::LoadPage().
66 void OnLoadPageDone(const SavePageRequest& request, 67 void OnLoadPageDone(const SavePageRequest& request,
67 Offliner::RequestStatus load_status, 68 Offliner::RequestStatus load_status,
68 content::WebContents* web_contents); 69 content::WebContents* web_contents);
(...skipping 30 matching lines...) Expand all
99 // ApplicationStatusListener to monitor if the Chrome moves to the foreground. 100 // ApplicationStatusListener to monitor if the Chrome moves to the foreground.
100 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_; 101 std::unique_ptr<base::android::ApplicationStatusListener> app_listener_;
101 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_; 102 base::WeakPtrFactory<PrerenderingOffliner> weak_ptr_factory_;
102 103
103 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner); 104 DISALLOW_COPY_AND_ASSIGN(PrerenderingOffliner);
104 }; 105 };
105 106
106 } // namespace offline_pages 107 } // namespace offline_pages
107 108
108 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_ 109 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_PRERENDERING_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698