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

Side by Side Diff: chrome/browser/extensions/extensions_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
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 "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/string_util.h" 9 #include "base/string_util.h"
10 #include "base/thread.h" 10 #include "base/thread.h"
(...skipping 30 matching lines...) Expand all
41 ExtensionsUIHTMLSource::ExtensionsUIHTMLSource() 41 ExtensionsUIHTMLSource::ExtensionsUIHTMLSource()
42 : DataSource(chrome::kChromeUIExtensionsHost, MessageLoop::current()) { 42 : DataSource(chrome::kChromeUIExtensionsHost, MessageLoop::current()) {
43 } 43 }
44 44
45 void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path, 45 void ExtensionsUIHTMLSource::StartDataRequest(const std::string& path,
46 int request_id) { 46 int request_id) {
47 DictionaryValue localized_strings; 47 DictionaryValue localized_strings;
48 localized_strings.SetString(L"title", 48 localized_strings.SetString(L"title",
49 l10n_util::GetString(IDS_EXTENSIONS_TITLE)); 49 l10n_util::GetString(IDS_EXTENSIONS_TITLE));
50 50
51 static const StringPiece extensions_html( 51 static const base::StringPiece extensions_html(
52 ResourceBundle::GetSharedInstance().GetRawDataResource( 52 ResourceBundle::GetSharedInstance().GetRawDataResource(
53 IDR_EXTENSIONS_UI_HTML)); 53 IDR_EXTENSIONS_UI_HTML));
54 std::string full_html(extensions_html.data(), extensions_html.size()); 54 std::string full_html(extensions_html.data(), extensions_html.size());
55 jstemplate_builder::AppendJsonHtml(&localized_strings, &full_html); 55 jstemplate_builder::AppendJsonHtml(&localized_strings, &full_html);
56 jstemplate_builder::AppendI18nTemplateSourceHtml(&full_html); 56 jstemplate_builder::AppendI18nTemplateSourceHtml(&full_html);
57 jstemplate_builder::AppendI18nTemplateProcessHtml(&full_html); 57 jstemplate_builder::AppendI18nTemplateProcessHtml(&full_html);
58 jstemplate_builder::AppendJsTemplateSourceHtml(&full_html); 58 jstemplate_builder::AppendJsTemplateSourceHtml(&full_html);
59 59
60 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 60 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
61 html_bytes->data.resize(full_html.size()); 61 html_bytes->data.resize(full_html.size());
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 AddMessageHandler(handler); 355 AddMessageHandler(handler);
356 handler->Attach(this); 356 handler->Attach(this);
357 357
358 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); 358 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource();
359 359
360 // Set up the chrome://extensions/ source. 360 // Set up the chrome://extensions/ source.
361 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, 361 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE,
362 NewRunnableMethod(&chrome_url_data_manager, 362 NewRunnableMethod(&chrome_url_data_manager,
363 &ChromeURLDataManager::AddDataSource, html_source)); 363 &ChromeURLDataManager::AddDataSource, html_source));
364 } 364 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/extensions/external_pref_extension_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698