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

Unified Diff: chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc

Issue 2772343003: Android: Remove GetApplicationContext part 1 (Closed)
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc
diff --git a/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc b/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc
index 407d81ec10a8c429240d131936725c538ed6c7f8..5196942fd5c205a08a44e42d67e781b520922b43 100644
--- a/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc
+++ b/chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/android/offline_pages/downloads/offline_page_notification_bridge.h"
-#include "base/android/context_utils.h"
#include "base/android/jni_string.h"
#include "chrome/browser/android/offline_pages/downloads/offline_page_download_bridge.h"
#include "jni/OfflinePageNotificationBridge_jni.h"
@@ -12,7 +11,6 @@
using base::android::AttachCurrentThread;
using base::android::ConvertUTF16ToJavaString;
using base::android::ConvertUTF8ToJavaString;
-using base::android::GetApplicationContext;
namespace {
@@ -38,7 +36,7 @@ void OfflinePageNotificationBridge::NotifyDownloadSuccessful(
const DownloadUIItem& item) {
JNIEnv* env = AttachCurrentThread();
Java_OfflinePageNotificationBridge_notifyDownloadSuccessful(
- env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
+ env, ConvertUTF8ToJavaString(env, item.guid),
ConvertUTF8ToJavaString(env, item.url.spec()), GetDisplayName(item));
}
@@ -46,7 +44,7 @@ void OfflinePageNotificationBridge::NotifyDownloadFailed(
const DownloadUIItem& item) {
JNIEnv* env = AttachCurrentThread();
Java_OfflinePageNotificationBridge_notifyDownloadFailed(
- env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
+ env, ConvertUTF8ToJavaString(env, item.guid),
ConvertUTF8ToJavaString(env, item.url.spec()), GetDisplayName(item));
}
@@ -54,7 +52,7 @@ void OfflinePageNotificationBridge::NotifyDownloadProgress(
const DownloadUIItem& item) {
JNIEnv* env = AttachCurrentThread();
Java_OfflinePageNotificationBridge_notifyDownloadProgress(
- env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
+ env, ConvertUTF8ToJavaString(env, item.guid),
ConvertUTF8ToJavaString(env, item.url.spec()),
item.start_time.ToJavaTime(), item.download_progress_bytes,
GetDisplayName(item));
@@ -64,29 +62,26 @@ void OfflinePageNotificationBridge::NotifyDownloadPaused(
const DownloadUIItem& item) {
JNIEnv* env = AttachCurrentThread();
Java_OfflinePageNotificationBridge_notifyDownloadPaused(
- env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
- GetDisplayName(item));
+ env, ConvertUTF8ToJavaString(env, item.guid), GetDisplayName(item));
}
void OfflinePageNotificationBridge::NotifyDownloadInterrupted(
const DownloadUIItem& item) {
JNIEnv* env = AttachCurrentThread();
Java_OfflinePageNotificationBridge_notifyDownloadInterrupted(
- env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid),
- GetDisplayName(item));
+ env, ConvertUTF8ToJavaString(env, item.guid), GetDisplayName(item));
}
void OfflinePageNotificationBridge::NotifyDownloadCanceled(
const DownloadUIItem& item) {
JNIEnv* env = AttachCurrentThread();
Java_OfflinePageNotificationBridge_notifyDownloadCanceled(
- env, GetApplicationContext(), ConvertUTF8ToJavaString(env, item.guid));
+ env, ConvertUTF8ToJavaString(env, item.guid));
}
void OfflinePageNotificationBridge::ShowDownloadingToast() {
JNIEnv* env = AttachCurrentThread();
- Java_OfflinePageNotificationBridge_showDownloadingToast(
- env, GetApplicationContext());
+ Java_OfflinePageNotificationBridge_showDownloadingToast(env);
}
} // namespace android

Powered by Google App Engine
This is Rietveld 408576698