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

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

Issue 7819009: For the SSL cert status, convert anonymous enum that gives bit values into a typedefed uint32. Th... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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 1010 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 1021
1022 void TabContents::OnDidLoadResourceFromMemoryCache( 1022 void TabContents::OnDidLoadResourceFromMemoryCache(
1023 const GURL& url, 1023 const GURL& url,
1024 const std::string& security_info, 1024 const std::string& security_info,
1025 const std::string& http_method, 1025 const std::string& http_method,
1026 ResourceType::Type resource_type) { 1026 ResourceType::Type resource_type) {
1027 base::StatsCounter cache("WebKit.CacheHit"); 1027 base::StatsCounter cache("WebKit.CacheHit");
1028 cache.Increment(); 1028 cache.Increment();
1029 1029
1030 // Send out a notification that we loaded a resource from our memory cache. 1030 // Send out a notification that we loaded a resource from our memory cache.
1031 int cert_id = 0, cert_status = 0, security_bits = -1, connection_status = 0; 1031 int cert_id = 0;
1032 net::CertStatus cert_status = net::CERT_STATUS_NO_ERROR;
1033 int security_bits = -1;
1034 int connection_status = 0;
1032 SSLManager::DeserializeSecurityInfo(security_info, 1035 SSLManager::DeserializeSecurityInfo(security_info,
1033 &cert_id, &cert_status, 1036 &cert_id, &cert_status,
1034 &security_bits, 1037 &security_bits,
1035 &connection_status); 1038 &connection_status);
1036 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(), 1039 LoadFromMemoryCacheDetails details(url, GetRenderProcessHost()->id(),
1037 cert_id, cert_status); 1040 cert_id, cert_status);
1038 1041
1039 NotificationService::current()->Notify( 1042 NotificationService::current()->Notify(
1040 content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE, 1043 content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE,
1041 Source<NavigationController>(&controller_), 1044 Source<NavigationController>(&controller_),
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
2016 } 2019 }
2017 2020
2018 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 2021 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
2019 render_manager_.SwapInRenderViewHost(rvh); 2022 render_manager_.SwapInRenderViewHost(rvh);
2020 } 2023 }
2021 2024
2022 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2025 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2023 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2026 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2024 rwh_view->SetSize(view()->GetContainerSize()); 2027 rwh_view->SetSize(view()->GetContainerSize());
2025 } 2028 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698