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

Side by Side Diff: content/browser/ssl/ssl_manager.cc

Issue 425653002: content: ResourceType cleanup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: REBASE Created 6 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
« no previous file with comments | « content/browser/ssl/ssl_manager.h ('k') | content/browser/ssl/ssl_request_info.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/ssl/ssl_manager.h" 5 #include "content/browser/ssl/ssl_manager.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 DISALLOW_COPY_AND_ASSIGN(SSLManagerSet); 44 DISALLOW_COPY_AND_ASSIGN(SSLManagerSet);
45 }; 45 };
46 46
47 } // namespace 47 } // namespace
48 48
49 // static 49 // static
50 void SSLManager::OnSSLCertificateError( 50 void SSLManager::OnSSLCertificateError(
51 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, 51 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
52 const GlobalRequestID& id, 52 const GlobalRequestID& id,
53 const ResourceType::Type resource_type, 53 const ResourceType resource_type,
54 const GURL& url, 54 const GURL& url,
55 int render_process_id, 55 int render_process_id,
56 int render_frame_id, 56 int render_frame_id,
57 const net::SSLInfo& ssl_info, 57 const net::SSLInfo& ssl_info,
58 bool fatal) { 58 bool fatal) {
59 DCHECK(delegate.get()); 59 DCHECK(delegate.get());
60 DVLOG(1) << "OnSSLCertificateError() cert_error: " 60 DVLOG(1) << "OnSSLCertificateError() cert_error: "
61 << net::MapCertStatusToNetError(ssl_info.cert_status) << " id: " 61 << net::MapCertStatusToNetError(ssl_info.cert_status) << " id: "
62 << id.child_id << "," << id.request_id << " resource_type: " 62 << id.child_id << "," << id.request_id << " resource_type: "
63 << resource_type << " url: " << url.spec() << " render_process_id: " 63 << resource_type << " url: " << url.spec() << " render_process_id: "
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 void SSLManager::DidLoadFromMemoryCache( 165 void SSLManager::DidLoadFromMemoryCache(
166 const LoadFromMemoryCacheDetails& details) { 166 const LoadFromMemoryCacheDetails& details) {
167 // Simulate loading this resource through the usual path. 167 // Simulate loading this resource through the usual path.
168 // Note that we specify SUB_RESOURCE as the resource type as WebCore only 168 // Note that we specify SUB_RESOURCE as the resource type as WebCore only
169 // caches sub-resources. 169 // caches sub-resources.
170 // This resource must have been loaded with no filtering because filtered 170 // This resource must have been loaded with no filtering because filtered
171 // resouces aren't cachable. 171 // resouces aren't cachable.
172 scoped_refptr<SSLRequestInfo> info(new SSLRequestInfo( 172 scoped_refptr<SSLRequestInfo> info(new SSLRequestInfo(
173 details.url, 173 details.url,
174 ResourceType::SUB_RESOURCE, 174 RESOURCE_TYPE_SUB_RESOURCE,
175 details.pid, 175 details.pid,
176 details.cert_id, 176 details.cert_id,
177 details.cert_status)); 177 details.cert_status));
178 178
179 // Simulate loading this resource through the usual path. 179 // Simulate loading this resource through the usual path.
180 policy()->OnRequestStarted(info.get()); 180 policy()->OnRequestStarted(info.get());
181 } 181 }
182 182
183 void SSLManager::DidStartResourceResponse( 183 void SSLManager::DidStartResourceResponse(
184 const ResourceRequestDetails& details) { 184 const ResourceRequestDetails& details) {
(...skipping 29 matching lines...) Expand all
214 214
215 WebContentsImpl* contents = 215 WebContentsImpl* contents =
216 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents()); 216 static_cast<WebContentsImpl*>(controller_->delegate()->GetWebContents());
217 policy()->UpdateEntry(entry, contents); 217 policy()->UpdateEntry(entry, contents);
218 218
219 if (!entry->GetSSL().Equals(original_ssl_status)) 219 if (!entry->GetSSL().Equals(original_ssl_status))
220 contents->DidChangeVisibleSSLState(); 220 contents->DidChangeVisibleSSLState();
221 } 221 }
222 222
223 } // namespace content 223 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_manager.h ('k') | content/browser/ssl/ssl_request_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698