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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 7461106: Inform disk cache of WebKit memory cache hits. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implement in backend Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 948 matching lines...) Expand 10 before | Expand all | Expand 10 after
959 Source<NavigationController>(&controller_), 959 Source<NavigationController>(&controller_),
960 Details<ProvisionalLoadDetails>(&details)); 960 Details<ProvisionalLoadDetails>(&details));
961 961
962 FOR_EACH_OBSERVER(TabContentsObserver, observers_, 962 FOR_EACH_OBSERVER(TabContentsObserver, observers_,
963 DidFailProvisionalLoad(frame_id, is_main_frame, 963 DidFailProvisionalLoad(frame_id, is_main_frame,
964 validated_url, error_code)); 964 validated_url, error_code));
965 } 965 }
966 966
967 void TabContents::OnDidLoadResourceFromMemoryCache( 967 void TabContents::OnDidLoadResourceFromMemoryCache(
968 const GURL& url, 968 const GURL& url,
969 const std::string& security_info) { 969 const std::string& security_info,
970 const std::string& http_method) {
970 base::StatsCounter cache("WebKit.CacheHit"); 971 base::StatsCounter cache("WebKit.CacheHit");
971 cache.Increment(); 972 cache.Increment();
972 973
973 // Send out a notification that we loaded a resource from our memory cache. 974 // Send out a notification that we loaded a resource from our memory cache.
974 int cert_id = 0, cert_status = 0, security_bits = -1, connection_status = 0; 975 int cert_id = 0, cert_status = 0, security_bits = -1, connection_status = 0;
975 SSLManager::DeserializeSecurityInfo(security_info, 976 SSLManager::DeserializeSecurityInfo(security_info,
976 &cert_id, &cert_status, 977 &cert_id, &cert_status,
977 &security_bits, 978 &security_bits,
978 &connection_status); 979 &connection_status);
979 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(), 980 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(),
(...skipping 899 matching lines...) Expand 10 before | Expand all | Expand 10 after
1879 } 1880 }
1880 1881
1881 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1882 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1882 render_manager_.SwapInRenderViewHost(rvh); 1883 render_manager_.SwapInRenderViewHost(rvh);
1883 } 1884 }
1884 1885
1885 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1886 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1886 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1887 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1887 rwh_view->SetSize(view()->GetContainerSize()); 1888 rwh_view->SetSize(view()->GetContainerSize());
1888 } 1889 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698