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

Side by Side Diff: chrome/browser/android/offline_pages/prefetch/prefetch_background_task.cc

Issue 2864293003: [Offline Pages] Add a GCMAppHandler for offline page prefetch. (Closed)
Patch Set: Move Content Suggestions Observer to //components/offline_pages/core and modify lifetime management Created 3 years, 7 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "chrome/browser/android/offline_pages/prefetch/prefetch_background_task .h" 5 #include "chrome/browser/android/offline_pages/prefetch/prefetch_background_task .h"
6 6
7 #include "chrome/browser/offline_pages/prefetch/prefetch_service_factory.h"
7 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
8 #include "chrome/browser/profiles/profile_android.h" 9 #include "chrome/browser/profiles/profile_android.h"
9 #include "components/offline_pages/content/prefetch_service_factory.h"
10 #include "content/public/browser/browser_context.h" 10 #include "content/public/browser/browser_context.h"
11 #include "jni/PrefetchBackgroundTask_jni.h" 11 #include "jni/PrefetchBackgroundTask_jni.h"
12 12
13 using base::android::JavaParamRef; 13 using base::android::JavaParamRef;
14 using base::android::ScopedJavaGlobalRef; 14 using base::android::ScopedJavaGlobalRef;
15 using base::android::ScopedJavaLocalRef; 15 using base::android::ScopedJavaLocalRef;
16 16
17 namespace offline_pages { 17 namespace offline_pages {
18 namespace prefetch { 18 namespace prefetch {
19 19
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void PrefetchBackgroundTask::SetNeedsReschedule(bool reschedule) { 75 void PrefetchBackgroundTask::SetNeedsReschedule(bool reschedule) {
76 needs_reschedule_ = reschedule; 76 needs_reschedule_ = reschedule;
77 } 77 }
78 78
79 bool RegisterPrefetchBackgroundTask(JNIEnv* env) { 79 bool RegisterPrefetchBackgroundTask(JNIEnv* env) {
80 return prefetch::RegisterNativesImpl(env); 80 return prefetch::RegisterNativesImpl(env);
81 } 81 }
82 82
83 } // namespace offline_pages 83 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698