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

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

Issue 7529051: ntp: use web store as default mv tile instead of themes gallery (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updated thumbnail Created 9 years, 4 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
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 url.url); 284 url.url);
285 if (!url.favicon_url.is_empty()) 285 if (!url.favicon_url.is_empty())
286 page_value->SetString("faviconUrl", url.favicon_url.spec()); 286 page_value->SetString("faviconUrl", url.favicon_url.spec());
287 287
288 // Special case for prepopulated pages: thumbnailUrl is different from url. 288 // Special case for prepopulated pages: thumbnailUrl is different from url.
289 if (url.url.spec() == l10n_util::GetStringUTF8(IDS_CHROME_WELCOME_URL)) { 289 if (url.url.spec() == l10n_util::GetStringUTF8(IDS_CHROME_WELCOME_URL)) {
290 page_value->SetString("thumbnailUrl", 290 page_value->SetString("thumbnailUrl",
291 "chrome://theme/IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL"); 291 "chrome://theme/IDR_NEWTAB_CHROME_WELCOME_PAGE_THUMBNAIL");
292 page_value->SetString("faviconDominantColor", "rgb(0, 147, 60)"); 292 page_value->SetString("faviconDominantColor", "rgb(0, 147, 60)");
293 } else if (url.url.spec() == 293 } else if (url.url.spec() ==
294 l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)) { 294 l10n_util::GetStringUTF8(IDS_WEBSTORE_URL)) {
295 page_value->SetString("thumbnailUrl", 295 page_value->SetString("thumbnailUrl",
296 "chrome://theme/IDR_NEWTAB_THEMES_GALLERY_THUMBNAIL"); 296 "chrome://theme/IDR_NEWTAB_WEBSTORE_THUMBNAIL");
297 page_value->SetString("faviconDominantColor", "rgb(63, 132, 197)"); 297 page_value->SetString("faviconDominantColor", "rgb(63, 132, 197)");
298 } 298 }
299 299
300 history::TopSites* ts = web_ui_->GetProfile()->GetTopSites(); 300 history::TopSites* ts = web_ui_->GetProfile()->GetTopSites();
301 if (ts && ts->IsURLPinned(url.url)) 301 if (ts && ts->IsURLPinned(url.url))
302 page_value->SetBoolean("pinned", true); 302 page_value->SetBoolean("pinned", true);
303 pages_value_->Append(page_value); 303 pages_value_->Append(page_value);
304 } 304 }
305 } 305 }
306 306
(...skipping 25 matching lines...) Expand all
332 return base::MD5String(url); 332 return base::MD5String(url);
333 } 333 }
334 334
335 // static 335 // static
336 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) { 336 void MostVisitedHandler::RegisterUserPrefs(PrefService* prefs) {
337 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist, 337 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedURLsBlacklist,
338 PrefService::UNSYNCABLE_PREF); 338 PrefService::UNSYNCABLE_PREF);
339 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs, 339 prefs->RegisterDictionaryPref(prefs::kNTPMostVisitedPinnedURLs,
340 PrefService::UNSYNCABLE_PREF); 340 PrefService::UNSYNCABLE_PREF);
341 } 341 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698