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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java

Issue 340403004: Java wrapper for DistilledPagePrefs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DomDistillerService Java wrapper Created 6 years, 6 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
Index: chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java
new file mode 100644
index 0000000000000000000000000000000000000000..d19920a8b4a12f3749a74f782a4e0223e0e017ac
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerServiceFactory.java
@@ -0,0 +1,35 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.dom_distiller;
+
+import java.util.HashMap;
+
+import org.chromium.chrome.browser.profiles.Profile;
+import org.chromium.components.dom_distiller.core.DomDistillerService;
+/**
robliao 2014/06/26 18:42:15 Add one linebreak above here.
sunangel 2014/06/26 23:31:36 Done.
+ * Returns Java DomDistillerService.
+ */
+public class DomDistillerServiceFactory {
+
+ static HashMap<Profile, DomDistillerService> profiles_to_DDS =
+ new HashMap<Profile, DomDistillerService>();
+
+ public static DomDistillerService getDomDistillerServiceForProfile(Profile
robliao 2014/06/26 18:42:15 Break Profile type declaration on the next line.
sunangel 2014/06/26 23:31:36 Done.
+ profile) {
+ DomDistillerService mDDS;
+ if (profiles_to_DDS.get(profile) == null) {
+ mDDS = new DomDistillerService(
robliao 2014/06/26 18:42:15 This should be 4 spaces over along with all other
sunangel 2014/06/26 23:31:36 Done.
+ nativeGetDomDistillerServiceForProfile(profile));
robliao 2014/06/26 18:42:15 Statement continuation, needs 8 spaces.
sunangel 2014/06/26 23:31:35 Done.
+ profiles_to_DDS.put(profile, mDDS);
+ }
+ else {
+ mDDS = profiles_to_DDS.get(profile);
+ }
+ return mDDS;
+ }
+
+ private static native long nativeGetDomDistillerServiceForProfile(Profile
robliao 2014/06/26 18:42:15 Break Profile type declaration on the next line.
sunangel 2014/06/26 23:31:35 Done.
+ profile);
+}
« no previous file with comments | « no previous file | chrome/browser/android/chrome_jni_registrar.cc » ('j') | chrome/browser/android/chrome_jni_registrar.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698