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

Side by Side Diff: chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc

Issue 2537373004: [OfflinePages] Call NotifyInterrupted for pending requests (Closed)
Patch Set: Created 4 years 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 #include "chrome/browser/android/offline_pages/downloads/offline_page_notificati on_bridge.h" 5 #include "chrome/browser/android/offline_pages/downloads/offline_page_notificati on_bridge.h"
6 6
7 #include "base/android/context_utils.h" 7 #include "base/android/context_utils.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "chrome/browser/android/offline_pages/downloads/offline_page_download_b ridge.h" 9 #include "chrome/browser/android/offline_pages/downloads/offline_page_download_b ridge.h"
10 #include "jni/OfflinePageNotificationBridge_jni.h" 10 #include "jni/OfflinePageNotificationBridge_jni.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid), 49 env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
50 ConvertUTF8ToJavaString(env, item.url.spec()), GetDisplayName(item)); 50 ConvertUTF8ToJavaString(env, item.url.spec()), GetDisplayName(item));
51 } 51 }
52 52
53 void OfflinePageNotificationBridge::NotifyDownloadProgress( 53 void OfflinePageNotificationBridge::NotifyDownloadProgress(
54 const DownloadUIItem& item) { 54 const DownloadUIItem& item) {
55 JNIEnv* env = AttachCurrentThread(); 55 JNIEnv* env = AttachCurrentThread();
56 Java_OfflinePageNotificationBridge_notifyDownloadProgress( 56 Java_OfflinePageNotificationBridge_notifyDownloadProgress(
57 env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid), 57 env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
58 ConvertUTF8ToJavaString(env, item.url.spec()), 58 ConvertUTF8ToJavaString(env, item.url.spec()),
59 item.start_time.ToJavaTime(), GetDisplayName(item), 59 item.start_time.ToJavaTime(), GetDisplayName(item));
60 item.is_offlining);
61 } 60 }
62 61
63 void OfflinePageNotificationBridge::NotifyDownloadPaused( 62 void OfflinePageNotificationBridge::NotifyDownloadPaused(
64 const DownloadUIItem& item) { 63 const DownloadUIItem& item) {
65 JNIEnv* env = AttachCurrentThread(); 64 JNIEnv* env = AttachCurrentThread();
66 Java_OfflinePageNotificationBridge_notifyDownloadPaused( 65 Java_OfflinePageNotificationBridge_notifyDownloadPaused(
67 env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid), 66 env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
68 GetDisplayName(item)); 67 GetDisplayName(item));
69 } 68 }
70 69
(...skipping 13 matching lines...) Expand all
84 } 83 }
85 84
86 void OfflinePageNotificationBridge::ShowDownloadingToast() { 85 void OfflinePageNotificationBridge::ShowDownloadingToast() {
87 JNIEnv* env = AttachCurrentThread(); 86 JNIEnv* env = AttachCurrentThread();
88 Java_OfflinePageNotificationBridge_showDownloadingToast( 87 Java_OfflinePageNotificationBridge_showDownloadingToast(
89 env, GetApplicationContext()); 88 env, GetApplicationContext());
90 } 89 }
91 90
92 } // namespace android 91 } // namespace android
93 } // namespace offline_pages 92 } // namespace offline_pages
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698