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

Unified Diff: components/password_manager/core/browser/form_saver_impl_unittest.cc

Issue 2101943003: Use StringPiece in form_saver_impl_unittest.cc early on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@621355-wipe
Patch Set: Just rebased Created 4 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/form_saver_impl_unittest.cc
diff --git a/components/password_manager/core/browser/form_saver_impl_unittest.cc b/components/password_manager/core/browser/form_saver_impl_unittest.cc
index 50cf3c9b5ed46a7e52155ed5c925745e5883d00f..3a1d97562003e4b36d840639c9f3d3ba8fbf2038 100644
--- a/components/password_manager/core/browser/form_saver_impl_unittest.cc
+++ b/components/password_manager/core/browser/form_saver_impl_unittest.cc
@@ -10,6 +10,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
+#include "base/strings/string_piece.h"
#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/common/password_form.h"
#include "components/password_manager/core/browser/mock_password_store.h"
@@ -20,6 +21,7 @@
using autofill::PasswordForm;
using autofill::PasswordFormMap;
using base::ASCIIToUTF16;
+using base::StringPiece;
using base::WrapUnique;
using testing::_;
using testing::DoAll;
@@ -41,7 +43,7 @@ PasswordForm CreateObserved() {
// Creates a dummy pending (for saving) form with some basic arbitrary values
// and |username| and |password| values as specified.
-PasswordForm CreatePending(const char* username, const char* password) {
+PasswordForm CreatePending(StringPiece username, StringPiece password) {
PasswordForm form = CreateObserved();
form.username_value = ASCIIToUTF16(username);
form.password_value = ASCIIToUTF16(password);
@@ -51,7 +53,7 @@ PasswordForm CreatePending(const char* username, const char* password) {
// Creates a dummy pending (for saving) GAIA form with |username| and
// |password| values as specified.
-PasswordForm CreatePendingGAIA(const char* username, const char* password) {
+PasswordForm CreatePendingGAIA(StringPiece username, StringPiece password) {
PasswordForm form;
form.origin = GURL("https://accounts.google.com");
form.signon_realm = form.origin.spec();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698