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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java

Issue 2457663002: Merge WebappInfo and WebApkMetaData part 1/2 (Closed)
Patch Set: Merge branch 'master' into update_fail_refactor00 Created 4 years, 1 month 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/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
index fda4695b1386f443241298288baf79afa922c036..d378ae3e2106426365a41ae117b8c7f838f6b7fc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
@@ -76,7 +76,7 @@ public class WebappActivity extends FullScreenActivity {
* of the WebappActivity.
*/
public WebappActivity() {
- mWebappInfo = WebappInfo.createEmpty();
+ mWebappInfo = createWebappInfo(null);
mDirectoryManager = new WebappDirectoryManager();
mWebappUma = new WebappUma();
}
@@ -86,7 +86,7 @@ public class WebappActivity extends FullScreenActivity {
if (intent == null) return;
super.onNewIntent(intent);
- WebappInfo newWebappInfo = WebappInfo.create(intent);
+ WebappInfo newWebappInfo = createWebappInfo(intent);
if (newWebappInfo == null) {
Log.e(TAG, "Failed to parse new Intent: " + intent);
finish();
@@ -103,6 +103,10 @@ public class WebappActivity extends FullScreenActivity {
return mIsInitialized;
}
+ protected WebappInfo createWebappInfo(Intent intent) {
+ return (intent == null) ? WebappInfo.createEmpty() : WebappInfo.create(intent);
+ }
+
private void initializeUI(Bundle savedInstanceState) {
// We do not load URL when restoring from saved instance states.
if (savedInstanceState == null && mWebappInfo.isInitialized()) {
@@ -123,7 +127,7 @@ public class WebappActivity extends FullScreenActivity {
@Override
public void preInflationStartup() {
- WebappInfo info = WebappInfo.create(getIntent());
+ WebappInfo info = createWebappInfo(getIntent());
String id = "";
if (info != null) {

Powered by Google App Engine
This is Rietveld 408576698