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

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

Issue 462011: Notify user that Chrome is already synced if promo banner "sync me" link is c... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/ntp_resource_cache.h" 5 #include "chrome/browser/dom_ui/ntp_resource_cache.h"
6 6
7 #include "app/animation.h" 7 #include "app/animation.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "app/theme_provider.h" 10 #include "app/theme_provider.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 l10n_util::GetString(IDS_NEW_TAB_SHOW_HIDE_BOOKMARK_SYNC)); 342 l10n_util::GetString(IDS_NEW_TAB_SHOW_HIDE_BOOKMARK_SYNC));
343 localized_strings.SetString(L"promonew", 343 localized_strings.SetString(L"promonew",
344 l10n_util::GetString(IDS_NTP_PROMOTION_NEW)); 344 l10n_util::GetString(IDS_NTP_PROMOTION_NEW));
345 std::wstring extensionLink = ASCIIToWide( 345 std::wstring extensionLink = ASCIIToWide(
346 google_util::AppendGoogleLocaleParam( 346 google_util::AppendGoogleLocaleParam(
347 GURL(extension_urls::kGalleryBrowsePrefix)).spec()); 347 GURL(extension_urls::kGalleryBrowsePrefix)).spec());
348 localized_strings.SetString(L"promomessage", 348 localized_strings.SetString(L"promomessage",
349 l10n_util::GetStringF(IDS_NTP_PROMO_MESSAGE, 349 l10n_util::GetStringF(IDS_NTP_PROMO_MESSAGE,
350 l10n_util::GetString(IDS_PRODUCT_NAME), extensionLink)); 350 l10n_util::GetString(IDS_PRODUCT_NAME), extensionLink));
351 localized_strings.SetString(L"extensionslink", extensionLink); 351 localized_strings.SetString(L"extensionslink", extensionLink);
352 localized_strings.SetString(L"close", l10n_util::GetString(IDS_CLOSE));
352 353
353 // Don't initiate the sync related message passing with the page if the sync 354 // Don't initiate the sync related message passing with the page if the sync
354 // code is not present. 355 // code is not present.
355 if (profile_->GetProfileSyncService()) 356 if (profile_->GetProfileSyncService())
356 localized_strings.SetString(L"syncispresent", "true"); 357 localized_strings.SetString(L"syncispresent", "true");
357 else 358 else
358 localized_strings.SetString(L"syncispresent", "false"); 359 localized_strings.SetString(L"syncispresent", "false");
359 360
360 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings); 361 ChromeURLDataManager::DataSource::SetFontAndTextDirection(&localized_strings);
361 362
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // Create the string from our template and the replacements. 542 // Create the string from our template and the replacements.
542 const std::string css_string = ReplaceStringPlaceholders( 543 const std::string css_string = ReplaceStringPlaceholders(
543 new_tab_theme_css, subst, NULL); 544 new_tab_theme_css, subst, NULL);
544 std::string full_css = ReplaceStringPlaceholders(css_string, subst2, NULL); 545 std::string full_css = ReplaceStringPlaceholders(css_string, subst2, NULL);
545 546
546 new_tab_css_ = new RefCountedBytes; 547 new_tab_css_ = new RefCountedBytes;
547 new_tab_css_->data.resize(full_css.size()); 548 new_tab_css_->data.resize(full_css.size());
548 std::copy(full_css.begin(), full_css.end(), 549 std::copy(full_css.begin(), full_css.end(),
549 new_tab_css_->data.begin()); 550 new_tab_css_->data.begin());
550 } 551 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_page_sync_handler.cc ('k') | chrome/browser/resources/new_new_tab.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698