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

Side by Side Diff: components/navigation_interception/intercept_navigation_delegate.cc

Issue 1004933003: favor DCHECK_CURRENTLY_ON for better logs in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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 "components/navigation_interception/intercept_navigation_delegate.h" 5 #include "components/navigation_interception/intercept_navigation_delegate.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "base/android/jni_string.h" 8 #include "base/android/jni_string.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "components/navigation_interception/intercept_navigation_resource_throt tle.h" 10 #include "components/navigation_interception/intercept_navigation_resource_throt tle.h"
(...skipping 14 matching lines...) Expand all
25 25
26 namespace navigation_interception { 26 namespace navigation_interception {
27 27
28 namespace { 28 namespace {
29 29
30 const void* kInterceptNavigationDelegateUserDataKey = 30 const void* kInterceptNavigationDelegateUserDataKey =
31 &kInterceptNavigationDelegateUserDataKey; 31 &kInterceptNavigationDelegateUserDataKey;
32 32
33 bool CheckIfShouldIgnoreNavigationOnUIThread(WebContents* source, 33 bool CheckIfShouldIgnoreNavigationOnUIThread(WebContents* source,
34 const NavigationParams& params) { 34 const NavigationParams& params) {
35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 35 DCHECK_CURRENTLY_ON(BrowserThread::UI);
36 DCHECK(source); 36 DCHECK(source);
37 37
38 InterceptNavigationDelegate* intercept_navigation_delegate = 38 InterceptNavigationDelegate* intercept_navigation_delegate =
39 InterceptNavigationDelegate::Get(source); 39 InterceptNavigationDelegate::Get(source);
40 if (!intercept_navigation_delegate) 40 if (!intercept_navigation_delegate)
41 return false; 41 return false;
42 42
43 return intercept_navigation_delegate->ShouldIgnoreNavigation(params); 43 return intercept_navigation_delegate->ShouldIgnoreNavigation(params);
44 } 44 }
45 45
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 jobject_params.obj()); 95 jobject_params.obj());
96 } 96 }
97 97
98 // Register native methods. 98 // Register native methods.
99 99
100 bool RegisterInterceptNavigationDelegate(JNIEnv* env) { 100 bool RegisterInterceptNavigationDelegate(JNIEnv* env) {
101 return RegisterNativesImpl(env); 101 return RegisterNativesImpl(env);
102 } 102 }
103 103
104 } // namespace navigation_interception 104 } // namespace navigation_interception
OLDNEW
« no previous file with comments | « components/nacl/browser/pnacl_host.cc ('k') | components/navigation_interception/intercept_navigation_resource_throttle.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698