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

Side by Side Diff: chrome/common/about_handler.cc

Issue 9349010: Move handling of debug urls like chrome://crash, chrome://gpuclean to content. These are for test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 8 years, 10 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/common/about_handler.h"
6 #include "chrome/common/url_constants.h"
7 #include "googleurl/src/gurl.h"
8
9 namespace chrome_about_handler {
10
11 // This needs to match up with about_urls_handlers in
12 // chrome/renderer/about_handler.cc.
13 const char* const about_urls[] = {
14 chrome::kChromeUICrashURL,
15 chrome::kChromeUIKillURL,
16 chrome::kChromeUIHangURL,
17 chrome::kChromeUIShorthangURL,
18 NULL,
19 };
20 const size_t about_urls_size = arraysize(about_urls);
21
22 bool WillHandle(const GURL& url) {
23 if (!url.SchemeIs(chrome::kChromeUIScheme))
24 return false;
25
26 const char* const* url_handler = about_urls;
27 while (*url_handler) {
28 if (GURL(*url_handler) == url)
29 return true;
30 url_handler++;
31 }
32 return false;
33 }
34
35 } // namespace chrome_about_handler
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698