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

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: Move http check 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,
971 ResourceType::Type resource_type) {
970 base::StatsCounter cache("WebKit.CacheHit"); 972 base::StatsCounter cache("WebKit.CacheHit");
971 cache.Increment(); 973 cache.Increment();
972 974
973 // Send out a notification that we loaded a resource from our memory cache. 975 // 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; 976 int cert_id = 0, cert_status = 0, security_bits = -1, connection_status = 0;
975 SSLManager::DeserializeSecurityInfo(security_info, 977 SSLManager::DeserializeSecurityInfo(security_info,
976 &cert_id, &cert_status, 978 &cert_id, &cert_status,
977 &security_bits, 979 &security_bits,
978 &connection_status); 980 &connection_status);
979 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(), 981 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(),
(...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1889 } 1891 }
1890 1892
1891 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 1893 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
1892 render_manager_.SwapInRenderViewHost(rvh); 1894 render_manager_.SwapInRenderViewHost(rvh);
1893 } 1895 }
1894 1896
1895 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 1897 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
1896 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 1898 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
1897 rwh_view->SetSize(view()->GetContainerSize()); 1899 rwh_view->SetSize(view()->GetContainerSize());
1898 } 1900 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698