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

Side by Side Diff: chrome/browser/ui/webui/ntp/most_visited_handler.h

Issue 10182006: Adds the MostVisitedAction stat. This stat will provide a baseline to compare (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync'ed. Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // Callback for the "blacklistURLFromMostVisited" message. 46 // Callback for the "blacklistURLFromMostVisited" message.
47 void HandleBlacklistURL(const base::ListValue* args); 47 void HandleBlacklistURL(const base::ListValue* args);
48 48
49 // Callback for the "removeURLsFromMostVisitedBlacklist" message. 49 // Callback for the "removeURLsFromMostVisitedBlacklist" message.
50 void HandleRemoveURLsFromBlacklist(const base::ListValue* args); 50 void HandleRemoveURLsFromBlacklist(const base::ListValue* args);
51 51
52 // Callback for the "clearMostVisitedURLsBlacklist" message. 52 // Callback for the "clearMostVisitedURLsBlacklist" message.
53 void HandleClearBlacklist(const base::ListValue* args); 53 void HandleClearBlacklist(const base::ListValue* args);
54 54
55 // Callback for the "mostVisitedAction" message.
56 void HandleMostVisitedAction(const base::ListValue* args);
57
58 // Callback for the "mostVisitedSelected" message.
59 void HandleMostVisitedSelected(const base::ListValue* args);
60
55 // content::NotificationObserver implementation. 61 // content::NotificationObserver implementation.
56 virtual void Observe(int type, 62 virtual void Observe(int type,
57 const content::NotificationSource& source, 63 const content::NotificationSource& source,
58 const content::NotificationDetails& details) OVERRIDE; 64 const content::NotificationDetails& details) OVERRIDE;
59 65
60 const std::vector<GURL>& most_visited_urls() const { 66 const std::vector<GURL>& most_visited_urls() const {
61 return most_visited_urls_; 67 return most_visited_urls_;
62 } 68 }
63 69
64 static void RegisterUserPrefs(PrefService* prefs); 70 static void RegisterUserPrefs(PrefService* prefs);
(...skipping 29 matching lines...) Expand all
94 // was clicked on for metrics purposes. 100 // was clicked on for metrics purposes.
95 std::vector<GURL> most_visited_urls_; 101 std::vector<GURL> most_visited_urls_;
96 102
97 // We pre-fetch the first set of result pages. This variable is false until 103 // We pre-fetch the first set of result pages. This variable is false until
98 // we get the first getMostVisited() call. 104 // we get the first getMostVisited() call.
99 bool got_first_most_visited_request_; 105 bool got_first_most_visited_request_;
100 106
101 // Keep the results of the db query here. 107 // Keep the results of the db query here.
102 scoped_ptr<base::ListValue> pages_value_; 108 scoped_ptr<base::ListValue> pages_value_;
103 109
110 // Whether the user has viewed the 'most visited' pane.
111 bool most_visited_viewed_;
112
113 // Whether the user has performed a "tracked" action to leave the page or not.
114 bool user_action_logged_;
115
104 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler); 116 DISALLOW_COPY_AND_ASSIGN(MostVisitedHandler);
105 }; 117 };
106 118
107 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_ 119 #endif // CHROME_BROWSER_UI_WEBUI_NTP_MOST_VISITED_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698