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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/DownloadController.java

Issue 657163004: Fix Java indentation issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 8
9 import org.chromium.base.CalledByNative; 9 import org.chromium.base.CalledByNative;
10 import org.chromium.base.JNINamespace; 10 import org.chromium.base.JNINamespace;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 /** 127 /**
128 * Notifies the download delegate about progress of a download. Downloads th at use Chrome 128 * Notifies the download delegate about progress of a download. Downloads th at use Chrome
129 * network stack use custom notification to display the progress of download s. 129 * network stack use custom notification to display the progress of download s.
130 */ 130 */
131 @CalledByNative 131 @CalledByNative
132 public void onDownloadUpdated(Context context, String url, String mimeType, 132 public void onDownloadUpdated(Context context, String url, String mimeType,
133 String filename, String path, long contentLength, boolean successful , int downloadId, 133 String filename, String path, long contentLength, boolean successful , int downloadId,
134 int percentCompleted, long timeRemainingInMs) { 134 int percentCompleted, long timeRemainingInMs) {
135 if (sDownloadNotificationService != null) { 135 if (sDownloadNotificationService != null) {
136 DownloadInfo downloadInfo = new DownloadInfo.Builder() 136 DownloadInfo downloadInfo = new DownloadInfo.Builder()
137 .setUrl(url) 137 .setUrl(url)
138 .setMimeType(mimeType) 138 .setMimeType(mimeType)
139 .setFileName(filename) 139 .setFileName(filename)
140 .setFilePath(path) 140 .setFilePath(path)
141 .setContentLength(contentLength) 141 .setContentLength(contentLength)
142 .setIsSuccessful(successful) 142 .setIsSuccessful(successful)
143 .setDescription(filename) 143 .setDescription(filename)
144 .setDownloadId(downloadId) 144 .setDownloadId(downloadId)
145 .setHasDownloadId(true) 145 .setHasDownloadId(true)
146 .setPercentCompleted(percentCompleted) 146 .setPercentCompleted(percentCompleted)
147 .setTimeRemainingInMillis(timeRemainingInMs) 147 .setTimeRemainingInMillis(timeRemainingInMs)
148 .build(); 148 .build();
149 sDownloadNotificationService.onDownloadUpdated(downloadInfo); 149 sDownloadNotificationService.onDownloadUpdated(downloadInfo);
150 } 150 }
151 } 151 }
152 152
153 /** 153 /**
154 * Notifies the download delegate that a dangerous download started. 154 * Notifies the download delegate that a dangerous download started.
155 */ 155 */
156 @CalledByNative 156 @CalledByNative
157 public void onDangerousDownload(ContentViewCore view, String filename, 157 public void onDangerousDownload(ContentViewCore view, String filename,
158 int downloadId) { 158 int downloadId) {
159 ContentViewDownloadDelegate downloadDelegate = downloadDelegateFromView( view); 159 ContentViewDownloadDelegate downloadDelegate = downloadDelegateFromView( view);
160 if (downloadDelegate != null) { 160 if (downloadDelegate != null) {
161 downloadDelegate.onDangerousDownload(filename, downloadId); 161 downloadDelegate.onDangerousDownload(filename, downloadId);
162 } 162 }
163 } 163 }
164 164
165 // native methods 165 // native methods
166 private native void nativeInit(); 166 private native void nativeInit();
167 } 167 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698