Index: chrome/common/net/url_request_context_getter.h |
diff --git a/chrome/common/net/url_request_context_getter.h b/chrome/common/net/url_request_context_getter.h |
index 89b28b53663b7b69caeb55e429fcd7012f35fab4..2b6ea82fce57e945daf8fb42687eff2109bdab2d 100644 |
--- a/chrome/common/net/url_request_context_getter.h |
+++ b/chrome/common/net/url_request_context_getter.h |
@@ -35,6 +35,14 @@ class URLRequestContextGetter |
// may be used). |
virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() = 0; |
+ // Controls whether or not the URLRequestContextGetter considers itself to be |
+ // the the "main" URLRequestContextGetter. Note that each Profile will have a |
+ // "default" URLRequestContextGetter. Therefore, "is_main" refers to the |
+ // default URLRequestContextGetter for the "main" Profile. |
+ // TODO(willchan): Move this code to ChromeURLRequestContextGetter, since this |
+ // ia a browser process specific concept. |
+ void set_is_main(bool is_main) { is_main_ = is_main; } |
+ |
protected: |
friend class DeleteTask<URLRequestContextGetter>; |
friend struct URLRequestContextGetterTraits; |
@@ -42,10 +50,16 @@ class URLRequestContextGetter |
URLRequestContextGetter(); |
virtual ~URLRequestContextGetter(); |
+ bool is_main() const { return is_main_; } |
+ |
private: |
// OnDestruct is meant to ensure deletion on the thread on which the request |
// IO happens. |
void OnDestruct(); |
+ |
+ // Indicates whether or not this is the default URLRequestContextGetter for |
+ // the main Profile. |
+ bool is_main_; |
}; |
struct URLRequestContextGetterTraits { |
@@ -55,4 +69,3 @@ struct URLRequestContextGetterTraits { |
}; |
#endif // CHROME_COMMON_NET_URL_REQUEST_CONTEXT_GETTER_H_ |
- |