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

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: move //c/b/ssl classes into global namespace 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 // SSLErrorHandler. Uses the SafeBrowsing UI manager to send invalid 523 // SSLErrorHandler. Uses the SafeBrowsing UI manager to send invalid
524 // certificate reports. 524 // certificate reports.
525 class SafeBrowsingSSLCertReporter : public SSLCertReporter { 525 class SafeBrowsingSSLCertReporter : public SSLCertReporter {
526 public: 526 public:
527 explicit SafeBrowsingSSLCertReporter( 527 explicit SafeBrowsingSSLCertReporter(
528 const scoped_refptr<SafeBrowsingUIManager>& safe_browsing_ui_manager) 528 const scoped_refptr<SafeBrowsingUIManager>& safe_browsing_ui_manager)
529 : safe_browsing_ui_manager_(safe_browsing_ui_manager) {} 529 : safe_browsing_ui_manager_(safe_browsing_ui_manager) {}
530 ~SafeBrowsingSSLCertReporter() override {} 530 ~SafeBrowsingSSLCertReporter() override {}
531 531
532 // SSLCertReporter implementation 532 // SSLCertReporter implementation
533 void ReportInvalidCertificateChain(const std::string& hostname, 533 void ReportInvalidCertificateChain(
534 const net::SSLInfo& ssl_info) override { 534 const std::string& serialized_report) override {
535 if (safe_browsing_ui_manager_) { 535 if (safe_browsing_ui_manager_) {
536 safe_browsing_ui_manager_->ReportInvalidCertificateChain( 536 safe_browsing_ui_manager_->ReportInvalidCertificateChain(
537 hostname, ssl_info, base::Bind(&base::DoNothing)); 537 serialized_report, base::Bind(&base::DoNothing));
538 } 538 }
539 } 539 }
540 540
541 private: 541 private:
542 const scoped_refptr<SafeBrowsingUIManager> safe_browsing_ui_manager_; 542 const scoped_refptr<SafeBrowsingUIManager> safe_browsing_ui_manager_;
543 }; 543 };
544 544
545 #if defined(OS_ANDROID) 545 #if defined(OS_ANDROID)
546 546
547 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) { 547 void HandleSingleTabModeBlockOnUIThread(const BlockedWindowParams& params) {
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 switches::kDisableWebRtcEncryption, 2446 switches::kDisableWebRtcEncryption,
2447 }; 2447 };
2448 to_command_line->CopySwitchesFrom(from_command_line, 2448 to_command_line->CopySwitchesFrom(from_command_line,
2449 kWebRtcDevSwitchNames, 2449 kWebRtcDevSwitchNames,
2450 arraysize(kWebRtcDevSwitchNames)); 2450 arraysize(kWebRtcDevSwitchNames));
2451 } 2451 }
2452 } 2452 }
2453 #endif // defined(ENABLE_WEBRTC) 2453 #endif // defined(ENABLE_WEBRTC)
2454 2454
2455 } // namespace chrome 2455 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698