Chromium Code Reviews| 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; |
| } |