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

Side by Side Diff: components/safe_browsing/password_protection/password_protection_service_unittest.cc

Issue 2949243004: Distinguish G Suite accounts from regular gmail/googlemail accounts (Closed)
Patch Set: nits Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #include "components/safe_browsing/password_protection/password_protection_servi ce.h" 4 #include "components/safe_browsing/password_protection/password_protection_servi ce.h"
5 5
6 #include "base/memory/ptr_util.h" 6 #include "base/memory/ptr_util.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/test/histogram_tester.h" 10 #include "base/test/histogram_tester.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 RequestOutcome* reason) override { 111 RequestOutcome* reason) override {
112 return true; 112 return true;
113 } 113 }
114 114
115 void ShowPhishingInterstitial(const GURL& phishing_url, 115 void ShowPhishingInterstitial(const GURL& phishing_url,
116 const std::string& token, 116 const std::string& token,
117 content::WebContents* web_contents) override {} 117 content::WebContents* web_contents) override {}
118 118
119 bool IsHistorySyncEnabled() override { return false; } 119 bool IsHistorySyncEnabled() override { return false; }
120 120
121 LoginReputationClientRequest::PasswordReuseEvent::SyncAccountType
122 GetSyncAccountType() override {
123 return LoginReputationClientRequest::PasswordReuseEvent::NOT_SIGNED_IN;
124 }
125
121 LoginReputationClientResponse* latest_response() { 126 LoginReputationClientResponse* latest_response() {
122 return latest_response_.get(); 127 return latest_response_.get();
123 } 128 }
124 129
125 ~TestPasswordProtectionService() override {} 130 ~TestPasswordProtectionService() override {}
126 131
127 size_t GetPendingRequestsCount() { return requests_.size(); } 132 size_t GetPendingRequestsCount() { return requests_.size(); }
128 133
129 const LoginReputationClientRequest* GetLatestRequestProto() { 134 const LoginReputationClientRequest* GetLatestRequestProto() {
130 return latest_request_ ? latest_request_->request_proto() : nullptr; 135 return latest_request_ ? latest_request_->request_proto() : nullptr;
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 request_->OnURLFetchComplete(&fetcher); 833 request_->OnURLFetchComplete(&fetcher);
829 base::RunLoop().RunUntilIdle(); 834 base::RunLoop().RunUntilIdle();
830 835
831 actual_request = password_protection_service_->GetLatestRequestProto(); 836 actual_request = password_protection_service_->GetLatestRequestProto();
832 ASSERT_TRUE(actual_request->has_password_reuse_event()); 837 ASSERT_TRUE(actual_request->has_password_reuse_event());
833 ASSERT_FALSE( 838 ASSERT_FALSE(
834 actual_request->password_reuse_event().is_chrome_signin_password()); 839 actual_request->password_reuse_event().is_chrome_signin_password());
835 } 840 }
836 841
837 } // namespace safe_browsing 842 } // namespace safe_browsing
OLDNEW
« no previous file with comments | « components/safe_browsing/password_protection/password_protection_service.h ('k') | tools/metrics/histograms/enums.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698