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

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

Issue 387333002: Make DownloadController singleton instance thread safe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/java/src/org/chromium/content/browser/DownloadController.java
diff --git a/content/public/android/java/src/org/chromium/content/browser/DownloadController.java b/content/public/android/java/src/org/chromium/content/browser/DownloadController.java
index 0d4a0883928cc1a591b23d2239863a0bcc8853a4..e7c8710709aa5cd7ba0cdedc40a5e11ad552e089 100644
--- a/content/public/android/java/src/org/chromium/content/browser/DownloadController.java
+++ b/content/public/android/java/src/org/chromium/content/browser/DownloadController.java
@@ -17,7 +17,7 @@ import org.chromium.base.JNINamespace;
@JNINamespace("content")
public class DownloadController {
private static final String LOGTAG = "DownloadController";
- private static DownloadController sInstance;
+ private static final DownloadController sInstance = new DownloadController();
/**
* Class for notifying the application that download has completed.
@@ -40,9 +40,6 @@ public class DownloadController {
@CalledByNative
public static DownloadController getInstance() {
- if (sInstance == null) {
- sInstance = new DownloadController();
- }
return sInstance;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698