OLD | NEW |
---|---|
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/ntp_resource_cache.h" | 5 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
476 // scale indefinitely (we'd need N*(N+1)/2 different strings to represent | 476 // scale indefinitely (we'd need N*(N+1)/2 different strings to represent |
477 // all the combinations of unacknowledged types). But for now, we just | 477 // all the combinations of unacknowledged types). But for now, we just |
478 // have sessions and typed urls so this is OK. | 478 // have sessions and typed urls so this is OK. |
479 if (unacknowledged.test(syncable::SESSIONS) && | 479 if (unacknowledged.test(syncable::SESSIONS) && |
480 unacknowledged.test(syncable::TYPED_URLS)) { | 480 unacknowledged.test(syncable::TYPED_URLS)) { |
481 return l10n_util::GetStringUTF16(IDS_SYNC_ADDED_SESSIONS_AND_TYPED_URLS); | 481 return l10n_util::GetStringUTF16(IDS_SYNC_ADDED_SESSIONS_AND_TYPED_URLS); |
482 } else if (unacknowledged.test(syncable::SESSIONS)) { | 482 } else if (unacknowledged.test(syncable::SESSIONS)) { |
483 return l10n_util::GetStringUTF16(IDS_SYNC_ADDED_SESSIONS); | 483 return l10n_util::GetStringUTF16(IDS_SYNC_ADDED_SESSIONS); |
484 } else if (unacknowledged.test(syncable::TYPED_URLS)) { | 484 } else if (unacknowledged.test(syncable::TYPED_URLS)) { |
485 return l10n_util::GetStringUTF16(IDS_SYNC_ADDED_TYPED_URLS); | 485 return l10n_util::GetStringUTF16(IDS_SYNC_ADDED_TYPED_URLS); |
486 } else if (unacknowledged.test(syncable::EXTENSION_SETTINGS)) { | |
not at google - send to devlin
2011/08/26 09:58:47
I'm not sure what this is about but the CHECK on t
| |
487 LOG(ERROR) << "Got unacknowledged settings sync something. What???"; | |
486 } else { | 488 } else { |
487 // Shouldn't be possible for any other types to be unacknowledged. | 489 // Shouldn't be possible for any other types to be unacknowledged. |
488 CHECK(!unacknowledged.any()); | 490 CHECK(!unacknowledged.any()); |
489 } | 491 } |
490 } | 492 } |
491 return string16(); | 493 return string16(); |
492 } | 494 } |
493 | 495 |
494 void NTPResourceCache::CreateNewTabIncognitoCSS() { | 496 void NTPResourceCache::CreateNewTabIncognitoCSS() { |
495 ui::ThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_); | 497 ui::ThemeProvider* tp = ThemeServiceFactory::GetForProfile(profile_); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
611 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; | 613 IDR_NEW_TAB_4_THEME_CSS : IDR_NEW_TAB_THEME_CSS; |
612 static const base::StringPiece new_tab_theme_css( | 614 static const base::StringPiece new_tab_theme_css( |
613 ResourceBundle::GetSharedInstance().GetRawDataResource( | 615 ResourceBundle::GetSharedInstance().GetRawDataResource( |
614 ntp_css_resource_id)); | 616 ntp_css_resource_id)); |
615 | 617 |
616 // Create the string from our template and the replacements. | 618 // Create the string from our template and the replacements. |
617 std::string css_string; | 619 std::string css_string; |
618 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); | 620 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); |
619 new_tab_css_ = base::RefCountedString::TakeString(&css_string); | 621 new_tab_css_ = base::RefCountedString::TakeString(&css_string); |
620 } | 622 } |
OLD | NEW |