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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 88643002: SignedCertificateTimestamp storing & serialization code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@erans_patches
Patch Set: Created 7 years 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 2131 matching lines...) Expand 10 before | Expand all | Expand 10 after
2142 const std::string& mime_type, 2142 const std::string& mime_type,
2143 ResourceType::Type resource_type) { 2143 ResourceType::Type resource_type) {
2144 base::StatsCounter cache("WebKit.CacheHit"); 2144 base::StatsCounter cache("WebKit.CacheHit");
2145 cache.Increment(); 2145 cache.Increment();
2146 2146
2147 // Send out a notification that we loaded a resource from our memory cache. 2147 // Send out a notification that we loaded a resource from our memory cache.
2148 int cert_id = 0; 2148 int cert_id = 0;
2149 net::CertStatus cert_status = 0; 2149 net::CertStatus cert_status = 0;
2150 int security_bits = -1; 2150 int security_bits = -1;
2151 int connection_status = 0; 2151 int connection_status = 0;
2152 content::SignedCertificateTimestampIDStatusList
2153 signed_certificate_timestamp_ids;
2152 DeserializeSecurityInfo(security_info, &cert_id, &cert_status, 2154 DeserializeSecurityInfo(security_info, &cert_id, &cert_status,
2153 &security_bits, &connection_status); 2155 &security_bits, &connection_status,
2156 &signed_certificate_timestamp_ids);
2154 LoadFromMemoryCacheDetails details( 2157 LoadFromMemoryCacheDetails details(
2155 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method, 2158 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method,
2156 mime_type, resource_type); 2159 mime_type, resource_type);
2157 2160
2158 controller_.ssl_manager()->DidLoadFromMemoryCache(details); 2161 controller_.ssl_manager()->DidLoadFromMemoryCache(details);
2159 2162
2160 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2163 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2161 DidLoadResourceFromMemoryCache(details)); 2164 DidLoadResourceFromMemoryCache(details));
2162 2165
2163 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) { 2166 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) {
(...skipping 1530 matching lines...) Expand 10 before | Expand all | Expand 10 after
3694 } 3697 }
3695 3698
3696 void WebContentsImpl::OnFrameRemoved( 3699 void WebContentsImpl::OnFrameRemoved(
3697 RenderViewHostImpl* render_view_host, 3700 RenderViewHostImpl* render_view_host,
3698 int64 frame_id) { 3701 int64 frame_id) {
3699 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3702 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3700 FrameDetached(render_view_host, frame_id)); 3703 FrameDetached(render_view_host, frame_id));
3701 } 3704 }
3702 3705
3703 } // namespace content 3706 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698