OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_about_handler.h" | 5 #include "chrome/browser/browser_about_handler.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1131 IDS_ABOUT_VERSION_OFFICIAL | 1131 IDS_ABOUT_VERSION_OFFICIAL |
1132 : IDS_ABOUT_VERSION_UNOFFICIAL)); | 1132 : IDS_ABOUT_VERSION_UNOFFICIAL)); |
1133 localized_strings->SetString("user_agent_name", | 1133 localized_strings->SetString("user_agent_name", |
1134 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_USER_AGENT)); | 1134 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_USER_AGENT)); |
1135 localized_strings->SetString("useragent", webkit_glue::GetUserAgent(GURL())); | 1135 localized_strings->SetString("useragent", webkit_glue::GetUserAgent(GURL())); |
1136 localized_strings->SetString("command_line_name", | 1136 localized_strings->SetString("command_line_name", |
1137 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMMAND_LINE)); | 1137 l10n_util::GetStringUTF16(IDS_ABOUT_VERSION_COMMAND_LINE)); |
1138 | 1138 |
1139 #if defined(OS_WIN) | 1139 #if defined(OS_WIN) |
1140 localized_strings->SetString("command_line", | 1140 localized_strings->SetString("command_line", |
1141 WideToUTF16(CommandLine::ForCurrentProcess()->command_line_string())); | 1141 WideToUTF16(CommandLine::ForCurrentProcess()->GetCommandLineString())); |
1142 #elif defined(OS_POSIX) | 1142 #elif defined(OS_POSIX) |
1143 std::string command_line = ""; | 1143 std::string command_line = ""; |
1144 typedef std::vector<std::string> ArgvList; | 1144 typedef std::vector<std::string> ArgvList; |
1145 const ArgvList& argv = CommandLine::ForCurrentProcess()->argv(); | 1145 const ArgvList& argv = CommandLine::ForCurrentProcess()->argv(); |
1146 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) | 1146 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) |
1147 command_line += " " + *iter; | 1147 command_line += " " + *iter; |
1148 // TODO(viettrungluu): |command_line| could really have any encoding, whereas | 1148 // TODO(viettrungluu): |command_line| could really have any encoding, whereas |
1149 // below we assumes it's UTF-8. | 1149 // below we assumes it's UTF-8. |
1150 localized_strings->SetString("command_line", command_line); | 1150 localized_strings->SetString("command_line", command_line); |
1151 #endif | 1151 #endif |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1522 return false; | 1522 return false; |
1523 } | 1523 } |
1524 | 1524 |
1525 std::vector<std::string> ChromePaths() { | 1525 std::vector<std::string> ChromePaths() { |
1526 std::vector<std::string> paths; | 1526 std::vector<std::string> paths; |
1527 paths.reserve(arraysize(kChromePaths)); | 1527 paths.reserve(arraysize(kChromePaths)); |
1528 for (size_t i = 0; i < arraysize(kChromePaths); i++) | 1528 for (size_t i = 0; i < arraysize(kChromePaths); i++) |
1529 paths.push_back(kChromePaths[i]); | 1529 paths.push_back(kChromePaths[i]); |
1530 return paths; | 1530 return paths; |
1531 } | 1531 } |
OLD | NEW |