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

Side by Side Diff: chrome/browser/password_manager/native_backend_libsecret_unittest.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Mac fixes Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdarg.h> 5 #include <stdarg.h>
6 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // We don't check the date created. It varies. 392 // We don't check the date created. It varies.
393 CheckUint32Attribute(item, "blacklisted_by_user", form.blacklisted_by_user); 393 CheckUint32Attribute(item, "blacklisted_by_user", form.blacklisted_by_user);
394 CheckUint32Attribute(item, "type", form.type); 394 CheckUint32Attribute(item, "type", form.type);
395 CheckUint32Attribute(item, "times_used", form.times_used); 395 CheckUint32Attribute(item, "times_used", form.times_used);
396 CheckUint32Attribute(item, "scheme", form.scheme); 396 CheckUint32Attribute(item, "scheme", form.scheme);
397 CheckStringAttribute( 397 CheckStringAttribute(
398 item, "date_synced", 398 item, "date_synced",
399 base::Int64ToString(form.date_synced.ToInternalValue())); 399 base::Int64ToString(form.date_synced.ToInternalValue()));
400 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name)); 400 CheckStringAttribute(item, "display_name", UTF16ToUTF8(form.display_name));
401 CheckStringAttribute(item, "avatar_url", form.icon_url.spec()); 401 CheckStringAttribute(item, "avatar_url", form.icon_url.spec());
402 // We serialize unique origins as "", in order to make other systems that 402 // We serialize opaque origins as "", in order to make other systems that
403 // read from the login database happy. https://crbug.com/591310 403 // read from the login database happy. https://crbug.com/591310
404 CheckStringAttribute(item, "federation_url", 404 CheckStringAttribute(item, "federation_url",
405 form.federation_origin.unique() 405 form.federation_origin.opaque()
406 ? "" 406 ? ""
407 : form.federation_origin.Serialize()); 407 : form.federation_origin.Serialize());
408 CheckUint32Attribute(item, "should_skip_zero_click", form.skip_zero_click); 408 CheckUint32Attribute(item, "should_skip_zero_click", form.skip_zero_click);
409 CheckUint32Attribute(item, "generation_upload_status", 409 CheckUint32Attribute(item, "generation_upload_status",
410 form.generation_upload_status); 410 form.generation_upload_status);
411 CheckStringAttribute(item, "application", app_string); 411 CheckStringAttribute(item, "application", app_string);
412 autofill::FormData actual; 412 autofill::FormData actual;
413 DeserializeFormDataFromBase64String( 413 DeserializeFormDataFromBase64String(
414 static_cast<char*>(g_hash_table_lookup(item->attributes, "form_data")), 414 static_cast<char*>(g_hash_table_lookup(item->attributes, "form_data")),
415 &actual); 415 &actual);
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1001 EXPECT_EQ(form_google_, *form_list[0]); 1001 EXPECT_EQ(form_google_, *form_list[0]);
1002 1002
1003 EXPECT_EQ(1u, global_mock_libsecret_items->size()); 1003 EXPECT_EQ(1u, global_mock_libsecret_items->size());
1004 if (!global_mock_libsecret_items->empty()) { 1004 if (!global_mock_libsecret_items->empty()) {
1005 CheckMockSecretItem((*global_mock_libsecret_items)[0].get(), form_google_, 1005 CheckMockSecretItem((*global_mock_libsecret_items)[0].get(), form_google_,
1006 "chrome-42"); 1006 "chrome-42");
1007 } 1007 }
1008 } 1008 }
1009 1009
1010 // TODO(mdm): add more basic tests here at some point. 1010 // TODO(mdm): add more basic tests here at some point.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698