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

Side by Side Diff: content/browser/renderer_host/pepper/pepper_socket_utils.cc

Issue 216473002: Replace DCHECK(BrowserThread::CurrentlyOn) with DCHECK_CURRENTLY_ON in content/browser/renderer_hos… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync to r260263 Created 6 years, 8 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) 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/renderer_host/pepper/pepper_socket_utils.h" 5 #include "content/browser/renderer_host/pepper/pepper_socket_utils.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 23 matching lines...) Expand all
34 &address, 34 &address,
35 &port); 35 &port);
36 return SocketPermissionRequest(type, host, port); 36 return SocketPermissionRequest(type, host, port);
37 } 37 }
38 38
39 bool CanUseSocketAPIs(bool external_plugin, 39 bool CanUseSocketAPIs(bool external_plugin,
40 bool private_api, 40 bool private_api,
41 const SocketPermissionRequest* params, 41 const SocketPermissionRequest* params,
42 int render_process_id, 42 int render_process_id,
43 int render_frame_id) { 43 int render_frame_id) {
44 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 44 DCHECK_CURRENTLY_ON(BrowserThread::UI);
45 if (!external_plugin) { 45 if (!external_plugin) {
46 // Always allow socket APIs for out-process plugins (other than external 46 // Always allow socket APIs for out-process plugins (other than external
47 // plugins instantiated by the embeeder through 47 // plugins instantiated by the embeeder through
48 // BrowserPpapiHost::CreateExternalPluginProcess). 48 // BrowserPpapiHost::CreateExternalPluginProcess).
49 return true; 49 return true;
50 } 50 }
51 51
52 RenderFrameHost* render_frame_host = 52 RenderFrameHost* render_frame_host =
53 RenderFrameHost::FromID(render_process_id, render_frame_id); 53 RenderFrameHost::FromID(render_process_id, render_frame_id);
54 if (!render_frame_host) 54 if (!render_frame_host)
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ppapi::PPB_X509Certificate_Fields* fields) { 119 ppapi::PPB_X509Certificate_Fields* fields) {
120 scoped_refptr<net::X509Certificate> cert = 120 scoped_refptr<net::X509Certificate> cert =
121 net::X509Certificate::CreateFromBytes(der, length); 121 net::X509Certificate::CreateFromBytes(der, length);
122 if (!cert.get()) 122 if (!cert.get())
123 return false; 123 return false;
124 return GetCertificateFields(*cert.get(), fields); 124 return GetCertificateFields(*cert.get(), fields);
125 } 125 }
126 126
127 } // namespace pepper_socket_utils 127 } // namespace pepper_socket_utils
128 } // namespace content 128 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698