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

Side by Side Diff: chrome/renderer/about_handler.h

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.cc ('k') | chrome/renderer/about_handler.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 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 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 // Contains code for handling "about:" URLs in the renderer process. We handle 5 // Contains code for handling "about:" URLs in the renderer process. We handle
6 // most about: URLs in the browser process (see 6 // most about: URLs in the browser process (see
7 // browser/browser_about_handler.*), but test URLs like about:crash need to 7 // browser/browser_about_handler.*), but test URLs like about:crash need to
8 // happen in the renderer. 8 // happen in the renderer.
9 9
10 #ifndef CHROME_RENDERER_ABOUT_HANDLER_H__ 10 #ifndef CHROME_RENDERER_ABOUT_HANDLER_H__
11 #define CHROME_RENDERER_ABOUT_HANDLER_H__ 11 #define CHROME_RENDERER_ABOUT_HANDLER_H__
12 12
13 #include "base/basictypes.h" 13 #include "base/basictypes.h"
14 14
15 class GURL; 15 class GURL;
16 16
17 class AboutHandler { 17 class AboutHandler {
18 public: 18 public:
19 // Given a URL, determine whether or not to handle it specially. Returns 19 // Given a URL, determine whether or not to handle it specially. Returns
20 // true if the URL was handled. 20 // true if the URL was handled.
21 static bool MaybeHandle(const GURL& url); 21 static bool MaybeHandle(const GURL& url);
22 22
23 // Returns true if the URL is one that this AboutHandler will handle when
24 // MaybeHandle is called.
25 static bool WillHandle(const GURL& url);
26
27 // Induces a renderer crash. 23 // Induces a renderer crash.
28 static void AboutCrash(); 24 static void AboutCrash();
29 25
30 // Induces a renderer hang. 26 // Induces a renderer hang.
31 static void AboutHang(); 27 static void AboutHang();
32 28
33 // Induces a brief (20 second) hang to make sure hang monitors go away. 29 // Induces a brief (20 second) hang to make sure hang monitors go away.
34 static void AboutShortHang(); 30 static void AboutShortHang();
35 31
32 // Returns the size of |about_urls_handlers|. Used for testing only.
33 static size_t AboutURLHandlerSize();
34
36 private: 35 private:
37 AboutHandler(); 36 AboutHandler();
38 ~AboutHandler(); 37 ~AboutHandler();
39 38
40 DISALLOW_COPY_AND_ASSIGN(AboutHandler); 39 DISALLOW_COPY_AND_ASSIGN(AboutHandler);
41 }; 40 };
42 41
43 #endif // CHROME_RENDERER_ABOUT_HANDLER_H__ 42 #endif // CHROME_RENDERER_ABOUT_HANDLER_H__
OLDNEW
« no previous file with comments | « chrome/common/about_handler.cc ('k') | chrome/renderer/about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698