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/most_visited_sites.h

Issue 884213005: Update {virtual,override,final} to follow C++11 style. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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 unified diff | Download patch
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 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ 5 #ifndef CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_
6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ 6 #define CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 27 matching lines...) Expand all
38 jobject j_observer, 38 jobject j_observer,
39 jint num_sites); 39 jint num_sites);
40 void GetURLThumbnail(JNIEnv* env, 40 void GetURLThumbnail(JNIEnv* env,
41 jobject obj, 41 jobject obj,
42 jstring url, 42 jstring url,
43 jobject j_callback); 43 jobject j_callback);
44 void BlacklistUrl(JNIEnv* env, jobject obj, jstring j_url); 44 void BlacklistUrl(JNIEnv* env, jobject obj, jstring j_url);
45 void RecordOpenedMostVisitedItem(JNIEnv* env, jobject obj, jint index); 45 void RecordOpenedMostVisitedItem(JNIEnv* env, jobject obj, jint index);
46 46
47 // ProfileSyncServiceObserver implementation. 47 // ProfileSyncServiceObserver implementation.
48 virtual void OnStateChanged() override; 48 void OnStateChanged() override;
49 49
50 // Registers JNI methods. 50 // Registers JNI methods.
51 static bool Register(JNIEnv* env); 51 static bool Register(JNIEnv* env);
52 52
53 private: 53 private:
54 // The source of the Most Visited sites. 54 // The source of the Most Visited sites.
55 enum MostVisitedSource { 55 enum MostVisitedSource {
56 TOP_SITES, 56 TOP_SITES,
57 SUGGESTIONS_SERVICE 57 SUGGESTIONS_SERVICE
58 }; 58 };
59 59
60 virtual ~MostVisitedSites(); 60 ~MostVisitedSites() override;
61 void QueryMostVisitedURLs(); 61 void QueryMostVisitedURLs();
62 62
63 // Initialize the query to Top Sites. Called if the SuggestionsService is not 63 // Initialize the query to Top Sites. Called if the SuggestionsService is not
64 // enabled, or if it returns no data. 64 // enabled, or if it returns no data.
65 void InitiateTopSitesQuery(); 65 void InitiateTopSitesQuery();
66 66
67 // Callback for when data is available from TopSites. 67 // Callback for when data is available from TopSites.
68 void OnMostVisitedURLsAvailable( 68 void OnMostVisitedURLsAvailable(
69 base::android::ScopedJavaGlobalRef<jobject>* j_observer, 69 base::android::ScopedJavaGlobalRef<jobject>* j_observer,
70 int num_sites, 70 int num_sites,
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 MostVisitedSource mv_source_; 132 MostVisitedSource mv_source_;
133 133
134 // For callbacks may be run after destruction. 134 // For callbacks may be run after destruction.
135 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_; 135 base::WeakPtrFactory<MostVisitedSites> weak_ptr_factory_;
136 136
137 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites); 137 DISALLOW_COPY_AND_ASSIGN(MostVisitedSites);
138 }; 138 };
139 139
140 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_ 140 #endif // CHROME_BROWSER_ANDROID_MOST_VISITED_SITES_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/logo_service.cc ('k') | chrome/browser/android/omnibox/answers_image_bridge.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698