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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1225983003: Clean up the interface to DeserializeSecurityInfo, fix uninitialized memory use. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 (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 "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 2094 matching lines...) Expand 10 before | Expand all | Expand 10 after
2105 2105
2106 void RenderViewImpl::ClearEditCommands() { 2106 void RenderViewImpl::ClearEditCommands() {
2107 edit_commands_.clear(); 2107 edit_commands_.clear();
2108 } 2108 }
2109 2109
2110 SSLStatus RenderViewImpl::GetSSLStatusOfFrame(blink::WebFrame* frame) const { 2110 SSLStatus RenderViewImpl::GetSSLStatusOfFrame(blink::WebFrame* frame) const {
2111 std::string security_info; 2111 std::string security_info;
2112 if (frame && frame->dataSource()) 2112 if (frame && frame->dataSource())
2113 security_info = frame->dataSource()->response().securityInfo(); 2113 security_info = frame->dataSource()->response().securityInfo();
2114 2114
2115 SSLStatus ssl_status; 2115 return DeserializeSecurityInfo(security_info);
2116 DeserializeSecurityInfo(security_info,
2117 &ssl_status.cert_id,
2118 &ssl_status.cert_status,
2119 &ssl_status.security_bits,
2120 &ssl_status.connection_status,
2121 &ssl_status.signed_certificate_timestamp_ids);
2122 return ssl_status;
2123 } 2116 }
2124 2117
2125 const std::string& RenderViewImpl::GetAcceptLanguages() const { 2118 const std::string& RenderViewImpl::GetAcceptLanguages() const {
2126 return renderer_preferences_.accept_languages; 2119 return renderer_preferences_.accept_languages;
2127 } 2120 }
2128 2121
2129 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, 2122 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame,
2130 WebIconURL::Type icon_type) { 2123 WebIconURL::Type icon_type) {
2131 if (frame->parent()) 2124 if (frame->parent())
2132 return; 2125 return;
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
3800 std::vector<gfx::Size> sizes; 3793 std::vector<gfx::Size> sizes;
3801 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3794 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3802 if (!url.isEmpty()) 3795 if (!url.isEmpty())
3803 urls.push_back( 3796 urls.push_back(
3804 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3797 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3805 } 3798 }
3806 SendUpdateFaviconURL(urls); 3799 SendUpdateFaviconURL(urls);
3807 } 3800 }
3808 3801
3809 } // namespace content 3802 } // namespace content
OLDNEW
« content/common/ssl_status_serialization.h ('K') | « content/renderer/context_menu_params_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698