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

Side by Side Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

Issue 2457033003: Add chrome://popular-sites-internals/ to iOS. (Closed)
Patch Set: Break out ...Client. Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/android/ntp/popular_sites.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h" 5 #include "chrome/browser/android/ntp/most_visited_sites_bridge.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 JNIEnv* env = AttachCurrentThread(); 152 JNIEnv* env = AttachCurrentThread();
153 Java_MostVisitedURLsObserver_onIconMadeAvailable( 153 Java_MostVisitedURLsObserver_onIconMadeAvailable(
154 env, observer_, ConvertUTF8ToJavaString(env, site_url.spec())); 154 env, observer_, ConvertUTF8ToJavaString(env, site_url.spec()));
155 } 155 }
156 156
157 MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile) 157 MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile)
158 : supervisor_(profile), 158 : supervisor_(profile),
159 most_visited_(profile->GetPrefs(), 159 most_visited_(profile->GetPrefs(),
160 TopSitesFactory::GetForProfile(profile), 160 TopSitesFactory::GetForProfile(profile),
161 SuggestionsServiceFactory::GetForProfile(profile), 161 SuggestionsServiceFactory::GetForProfile(profile),
162 base::MakeUnique<ntp_tiles::PopularSites>( 162 ChromePopularSites::NewForProfile(profile),
163 BrowserThread::GetBlockingPool(),
164 profile->GetPrefs(),
165 TemplateURLServiceFactory::GetForProfile(profile),
166 g_browser_process->variations_service(),
167 profile->GetRequestContext(),
168 ChromePopularSites::GetDirectory(),
169 base::Bind(safe_json::SafeJsonParser::Parse)),
170 base::MakeUnique<ntp_tiles::IconCacher>( 163 base::MakeUnique<ntp_tiles::IconCacher>(
171 FaviconServiceFactory::GetForProfile( 164 FaviconServiceFactory::GetForProfile(
172 profile, 165 profile,
173 ServiceAccessType::IMPLICIT_ACCESS), 166 ServiceAccessType::IMPLICIT_ACCESS),
174 base::MakeUnique<image_fetcher::ImageFetcherImpl>( 167 base::MakeUnique<image_fetcher::ImageFetcherImpl>(
175 base::MakeUnique<suggestions::ImageDecoderImpl>(), 168 base::MakeUnique<suggestions::ImageDecoderImpl>(),
176 profile->GetRequestContext())), 169 profile->GetRequestContext())),
177 &supervisor_) { 170 &supervisor_) {
178 // Register the thumbnails debugging page. 171 // Register the thumbnails debugging page.
179 // TODO(sfiera): find thumbnails a home. They don't belong here. 172 // TODO(sfiera): find thumbnails a home. They don't belong here.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 } 238 }
246 239
247 static jlong Init(JNIEnv* env, 240 static jlong Init(JNIEnv* env,
248 const JavaParamRef<jobject>& obj, 241 const JavaParamRef<jobject>& obj,
249 const JavaParamRef<jobject>& jprofile) { 242 const JavaParamRef<jobject>& jprofile) {
250 MostVisitedSitesBridge* most_visited_sites = 243 MostVisitedSitesBridge* most_visited_sites =
251 new MostVisitedSitesBridge( 244 new MostVisitedSitesBridge(
252 ProfileAndroid::FromProfileAndroid(jprofile)); 245 ProfileAndroid::FromProfileAndroid(jprofile));
253 return reinterpret_cast<intptr_t>(most_visited_sites); 246 return reinterpret_cast<intptr_t>(most_visited_sites);
254 } 247 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/android/ntp/popular_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698