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

Side by Side Diff: chrome/browser/safe_browsing/chrome_password_protection_service_unittest.cc

Issue 2911293003: Reland: Cache protected password entry and password on focus ping separately. (Closed)
Patch Set: Fix Crashes by Using GetDictionaryWithoutPathExpansion Created 3 years, 6 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 "chrome/browser/safe_browsing/chrome_password_protection_service.h" 4 #include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
5 5
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/test/scoped_feature_list.h" 7 #include "base/test/scoped_feature_list.h"
8 #include "chrome/browser/safe_browsing/ui_manager.h" 8 #include "chrome/browser/safe_browsing/ui_manager.h"
9 #include "chrome/common/pref_names.h" 9 #include "chrome/common/pref_names.h"
10 #include "chrome/test/base/chrome_render_view_host_test_harness.h" 10 #include "chrome/test/base/chrome_render_view_host_test_harness.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 void SetUIManager(scoped_refptr<SafeBrowsingUIManager> ui_manager) { 69 void SetUIManager(scoped_refptr<SafeBrowsingUIManager> ui_manager) {
70 ui_manager_ = ui_manager; 70 ui_manager_ = ui_manager;
71 } 71 }
72 72
73 MockSafeBrowsingUIManager* ui_manager() { 73 MockSafeBrowsingUIManager* ui_manager() {
74 return static_cast<MockSafeBrowsingUIManager*>(ui_manager_.get()); 74 return static_cast<MockSafeBrowsingUIManager*>(ui_manager_.get());
75 } 75 }
76 76
77 void CacheVerdict(const GURL& url, 77 void CacheVerdict(const GURL& url,
78 LoginReputationClientRequest::TriggerType trigger_type,
78 LoginReputationClientResponse* verdict, 79 LoginReputationClientResponse* verdict,
79 const base::Time& receive_time) override {} 80 const base::Time& receive_time) override {}
80 81
81 protected: 82 protected:
82 friend class ChromePasswordProtectionServiceTest; 83 friend class ChromePasswordProtectionServiceTest;
83 84
84 private: 85 private:
85 bool is_incognito_; 86 bool is_incognito_;
86 bool is_extended_reporting_; 87 bool is_extended_reporting_;
87 bool is_history_sync_enabled_; 88 bool is_history_sync_enabled_;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 InitializeVerdict(LoginReputationClientResponse::LOW_REPUTATION); 435 InitializeVerdict(LoginReputationClientResponse::LOW_REPUTATION);
435 RequestFinished(request_.get(), std::move(verdict_)); 436 RequestFinished(request_.get(), std::move(verdict_));
436 437
437 // For protected password entry request, no interstitial shown if verdict is 438 // For protected password entry request, no interstitial shown if verdict is
438 // SAFE. 439 // SAFE.
439 InitializeVerdict(LoginReputationClientResponse::SAFE); 440 InitializeVerdict(LoginReputationClientResponse::SAFE);
440 RequestFinished(request_.get(), std::move(verdict_)); 441 RequestFinished(request_.get(), std::move(verdict_));
441 } 442 }
442 443
443 } // namespace safe_browsing 444 } // namespace safe_browsing
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698