OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/memory/ref_counted_memory.h" | 8 #include "base/memory/ref_counted_memory.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "base/values.h" | 12 #include "base/values.h" |
13 #include "chrome/browser/google/google_util.h" | 13 #include "chrome/browser/google/google_util.h" |
14 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
17 #include "content/public/browser/notification_service.h" | 17 #include "content/public/browser/notification_service.h" |
18 #include "grit/browser_resources.h" | 18 #include "grit/browser_resources.h" |
19 #include "grit/generated_resources.h" | 19 #include "grit/generated_resources.h" |
20 #include "ui/base/l10n/l10n_util.h" | 20 #include "ui/base/l10n/l10n_util.h" |
21 #include "ui/base/resource/resource_bundle.h" | 21 #include "ui/base/resource/resource_bundle.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 size_t after_offset = pos + template_data_placeholder.size(); | 143 size_t after_offset = pos + template_data_placeholder.size(); |
144 full_html.append(new_tab_html.data() + after_offset, | 144 full_html.append(new_tab_html.data() + after_offset, |
145 new_tab_html.size() - after_offset); | 145 new_tab_html.size() - after_offset); |
146 } else { | 146 } else { |
147 NOTREACHED(); | 147 NOTREACHED(); |
148 full_html.assign(new_tab_html.data(), new_tab_html.size()); | 148 full_html.assign(new_tab_html.data(), new_tab_html.size()); |
149 } | 149 } |
150 | 150 |
151 new_tab_html_ = base::RefCountedString::TakeString(&full_html); | 151 new_tab_html_ = base::RefCountedString::TakeString(&full_html); |
152 } | 152 } |
OLD | NEW |