| OLD | NEW |
| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 // Called when application state has changed. | 77 // Called when application state has changed. |
| 78 void OnApplicationStateChange( | 78 void OnApplicationStateChange( |
| 79 base::android::ApplicationState application_state); | 79 base::android::ApplicationState application_state); |
| 80 | 80 |
| 81 // Called to remember at what time we started loading. | 81 // Called to remember at what time we started loading. |
| 82 void MarkLoadStartTime(); | 82 void MarkLoadStartTime(); |
| 83 | 83 |
| 84 // Called to add a loading signal as we observe it. | 84 // Called to add a loading signal as we observe it. |
| 85 void AddLoadingSignal(const char* signal_name); | 85 void AddLoadingSignal(const char* signal_name); |
| 86 | 86 |
| 87 void DeleteOfflinePageCallback(const SavePageRequest& request, |
| 88 DeletePageResult result); |
| 89 |
| 87 std::unique_ptr<background_loader::BackgroundLoaderContents> loader_; | 90 std::unique_ptr<background_loader::BackgroundLoaderContents> loader_; |
| 88 // Not owned. | 91 // Not owned. |
| 89 content::BrowserContext* browser_context_; | 92 content::BrowserContext* browser_context_; |
| 90 // Not owned. | 93 // Not owned. |
| 91 OfflinePageModel* offline_page_model_; | 94 OfflinePageModel* offline_page_model_; |
| 92 // Not owned. | 95 // Not owned. |
| 93 const OfflinerPolicy* policy_; | 96 const OfflinerPolicy* policy_; |
| 94 // Tracks pending request, if any. | 97 // Tracks pending request, if any. |
| 95 std::unique_ptr<SavePageRequest> pending_request_; | 98 std::unique_ptr<SavePageRequest> pending_request_; |
| 96 // Handles determining when a page should be snapshotted. | 99 // Handles determining when a page should be snapshotted. |
| (...skipping 29 matching lines...) Expand all Loading... |
| 126 | 129 |
| 127 // Callback for cancel. | 130 // Callback for cancel. |
| 128 CancelCallback cancel_callback_; | 131 CancelCallback cancel_callback_; |
| 129 | 132 |
| 130 base::WeakPtrFactory<BackgroundLoaderOffliner> weak_ptr_factory_; | 133 base::WeakPtrFactory<BackgroundLoaderOffliner> weak_ptr_factory_; |
| 131 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOffliner); | 134 DISALLOW_COPY_AND_ASSIGN(BackgroundLoaderOffliner); |
| 132 }; | 135 }; |
| 133 | 136 |
| 134 } // namespace offline_pages | 137 } // namespace offline_pages |
| 135 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ | 138 #endif // CHROME_BROWSER_ANDROID_OFFLINE_PAGES_BACKGROUND_LOADER_OFFLINER_H_ |
| OLD | NEW |