| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |