| OLD | NEW |
| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "app/animation.h" | 10 #include "app/animation.h" |
| 11 #include "app/l10n_util.h" | 11 #include "app/l10n_util.h" |
| 12 #include "app/resource_bundle.h" | 12 #include "app/resource_bundle.h" |
| 13 #include "app/theme_provider.h" | 13 #include "app/theme_provider.h" |
| 14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 15 #include "base/file_util.h" | 15 #include "base/file_util.h" |
| 16 #include "base/ref_counted_memory.h" | 16 #include "base/ref_counted_memory.h" |
| 17 #include "base/string16.h" | 17 #include "base/string16.h" |
| 18 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
| 19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
| 20 #include "base/values.h" | 20 #include "base/values.h" |
| 21 #include "chrome/browser/chrome_thread.h" | 21 #include "chrome/browser/chrome_thread.h" |
| 22 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 22 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
| 23 #include "chrome/browser/google_util.h" | 23 #include "chrome/browser/google_util.h" |
| 24 #include "chrome/browser/pref_service.h" | 24 #include "chrome/browser/prefs/pref_service.h" |
| 25 #include "chrome/browser/profile.h" | 25 #include "chrome/browser/profile.h" |
| 26 #include "chrome/browser/themes/browser_theme_provider.h" | 26 #include "chrome/browser/themes/browser_theme_provider.h" |
| 27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
| 28 #include "chrome/common/extensions/extension.h" | 28 #include "chrome/common/extensions/extension.h" |
| 29 #include "chrome/common/extensions/extension_constants.h" | 29 #include "chrome/common/extensions/extension_constants.h" |
| 30 #include "chrome/common/jstemplate_builder.h" | 30 #include "chrome/common/jstemplate_builder.h" |
| 31 #include "chrome/common/notification_service.h" | 31 #include "chrome/common/notification_service.h" |
| 32 #include "chrome/common/notification_type.h" | 32 #include "chrome/common/notification_type.h" |
| 33 #include "chrome/common/pref_names.h" | 33 #include "chrome/common/pref_names.h" |
| 34 #include "chrome/common/url_constants.h" | 34 #include "chrome/common/url_constants.h" |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 452 // Create the string from our template and the replacements. | 452 // Create the string from our template and the replacements. |
| 453 const std::string css_string = ReplaceStringPlaceholders( | 453 const std::string css_string = ReplaceStringPlaceholders( |
| 454 new_tab_theme_css, subst, NULL); | 454 new_tab_theme_css, subst, NULL); |
| 455 std::string full_css = ReplaceStringPlaceholders(css_string, subst2, NULL); | 455 std::string full_css = ReplaceStringPlaceholders(css_string, subst2, NULL); |
| 456 | 456 |
| 457 new_tab_css_ = new RefCountedBytes; | 457 new_tab_css_ = new RefCountedBytes; |
| 458 new_tab_css_->data.resize(full_css.size()); | 458 new_tab_css_->data.resize(full_css.size()); |
| 459 std::copy(full_css.begin(), full_css.end(), | 459 std::copy(full_css.begin(), full_css.end(), |
| 460 new_tab_css_->data.begin()); | 460 new_tab_css_->data.begin()); |
| 461 } | 461 } |
| OLD | NEW |