| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "chrome/common/about_handler.h" |
| 6 |
| 7 namespace chrome_about_handler { |
| 8 |
| 9 // This needs to match up with about_urls_handlers in |
| 10 // chrome/renderer/about_handler.cc. |
| 11 const char* const about_urls[] = { |
| 12 chrome::kAboutCrashURL, |
| 13 chrome::kAboutHangURL, |
| 14 chrome::kAboutShorthangURL, |
| 15 NULL, |
| 16 }; |
| 17 const size_t about_urls_size = arraysize(about_urls); |
| 18 |
| 19 const char* const kAboutScheme = "about"; |
| 20 |
| 21 bool WillHandle(const GURL& url) { |
| 22 if (url.scheme() != kAboutScheme) |
| 23 return false; |
| 24 |
| 25 const char* const* url_handler = about_urls; |
| 26 while (*url_handler) { |
| 27 if (GURL(*url_handler) == url) |
| 28 return true; |
| 29 url_handler++; |
| 30 } |
| 31 return false; |
| 32 } |
| 33 |
| 34 } // namespace chrome_about_handler |
| OLD | NEW |