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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1117173004: Split cert reporter class into report building/serializing and sending (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BUILD.gn fix Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <set> 7 #include <set>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 // SSLErrorHandler. Uses the SafeBrowsing UI manager to send invalid 521 // SSLErrorHandler. Uses the SafeBrowsing UI manager to send invalid
522 // certificate reports. 522 // certificate reports.
523 class SafeBrowsingSSLCertReporter : public SSLCertReporter { 523 class SafeBrowsingSSLCertReporter : public SSLCertReporter {
524 public: 524 public:
525 explicit SafeBrowsingSSLCertReporter( 525 explicit SafeBrowsingSSLCertReporter(
526 const scoped_refptr<SafeBrowsingUIManager>& safe_browsing_ui_manager) 526 const scoped_refptr<SafeBrowsingUIManager>& safe_browsing_ui_manager)
527 : safe_browsing_ui_manager_(safe_browsing_ui_manager) {} 527 : safe_browsing_ui_manager_(safe_browsing_ui_manager) {}
528 ~SafeBrowsingSSLCertReporter() override {} 528 ~SafeBrowsingSSLCertReporter() override {}
529 529
530 // SSLCertReporter implementation 530 // SSLCertReporter implementation
531 void ReportInvalidCertificateChain(const std::string& hostname, 531 void ReportInvalidCertificateChain(
532 const net::SSLInfo& ssl_info) override { 532 const std::string& serialized_report) override {
533 if (safe_browsing_ui_manager_) { 533 if (safe_browsing_ui_manager_) {
534 safe_browsing_ui_manager_->ReportInvalidCertificateChain( 534 safe_browsing_ui_manager_->ReportInvalidCertificateChain(
535 hostname, ssl_info, base::Bind(&base::DoNothing)); 535 serialized_report, base::Bind(&base::DoNothing));
536 } 536 }
537 } 537 }
538 538
539 private: 539 private:
540 const scoped_refptr<SafeBrowsingUIManager> safe_browsing_ui_manager_; 540 const scoped_refptr<SafeBrowsingUIManager> safe_browsing_ui_manager_;
541 }; 541 };
542 542
543 #if defined(OS_ANDROID) 543 #if defined(OS_ANDROID)
544 544
545 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) { 545 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) {
(...skipping 1899 matching lines...) Expand 10 before | Expand all | Expand 10 after
2445 switches::kDisableWebRtcEncryption, 2445 switches::kDisableWebRtcEncryption,
2446 }; 2446 };
2447 to_command_line->CopySwitchesFrom(from_command_line, 2447 to_command_line->CopySwitchesFrom(from_command_line,
2448 kWebRtcDevSwitchNames, 2448 kWebRtcDevSwitchNames,
2449 arraysize(kWebRtcDevSwitchNames)); 2449 arraysize(kWebRtcDevSwitchNames));
2450 } 2450 }
2451 } 2451 }
2452 #endif // defined(ENABLE_WEBRTC) 2452 #endif // defined(ENABLE_WEBRTC)
2453 2453
2454 } // namespace chrome 2454 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698