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

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

Issue 16256018: Update content/ to use WeakPtr<T>::get() instead of implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix incorrectly modified code Created 7 years, 6 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_error_handler.cc ('k') | content/browser/tracing/tracing_ui.cc » ('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/supports_user_data.h" 10 #include "base/supports_user_data.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // static 51 // static
52 void SSLManager::OnSSLCertificateError( 52 void SSLManager::OnSSLCertificateError(
53 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate, 53 const base::WeakPtr<SSLErrorHandler::Delegate>& delegate,
54 const GlobalRequestID& id, 54 const GlobalRequestID& id,
55 const ResourceType::Type resource_type, 55 const ResourceType::Type resource_type,
56 const GURL& url, 56 const GURL& url,
57 int render_process_id, 57 int render_process_id,
58 int render_view_id, 58 int render_view_id,
59 const net::SSLInfo& ssl_info, 59 const net::SSLInfo& ssl_info,
60 bool fatal) { 60 bool fatal) {
61 DCHECK(delegate); 61 DCHECK(delegate.get());
62 DVLOG(1) << "OnSSLCertificateError() cert_error: " 62 DVLOG(1) << "OnSSLCertificateError() cert_error: "
63 << net::MapCertStatusToNetError(ssl_info.cert_status) 63 << net::MapCertStatusToNetError(ssl_info.cert_status) << " id: "
64 << " id: " << id.child_id << "," << id.request_id 64 << id.child_id << "," << id.request_id << " resource_type: "
65 << " resource_type: " << resource_type 65 << resource_type << " url: " << url.spec() << " render_process_id: "
66 << " url: " << url.spec() 66 << render_process_id << " render_view_id: " << render_view_id
67 << " render_process_id: " << render_process_id
68 << " render_view_id: " << render_view_id
69 << " cert_status: " << std::hex << ssl_info.cert_status; 67 << " cert_status: " << std::hex << ssl_info.cert_status;
70 68
71 // A certificate error occurred. Construct a SSLCertErrorHandler object and 69 // A certificate error occurred. Construct a SSLCertErrorHandler object and
72 // hand it over to the UI thread for processing. 70 // hand it over to the UI thread for processing.
73 BrowserThread::PostTask( 71 BrowserThread::PostTask(
74 BrowserThread::UI, FROM_HERE, 72 BrowserThread::UI, FROM_HERE,
75 base::Bind(&SSLCertErrorHandler::Dispatch, 73 base::Bind(&SSLCertErrorHandler::Dispatch,
76 new SSLCertErrorHandler(delegate, 74 new SSLCertErrorHandler(delegate,
77 id, 75 id,
78 resource_type, 76 resource_type,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 240
243 SSLStatus original_ssl_status = entry->GetSSL(); // Copy! 241 SSLStatus original_ssl_status = entry->GetSSL(); // Copy!
244 242
245 policy()->UpdateEntry(entry, controller_->web_contents()); 243 policy()->UpdateEntry(entry, controller_->web_contents());
246 244
247 if (!entry->GetSSL().Equals(original_ssl_status)) 245 if (!entry->GetSSL().Equals(original_ssl_status))
248 controller_->web_contents()->DidChangeVisibleSSLState(); 246 controller_->web_contents()->DidChangeVisibleSSLState();
249 } 247 }
250 248
251 } // namespace content 249 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/ssl/ssl_error_handler.cc ('k') | content/browser/tracing/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698