| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/dom_ui/gpu_internals_ui.h" | 5 #include "chrome/browser/dom_ui/gpu_internals_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 199 } |
| 200 } | 200 } |
| 201 | 201 |
| 202 Value* GpuMessageHandler::OnRequestClientInfo(const ListValue* list) { | 202 Value* GpuMessageHandler::OnRequestClientInfo(const ListValue* list) { |
| 203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 203 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 204 | 204 |
| 205 DictionaryValue* dict = new DictionaryValue(); | 205 DictionaryValue* dict = new DictionaryValue(); |
| 206 | 206 |
| 207 chrome::VersionInfo version_info; | 207 chrome::VersionInfo version_info; |
| 208 | 208 |
| 209 if (!version_info.is_valid()) { | 209 // We have everything we need to send the right values. |
| 210 DLOG(ERROR) << "Unable to create chrome::VersionInfo"; | 210 dict->SetString("version", version_info.Version()); |
| 211 } else { | 211 dict->SetString("cl", version_info.LastChange()); |
| 212 // We have everything we need to send the right values. | 212 dict->SetString("version_mod", |
| 213 dict->SetString("version", version_info.Version()); | 213 platform_util::GetVersionStringModifier()); |
| 214 dict->SetString("cl", version_info.LastChange()); | 214 dict->SetString("official", |
| 215 dict->SetString("version_mod", | 215 l10n_util::GetStringUTF16( |
| 216 platform_util::GetVersionStringModifier()); | 216 version_info.IsOfficialBuild() ? |
| 217 dict->SetString("official", | 217 IDS_ABOUT_VERSION_OFFICIAL |
| 218 l10n_util::GetStringUTF16( | 218 : IDS_ABOUT_VERSION_UNOFFICIAL)); |
| 219 version_info.IsOfficialBuild() ? | |
| 220 IDS_ABOUT_VERSION_OFFICIAL | |
| 221 : IDS_ABOUT_VERSION_UNOFFICIAL)); | |
| 222 | 219 |
| 223 dict->SetString("command_line", | 220 dict->SetString("command_line", |
| 224 CommandLine::ForCurrentProcess()->command_line_string()); | 221 CommandLine::ForCurrentProcess()->command_line_string()); |
| 225 } | |
| 226 | 222 |
| 227 return dict; | 223 return dict; |
| 228 } | 224 } |
| 229 | 225 |
| 230 DictionaryValue* NewDescriptionValuePair(const std::string& desc, | 226 DictionaryValue* NewDescriptionValuePair(const std::string& desc, |
| 231 const std::string& value) { | 227 const std::string& value) { |
| 232 DictionaryValue* dict = new DictionaryValue(); | 228 DictionaryValue* dict = new DictionaryValue(); |
| 233 dict->SetString("description", desc); | 229 dict->SetString("description", desc); |
| 234 dict->SetString("value", value); | 230 dict->SetString("value", value); |
| 235 return dict; | 231 return dict; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 | 337 |
| 342 // Set up the chrome://gpu/ source. | 338 // Set up the chrome://gpu/ source. |
| 343 BrowserThread::PostTask( | 339 BrowserThread::PostTask( |
| 344 BrowserThread::IO, FROM_HERE, | 340 BrowserThread::IO, FROM_HERE, |
| 345 NewRunnableMethod( | 341 NewRunnableMethod( |
| 346 ChromeURLDataManager::GetInstance(), | 342 ChromeURLDataManager::GetInstance(), |
| 347 &ChromeURLDataManager::AddDataSource, | 343 &ChromeURLDataManager::AddDataSource, |
| 348 make_scoped_refptr(html_source))); | 344 make_scoped_refptr(html_source))); |
| 349 } | 345 } |
| 350 | 346 |
| OLD | NEW |