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

Side by Side Diff: content/browser/web_contents/debug_urls.cc

Issue 10269003: Allow a pasted-in crash URL to work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « no previous file | no next file » | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/web_contents/debug_urls.h" 5 #include "content/browser/web_contents/debug_urls.h"
6 6
7 #include "content/browser/gpu/gpu_process_host_ui_shim.h" 7 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
8 #include "content/public/common/url_constants.h" 8 #include "content/public/common/url_constants.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 bool HandleDebugURL(const GURL& url, content::PageTransition transition) { 13 bool HandleDebugURL(const GURL& url, content::PageTransition transition) {
14 content::PageTransition base_transition = 14 content::PageTransition base_transition =
15 content::PageTransitionStripQualifier(transition); 15 content::PageTransitionStripQualifier(transition);
16 if (base_transition != content::PAGE_TRANSITION_TYPED) 16 bool user_initiated =
17 transition & content::PAGE_TRANSITION_FROM_ADDRESS_BAR ||
Peter Kasting 2012/04/30 18:07:37 I think if you have this bit you can (and should)
18 base_transition == content::PAGE_TRANSITION_TYPED;
19 if (!user_initiated)
17 return false; 20 return false;
18 21
19 if (url.host() == chrome::kChromeUIBrowserCrashHost) { 22 if (url.host() == chrome::kChromeUIBrowserCrashHost) {
20 // Induce an intentional crash in the browser process. 23 // Induce an intentional crash in the browser process.
21 CHECK(false); 24 CHECK(false);
22 return true; 25 return true;
23 } 26 }
24 27
25 if (url == GURL(chrome::kChromeUIGpuCleanURL)) { 28 if (url == GURL(chrome::kChromeUIGpuCleanURL)) {
26 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance(); 29 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
(...skipping 13 matching lines...) Expand all
40 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance(); 43 GpuProcessHostUIShim* shim = GpuProcessHostUIShim::GetOneInstance();
41 if (shim) 44 if (shim)
42 shim->SimulateHang(); 45 shim->SimulateHang();
43 return true; 46 return true;
44 } 47 }
45 48
46 return false; 49 return false;
47 } 50 }
48 51
49 } // namespace content 52 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698