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

Side by Side Diff: content/public/browser/url_data_source.h

Issue 13243003: Move MessageLoop to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « content/public/browser/histogram_fetcher.h ('k') | content/public/browser/url_data_source.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 6 #define CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
11 #include "content/common/content_export.h" 11 #include "content/common/content_export.h"
12 12
13 namespace base {
13 class MessageLoop; 14 class MessageLoop;
14
15 namespace base {
16 class RefCountedMemory; 15 class RefCountedMemory;
17 } 16 }
18 17
19 namespace net { 18 namespace net {
20 class URLRequest; 19 class URLRequest;
21 } 20 }
22 21
23 namespace content { 22 namespace content {
24 class BrowserContext; 23 class BrowserContext;
25 24
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // The following methods are all called on the IO thread. 58 // The following methods are all called on the IO thread.
60 59
61 // Returns the MessageLoop on which the delegate wishes to have 60 // Returns the MessageLoop on which the delegate wishes to have
62 // StartDataRequest called to handle the request for |path|. The default 61 // StartDataRequest called to handle the request for |path|. The default
63 // implementation returns BrowserThread::UI. If the delegate does not care 62 // implementation returns BrowserThread::UI. If the delegate does not care
64 // which thread StartDataRequest is called on, this should return NULL. It may 63 // which thread StartDataRequest is called on, this should return NULL. It may
65 // be beneficial to return NULL for requests that are safe to handle directly 64 // be beneficial to return NULL for requests that are safe to handle directly
66 // on the IO thread. This can improve performance by satisfying such requests 65 // on the IO thread. This can improve performance by satisfying such requests
67 // more rapidly when there is a large amount of UI thread contention. Or the 66 // more rapidly when there is a large amount of UI thread contention. Or the
68 // delegate can return a specific thread's Messageloop if they wish. 67 // delegate can return a specific thread's Messageloop if they wish.
69 virtual MessageLoop* MessageLoopForRequestPath(const std::string& path) const; 68 virtual base::MessageLoop* MessageLoopForRequestPath(
69 const std::string& path) const;
70 70
71 // Returns true if the URLDataSource should replace an existing URLDataSource 71 // Returns true if the URLDataSource should replace an existing URLDataSource
72 // with the same name that has already been registered. The default is true. 72 // with the same name that has already been registered. The default is true.
73 // 73 //
74 // WARNING: this is invoked on the IO thread. 74 // WARNING: this is invoked on the IO thread.
75 // 75 //
76 // TODO: nuke this and convert all callers to not replace. 76 // TODO: nuke this and convert all callers to not replace.
77 virtual bool ShouldReplaceExistingSource() const; 77 virtual bool ShouldReplaceExistingSource() const;
78 78
79 // Returns true if responses from this URLDataSource can be cached. 79 // Returns true if responses from this URLDataSource can be cached.
(...skipping 24 matching lines...) Expand all
104 // Override in specific WebUI data sources to enable for additional schemes or 104 // Override in specific WebUI data sources to enable for additional schemes or
105 // to implement fancier access control. Typically used in concert with 105 // to implement fancier access control. Typically used in concert with
106 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional 106 // ContentBrowserClient::GetAdditionalWebUISchemes() to permit additional
107 // WebUI scheme support for an embedder. 107 // WebUI scheme support for an embedder.
108 virtual bool ShouldServiceRequest(const net::URLRequest* request) const; 108 virtual bool ShouldServiceRequest(const net::URLRequest* request) const;
109 }; 109 };
110 110
111 } // namespace content 111 } // namespace content
112 112
113 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_ 113 #endif // CONTENT_PUBLIC_BROWSER_URL_DATA_SOURCE_H_
OLDNEW
« no previous file with comments | « content/public/browser/histogram_fetcher.h ('k') | content/public/browser/url_data_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698