summaryrefslogtreecommitdiffstats
path: root/chromium
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2015-07-09 12:56:41 +0000
committer Eric Hameleers <alien@slackware.com>2015-07-09 12:56:41 +0000
commit924af28ec0b087c8700a26fd2393f7fc8fe0e8d1 (patch)
treecec2bf1380f29e0e9661fd32eaa8d91d06e58dfb /chromium
parent358c78298f3a79e07de0f2b1babc90d882688aac (diff)
downloadasb-924af28ec0b087c8700a26fd2393f7fc8fe0e8d1.tar.gz
asb-924af28ec0b087c8700a26fd2393f7fc8fe0e8d1.tar.xz
chromium: rebased the chromium_kde_pickles.patch
Diffstat (limited to 'chromium')
-rw-r--r--chromium/build/patches/chromium_kde_pickles.patch104
1 files changed, 45 insertions, 59 deletions
diff --git a/chromium/build/patches/chromium_kde_pickles.patch b/chromium/build/patches/chromium_kde_pickles.patch
index 0b3b1e55..a676b98f 100644
--- a/chromium/build/patches/chromium_kde_pickles.patch
+++ b/chromium/build/patches/chromium_kde_pickles.patch
@@ -1,18 +1,6 @@
-[Password manager] Fix pickle creatin for KDE, bump to version 7
-
-As described in http://crbug.com/494229#c11, version 6 pickles have been stored without generation_upload_status recently. This extends the definition of version 6 pickle to have this field optional.
-
-This CL introduces version 7 which makes that field required, and adds graceful handling of version 6.
-
-BUG=494229
-
-Review URL: https://codereview.chromium.org/1181203003
-
-Cr-Commit-Position: refs/heads/master@{#334561}
-diff --git a/chrome/browser/password_manager/native_backend_kwallet_x.cc b/chrome/browser/password_manager/native_backend_kwallet_x.cc
-index 12536ed..78aa1d9 100644
---- a/chrome/browser/password_manager/native_backend_kwallet_x.cc
-+++ b/chrome/browser/password_manager/native_backend_kwallet_x.cc
+diff -uar chromium-43.0.2357.132.orig/chrome/browser/password_manager/native_backend_kwallet_x.cc chromium-43.0.2357.132/chrome/browser/password_manager/native_backend_kwallet_x.cc
+--- chromium-43.0.2357.132.orig/chrome/browser/password_manager/native_backend_kwallet_x.cc 2015-07-07 23:57:09.000000000 +0200
++++ chromium-43.0.2357.132/chrome/browser/password_manager/native_backend_kwallet_x.cc 2015-07-08 19:59:36.865817805 +0200
@@ -30,7 +30,7 @@
// In case the fields in the pickle ever change, version them so we can try to
@@ -33,18 +21,18 @@ index 12536ed..78aa1d9 100644
+ // generation_upload_status, see http://crbug.com/494229#c11.
LogDeserializationWarning(version, signon_realm, false);
+ return false;
- }
-- form->generation_upload_status =
-- static_cast<PasswordForm::GenerationUploadStatus>(
-- generation_upload_status);
++ }
+ if (read_success) {
+ form->generation_upload_status =
+ static_cast<PasswordForm::GenerationUploadStatus>(
+ generation_upload_status);
-+ }
+ }
+- form->generation_upload_status =
+- static_cast<PasswordForm::GenerationUploadStatus>(
+- generation_upload_status);
}
- converted_forms.push_back(form.Pass());
+ converted_forms.push_back(form.release());
@@ -259,6 +265,7 @@
pickle->WriteString(form->avatar_url.spec());
pickle->WriteString(form->federation_url.spec());
@@ -53,11 +41,10 @@ index 12536ed..78aa1d9 100644
}
}
-diff --git a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
-index 670cf41..b1a9524 100644
---- a/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
-+++ b/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
-@@ -173,6 +173,7 @@
+diff -uar chromium-43.0.2357.132.orig/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc chromium-43.0.2357.132/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc
+--- chromium-43.0.2357.132.orig/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc 2015-07-07 23:57:09.000000000 +0200
++++ chromium-43.0.2357.132/chrome/browser/password_manager/native_backend_kwallet_x_unittest.cc 2015-07-08 20:07:26.970585840 +0200
+@@ -170,6 +170,7 @@
form_google_.avatar_url = GURL("http://www.google.com/avatar");
form_google_.federation_url = GURL("http://www.google.com/federation_url");
form_google_.skip_zero_click = true;
@@ -65,25 +52,25 @@ index 670cf41..b1a9524 100644
form_isc_.origin = GURL("http://www.isc.org/");
form_isc_.action = GURL("http://www.isc.org/auth");
-@@ -934,15 +935,21 @@
+@@ -930,15 +931,21 @@
class NativeBackendKWalletPickleTest : public NativeBackendKWalletTestBase {
protected:
-- void CreateVersion6Pickle(const PasswordForm& form, base::Pickle* pickle);
-- void CreateVersion5Pickle(const PasswordForm& form, base::Pickle* pickle);
-- void CreateVersion3Pickle(const PasswordForm& form, base::Pickle* pickle);
-- void CreateVersion2Pickle(const PasswordForm& form, base::Pickle* pickle);
-- void CreateVersion1Pickle(const PasswordForm& form, base::Pickle* pickle);
+- void CreateVersion6Pickle(const PasswordForm& form, Pickle* pickle);
+- void CreateVersion5Pickle(const PasswordForm& form, Pickle* pickle);
+- void CreateVersion3Pickle(const PasswordForm& form, Pickle* pickle);
+- void CreateVersion2Pickle(const PasswordForm& form, Pickle* pickle);
+- void CreateVersion1Pickle(const PasswordForm& form, Pickle* pickle);
+ // Based on |form|, fills |pickle| with data conforming to
+ // |effective_version|, but marking the pickle version as |stored_version|. In
+ // most cases the two versions should be the same.
+ void CreateVersion1PlusPickle(const PasswordForm& form,
-+ base::Pickle* pickle,
++ Pickle* pickle,
+ int stored_version,
+ int effective_version);
void CreateVersion0Pickle(bool size_32,
const PasswordForm& form,
- base::Pickle* pickle);
+ Pickle* pickle);
- void CheckVersion6Pickle();
+ // As explained in http://crbug.com/494229#c11, version 6 added a new optional
+ // field to version 5. This field became required in version 7. Depending on
@@ -93,16 +80,16 @@ index 670cf41..b1a9524 100644
void CheckVersion5Pickle();
void CheckVersion3Pickle();
void CheckVersion2Pickle();
-@@ -960,63 +967,30 @@
- base::Pickle* pickle);
+@@ -956,62 +963,32 @@
+ Pickle* pickle);
};
-void NativeBackendKWalletPickleTest::CreateVersion6Pickle(
+void NativeBackendKWalletPickleTest::CreateVersion1PlusPickle(
const PasswordForm& form,
-- base::Pickle* pickle) {
+- Pickle* pickle) {
- pickle->WriteInt(6);
-+ base::Pickle* pickle,
++ Pickle* pickle,
+ int stored_version,
+ int effective_version) {
+ pickle->WriteInt(stored_version);
@@ -124,11 +111,11 @@ index 670cf41..b1a9524 100644
+ if (effective_version < 7)
+ return;
pickle->WriteInt(form.generation_upload_status);
--}
--
+ }
+
-void NativeBackendKWalletPickleTest::CreateVersion5Pickle(
- const PasswordForm& form,
-- base::Pickle* pickle) {
+- Pickle* pickle) {
- pickle->WriteInt(5);
- CreatePickle(false, true, form, pickle);
- pickle->WriteInt(form.type);
@@ -142,8 +129,7 @@ index 670cf41..b1a9524 100644
-}
-
-void NativeBackendKWalletPickleTest::CreateVersion3Pickle(
-- const PasswordForm& form,
-- base::Pickle* pickle) {
+- const PasswordForm& form, Pickle* pickle) {
- pickle->WriteInt(3);
- CreatePickle(false, false, form, pickle);
- pickle->WriteInt(form.type);
@@ -153,8 +139,7 @@ index 670cf41..b1a9524 100644
-}
-
-void NativeBackendKWalletPickleTest::CreateVersion2Pickle(
-- const PasswordForm& form,
-- base::Pickle* pickle) {
+- const PasswordForm& form, Pickle* pickle) {
- pickle->WriteInt(2);
- CreatePickle(false, false, form, pickle);
- pickle->WriteInt(form.type);
@@ -163,21 +148,22 @@ index 670cf41..b1a9524 100644
-}
-
-void NativeBackendKWalletPickleTest::CreateVersion1Pickle(
-- const PasswordForm& form,
-- base::Pickle* pickle) {
+- const PasswordForm& form, Pickle* pickle) {
- pickle->WriteInt(1);
- CreatePickle(false, false, form, pickle);
- }
-
+-}
+-
void NativeBackendKWalletPickleTest::CreateVersion0Pickle(
-@@ -1052,11 +1026,15 @@
+ bool size_32, const PasswordForm& form, Pickle* pickle) {
+ pickle->WriteInt(0);
+@@ -1043,11 +1020,15 @@
pickle->WriteInt64(form.date_created.ToTimeT());
}
-void NativeBackendKWalletPickleTest::CheckVersion6Pickle() {
+void NativeBackendKWalletPickleTest::CheckVersion6Pickle(
+ bool with_optional_field) {
- base::Pickle pickle;
+ Pickle pickle;
PasswordForm form = form_google_;
- form.generation_upload_status = PasswordForm::NEGATIVE_SIGNAL_SENT;
- CreateVersion6Pickle(form, &pickle);
@@ -189,10 +175,10 @@ index 670cf41..b1a9524 100644
ScopedVector<PasswordForm> form_list =
NativeBackendKWalletStub::DeserializeValue(form.signon_realm, pickle);
-@@ -1069,8 +1047,11 @@
+@@ -1060,8 +1041,11 @@
void NativeBackendKWalletPickleTest::CheckVersion5Pickle() {
- base::Pickle pickle;
+ Pickle pickle;
+ PasswordForm default_values;
PasswordForm form = form_google_;
- CreateVersion5Pickle(form, &pickle);
@@ -202,10 +188,10 @@ index 670cf41..b1a9524 100644
ScopedVector<PasswordForm> form_list =
NativeBackendKWalletStub::DeserializeValue(form.signon_realm, pickle);
-@@ -1082,13 +1063,15 @@
+@@ -1073,13 +1057,15 @@
void NativeBackendKWalletPickleTest::CheckVersion3Pickle() {
- base::Pickle pickle;
+ Pickle pickle;
+ PasswordForm default_values;
PasswordForm form = form_google_;
// Remove the fields which were not present in version #3.
@@ -223,7 +209,7 @@ index 670cf41..b1a9524 100644
ScopedVector<PasswordForm> form_list =
NativeBackendKWalletStub::DeserializeValue(form.signon_realm, pickle);
-@@ -1104,7 +1087,7 @@
+@@ -1095,7 +1081,7 @@
form.times_used = form_google_.times_used;
form.type = form_google_.type;
form.form_data = form_google_.form_data;
@@ -232,16 +218,16 @@ index 670cf41..b1a9524 100644
ScopedVector<PasswordForm> form_list =
NativeBackendKWalletStub::DeserializeValue(form.signon_realm, pickle);
-@@ -1118,7 +1101,7 @@
+@@ -1109,7 +1095,7 @@
void NativeBackendKWalletPickleTest::CheckVersion1Pickle() {
- base::Pickle pickle;
+ Pickle pickle;
PasswordForm form = form_google_;
- CreateVersion1Pickle(form, &pickle);
+ CreateVersion1PlusPickle(form, &pickle, 1, 1);
ScopedVector<autofill::PasswordForm> form_list =
NativeBackendKWalletStub::DeserializeValue(form.signon_realm, pickle);
-@@ -1206,5 +1189,6 @@
+@@ -1197,5 +1183,6 @@
}
TEST_F(NativeBackendKWalletPickleTest, CheckVersion6Pickle) {