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

Side by Side Diff: content/browser/android/child_process_launcher_android.cc

Issue 1312843012: Use DCHECK_CURRENTLY_ON in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | content/browser/media/capture/web_contents_video_capture_device_unittest.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/android/child_process_launcher_android.h" 5 #include "content/browser/android/child_process_launcher_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_array.h" 8 #include "base/android/jni_array.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 const JavaParamRef<jclass>& clazz, 173 const JavaParamRef<jclass>& clazz,
174 jint pid, 174 jint pid,
175 const JavaParamRef<jobject>& surface, 175 const JavaParamRef<jobject>& surface,
176 jint primary_id, 176 jint primary_id,
177 jint secondary_id) { 177 jint secondary_id) {
178 ScopedJavaGlobalRef<jobject> jsurface; 178 ScopedJavaGlobalRef<jobject> jsurface;
179 jsurface.Reset(env, surface); 179 jsurface.Reset(env, surface);
180 if (jsurface.is_null()) 180 if (jsurface.is_null())
181 return; 181 return;
182 182
183 DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::UI)); 183 DCHECK_CURRENTLY_ON(BrowserThread::UI);
Lei Zhang 2015/09/08 22:50:22 gah, search and replace fail.
Lei Zhang 2015/09/08 22:59:43 This change has been reverted.
184 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind( 184 BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
185 &SetSurfacePeer, jsurface, pid, primary_id, secondary_id)); 185 &SetSurfacePeer, jsurface, pid, primary_id, secondary_id));
186 } 186 }
187 187
188 void RegisterViewSurface(int surface_id, jobject j_surface) { 188 void RegisterViewSurface(int surface_id, jobject j_surface) {
189 JNIEnv* env = AttachCurrentThread(); 189 JNIEnv* env = AttachCurrentThread();
190 DCHECK(env); 190 DCHECK(env);
191 Java_ChildProcessLauncher_registerViewSurface(env, surface_id, j_surface); 191 Java_ChildProcessLauncher_registerViewSurface(env, surface_id, j_surface);
192 } 192 }
193 193
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) { 228 jboolean IsSingleProcess(JNIEnv* env, const JavaParamRef<jclass>& clazz) {
229 return base::CommandLine::ForCurrentProcess()->HasSwitch( 229 return base::CommandLine::ForCurrentProcess()->HasSwitch(
230 switches::kSingleProcess); 230 switches::kSingleProcess);
231 } 231 }
232 232
233 bool RegisterChildProcessLauncher(JNIEnv* env) { 233 bool RegisterChildProcessLauncher(JNIEnv* env) {
234 return RegisterNativesImpl(env); 234 return RegisterNativesImpl(env);
235 } 235 }
236 236
237 } // namespace content 237 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/media/capture/web_contents_video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698