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

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: Fixes for wtc. 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 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids;
2152 DeserializeSecurityInfo(security_info, &cert_id, &cert_status, 2153 DeserializeSecurityInfo(security_info, &cert_id, &cert_status,
2153 &security_bits, &connection_status); 2154 &security_bits, &connection_status,
2155 &signed_certificate_timestamp_ids);
2154 LoadFromMemoryCacheDetails details( 2156 LoadFromMemoryCacheDetails details(
2155 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method, 2157 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method,
wtc 2013/11/28 16:15:07 Since signed_certificate_timestamp_ids is closely
alcutter 2013/11/28 16:42:18 Done.
2156 mime_type, resource_type); 2158 mime_type, resource_type);
2157 2159
2158 controller_.ssl_manager()->DidLoadFromMemoryCache(details); 2160 controller_.ssl_manager()->DidLoadFromMemoryCache(details);
2159 2161
2160 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 2162 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
2161 DidLoadResourceFromMemoryCache(details)); 2163 DidLoadResourceFromMemoryCache(details));
2162 2164
2163 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) { 2165 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) {
2164 scoped_refptr<net::URLRequestContextGetter> request_context( 2166 scoped_refptr<net::URLRequestContextGetter> request_context(
2165 resource_type == ResourceType::MEDIA ? 2167 resource_type == ResourceType::MEDIA ?
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
3694 } 3696 }
3695 3697
3696 void WebContentsImpl::OnFrameRemoved( 3698 void WebContentsImpl::OnFrameRemoved(
3697 RenderViewHostImpl* render_view_host, 3699 RenderViewHostImpl* render_view_host,
3698 int64 frame_id) { 3700 int64 frame_id) {
3699 FOR_EACH_OBSERVER(WebContentsObserver, observers_, 3701 FOR_EACH_OBSERVER(WebContentsObserver, observers_,
3700 FrameDetached(render_view_host, frame_id)); 3702 FrameDetached(render_view_host, frame_id));
3701 } 3703 }
3702 3704
3703 } // namespace content 3705 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698