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

Side by Side Diff: chrome/browser/net/chrome_url_request_context.h

Issue 11883038: Move is_incognito bit out of ChromeURLRequestContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unneeded include Created 7 years, 11 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/net/chrome_url_request_context.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 5 #ifndef CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 6 #define CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 chrome_browser_net::LoadTimeStats* load_time_stats); 40 chrome_browser_net::LoadTimeStats* load_time_stats);
41 virtual ~ChromeURLRequestContext(); 41 virtual ~ChromeURLRequestContext();
42 42
43 base::WeakPtr<ChromeURLRequestContext> GetWeakPtr() { 43 base::WeakPtr<ChromeURLRequestContext> GetWeakPtr() {
44 return weak_factory_.GetWeakPtr(); 44 return weak_factory_.GetWeakPtr();
45 } 45 }
46 46
47 // Copies the state from |other| into this context. 47 // Copies the state from |other| into this context.
48 void CopyFrom(ChromeURLRequestContext* other); 48 void CopyFrom(ChromeURLRequestContext* other);
49 49
50 bool is_incognito() const {
51 return is_incognito_;
52 }
53
54 void set_is_incognito(bool is_incognito) {
55 is_incognito_ = is_incognito;
56 }
57
58 private: 50 private:
59 base::WeakPtrFactory<ChromeURLRequestContext> weak_factory_; 51 base::WeakPtrFactory<ChromeURLRequestContext> weak_factory_;
60 52
61 // --------------------------------------------------------------------------- 53 // ---------------------------------------------------------------------------
62 // Important: When adding any new members below, consider whether they need to 54 // Important: When adding any new members below, consider whether they need to
63 // be added to CopyFrom. 55 // be added to CopyFrom.
64 // --------------------------------------------------------------------------- 56 // ---------------------------------------------------------------------------
65 57
66 bool is_incognito_;
67 chrome_browser_net::LoadTimeStats* load_time_stats_; 58 chrome_browser_net::LoadTimeStats* load_time_stats_;
68 59
69 // --------------------------------------------------------------------------- 60 // ---------------------------------------------------------------------------
70 // Important: When adding any new members above, consider whether they need to 61 // Important: When adding any new members above, consider whether they need to
71 // be added to CopyFrom. 62 // be added to CopyFrom.
72 // --------------------------------------------------------------------------- 63 // ---------------------------------------------------------------------------
73 64
74 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext); 65 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContext);
75 }; 66 };
76 67
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 154
164 // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext 155 // NULL if not yet initialized. Otherwise, it is the ChromeURLRequestContext
165 // instance that was lazily created by GetURLRequestContext(). 156 // instance that was lazily created by GetURLRequestContext().
166 // Access only from the IO thread. 157 // Access only from the IO thread.
167 base::WeakPtr<ChromeURLRequestContext> url_request_context_; 158 base::WeakPtr<ChromeURLRequestContext> url_request_context_;
168 159
169 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter); 160 DISALLOW_COPY_AND_ASSIGN(ChromeURLRequestContextGetter);
170 }; 161 };
171 162
172 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_ 163 #endif // CHROME_BROWSER_NET_CHROME_URL_REQUEST_CONTEXT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/net/chrome_url_request_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698