OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package org.chromium.chrome.browser.superviseduser; | 5 package org.chromium.chrome.browser.superviseduser; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.content.BroadcastReceiver; | 8 import android.content.BroadcastReceiver; |
9 import android.content.Context; | 9 import android.content.Context; |
10 import android.content.Intent; | 10 import android.content.Intent; |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 ThreadUtils.runOnUiThread(new Runnable() { | 74 ThreadUtils.runOnUiThread(new Runnable() { |
75 @Override | 75 @Override |
76 public void run() { | 76 public void run() { |
77 try { | 77 try { |
78 ChromeBrowserInitializer.getInstance(appContext).handleS
ynchronousStartup(); | 78 ChromeBrowserInitializer.getInstance(appContext).handleS
ynchronousStartup(); |
79 } catch (ProcessInitException e) { | 79 } catch (ProcessInitException e) { |
80 reply.onQueryFinished(0L); | 80 reply.onQueryFinished(0L); |
81 return; | 81 return; |
82 } | 82 } |
83 final ChromeSigninController chromeSigninController = | 83 final ChromeSigninController chromeSigninController = |
84 ChromeSigninController.get(appContext); | 84 ChromeSigninController.get(); |
85 if (chromeSigninController.isSignedIn()) { | 85 if (chromeSigninController.isSignedIn()) { |
86 reply.onQueryFinished(nativeCreateSupervisedUserContentP
rovider()); | 86 reply.onQueryFinished(nativeCreateSupervisedUserContentP
rovider()); |
87 return; | 87 return; |
88 } | 88 } |
89 // Try to sign in, Chrome needs to be signed in to get the U
RL filter. | 89 // Try to sign in, Chrome needs to be signed in to get the U
RL filter. |
90 startForcedSigninProcessor(appContext, new Runnable() { | 90 startForcedSigninProcessor(appContext, new Runnable() { |
91 @Override | 91 @Override |
92 public void run() { | 92 public void run() { |
93 if (!chromeSigninController.isSignedIn()) { | 93 if (!chromeSigninController.isSignedIn()) { |
94 reply.onQueryFinished(0L); | 94 reply.onQueryFinished(0L); |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 344 |
345 native void nativeShouldProceed(long nativeSupervisedUserContentProvider, | 345 native void nativeShouldProceed(long nativeSupervisedUserContentProvider, |
346 SupervisedUserQueryReply queryReply, String url); | 346 SupervisedUserQueryReply queryReply, String url); |
347 | 347 |
348 native void nativeRequestInsert(long nativeSupervisedUserContentProvider, | 348 native void nativeRequestInsert(long nativeSupervisedUserContentProvider, |
349 SupervisedUserInsertReply insertReply, String url); | 349 SupervisedUserInsertReply insertReply, String url); |
350 | 350 |
351 private native void nativeSetFilterForTesting(long nativeSupervisedUserConte
ntProvider); | 351 private native void nativeSetFilterForTesting(long nativeSupervisedUserConte
ntProvider); |
352 | 352 |
353 } | 353 } |
OLD | NEW |