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

Side by Side Diff: content/renderer/context_menu_params_builder.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/context_menu_params_builder.h" 5 #include "content/renderer/context_menu_params_builder.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/common/ssl_status_serialization.h" 8 #include "content/common/ssl_status_serialization.h"
9 #include "content/public/common/context_menu_params.h" 9 #include "content/public/common/context_menu_params.h"
10 #include "content/public/renderer/content_renderer_client.h" 10 #include "content/public/renderer/content_renderer_client.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 if (!selectedElement.isNull() && selectedNode.isLink()) { 70 if (!selectedElement.isNull() && selectedNode.isLink()) {
71 params.link_text = selectedElement.textContent(); 71 params.link_text = selectedElement.textContent();
72 } else { 72 } else {
73 LOG(ERROR) << "Creating a ContextMenuParams for a node that has a link" 73 LOG(ERROR) << "Creating a ContextMenuParams for a node that has a link"
74 << "url but is not an ElementNode or does not have an" 74 << "url but is not an ElementNode or does not have an"
75 << "ancestor that is a link."; 75 << "ancestor that is a link.";
76 } 76 }
77 } 77 }
78 78
79 // Deserialize the SSL info. 79 // Deserialize the SSL info.
80 if (!data.securityInfo.isEmpty()) { 80 if (!data.securityInfo.isEmpty())
81 DeserializeSecurityInfo(data.securityInfo, 81 params.security_info = DeserializeSecurityInfo(data.securityInfo);
82 &params.security_info.cert_id, &params.security_info.cert_status,
83 &params.security_info.security_bits,
84 &params.security_info.connection_status,
85 &params.security_info.signed_certificate_timestamp_ids);
86 }
87 82
88 return params; 83 return params;
89 } 84 }
90 85
91 } // namespace content 86 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698