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

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

Issue 562603002: Move PageTransition from //content/public/common to //ui/base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/debug_urls.h" 5 #include "content/browser/frame_host/debug_urls.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/asan_invalid_access.h" 10 #include "base/debug/asan_invalid_access.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return false; 103 return false;
104 } 104 }
105 #endif 105 #endif
106 106
107 return true; 107 return true;
108 } 108 }
109 109
110 110
111 } // namespace 111 } // namespace
112 112
113 bool HandleDebugURL(const GURL& url, PageTransition transition) { 113 bool HandleDebugURL(const GURL& url, ui::PageTransition transition) {
114 // Ensure that the user explicitly navigated to this URL, unless 114 // Ensure that the user explicitly navigated to this URL, unless
115 // kEnableGpuBenchmarking is enabled by Telemetry. 115 // kEnableGpuBenchmarking is enabled by Telemetry.
116 bool is_telemetry_navigation = 116 bool is_telemetry_navigation =
117 base::CommandLine::ForCurrentProcess()->HasSwitch( 117 base::CommandLine::ForCurrentProcess()->HasSwitch(
118 cc::switches::kEnableGpuBenchmarking) && 118 cc::switches::kEnableGpuBenchmarking) &&
119 (transition & PAGE_TRANSITION_TYPED); 119 (transition & ui::PAGE_TRANSITION_TYPED);
120 120
121 if (!(transition & PAGE_TRANSITION_FROM_ADDRESS_BAR) && 121 if (!(transition & ui::PAGE_TRANSITION_FROM_ADDRESS_BAR) &&
122 !is_telemetry_navigation) 122 !is_telemetry_navigation)
123 return false; 123 return false;
124 124
125 if (IsAsanDebugURL(url)) 125 if (IsAsanDebugURL(url))
126 return HandleAsanDebugURL(url); 126 return HandleAsanDebugURL(url);
127 127
128 if (url.host() == kChromeUIBrowserCrashHost) { 128 if (url.host() == kChromeUIBrowserCrashHost) {
129 // Induce an intentional crash in the browser process. 129 // Induce an intentional crash in the browser process.
130 CHECK(false); 130 CHECK(false);
131 return true; 131 return true;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 return true; 170 return true;
171 171
172 return url == GURL(kChromeUICrashURL) || 172 return url == GURL(kChromeUICrashURL) ||
173 url == GURL(kChromeUIDumpURL) || 173 url == GURL(kChromeUIDumpURL) ||
174 url == GURL(kChromeUIKillURL) || 174 url == GURL(kChromeUIKillURL) ||
175 url == GURL(kChromeUIHangURL) || 175 url == GURL(kChromeUIHangURL) ||
176 url == GURL(kChromeUIShorthangURL); 176 url == GURL(kChromeUIShorthangURL);
177 } 177 }
178 178
179 } // namespace content 179 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/debug_urls.h ('k') | content/browser/frame_host/interstitial_page_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698