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

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

Issue 7249003: Move GetVersionStringModifier() and GetChannel() from platform_util_* to chrome_version_info_* (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: correct nits Created 9 years, 6 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
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/gpu_internals_ui.h" 5 #include "chrome/browser/ui/webui/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>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/file_util.h" 13 #include "base/file_util.h"
14 #include "base/memory/singleton.h" 14 #include "base/memory/singleton.h"
15 #include "base/message_loop.h" 15 #include "base/message_loop.h"
16 #include "base/path_service.h" 16 #include "base/path_service.h"
17 #include "base/scoped_ptr.h" 17 #include "base/scoped_ptr.h"
18 #include "base/stringprintf.h" 18 #include "base/stringprintf.h"
19 #include "base/string_number_conversions.h" 19 #include "base/string_number_conversions.h"
20 #include "base/string_piece.h" 20 #include "base/string_piece.h"
21 #include "base/utf_string_conversions.h" 21 #include "base/utf_string_conversions.h"
22 #include "base/values.h" 22 #include "base/values.h"
23 #include "chrome/browser/browser_process.h" 23 #include "chrome/browser/browser_process.h"
24 #include "chrome/browser/io_thread.h" 24 #include "chrome/browser/io_thread.h"
25 #include "chrome/browser/net/chrome_net_log.h" 25 #include "chrome/browser/net/chrome_net_log.h"
26 #include "chrome/browser/net/connection_tester.h" 26 #include "chrome/browser/net/connection_tester.h"
27 #include "chrome/browser/net/passive_log_collector.h" 27 #include "chrome/browser/net/passive_log_collector.h"
28 #include "chrome/browser/net/url_fixer_upper.h" 28 #include "chrome/browser/net/url_fixer_upper.h"
29 #include "chrome/browser/platform_util.h"
30 #include "chrome/browser/profiles/profile.h" 29 #include "chrome/browser/profiles/profile.h"
31 #include "chrome/browser/ui/shell_dialogs.h" 30 #include "chrome/browser/ui/shell_dialogs.h"
32 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 31 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
33 #include "chrome/common/chrome_paths.h" 32 #include "chrome/common/chrome_paths.h"
34 #include "chrome/common/chrome_version_info.h" 33 #include "chrome/common/chrome_version_info.h"
35 #include "chrome/common/jstemplate_builder.h" 34 #include "chrome/common/jstemplate_builder.h"
36 #include "chrome/common/url_constants.h" 35 #include "chrome/common/url_constants.h"
37 #include "content/browser/browser_thread.h" 36 #include "content/browser/browser_thread.h"
38 #include "content/browser/gpu/gpu_data_manager.h" 37 #include "content/browser/gpu/gpu_data_manager.h"
39 #include "content/browser/gpu/gpu_process_host.h" 38 #include "content/browser/gpu/gpu_process_host.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 453
455 chrome::VersionInfo version_info; 454 chrome::VersionInfo version_info;
456 455
457 if (!version_info.is_valid()) { 456 if (!version_info.is_valid()) {
458 DLOG(ERROR) << "Unable to create chrome::VersionInfo"; 457 DLOG(ERROR) << "Unable to create chrome::VersionInfo";
459 } else { 458 } else {
460 // We have everything we need to send the right values. 459 // We have everything we need to send the right values.
461 dict->SetString("version", version_info.Version()); 460 dict->SetString("version", version_info.Version());
462 dict->SetString("cl", version_info.LastChange()); 461 dict->SetString("cl", version_info.LastChange());
463 dict->SetString("version_mod", 462 dict->SetString("version_mod",
464 platform_util::GetVersionStringModifier()); 463 chrome::VersionInfo::GetVersionStringModifier());
465 dict->SetString("official", 464 dict->SetString("official",
466 l10n_util::GetStringUTF16( 465 l10n_util::GetStringUTF16(
467 version_info.IsOfficialBuild() ? 466 version_info.IsOfficialBuild() ?
468 IDS_ABOUT_VERSION_OFFICIAL : 467 IDS_ABOUT_VERSION_OFFICIAL :
469 IDS_ABOUT_VERSION_UNOFFICIAL)); 468 IDS_ABOUT_VERSION_UNOFFICIAL));
470 469
471 dict->SetString("command_line", 470 dict->SetString("command_line",
472 CommandLine::ForCurrentProcess()->command_line_string()); 471 CommandLine::ForCurrentProcess()->command_line_string());
473 } 472 }
474 473
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 //////////////////////////////////////////////////////////////////////////////// 642 ////////////////////////////////////////////////////////////////////////////////
644 643
645 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : ChromeWebUI(contents) { 644 GpuInternalsUI::GpuInternalsUI(TabContents* contents) : ChromeWebUI(contents) {
646 AddMessageHandler((new GpuMessageHandler())->Attach(this)); 645 AddMessageHandler((new GpuMessageHandler())->Attach(this));
647 646
648 GpuHTMLSource* html_source = new GpuHTMLSource(); 647 GpuHTMLSource* html_source = new GpuHTMLSource();
649 648
650 // Set up the chrome://gpu/ source. 649 // Set up the chrome://gpu/ source.
651 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); 650 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source);
652 } 651 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/flash_ui.cc ('k') | chrome/browser/ui/webui/net_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698