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

Side by Side Diff: chrome/browser/browser_about_handler.h

Issue 5315006: chromeos: Fix DOMUI about:credits link. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: abstract out AboutSource init code from WillHandleBrowserAboutURL Created 9 years, 12 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 | « no previous file | chrome/browser/browser_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 browser process. 5 // Contains code for handling "about:" URLs in the browser process.
6 6
7 #ifndef CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ 7 #ifndef CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_
8 #define CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ 8 #define CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_
9 #pragma once 9 #pragma once
10 10
11 #include <map> 11 #include <map>
12 #include <string> 12 #include <string>
13 13
14 #include "base/process.h" 14 #include "base/process.h"
15 #include "base/string_util.h" 15 #include "base/string_util.h"
16 16
17 template <typename T> struct DefaultSingletonTraits; 17 template <typename T> struct DefaultSingletonTraits;
18 class GURL; 18 class GURL;
19 class Profile; 19 class Profile;
20 20
21 // Decides whether the given URL will be handled by the browser about handler 21 // Decides whether the given URL will be handled by the browser about handler
22 // and returns true if so. On true, it may also modify the given URL to be the 22 // and returns true if so. On true, it may also modify the given URL to be the
23 // final form (we fix up most "about:" URLs to be "chrome:" because WebKit 23 // final form (we fix up most "about:" URLs to be "chrome:" because WebKit
24 // handles all "about:" URLs as "about:blank. 24 // handles all "about:" URLs as "about:blank.
25 // 25 //
26 // This is used by BrowserURLHandler. 26 // This is used by BrowserURLHandler.
27 bool WillHandleBrowserAboutURL(GURL* url, Profile* profile); 27 bool WillHandleBrowserAboutURL(GURL* url, Profile* profile);
28 28
29 // Register the data source for chrome://about URLs.
30 // Safe to call multiple times.
31 void InitializeAboutDataSource();
32
29 // We have a few magic commands that don't cause navigations, but rather pop up 33 // We have a few magic commands that don't cause navigations, but rather pop up
30 // dialogs. This function handles those cases, and returns true if so. In this 34 // dialogs. This function handles those cases, and returns true if so. In this
31 // case, normal tab navigation should be skipped. 35 // case, normal tab navigation should be skipped.
32 bool HandleNonNavigationAboutURL(const GURL& url); 36 bool HandleNonNavigationAboutURL(const GURL& url);
33 37
34 #if defined(USE_TCMALLOC) 38 #if defined(USE_TCMALLOC)
35 // A map of header strings (e.g. "Browser", "Renderer PID 123") 39 // A map of header strings (e.g. "Browser", "Renderer PID 123")
36 // to the tcmalloc output collected for each process. 40 // to the tcmalloc output collected for each process.
37 typedef std::map<std::string, std::string> AboutTcmallocOutputsType; 41 typedef std::map<std::string, std::string> AboutTcmallocOutputsType;
38 42
(...skipping 24 matching lines...) Expand all
63 friend struct DefaultSingletonTraits<AboutTcmallocOutputs>; 67 friend struct DefaultSingletonTraits<AboutTcmallocOutputs>;
64 68
65 DISALLOW_COPY_AND_ASSIGN(AboutTcmallocOutputs); 69 DISALLOW_COPY_AND_ASSIGN(AboutTcmallocOutputs);
66 }; 70 };
67 71
68 // Glue between the callback task and the method in the singleton. 72 // Glue between the callback task and the method in the singleton.
69 void AboutTcmallocRendererCallback(base::ProcessId pid, std::string output); 73 void AboutTcmallocRendererCallback(base::ProcessId pid, std::string output);
70 #endif 74 #endif
71 75
72 #endif // CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_ 76 #endif // CHROME_BROWSER_BROWSER_ABOUT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browser_about_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698