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

Side by Side Diff: chrome/browser/browser_about_handler.cc

Issue 5685007: Rename all methods accessing Singleton<T> as GetInstance(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 10 years 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/background_page_tracker.cc ('k') | chrome/browser/browser_main.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) 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/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 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 } 757 }
758 758
759 output->append("</ul>\n"); 759 output->append("</ul>\n");
760 } 760 }
761 761
762 #endif // OS_WIN 762 #endif // OS_WIN
763 763
764 } 764 }
765 765
766 std::string AboutGpu() { 766 std::string AboutGpu() {
767 const GPUInfo& gpu_info = GpuProcessHostUIShim::Get()->gpu_info(); 767 const GPUInfo& gpu_info = GpuProcessHostUIShim::GetInstance()->gpu_info();
768 768
769 std::string html; 769 std::string html;
770 770
771 html.append("<html><head><title>About GPU</title></head>\n"); 771 html.append("<html><head><title>About GPU</title></head>\n");
772 772
773 if (gpu_info.progress() != GPUInfo::kComplete) { 773 if (gpu_info.progress() != GPUInfo::kComplete) {
774 GpuProcessHostUIShim::Get()->CollectGraphicsInfoAsynchronously(); 774 GpuProcessHostUIShim::GetInstance()->CollectGraphicsInfoAsynchronously();
775 775
776 // If it's not fully initialized yet, set a timeout to reload the page. 776 // If it's not fully initialized yet, set a timeout to reload the page.
777 html.append("<body onload=\"setTimeout('window.location.reload(true)',"); 777 html.append("<body onload=\"setTimeout('window.location.reload(true)',");
778 html.append("2000)\">\n"); 778 html.append("2000)\">\n");
779 } else { 779 } else {
780 html.append("<body>\n"); 780 html.append("<body>\n");
781 } 781 }
782 782
783 html.append("<h2>GPU Information</h2>\n"); 783 html.append("<h2>GPU Information</h2>\n");
784 784
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
1159 // Handle URL to crash the browser process. 1159 // Handle URL to crash the browser process.
1160 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutBrowserCrash)) { 1160 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutBrowserCrash)) {
1161 // Induce an intentional crash in the browser process. 1161 // Induce an intentional crash in the browser process.
1162 int* bad_pointer = NULL; 1162 int* bad_pointer = NULL;
1163 *bad_pointer = 42; 1163 *bad_pointer = 42;
1164 return true; 1164 return true;
1165 } 1165 }
1166 1166
1167 // Handle URLs to wreck the gpu process. 1167 // Handle URLs to wreck the gpu process.
1168 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuCrashURL)) { 1168 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuCrashURL)) {
1169 GpuProcessHostUIShim::Get()->SendAboutGpuCrash(); 1169 GpuProcessHostUIShim::GetInstance()->SendAboutGpuCrash();
1170 return true; 1170 return true;
1171 } 1171 }
1172 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuHangURL)) { 1172 if (LowerCaseEqualsASCII(url->spec(), chrome::kAboutGpuHangURL)) {
1173 GpuProcessHostUIShim::Get()->SendAboutGpuHang(); 1173 GpuProcessHostUIShim::GetInstance()->SendAboutGpuHang();
1174 return true; 1174 return true;
1175 } 1175 }
1176 1176
1177 // There are a few about: URLs that we hand over to the renderer. If the 1177 // There are a few about: URLs that we hand over to the renderer. If the
1178 // renderer wants them, don't do any rewriting. 1178 // renderer wants them, don't do any rewriting.
1179 if (chrome_about_handler::WillHandle(*url)) 1179 if (chrome_about_handler::WillHandle(*url))
1180 return false; 1180 return false;
1181 1181
1182 // Anything else requires our special handler, make sure its initialized. 1182 // Anything else requires our special handler, make sure its initialized.
1183 // We only need to register the AboutSource once and it is kept globally. 1183 // We only need to register the AboutSource once and it is kept globally.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1215 // Run the dialog. This will re-use the existing one if it's already up. 1215 // Run the dialog. This will re-use the existing one if it's already up.
1216 AboutIPCDialog::RunDialog(); 1216 AboutIPCDialog::RunDialog();
1217 return true; 1217 return true;
1218 } 1218 }
1219 #endif 1219 #endif
1220 1220
1221 #endif // OFFICIAL_BUILD 1221 #endif // OFFICIAL_BUILD
1222 1222
1223 return false; 1223 return false;
1224 } 1224 }
OLDNEW
« no previous file with comments | « chrome/browser/background_page_tracker.cc ('k') | chrome/browser/browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698