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

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

Issue 6905044: Refactor preference syncing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Really fix. And rebase Created 9 years, 7 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/webui/ntp/most_visited_handler.h" 5 #include "chrome/browser/ui/webui/ntp/most_visited_handler.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 if (ts) 361 if (ts)
362 ts->AddBlacklistedURL(url); 362 ts->AddBlacklistedURL(url);
363 } 363 }
364 364
365 std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) { 365 std::string MostVisitedHandler::GetDictionaryKeyForURL(const std::string& url) {
366 return MD5String(url); 366 return MD5String(url);
367 } 367 }
368 368
369 // static 369 // static
370 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) { 370 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) {
371 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist); 371 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist,
372 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs); 372 PrefService::UNSYNCABLE_PREF);
373 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs,
374 PrefService::UNSYNCABLE_PREF);
373 } 375 }
374 376
375 // static 377 // static
376 std::vector<GURL> MostVisitedHandler::GetPrePopulatedUrls() { 378 std::vector<GURL> MostVisitedHandler::GetPrePopulatedUrls() {
377 const std::vector<MostVisitedPage> pages = 379 const std::vector<MostVisitedPage> pages =
378 MostVisitedHandler::GetPrePopulatedPages(); 380 MostVisitedHandler::GetPrePopulatedPages();
379 std::vector<GURL> page_urls; 381 std::vector<GURL> page_urls;
380 for (size_t i = 0; i < pages.size(); ++i) 382 for (size_t i = 0; i < pages.size(); ++i)
381 page_urls.push_back(pages[i].url); 383 page_urls.push_back(pages[i].url);
382 return page_urls; 384 return page_urls;
383 } 385 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_actions_container.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698