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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java

Issue 1015833005: Move upstreamed calls to FirstRunActivity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove log statements Created 5 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/java/src/org/chromium/chrome/browser/signin/SigninManager.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/firstrun/FirstRunActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
index 4d0380962e8568943f7f1e89e9b2b55c3fb03ea1..cd531cb7d0343605683353b05914429ceba18182 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunActivity.java
@@ -11,9 +11,11 @@ import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;
import android.text.TextUtils;
+import android.util.Log;
import org.chromium.base.ApplicationStatus;
import org.chromium.base.VisibleForTesting;
+import org.chromium.base.library_loader.ProcessInitException;
import org.chromium.base.metrics.RecordHistogram;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromiumApplication;
@@ -136,15 +138,12 @@ public class FirstRunActivity extends ActionBarActivity implements FirstRunPageD
mPager = new ViewPager(this);
mPager.setId(R.id.fre_pager);
setContentView(mPager);
- android.util.Log.i("FirstRunActivity", "onCreate: after setContentView");
mProfileDataCache = new ProfileDataCache(FirstRunActivity.this, null);
mProfileDataCache.setProfile(Profile.getLastUsedProfile());
new FirstRunFlowSequencer(this, mFreProperties) {
@Override
public void onFlowIsKnown(Activity activity, Bundle freProperties) {
- android.util.Log.i("FirstRunActivity", "in onFlowIsKnown");
-
if (freProperties == null) {
completeFirstRunExperience();
return;
@@ -174,10 +173,8 @@ public class FirstRunActivity extends ActionBarActivity implements FirstRunPageD
mPager.setAdapter(mPagerAdapter);
skipPagesIfNecessary();
- android.util.Log.i("FirstRunActivity", "before return from onFlowIsKnown");
}
}.start();
- android.util.Log.i("FirstRunActivity", "onCreate: after starting the sequencer");
}
@Override
@@ -402,8 +399,21 @@ public class FirstRunActivity extends ActionBarActivity implements FirstRunPageD
}
}
- protected void initializeBrowserProcess() {
- // TODO(aurimas): implement this once browser process initialization is upstreamed.
+ private void initializeBrowserProcess() {
+ // The Chrome browser process must be started here because this Activity
+ // may be started explicitly for tests cases, from Android notifications or
+ // when the application is restoring a FRE fragment after Chrome being killed.
+ // This should happen before super.onCreate() because it might recreate a fragment,
+ // and a fragment might depend on the native library.
+ try {
+ ((ChromiumApplication) getApplication())
+ .startBrowserProcessesAndLoadLibrariesSync(this, true);
+ mNativeSideIsInitialized = true;
+ } catch (ProcessInitException e) {
+ Log.e(TAG, "Unable to load native library.", e);
+ abortFirstRunExperience();
+ return;
+ }
}
/**
@@ -426,10 +436,6 @@ public class FirstRunActivity extends ActionBarActivity implements FirstRunPageD
// TODO(aurimas): implement this once EmbededContentViewActivity is upstreamed.
}
- public void showSignInNotification() {
- // TODO(aurimas): implement this once GoogleServicesManager is upstreamed.
- }
-
@Override
public void openDocumentModeSettings() {
// TODO(aurimas): implement opening settings once DocumentModeSettings is upstreamed.
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManager.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698