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

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

Issue 659563005: Standardize usage of virtual/override/final in chrome/browser/password_manager (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 "chrome/browser/password_manager/chrome_password_manager_client.h" 5 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/common/chrome_version_info.h" 10 #include "chrome/common/chrome_version_info.h"
(...skipping 22 matching lines...) Expand all
33 class MockLogReceiver : public password_manager::LogReceiver { 33 class MockLogReceiver : public password_manager::LogReceiver {
34 public: 34 public:
35 MOCK_METHOD1(LogSavePasswordProgress, void(const std::string&)); 35 MOCK_METHOD1(LogSavePasswordProgress, void(const std::string&));
36 }; 36 };
37 37
38 class TestChromePasswordManagerClient : public ChromePasswordManagerClient { 38 class TestChromePasswordManagerClient : public ChromePasswordManagerClient {
39 public: 39 public:
40 explicit TestChromePasswordManagerClient(content::WebContents* web_contents) 40 explicit TestChromePasswordManagerClient(content::WebContents* web_contents)
41 : ChromePasswordManagerClient(web_contents, NULL), 41 : ChromePasswordManagerClient(web_contents, NULL),
42 is_sync_account_credential_(false) {} 42 is_sync_account_credential_(false) {}
43 virtual ~TestChromePasswordManagerClient() {} 43 ~TestChromePasswordManagerClient() override {}
44 44
45 virtual bool IsSyncAccountCredential( 45 bool IsSyncAccountCredential(const std::string& username,
46 const std::string& username, 46 const std::string& origin) const override {
47 const std::string& origin) const override {
48 return is_sync_account_credential_; 47 return is_sync_account_credential_;
49 } 48 }
50 49
51 void set_is_sync_account_credential(bool is_sync_account_credential) { 50 void set_is_sync_account_credential(bool is_sync_account_credential) {
52 is_sync_account_credential_ = is_sync_account_credential; 51 is_sync_account_credential_ = is_sync_account_credential;
53 } 52 }
54 53
55 private: 54 private:
56 bool is_sync_account_credential_; 55 bool is_sync_account_credential_;
57 56
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 GURL("https://accounts.google.com/ServiceLogin?continue=" 322 GURL("https://accounts.google.com/ServiceLogin?continue="
324 "https://mail.google.com&rart=234")); 323 "https://mail.google.com&rart=234"));
325 EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage()); 324 EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage());
326 325
327 // Reauth pages are only on accounts.google.com 326 // Reauth pages are only on accounts.google.com
328 NavigateAndCommit( 327 NavigateAndCommit(
329 GURL("https://other.site.com/ServiceLogin?continue=" 328 GURL("https://other.site.com/ServiceLogin?continue="
330 "https://passwords.google.com&rart=234")); 329 "https://passwords.google.com&rart=234"));
331 EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage()); 330 EXPECT_TRUE(client->IsPasswordManagerEnabledForCurrentPage());
332 } 331 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698