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

Side by Side Diff: components/password_manager/content/browser/content_credential_manager_dispatcher_unittest.cc

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 #include "components/password_manager/content/browser/content_credential_manager _dispatcher.h" 5 #include "components/password_manager/content/browser/content_credential_manager _dispatcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 15 matching lines...) Expand all
26 namespace { 26 namespace {
27 27
28 // Chosen by fair dice roll. Guaranteed to be random. 28 // Chosen by fair dice roll. Guaranteed to be random.
29 const int kRequestId = 4; 29 const int kRequestId = 4;
30 30
31 class TestPasswordManagerClient 31 class TestPasswordManagerClient
32 : public password_manager::StubPasswordManagerClient { 32 : public password_manager::StubPasswordManagerClient {
33 public: 33 public:
34 TestPasswordManagerClient(password_manager::PasswordStore* store) 34 TestPasswordManagerClient(password_manager::PasswordStore* store)
35 : did_prompt_user_to_save_(false), store_(store) {} 35 : did_prompt_user_to_save_(false), store_(store) {}
36 virtual ~TestPasswordManagerClient() {} 36 ~TestPasswordManagerClient() override {}
37 37
38 virtual password_manager::PasswordStore* GetPasswordStore() override { 38 password_manager::PasswordStore* GetPasswordStore() override {
39 return store_; 39 return store_;
40 } 40 }
41 41
42 virtual password_manager::PasswordManagerDriver* GetDriver() override { 42 password_manager::PasswordManagerDriver* GetDriver() override {
43 return &driver_; 43 return &driver_;
44 } 44 }
45 45
46 virtual bool PromptUserToSavePassword( 46 bool PromptUserToSavePassword(
47 scoped_ptr<password_manager::PasswordFormManager> manager) override { 47 scoped_ptr<password_manager::PasswordFormManager> manager) override {
48 did_prompt_user_to_save_ = true; 48 did_prompt_user_to_save_ = true;
49 manager_.reset(manager.release()); 49 manager_.reset(manager.release());
50 return true; 50 return true;
51 } 51 }
52 52
53 bool did_prompt_user_to_save() const { return did_prompt_user_to_save_; } 53 bool did_prompt_user_to_save() const { return did_prompt_user_to_save_; }
54 54
55 password_manager::PasswordFormManager* pending_manager() const { 55 password_manager::PasswordFormManager* pending_manager() const {
56 return manager_.get(); 56 return manager_.get();
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 message = process()->sink().GetFirstMessageMatching(kMsgID); 226 message = process()->sink().GetFirstMessageMatching(kMsgID);
227 EXPECT_TRUE(message); 227 EXPECT_TRUE(message);
228 CredentialManagerMsg_SendCredential::Param send_param; 228 CredentialManagerMsg_SendCredential::Param send_param;
229 CredentialManagerMsg_SendCredential::Read(message, &send_param); 229 CredentialManagerMsg_SendCredential::Read(message, &send_param);
230 CredentialManagerMsg_SendCredential::Read(message, &send_param); 230 CredentialManagerMsg_SendCredential::Read(message, &send_param);
231 EXPECT_NE(CREDENTIAL_TYPE_EMPTY, send_param.b.type); 231 EXPECT_NE(CREDENTIAL_TYPE_EMPTY, send_param.b.type);
232 process()->sink().ClearMessages(); 232 process()->sink().ClearMessages();
233 } 233 }
234 234
235 } // namespace password_manager 235 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698