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

Unified Diff: chrome/browser/android/background_sync_launcher_android.cc

Issue 1324173002: [Background Sync] Use GcmNetworkManager to start the browser for sync events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@bgsync-fix-background5
Patch Set: Addressing comments from PS#25 Created 5 years, 2 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/background_sync_launcher_android.cc
diff --git a/content/browser/android/background_sync_launcher_android.cc b/chrome/browser/android/background_sync_launcher_android.cc
similarity index 88%
rename from content/browser/android/background_sync_launcher_android.cc
rename to chrome/browser/android/background_sync_launcher_android.cc
index 693817baa8a8174bad383aac37131c9531a0603e..7d9c2e3440f4375bd881fe5e1fa25b1c5cc048ed 100644
--- a/content/browser/android/background_sync_launcher_android.cc
+++ b/chrome/browser/android/background_sync_launcher_android.cc
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/android/background_sync_launcher_android.h"
+#include "chrome/browser/android/background_sync_launcher_android.h"
#include "content/public/browser/browser_thread.h"
#include "jni/BackgroundSyncLauncher_jni.h"
-namespace content {
+using content::BrowserThread;
namespace {
base::LazyInstance<BackgroundSyncLauncherAndroid> g_background_sync_launcher =
@@ -23,7 +23,7 @@ BackgroundSyncLauncherAndroid* BackgroundSyncLauncherAndroid::Get() {
// static
void BackgroundSyncLauncherAndroid::LaunchBrowserWhenNextOnline(
- const BackgroundSyncManager* registrant,
+ const content::BackgroundSyncManager* registrant,
bool launch_when_next_online) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -31,7 +31,7 @@ void BackgroundSyncLauncherAndroid::LaunchBrowserWhenNextOnline(
}
void BackgroundSyncLauncherAndroid::LaunchBrowserWhenNextOnlineImpl(
- const BackgroundSyncManager* registrant,
+ const content::BackgroundSyncManager* registrant,
bool launch_when_next_online) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -45,7 +45,7 @@ void BackgroundSyncLauncherAndroid::LaunchBrowserWhenNextOnlineImpl(
bool now_launching = !launch_when_next_online_registrants_.empty();
if (was_launching != now_launching) {
JNIEnv* env = base::android::AttachCurrentThread();
- Java_BackgroundSyncLauncher_setLaunchWhenNextOnline(
+ Java_BackgroundSyncLauncher_launchBrowserWhenNextOnlineIfStopped(
env, java_launcher_.obj(), base::android::GetApplicationContext(),
now_launching);
}
@@ -70,5 +70,3 @@ BackgroundSyncLauncherAndroid::~BackgroundSyncLauncherAndroid() {
JNIEnv* env = base::android::AttachCurrentThread();
Java_BackgroundSyncLauncher_destroy(env, java_launcher_.obj());
}
-
-} // namespace content
« no previous file with comments | « chrome/browser/android/background_sync_launcher_android.h ('k') | chrome/browser/android/chrome_jni_registrar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698