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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_controller.cc

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
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_controller.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/ntp_snippets_controller.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_controller.cc b/chrome/browser/android/ntp/ntp_snippets_controller.cc
deleted file mode 100644
index 496ec56c7c7697bc9dbacc11b00bfdee35f49fe2..0000000000000000000000000000000000000000
--- a/chrome/browser/android/ntp/ntp_snippets_controller.cc
+++ /dev/null
@@ -1,33 +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.
-
-#include "chrome/browser/android/ntp/ntp_snippets_controller.h"
-
-#include <jni.h>
-
-#include "base/android/jni_android.h"
-#include "base/android/scoped_java_ref.h"
-#include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/profiles/profile_android.h"
-#include "components/ntp_snippets/ntp_snippets_service.h"
-#include "jni/SnippetsController_jni.h"
-
-using base::android::JavaParamRef;
-
-static void FetchSnippets(JNIEnv* env,
- const JavaParamRef<jobject>& obj,
- const JavaParamRef<jobject>& jprofile) {
- Profile* profile = ProfileAndroid::FromProfileAndroid(jprofile);
- if (profile) {
- ntp_snippets::NTPSnippetsService* ntp_snippets_service =
- NTPSnippetsServiceFactory::GetForProfile(profile);
- ntp_snippets_service->FetchSnippets();
- }
-}
-
-// static
-bool NTPSnippetsController::Register(JNIEnv* env) {
- return RegisterNativesImpl(env);
-}
« no previous file with comments | « chrome/browser/android/ntp/ntp_snippets_controller.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698