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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java

Issue 927763003: Move website settings fetching from WebsitePreferences to new WebsitePermissionFetcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert changes to WebsiteSettingsPopup. Created 5 years, 10 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
Index: chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
index fcd442219c826a4211bea9c8e2d9236ad40637fb..a0dc999fca7aaa17e3b0945bcad9c2dce1f73e20 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/website/Website.java
@@ -229,6 +229,38 @@ public Website(WebsiteAddress address) {
mTitle = address.getTitle();
}
+ /**
+ * Copies preferences info of |other| into |this| if |this| does not have a value for that info
Miguel Garcia 2015/02/18 21:40:46 can you explain why is it ok to discard merges whe
Michael van Ouwerkerk 2015/02/19 17:19:35 I've moved the relevant merging functionality into
+ * type yet.
+ */
+ public void merge(Website other) {
+ if (mCookieInfo == null && other.mCookieInfo != null) {
+ setCookieInfo(other.mCookieInfo);
+ }
+ if (mGeolocationInfo == null && other.mGeolocationInfo != null) {
+ setGeolocationInfo(other.mGeolocationInfo);
+ }
+ if (mMidiInfo == null && other.mMidiInfo != null) {
+ setMidiInfo(other.mMidiInfo);
+ }
+ if (mPopupExceptionInfo == null && other.mPopupExceptionInfo != null) {
+ setPopupExceptionInfo(other.mPopupExceptionInfo);
+ }
+ if (mProtectedMediaIdentifierInfo == null && other.mProtectedMediaIdentifierInfo != null) {
+ setProtectedMediaIdentifierInfo(other.mProtectedMediaIdentifierInfo);
+ }
+ if (mPushNotificationInfo == null && other.mPushNotificationInfo != null) {
+ setPushNotificationInfo(other.mPushNotificationInfo);
+ }
+ if (mVoiceAndVideoCaptureInfo == null && other.mVoiceAndVideoCaptureInfo != null) {
+ setVoiceAndVideoCaptureInfo(other.mVoiceAndVideoCaptureInfo);
+ }
+ if (mLocalStorageInfo == null && other.mLocalStorageInfo != null) {
+ setLocalStorageInfo(other.mLocalStorageInfo);
+ }
+ mStorageInfo.addAll(other.mStorageInfo);
Miguel Garcia 2015/02/18 21:40:46 so we are ok with duplicates on mStorageInfo?
Michael van Ouwerkerk 2015/02/19 17:19:35 It seems to go unused so far, I couldn't get this
+ }
+
public WebsiteAddress getAddress() {
return mAddress;
}

Powered by Google App Engine
This is Rietveld 408576698