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

Side by Side Diff: chrome/browser/extensions/extensions_ui.cc

Issue 31014: Port DictionaryValue to use string16 instead of wstring. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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/extensions/extensions_service.cc ('k') | chrome/browser/importer/importer.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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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/extensions/extensions_ui.h" 5 #include "chrome/browser/extensions/extensions_ui.h"
6 6
7 #include "base/thread.h" 7 #include "base/thread.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/common/jstemplate_builder.h" 9 #include "chrome/common/jstemplate_builder.h"
10 #include "chrome/common/l10n_util.h" 10 #include "chrome/common/l10n_util.h"
(...skipping 12 matching lines...) Expand all
23 // 23 //
24 //////////////////////////////////////////////////////////////////////////////// 24 ////////////////////////////////////////////////////////////////////////////////
25 25
26 ExtensionsUIHTMLSource::ExtensionsUIHTMLSource() 26 ExtensionsUIHTMLSource::ExtensionsUIHTMLSource()
27 : DataSource(kExtensionsHost, MessageLoop::current()) { 27 : DataSource(kExtensionsHost, MessageLoop::current()) {
28 } 28 }
29 29
30 void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path, 30 void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
31 int request_id) { 31 int request_id) {
32 DictionaryValue localized_strings; 32 DictionaryValue localized_strings;
33 localized_strings.SetString(L"title", 33 localized_strings.SetString(
34 l10n_util::GetString(IDS_EXTENSIONS_TITLE)); 34 ASCIIToUTF16("title"),
35 WideToUTF16Hack(l10n_util::GetString(IDS_EXTENSIONS_TITLE)));
35 36
36 static const StringPiece extensions_html( 37 static const StringPiece extensions_html(
37 ResourceBundle::GetSharedInstance().GetRawDataResource( 38 ResourceBundle::GetSharedInstance().GetRawDataResource(
38 IDR_EXTENSIONS_HTML)); 39 IDR_EXTENSIONS_HTML));
39 const std::string full_html = jstemplate_builder::GetTemplateHtml( 40 const std::string full_html = jstemplate_builder::GetTemplateHtml(
40 extensions_html, &localized_strings, "root"); 41 extensions_html, &localized_strings, "root");
41 42
42 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 43 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
43 html_bytes->data.resize(full_html.size()); 44 html_bytes->data.resize(full_html.size());
44 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin()); 45 std::copy(full_html.begin(), full_html.end(), html_bytes->data.begin());
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 &ChromeURLDataManager::AddDataSource, html_source)); 81 &ChromeURLDataManager::AddDataSource, html_source));
81 } 82 }
82 83
83 // static 84 // static
84 GURL ExtensionsUI::GetBaseURL() { 85 GURL ExtensionsUI::GetBaseURL() {
85 std::string url = DOMUIContents::GetScheme(); 86 std::string url = DOMUIContents::GetScheme();
86 url += chrome::kStandardSchemeSeparator; 87 url += chrome::kStandardSchemeSeparator;
87 url += kExtensionsHost; 88 url += kExtensionsHost;
88 return GURL(url); 89 return GURL(url);
89 } 90 }
90
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extensions_service.cc ('k') | chrome/browser/importer/importer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698