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

Side by Side Diff: chrome/browser/android/most_visited_sites.cc

Issue 766053010: SuggestionsService undo blacklist functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix uninitialized test variable Created 6 years 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 | components/suggestions/blacklist_store.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/most_visited_sites.h" 5 #include "chrome/browser/android/most_visited_sites.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 297
298 case SUGGESTIONS_SERVICE: { 298 case SUGGESTIONS_SERVICE: {
299 SuggestionsService* suggestions_service = 299 SuggestionsService* suggestions_service =
300 SuggestionsServiceFactory::GetForProfile(profile_); 300 SuggestionsServiceFactory::GetForProfile(profile_);
301 DCHECK(suggestions_service); 301 DCHECK(suggestions_service);
302 suggestions_service->BlacklistURL( 302 suggestions_service->BlacklistURL(
303 GURL(url), 303 GURL(url),
304 base::Bind( 304 base::Bind(
305 &MostVisitedSites::OnSuggestionsProfileAvailable, 305 &MostVisitedSites::OnSuggestionsProfileAvailable,
306 weak_ptr_factory_.GetWeakPtr(), 306 weak_ptr_factory_.GetWeakPtr(),
307 base::Owned(new ScopedJavaGlobalRef<jobject>(observer_)))); 307 base::Owned(new ScopedJavaGlobalRef<jobject>(observer_))),
308 base::Closure());
308 break; 309 break;
309 } 310 }
310 } 311 }
311 } 312 }
312 313
313 void MostVisitedSites::RecordOpenedMostVisitedItem(JNIEnv* env, 314 void MostVisitedSites::RecordOpenedMostVisitedItem(JNIEnv* env,
314 jobject obj, 315 jobject obj,
315 jint index) { 316 jint index) {
316 switch (mv_source_) { 317 switch (mv_source_) {
317 case TOP_SITES: { 318 case TOP_SITES: {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 num_empty_thumbs_ = 0; 527 num_empty_thumbs_ = 0;
527 UMA_HISTOGRAM_SPARSE_SLOWLY(kNumServerTilesHistogramName, num_server_thumbs_); 528 UMA_HISTOGRAM_SPARSE_SLOWLY(kNumServerTilesHistogramName, num_server_thumbs_);
528 num_server_thumbs_ = 0; 529 num_server_thumbs_ = 0;
529 } 530 }
530 531
531 static jlong Init(JNIEnv* env, jobject obj, jobject jprofile) { 532 static jlong Init(JNIEnv* env, jobject obj, jobject jprofile) {
532 MostVisitedSites* most_visited_sites = 533 MostVisitedSites* most_visited_sites =
533 new MostVisitedSites(ProfileAndroid::FromProfileAndroid(jprofile)); 534 new MostVisitedSites(ProfileAndroid::FromProfileAndroid(jprofile));
534 return reinterpret_cast<intptr_t>(most_visited_sites); 535 return reinterpret_cast<intptr_t>(most_visited_sites);
535 } 536 }
OLDNEW
« no previous file with comments | « no previous file | components/suggestions/blacklist_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698