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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContents.java

Issue 1828193002: DCHECK that jstring to C++ string conversions don't pass in null. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: braces Created 4 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
« no previous file with comments | « no previous file | base/android/content_uri_utils.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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Activity; 8 import android.app.Activity;
9 import android.content.ComponentCallbacks2; 9 import android.content.ComponentCallbacks2;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 1340
1341 public Bitmap getFavicon() { 1341 public Bitmap getFavicon() {
1342 if (isDestroyed(WARN)) return null; 1342 if (isDestroyed(WARN)) return null;
1343 return mFavicon; 1343 return mFavicon;
1344 } 1344 }
1345 1345
1346 private void requestVisitedHistoryFromClient() { 1346 private void requestVisitedHistoryFromClient() {
1347 ValueCallback<String[]> callback = new ValueCallback<String[]>() { 1347 ValueCallback<String[]> callback = new ValueCallback<String[]>() {
1348 @Override 1348 @Override
1349 public void onReceiveValue(final String[] value) { 1349 public void onReceiveValue(final String[] value) {
1350 if (value != null) {
1351 // Replace null values with empty strings, because they can' t be represented as
1352 // native strings.
1353 for (int i = 0; i < value.length; i++) {
1354 if (value[i] == null) value[i] = "";
1355 }
1356 }
1357
1350 ThreadUtils.runOnUiThread(new Runnable() { 1358 ThreadUtils.runOnUiThread(new Runnable() {
1351 @Override 1359 @Override
1352 public void run() { 1360 public void run() {
1353 if (!isDestroyed(NO_WARN)) nativeAddVisitedLinks(mNative AwContents, value); 1361 if (!isDestroyed(NO_WARN)) nativeAddVisitedLinks(mNative AwContents, value);
1354 } 1362 }
1355 }); 1363 });
1356 } 1364 }
1357 }; 1365 };
1358 mContentsClient.getVisitedHistory(callback); 1366 mContentsClient.getVisitedHistory(callback);
1359 } 1367 }
(...skipping 1946 matching lines...) Expand 10 before | Expand all | Expand 10 after
3306 long resources); 3314 long resources);
3307 3315
3308 private native void nativePostMessageToFrame(long nativeAwContents, String f rameId, 3316 private native void nativePostMessageToFrame(long nativeAwContents, String f rameId,
3309 String message, String targetOrigin, int[] msgPorts); 3317 String message, String targetOrigin, int[] msgPorts);
3310 3318
3311 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess agePort[] ports); 3319 private native void nativeCreateMessageChannel(long nativeAwContents, AwMess agePort[] ports);
3312 3320
3313 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC ontents); 3321 private native void nativeGrantFileSchemeAccesstoChildProcess(long nativeAwC ontents);
3314 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw Contents); 3322 private native void nativeResumeLoadingCreatedPopupWebContents(long nativeAw Contents);
3315 } 3323 }
OLDNEW
« no previous file with comments | « no previous file | base/android/content_uri_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698