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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java

Issue 1847573003: Use the ChromeBrowserInitializer on incoming notification intents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerIntentTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java
index 5b864378258550e4ae8f222912b57eae7762932f..5b18a474f478cab86475b72b76408ddad597aca1 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationService.java
@@ -10,13 +10,10 @@ import android.content.Context;
import android.content.Intent;
import android.util.Log;
-import org.chromium.base.CommandLine;
import org.chromium.base.ThreadUtils;
import org.chromium.base.annotations.SuppressFBWarnings;
-import org.chromium.base.library_loader.LibraryProcessType;
import org.chromium.base.library_loader.ProcessInitException;
-import org.chromium.content.app.ContentApplication;
-import org.chromium.content.browser.BrowserStartupController;
+import org.chromium.chrome.browser.init.ChromeBrowserInitializer;
/**
* The Notification service receives intents fired as responses to user actions issued on Android
@@ -76,14 +73,8 @@ public class NotificationService extends IntentService {
*/
@SuppressFBWarnings("DM_EXIT")
private void dispatchIntentOnUIThread(Intent intent) {
- Context context = getApplicationContext();
- if (!CommandLine.isInitialized()) {
- ContentApplication.initCommandLine(context);
- }
-
try {
- BrowserStartupController.get(this, LibraryProcessType.PROCESS_BROWSER)
- .startBrowserProcessesSync(false);
+ ChromeBrowserInitializer.getInstance(this).handleSynchronousStartup();
// Now that the browser process is initialized, we pass forward the call to the
// Notification UI Manager which will take care of delivering the appropriate events.
@@ -94,9 +85,6 @@ public class NotificationService extends IntentService {
// TODO(peter): Verify that the lifetime of the NotificationService is sufficient
// when a notification event could be dispatched successfully.
- // TODO(peter): The native side needs to tell us when executing the event has
- // finished, so that we can forcefully stop the service.
-
} catch (ProcessInitException e) {
Log.e(TAG, "Unable to start the browser process.", e);
System.exit(-1);
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/notifications/NotificationUIManagerIntentTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698