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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_test.h

Issue 2253233005: Change ScopedVector to vector<unique_ptr> in the password's UI code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android+ Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ 5 #ifndef CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_
6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ 6 #define CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/memory/scoped_vector.h"
12 #include "base/metrics/histogram_samples.h" 11 #include "base/metrics/histogram_samples.h"
13 #include "base/test/histogram_tester.h" 12 #include "base/test/histogram_tester.h"
14 #include "chrome/test/base/in_process_browser_test.h" 13 #include "chrome/test/base/in_process_browser_test.h"
15 #include "components/autofill/core/common/password_form.h" 14 #include "components/autofill/core/common/password_form.h"
16 #include "components/password_manager/core/common/credential_manager_types.h" 15 #include "components/password_manager/core/common/credential_manager_types.h"
17 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
18 17
19 class GURL; 18 class GURL;
20 class ManagePasswordsIconView; 19 class ManagePasswordsIconView;
21 class PasswordsClientUIDelegate; 20 class PasswordsClientUIDelegate;
(...skipping 18 matching lines...) Expand all
40 void SetupManagingPasswords(); 39 void SetupManagingPasswords();
41 40
42 // Put the controller, icon, and bubble into the confirmation state. 41 // Put the controller, icon, and bubble into the confirmation state.
43 void SetupAutomaticPassword(); 42 void SetupAutomaticPassword();
44 43
45 // Put the controller, icon, and bubble into a pending-password state. 44 // Put the controller, icon, and bubble into a pending-password state.
46 void SetupPendingPassword(); 45 void SetupPendingPassword();
47 46
48 // Put the controller, icon, and bubble into an auto sign-in state. 47 // Put the controller, icon, and bubble into an auto sign-in state.
49 void SetupAutoSignin( 48 void SetupAutoSignin(
50 ScopedVector<autofill::PasswordForm> local_credentials); 49 std::vector<std::unique_ptr<autofill::PasswordForm>> local_credentials);
51 50
52 // Get samples for |histogram|. 51 // Get samples for |histogram|.
53 std::unique_ptr<base::HistogramSamples> GetSamples(const char* histogram); 52 std::unique_ptr<base::HistogramSamples> GetSamples(const char* histogram);
54 53
55 autofill::PasswordForm* test_form() { return &test_form_; } 54 autofill::PasswordForm* test_form() { return &test_form_; }
56 55
57 // Get the UI controller for the current WebContents. 56 // Get the UI controller for the current WebContents.
58 PasswordsClientUIDelegate* GetController(); 57 PasswordsClientUIDelegate* GetController();
59 58
60 MOCK_METHOD1(OnChooseCredential, 59 MOCK_METHOD1(OnChooseCredential,
61 void(const password_manager::CredentialInfo&)); 60 void(const password_manager::CredentialInfo&));
62 61
63 private: 62 private:
64 autofill::PasswordForm test_form_; 63 autofill::PasswordForm test_form_;
65 base::HistogramTester histogram_tester_; 64 base::HistogramTester histogram_tester_;
66 65
67 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest); 66 DISALLOW_COPY_AND_ASSIGN(ManagePasswordsTest);
68 }; 67 };
69 68
70 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_ 69 #endif // CHROME_BROWSER_UI_PASSWORDS_MANAGE_PASSWORDS_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_state_unittest.cc ('k') | chrome/browser/ui/passwords/manage_passwords_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698