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

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

Issue 2814012: Split part of about_handler into chrome/common to break the browser-renderer ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: with unit test Created 10 years, 6 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 | « chrome/common/about_handler.h ('k') | chrome/renderer/about_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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
OLDNEW
« no previous file with comments | « chrome/common/about_handler.h ('k') | chrome/renderer/about_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698