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

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

Issue 2736843002: Fix the Download Notifications for Offline Pages to indicate bytes loaded. (Closed)
Patch Set: more fixes to more tests. 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_BACKGROUND_LOADER_OFFLINER_H_ 5 #ifndef CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_
6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ 6 #define CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_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 18 matching lines...) Expand all
29 class BackgroundLoaderOffliner : public Offliner, 29 class BackgroundLoaderOffliner : public Offliner,
30 public content::WebContentsObserver { 30 public content::WebContentsObserver {
31 public: 31 public:
32 BackgroundLoaderOffliner(content::BrowserContext* browser_context, 32 BackgroundLoaderOffliner(content::BrowserContext* browser_context,
33 const OfflinerPolicy* policy, 33 const OfflinerPolicy* policy,
34 OfflinePageModel* offline_page_model); 34 OfflinePageModel* offline_page_model);
35 ~BackgroundLoaderOffliner() override; 35 ~BackgroundLoaderOffliner() override;
36 36
37 // Offliner implementation. 37 // Offliner implementation.
38 bool LoadAndSave(const SavePageRequest& request, 38 bool LoadAndSave(const SavePageRequest& request,
39 const CompletionCallback& callback) override; 39 const CompletionCallback& completion_callback,
40 const ProgressCallback& progress_callback) override;
40 void Cancel(const CancelCallback& callback) override; 41 void Cancel(const CancelCallback& callback) override;
41 bool HandleTimeout(const SavePageRequest& request) override; 42 bool HandleTimeout(const SavePageRequest& request) override;
42 43
43 // WebContentsObserver implementation. 44 // WebContentsObserver implementation.
44 void DidStopLoading() override; 45 void DidStopLoading() override;
45 void RenderProcessGone(base::TerminationStatus status) override; 46 void RenderProcessGone(base::TerminationStatus status) override;
46 void WebContentsDestroyed() override; 47 void WebContentsDestroyed() override;
47 void DidFinishNavigation( 48 void DidFinishNavigation(
48 content::NavigationHandle* navigation_handle) override; 49 content::NavigationHandle* navigation_handle) override;
49 50
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 95
95 // Callback for cancel. 96 // Callback for cancel.
96 CancelCallback cancel_callback_; 97 CancelCallback cancel_callback_;
97 98
98 base::WeakPtrFactory<BackgroundLoaderOffliner> weak_ptr_factory_; 99 base::WeakPtrFactory<BackgroundLoaderOffliner> weak_ptr_factory_;
99 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOffliner); 100 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOffliner);
100 }; 101 };
101 102
102 } // namespace offline_pages 103 } // namespace offline_pages
103 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ 104 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698