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

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: typo 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
« no previous file with comments | « content/renderer/context_menu_params_builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2107 matching lines...) Expand 10 before | Expand all | Expand 10 after
2118 2118
2119 void RenderViewImpl::ClearEditCommands() { 2119 void RenderViewImpl::ClearEditCommands() {
2120 edit_commands_.clear(); 2120 edit_commands_.clear();
2121 } 2121 }
2122 2122
2123 SSLStatus RenderViewImpl::GetSSLStatusOfFrame(blink::WebFrame* frame) const { 2123 SSLStatus RenderViewImpl::GetSSLStatusOfFrame(blink::WebFrame* frame) const {
2124 std::string security_info; 2124 std::string security_info;
2125 if (frame && frame->dataSource()) 2125 if (frame && frame->dataSource())
2126 security_info = frame->dataSource()->response().securityInfo(); 2126 security_info = frame->dataSource()->response().securityInfo();
2127 2127
2128 SSLStatus ssl_status; 2128 return DeserializeSecurityInfo(security_info);
2129 DeserializeSecurityInfo(security_info,
2130 &ssl_status.cert_id,
2131 &ssl_status.cert_status,
2132 &ssl_status.security_bits,
2133 &ssl_status.connection_status,
2134 &ssl_status.signed_certificate_timestamp_ids);
2135 return ssl_status;
2136 } 2129 }
2137 2130
2138 const std::string& RenderViewImpl::GetAcceptLanguages() const { 2131 const std::string& RenderViewImpl::GetAcceptLanguages() const {
2139 return renderer_preferences_.accept_languages; 2132 return renderer_preferences_.accept_languages;
2140 } 2133 }
2141 2134
2142 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame, 2135 void RenderViewImpl::didChangeIcon(WebLocalFrame* frame,
2143 WebIconURL::Type icon_type) { 2136 WebIconURL::Type icon_type) {
2144 if (frame->parent()) 2137 if (frame->parent())
2145 return; 2138 return;
(...skipping 1667 matching lines...) Expand 10 before | Expand all | Expand 10 after
3813 std::vector<gfx::Size> sizes; 3806 std::vector<gfx::Size> sizes;
3814 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3807 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3815 if (!url.isEmpty()) 3808 if (!url.isEmpty())
3816 urls.push_back( 3809 urls.push_back(
3817 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3810 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3818 } 3811 }
3819 SendUpdateFaviconURL(urls); 3812 SendUpdateFaviconURL(urls);
3820 } 3813 }
3821 3814
3822 } // namespace content 3815 } // namespace content
OLDNEW
« no previous file with comments | « 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