OLD | NEW |
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 1001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1012 | 1012 |
1013 void TabContents::OnDidLoadResourceFromMemoryCache( | 1013 void TabContents::OnDidLoadResourceFromMemoryCache( |
1014 const GURL& url, | 1014 const GURL& url, |
1015 const std::string& security_info, | 1015 const std::string& security_info, |
1016 const std::string& http_method, | 1016 const std::string& http_method, |
1017 ResourceType::Type resource_type) { | 1017 ResourceType::Type resource_type) { |
1018 base::StatsCounter cache("WebKit.CacheHit"); | 1018 base::StatsCounter cache("WebKit.CacheHit"); |
1019 cache.Increment(); | 1019 cache.Increment(); |
1020 | 1020 |
1021 // Send out a notification that we loaded a resource from our memory cache. | 1021 // Send out a notification that we loaded a resource from our memory cache. |
1022 int cert_id = 0, cert_status = 0, security_bits = -1, connection_status = 0; | 1022 int cert_id = 0; |
| 1023 net::CertStatus cert_status = net::CERT_STATUS_NO_ERROR; |
| 1024 int security_bits = -1; |
| 1025 int connection_status = 0; |
1023 SSLManager::DeserializeSecurityInfo(security_info, | 1026 SSLManager::DeserializeSecurityInfo(security_info, |
1024 &cert_id, &cert_status, | 1027 &cert_id, &cert_status, |
1025 &security_bits, | 1028 &security_bits, |
1026 &connection_status); | 1029 &connection_status); |
1027 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(), | 1030 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(), |
1028 cert_id, cert_status); | 1031 cert_id, cert_status); |
1029 | 1032 |
1030 NotificationService::current()->Notify( | 1033 NotificationService::current()->Notify( |
1031 content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, | 1034 content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, |
1032 Source<NavigationController>(&controller_), | 1035 Source<NavigationController>(&controller_), |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1983 } | 1986 } |
1984 | 1987 |
1985 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { | 1988 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { |
1986 render_manager_.SwapInRenderViewHost(rvh); | 1989 render_manager_.SwapInRenderViewHost(rvh); |
1987 } | 1990 } |
1988 | 1991 |
1989 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 1992 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
1990 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); | 1993 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); |
1991 rwh_view->SetSize(view()->GetContainerSize()); | 1994 rwh_view->SetSize(view()->GetContainerSize()); |
1992 } | 1995 } |
OLD | NEW |