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

Unified Diff: components/password_manager/core/browser/password_form_data.h

Issue 896903003: [PasswordManager clean-up] Merge copies of CreatePasswordFormFromData (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@451018_more_scoped_vector
Patch Set: Rebased again 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: components/password_manager/core/browser/password_form_data.h
diff --git a/components/password_manager/core/browser/password_form_data.h b/components/password_manager/core/browser/password_form_data.h
deleted file mode 100644
index 33ea01c7cbe2f549076569547ddcc690ebcc17f8..0000000000000000000000000000000000000000
--- a/components/password_manager/core/browser/password_form_data.h
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_DATA_H_
-#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_DATA_H_
-
-#include <ostream>
-
-#include "base/memory/scoped_ptr.h"
-#include "components/autofill/core/common/password_form.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-// TODO(sync): This file must eventually be refactored away -- crbug.com/87185.
-
-namespace password_manager {
-
-// Struct used for creation of PasswordForms from static arrays of data.
-// Note: This is only meant to be used in unit test.
-struct PasswordFormData {
- const autofill::PasswordForm::Scheme scheme;
- const char* signon_realm;
- const char* origin;
- const char* action;
- const wchar_t* submit_element;
- const wchar_t* username_element;
- const wchar_t* password_element;
- const wchar_t* username_value; // Set to NULL for a blacklist entry.
- const wchar_t* password_value;
- const bool preferred;
- const bool ssl_valid;
- const double creation_time;
-};
-
-// Creates and returns a new PasswordForm built from form_data.
-scoped_ptr<autofill::PasswordForm> CreatePasswordFormFromData(
- const PasswordFormData& form_data);
-
-// Checks whether two vectors of PasswordForms contain equivalent elements,
-// regardless of order.
-// TODO(vabr) The *Ptr suffix is obsolete, rename.
-bool ContainsSamePasswordFormsPtr(
- const std::vector<autofill::PasswordForm*>& first,
- const std::vector<autofill::PasswordForm*>& second);
-
-// This gmock matcher is used to check that the |arg| contains exactly the same
-// PasswordForms as |forms|, regardless of order.
-MATCHER_P(ContainsSamePasswordForms, forms, "") {
- return ContainsSamePasswordFormsPtr(forms, arg);
-}
-
-} // namespace password_manager
-
-#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_PASSWORD_FORM_DATA_H_
« no previous file with comments | « components/password_manager/core/browser/BUILD.gn ('k') | components/password_manager/core/browser/password_form_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698