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

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

Issue 6532069: Reland "WebUI: Move more files from chrome/browser/dom_ui to chrome/browser/webui. Part 5." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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/dom_ui/new_tab_ui.cc ('k') | chrome/browser/dom_ui/options/options_ui.h » ('j') | 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/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 "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/ref_counted_memory.h" 12 #include "base/ref_counted_memory.h"
13 #include "base/string16.h" 13 #include "base/string16.h"
14 #include "base/string_number_conversions.h" 14 #include "base/string_number_conversions.h"
15 #include "base/time.h" 15 #include "base/time.h"
16 #include "base/utf_string_conversions.h" 16 #include "base/utf_string_conversions.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "chrome/browser/browser_thread.h" 18 #include "chrome/browser/browser_thread.h"
19 #include "chrome/browser/dom_ui/chrome_url_data_manager.h"
20 #include "chrome/browser/dom_ui/shown_sections_handler.h" 19 #include "chrome/browser/dom_ui/shown_sections_handler.h"
21 #include "chrome/browser/google/google_util.h" 20 #include "chrome/browser/google/google_util.h"
22 #include "chrome/browser/prefs/pref_service.h" 21 #include "chrome/browser/prefs/pref_service.h"
23 #include "chrome/browser/profiles/profile.h" 22 #include "chrome/browser/profiles/profile.h"
24 #include "chrome/browser/themes/browser_theme_provider.h" 23 #include "chrome/browser/themes/browser_theme_provider.h"
25 #include "chrome/browser/web_resource/promo_resource_service.h" 24 #include "chrome/browser/web_resource/promo_resource_service.h"
25 #include "chrome/browser/webui/chrome_url_data_manager.h"
26 #include "chrome/common/chrome_switches.h" 26 #include "chrome/common/chrome_switches.h"
27 #include "chrome/common/extensions/extension.h" 27 #include "chrome/common/extensions/extension.h"
28 #include "chrome/common/extensions/extension_constants.h" 28 #include "chrome/common/extensions/extension_constants.h"
29 #include "chrome/common/jstemplate_builder.h" 29 #include "chrome/common/jstemplate_builder.h"
30 #include "chrome/common/notification_service.h" 30 #include "chrome/common/notification_service.h"
31 #include "chrome/common/notification_type.h" 31 #include "chrome/common/notification_type.h"
32 #include "chrome/common/pref_names.h" 32 #include "chrome/common/pref_names.h"
33 #include "chrome/common/url_constants.h" 33 #include "chrome/common/url_constants.h"
34 #include "grit/browser_resources.h" 34 #include "grit/browser_resources.h"
35 #include "grit/chromium_strings.h" 35 #include "grit/chromium_strings.h"
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 std::string css_string; 550 std::string css_string;
551 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL); 551 css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
552 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL); 552 css_string = ReplaceStringPlaceholders(css_string, subst2, NULL);
553 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL); 553 css_string = ReplaceStringPlaceholders(css_string, subst3, NULL);
554 554
555 new_tab_css_ = new RefCountedBytes; 555 new_tab_css_ = new RefCountedBytes;
556 new_tab_css_->data.resize(css_string.size()); 556 new_tab_css_->data.resize(css_string.size());
557 std::copy(css_string.begin(), css_string.end(), 557 std::copy(css_string.begin(), css_string.end(),
558 new_tab_css_->data.begin()); 558 new_tab_css_->data.begin());
559 } 559 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/dom_ui/options/options_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698