| OLD | NEW |
| 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/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
| (...skipping 2896 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2907 } | 2907 } |
| 2908 | 2908 |
| 2909 void WebContentsImpl::OnDidLoadResourceFromMemoryCache( | 2909 void WebContentsImpl::OnDidLoadResourceFromMemoryCache( |
| 2910 const GURL& url, | 2910 const GURL& url, |
| 2911 const std::string& security_info, | 2911 const std::string& security_info, |
| 2912 const std::string& http_method, | 2912 const std::string& http_method, |
| 2913 const std::string& mime_type, | 2913 const std::string& mime_type, |
| 2914 ResourceType resource_type) { | 2914 ResourceType resource_type) { |
| 2915 | 2915 |
| 2916 // Send out a notification that we loaded a resource from our memory cache. | 2916 // Send out a notification that we loaded a resource from our memory cache. |
| 2917 int cert_id = 0; | 2917 SSLStatus status = DeserializeSecurityInfo(security_info); |
| 2918 net::CertStatus cert_status = 0; | 2918 // TODO(alcutter,eranm): Pass signed_certificate_timestamp_ids into details. |
| 2919 int security_bits = -1; | |
| 2920 int connection_status = 0; | |
| 2921 SignedCertificateTimestampIDStatusList signed_certificate_timestamp_ids; | |
| 2922 DeserializeSecurityInfo(security_info, &cert_id, &cert_status, | |
| 2923 &security_bits, &connection_status, | |
| 2924 &signed_certificate_timestamp_ids); | |
| 2925 // TODO(alcutter,eranm): Pass signed_certificate_timestamp_ids into details | |
| 2926 LoadFromMemoryCacheDetails details( | 2919 LoadFromMemoryCacheDetails details( |
| 2927 url, GetRenderProcessHost()->GetID(), cert_id, cert_status, http_method, | 2920 url, GetRenderProcessHost()->GetID(), status.cert_id, status.cert_status, |
| 2928 mime_type, resource_type); | 2921 http_method, mime_type, resource_type); |
| 2929 | 2922 |
| 2930 controller_.ssl_manager()->DidLoadFromMemoryCache(details); | 2923 controller_.ssl_manager()->DidLoadFromMemoryCache(details); |
| 2931 | 2924 |
| 2932 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | 2925 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
| 2933 DidLoadResourceFromMemoryCache(details)); | 2926 DidLoadResourceFromMemoryCache(details)); |
| 2934 | 2927 |
| 2935 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) { | 2928 if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) { |
| 2936 scoped_refptr<net::URLRequestContextGetter> request_context( | 2929 scoped_refptr<net::URLRequestContextGetter> request_context( |
| 2937 resource_type == RESOURCE_TYPE_MEDIA ? | 2930 resource_type == RESOURCE_TYPE_MEDIA ? |
| 2938 GetBrowserContext()->GetMediaRequestContextForRenderProcess( | 2931 GetBrowserContext()->GetMediaRequestContextForRenderProcess( |
| (...skipping 1537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4476 player_map->erase(it); | 4469 player_map->erase(it); |
| 4477 } | 4470 } |
| 4478 | 4471 |
| 4479 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4472 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
| 4480 force_disable_overscroll_content_ = force_disable; | 4473 force_disable_overscroll_content_ = force_disable; |
| 4481 if (view_) | 4474 if (view_) |
| 4482 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4475 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
| 4483 } | 4476 } |
| 4484 | 4477 |
| 4485 } // namespace content | 4478 } // namespace content |
| OLD | NEW |