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/ui/webui/options/about_page_handler.h" | 5 #include "chrome/browser/ui/webui/options/about_page_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 // user agent | 235 // user agent |
236 | 236 |
237 localized_strings->SetString("user_agent_info", | 237 localized_strings->SetString("user_agent_info", |
238 webkit_glue::GetUserAgent(GURL())); | 238 webkit_glue::GetUserAgent(GURL())); |
239 | 239 |
240 // command line | 240 // command line |
241 | 241 |
242 #if defined(OS_WIN) | 242 #if defined(OS_WIN) |
243 localized_strings->SetString("command_line_info", | 243 localized_strings->SetString("command_line_info", |
244 WideToUTF16(CommandLine::ForCurrentProcess()->command_line_string())); | 244 WideToUTF16(CommandLine::ForCurrentProcess()->GetCommandLineString())); |
245 #elif defined(OS_POSIX) | 245 #elif defined(OS_POSIX) |
246 // TODO(viettrungluu): something horrible might happen if there are non-UTF-8 | 246 // TODO(viettrungluu): something horrible might happen if there are non-UTF-8 |
247 // arguments (since |SetString()| requires Unicode). | 247 // arguments (since |SetString()| requires Unicode). |
248 std::string command_line = ""; | 248 std::string command_line = ""; |
249 typedef std::vector<std::string> ArgvList; | 249 typedef std::vector<std::string> ArgvList; |
250 const ArgvList& argv = CommandLine::ForCurrentProcess()->argv(); | 250 const ArgvList& argv = CommandLine::ForCurrentProcess()->argv(); |
251 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) | 251 for (ArgvList::const_iterator iter = argv.begin(); iter != argv.end(); iter++) |
252 command_line += " " + *iter; | 252 command_line += " " + *iter; |
253 localized_strings->SetString("command_line_info", command_line); | 253 localized_strings->SetString("command_line_info", command_line); |
254 #endif | 254 #endif |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 if (chromeos::CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { | 442 if (chromeos::CrosLibrary::Get()->GetUpdateLibrary()->HasObserver(observer)) { |
443 // If UpdateLibrary still has the observer, then the page handler is valid. | 443 // If UpdateLibrary still has the observer, then the page handler is valid. |
444 AboutPageHandler* handler = observer->page_handler(); | 444 AboutPageHandler* handler = observer->page_handler(); |
445 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); | 445 scoped_ptr<Value> channel_string(Value::CreateStringValue(channel)); |
446 handler->web_ui_->CallJavascriptFunction( | 446 handler->web_ui_->CallJavascriptFunction( |
447 "AboutPage.updateSelectedOptionCallback", *channel_string); | 447 "AboutPage.updateSelectedOptionCallback", *channel_string); |
448 } | 448 } |
449 } | 449 } |
450 | 450 |
451 #endif // defined(OS_CHROMEOS) | 451 #endif // defined(OS_CHROMEOS) |
OLD | NEW |