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

Side by Side Diff: chrome/browser/dom_ui/most_visited_handler.cc

Issue 5088001: Add pyauto hook for getting and manipulating the data underneath the NTP. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/functional
Patch Set: ... Created 10 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/dom_ui/most_visited_handler.h" 5 #include "chrome/browser/dom_ui/most_visited_handler.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 540
541 std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) { 541 std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) {
542 return MD5String(url); 542 return MD5String(url);
543 } 543 }
544 544
545 // static 545 // static
546 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) { 546 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) {
547 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist); 547 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist);
548 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs); 548 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs);
549 } 549 }
550
551 // static
552 std::vector<GURL> MostVisitedHandler::GetPrePopulatedUrls() {
553 const std::vector<MostVisitedPage> pages =
554 MostVisitedHandler::GetPrePopulatedPages();
555 std::vector<GURL> page_urls;
556 for (size_t i = 0; i < pages.size(); ++i)
557 page_urls.push_back(pages[i].url);
558 return page_urls;
559 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698