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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsController.java

Issue 1871583002: [NTP Snippets] Merge SnippetsController into SnippetsBridge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@snippets_bridge_cleanup
Patch Set: review 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 side-by-side diff with in-line comments
Download patch
Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsController.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsController.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsController.java
deleted file mode 100644
index 64b33f042072b08056f60aec4f154cf721ef26bb..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsController.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2016 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.ntp.snippets;
-
-import org.chromium.base.ThreadUtils;
-import org.chromium.base.VisibleForTesting;
-import org.chromium.chrome.browser.profiles.Profile;
-
-/**
- * The main controller for calling into the native snippets component to fetch snippets.
- */
-public class SnippetsController {
- private static SnippetsController sInstance;
-
- private long mNativeSnippetsController;
-
- public SnippetsController() {}
-
- /**
- * Fetches new snippets.
- */
- public void fetchSnippets() {
- nativeFetchSnippets(Profile.getLastUsedProfile());
- }
-
- /**
- * Retrieve the singleton instance of this class.
- *
- * @return the singleton instance.
- */
- public static SnippetsController get() {
- ThreadUtils.assertOnUiThread();
- if (sInstance == null) {
- sInstance = new SnippetsController();
- }
- return sInstance;
- }
-
- @VisibleForTesting
- public static void setInstanceForTesting(SnippetsController instance) {
- sInstance = instance;
- }
-
- private native void nativeFetchSnippets(Profile profile);
-}
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698