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

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

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 years, 3 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
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/extensions/extension_host.cc » ('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) 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/print_ui.h" 5 #include "chrome/browser/dom_ui/print_ui.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 void PrintUIHTMLSource::StartDataRequest(const std::string& path, 45 void PrintUIHTMLSource::StartDataRequest(const std::string& path,
46 int request_id) { 46 int request_id) {
47 // Setup a dictionary so that the html page could read the values. 47 // Setup a dictionary so that the html page could read the values.
48 DictionaryValue localized_strings; 48 DictionaryValue localized_strings;
49 localized_strings.SetString(L"title", l10n_util::GetString(IDS_PRINT)); 49 localized_strings.SetString(L"title", l10n_util::GetString(IDS_PRINT));
50 50
51 SetFontAndTextDirection(&localized_strings); 51 SetFontAndTextDirection(&localized_strings);
52 52
53 // Setup the print html page. 53 // Setup the print html page.
54 static const StringPiece print_html( 54 static const base::StringPiece print_html(
55 ResourceBundle::GetSharedInstance().GetRawDataResource( 55 ResourceBundle::GetSharedInstance().GetRawDataResource(
56 IDR_PRINT_TAB_HTML)); 56 IDR_PRINT_TAB_HTML));
57 const std::string full_html = jstemplate_builder::GetI18nTemplateHtml( 57 const std::string full_html = jstemplate_builder::GetI18nTemplateHtml(
58 print_html, &localized_strings); 58 print_html, &localized_strings);
59 59
60 // Load the print html page into the tab contents. 60 // Load the print html page into the tab contents.
61 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 61 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
62 html_bytes->data.resize(full_html.size()); 62 html_bytes->data.resize(full_html.size());
63 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin()); 63 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin());
64 SendResponse(request_id, html_bytes); 64 SendResponse(request_id, html_bytes);
65 } 65 }
OLDNEW
« no previous file with comments | « chrome/browser/dom_ui/new_tab_ui.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698