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

Unified Diff: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java

Issue 2199223002: Remove unnecessary page loading in ContentShellActivity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Bringing back the assertWaitForPatchScaleFactorMatch check in ContentViewZoomingTest Created 4 years, 4 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 | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
index af13bbfe3d446b90957de44038eb1e67b5cbb59d..881bfc0fe488378699dbba72edd7ddcad11bfac9 100644
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ContentShellActivity.java
@@ -42,6 +42,7 @@ public class ContentShellActivity extends Activity {
private ShellManager mShellManager;
private ActivityWindowAndroid mWindowAndroid;
private Intent mLastSentIntent;
+ private String mStartupUrl;
@Override
@SuppressFBWarnings("DM_EXIT")
@@ -81,9 +82,9 @@ public class ContentShellActivity extends Activity {
mWindowAndroid.setAnimationPlaceholderView(
mShellManager.getContentViewRenderView().getSurfaceView());
- String startupUrl = getUrlFromIntent(getIntent());
- if (!TextUtils.isEmpty(startupUrl)) {
- mShellManager.setStartupUrl(Shell.sanitizeUrl(startupUrl));
+ mStartupUrl = getUrlFromIntent(getIntent());
+ if (!TextUtils.isEmpty(mStartupUrl)) {
+ mShellManager.setStartupUrl(Shell.sanitizeUrl(mStartupUrl));
}
if (CommandLine.getInstance().hasSwitch(ContentSwitches.RUN_LAYOUT_TEST)) {
@@ -118,7 +119,13 @@ public class ContentShellActivity extends Activity {
}
private void finishInitialization(Bundle savedInstanceState) {
- String shellUrl = ShellManager.DEFAULT_SHELL_URL;
+ String shellUrl;
+ if (!TextUtils.isEmpty(mStartupUrl)) {
+ shellUrl = mStartupUrl;
+ } else {
+ shellUrl = ShellManager.DEFAULT_SHELL_URL;
+ }
+
if (savedInstanceState != null
&& savedInstanceState.containsKey(ACTIVE_SHELL_URL_KEY)) {
shellUrl = savedInstanceState.getString(ACTIVE_SHELL_URL_KEY);
« no previous file with comments | « content/shell/android/javatests/src/org/chromium/content_shell_apk/ContentShellTestBase.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698