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

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

Issue 1989073002: Remove unnecessary WebappInfo#copy() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/webapps/WebappInfo.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/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 e4f5fe67dccc7fe10498d3c10e6b0f4cfe865c5e..5015d888fa7ce26a7e20e0779b7bff08c6bc66f1 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
@@ -62,9 +62,10 @@ public class WebappActivity extends FullScreenActivity {
private static final String TAG = "WebappActivity";
private static final long MS_BEFORE_NAVIGATING_BACK_FROM_INTERSTITIAL = 1000;
- private final WebappInfo mWebappInfo;
private final WebappDirectoryManager mDirectoryManager;
+ private WebappInfo mWebappInfo;
+
private boolean mOldWebappCleanupStarted;
private ViewGroup mSplashScreen;
@@ -98,7 +99,7 @@ public class WebappActivity extends FullScreenActivity {
Log.e(TAG, "Failed to parse new Intent: " + intent);
finish();
} else if (!TextUtils.equals(mWebappInfo.id(), newWebappInfo.id())) {
- mWebappInfo.copy(newWebappInfo);
+ mWebappInfo = newWebappInfo;
resetSavedInstanceState();
if (mIsInitialized) initializeUI(null);
}
@@ -123,7 +124,7 @@ public class WebappActivity extends FullScreenActivity {
@Override
public void preInflationStartup() {
WebappInfo info = WebappInfo.create(getIntent());
- if (info != null) mWebappInfo.copy(info);
+ if (info != null) mWebappInfo = info;
ScreenOrientationProvider.lockOrientation((byte) mWebappInfo.orientation(), this);
super.preInflationStartup();
@@ -230,6 +231,7 @@ public class WebappActivity extends FullScreenActivity {
/**
* @return Structure containing data about the webapp currently displayed.
+ * The return value should not be cached.
*/
WebappInfo getWebappInfo() {
return mWebappInfo;
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappInfo.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698