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

Unified Diff: chrome/browser/dom_ui/most_visited_handler.h

Issue 3061009: Speculative fix for crash in DOMUIThumbnailSource. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: msvc++ caught this Created 10 years, 5 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/dom_ui/dom_ui_thumbnail_source.cc ('k') | chrome/browser/dom_ui/most_visited_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/most_visited_handler.h
diff --git a/chrome/browser/dom_ui/most_visited_handler.h b/chrome/browser/dom_ui/most_visited_handler.h
index 8f74e25e99bcad47eb4f9eb54e652fd209df7384..bc6ac80bbab9faf467bdf306e6f93d6de75b13c2 100644
--- a/chrome/browser/dom_ui/most_visited_handler.h
+++ b/chrome/browser/dom_ui/most_visited_handler.h
@@ -14,9 +14,9 @@
#include "chrome/browser/history/history_types.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/notification_registrar.h"
-#include "googleurl/src/gurl.h"
class DictionaryValue;
+class GURL;
class ListValue;
class PageUsageData;
class PrefService;
@@ -26,14 +26,6 @@ class Value;
class MostVisitedHandler : public DOMMessageHandler,
public NotificationObserver {
public:
- // This struct is used when getting the pre-populated pages in case the user
- // hasn't filled up his most visited pages.
- struct MostVisitedPage {
- std::wstring title;
- GURL url;
- GURL thumbnail_url;
- GURL favicon_url;
- };
MostVisitedHandler();
virtual ~MostVisitedHandler() { }
@@ -75,6 +67,8 @@ class MostVisitedHandler : public DOMMessageHandler,
static GURL GetChromeStoreURLWithLocale();
private:
+ struct MostVisitedPage;
+
// Send a request to the HistoryService to get the most visited pages.
void StartQueryForMostVisited();
@@ -111,6 +105,11 @@ class MostVisitedHandler : public DOMMessageHandler,
// Returns true if we should treat this as the first run of the new tab page.
bool IsFirstRun();
+ // Adds the fields in the page to the dictionary.
+ static void SetMostVisistedPage(
+ DictionaryValue* dict,
+ const MostVisitedHandler::MostVisitedPage& page);
+
static const std::vector<MostVisitedPage>& GetPrePopulatedPages();
static MostVisitedPage GetChromeStorePage();
« no previous file with comments | « chrome/browser/dom_ui/dom_ui_thumbnail_source.cc ('k') | chrome/browser/dom_ui/most_visited_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698