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

Side by Side Diff: content/browser/renderer_host/websocket_host.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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer_host/websocket_host.h" 5 #include "content/browser/renderer_host/websocket_host.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "content/browser/renderer_host/websocket_dispatcher_host.h" 10 #include "content/browser/renderer_host/websocket_dispatcher_host.h"
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 bool fatal) { 273 bool fatal) {
274 DVLOG(3) << "WebSocketEventHandler::OnSSLCertificateError" 274 DVLOG(3) << "WebSocketEventHandler::OnSSLCertificateError"
275 << " routing_id=" << routing_id_ << " url=" << url.spec() 275 << " routing_id=" << routing_id_ << " url=" << url.spec()
276 << " cert_status=" << ssl_info.cert_status << " fatal=" << fatal; 276 << " cert_status=" << ssl_info.cert_status << " fatal=" << fatal;
277 ssl_error_handler_delegate_.reset( 277 ssl_error_handler_delegate_.reset(
278 new SSLErrorHandlerDelegate(callbacks.Pass())); 278 new SSLErrorHandlerDelegate(callbacks.Pass()));
279 // We don't need request_id to be unique so just make a fake one. 279 // We don't need request_id to be unique so just make a fake one.
280 GlobalRequestID request_id(-1, -1); 280 GlobalRequestID request_id(-1, -1);
281 SSLManager::OnSSLCertificateError(ssl_error_handler_delegate_->GetWeakPtr(), 281 SSLManager::OnSSLCertificateError(ssl_error_handler_delegate_->GetWeakPtr(),
282 request_id, 282 request_id,
283 ResourceType::SUB_RESOURCE, 283 RESOURCE_TYPE_SUB_RESOURCE,
284 url, 284 url,
285 dispatcher_->render_process_id(), 285 dispatcher_->render_process_id(),
286 render_frame_id_, 286 render_frame_id_,
287 ssl_info, 287 ssl_info,
288 fatal); 288 fatal);
289 // The above method is always asynchronous. 289 // The above method is always asynchronous.
290 return WebSocketEventInterface::CHANNEL_ALIVE; 290 return WebSocketEventInterface::CHANNEL_ALIVE;
291 } 291 }
292 292
293 WebSocketEventHandler::SSLErrorHandlerDelegate::SSLErrorHandlerDelegate( 293 WebSocketEventHandler::SSLErrorHandlerDelegate::SSLErrorHandlerDelegate(
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 DVLOG(3) << "WebSocketHost::OnDropChannel" 391 DVLOG(3) << "WebSocketHost::OnDropChannel"
392 << " routing_id=" << routing_id_ << " was_clean=" << was_clean 392 << " routing_id=" << routing_id_ << " was_clean=" << was_clean
393 << " code=" << code << " reason=\"" << reason << "\""; 393 << " code=" << code << " reason=\"" << reason << "\"";
394 394
395 DCHECK(channel_); 395 DCHECK(channel_);
396 // TODO(yhirano): Handle |was_clean| appropriately. 396 // TODO(yhirano): Handle |was_clean| appropriately.
397 channel_->StartClosingHandshake(code, reason); 397 channel_->StartClosingHandshake(code, reason);
398 } 398 }
399 399
400 } // namespace content 400 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698