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

Side by Side Diff: chrome/browser/ui/webui/version_ui.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
OLDNEW
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/version_ui.h" 5 #include "chrome/browser/ui/webui/version_ui.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 html_source->AddLocalizedString("user_agent_name", 85 html_source->AddLocalizedString("user_agent_name",
86 IDS_ABOUT_VERSION_USER_AGENT); 86 IDS_ABOUT_VERSION_USER_AGENT);
87 html_source->AddString("useragent", content::GetUserAgent(GURL())); 87 html_source->AddString("useragent", content::GetUserAgent(GURL()));
88 html_source->AddLocalizedString("command_line_name", 88 html_source->AddLocalizedString("command_line_name",
89 IDS_ABOUT_VERSION_COMMAND_LINE); 89 IDS_ABOUT_VERSION_COMMAND_LINE);
90 90
91 #if defined(OS_WIN) 91 #if defined(OS_WIN)
92 html_source->AddString("command_line", 92 html_source->AddString("command_line",
93 WideToUTF16(CommandLine::ForCurrentProcess()->GetCommandLineString())); 93 WideToUTF16(CommandLine::ForCurrentProcess()->GetCommandLineString()));
94 #elif defined(OS_POSIX) 94 #elif defined(OS_POSIX)
95 std::string command_line = ""; 95 std::string command_line;
96 typedef std::vector<std::string> ArgvList; 96 typedef std::vector<std::string> ArgvList;
97 const ArgvList& argv = CommandLine::ForCurrentProcess()->argv(); 97 const ArgvList& argv = CommandLine::ForCurrentProcess()->argv();
98 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) 98 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++)
99 command_line += " " + *iter; 99 command_line += " " + *iter;
100 // TODO(viettrungluu): |command_line| could really have any encoding, whereas 100 // TODO(viettrungluu): |command_line| could really have any encoding, whereas
101 // below we assumes it's UTF-8. 101 // below we assumes it's UTF-8.
102 html_source->AddString("command_line", command_line); 102 html_source->AddString("command_line", command_line);
103 #endif 103 #endif
104 104
105 // Note that the executable path and profile path are retrieved asynchronously 105 // Note that the executable path and profile path are retrieved asynchronously
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // Set up the chrome://theme/ source. 140 // Set up the chrome://theme/ source.
141 ThemeSource* theme = new ThemeSource(profile); 141 ThemeSource* theme = new ThemeSource(profile);
142 content::URLDataSource::Add(profile, theme); 142 content::URLDataSource::Add(profile, theme);
143 #endif 143 #endif
144 144
145 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile)); 145 content::WebUIDataSource::Add(profile, CreateVersionUIDataSource(profile));
146 } 146 }
147 147
148 VersionUI::~VersionUI() { 148 VersionUI::~VersionUI() {
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/sync_setup_handler_unittest.cc ('k') | chrome/browser/value_store/leveldb_value_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698