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

Side by Side Diff: chrome/test/testing_profile.h

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update cookie logic in test. Created 9 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
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 #ifndef CHROME_TEST_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_TESTING_PROFILE_H_
6 #define CHROME_TEST_TESTING_PROFILE_H_ 6 #define CHROME_TEST_TESTING_PROFILE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/ref_counted.h" 9 #include "base/ref_counted.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 // Returns a testing ContextGetter (if one has been created via 218 // Returns a testing ContextGetter (if one has been created via
219 // CreateRequestContext) or NULL. This is not done on-demand for two reasons: 219 // CreateRequestContext) or NULL. This is not done on-demand for two reasons:
220 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because 220 // (1) Some tests depend on GetRequestContext() returning NULL. (2) Because
221 // of the special memory management considerations for the 221 // of the special memory management considerations for the
222 // TestURLRequestContextGetter class, many tests would find themseleves 222 // TestURLRequestContextGetter class, many tests would find themseleves
223 // leaking if they called this method without the necessary IO thread. This 223 // leaking if they called this method without the necessary IO thread. This
224 // getter is currently only capable of returning a Context that helps test 224 // getter is currently only capable of returning a Context that helps test
225 // the CookieMonster. See implementation comments for more details. 225 // the CookieMonster. See implementation comments for more details.
226 virtual URLRequestContextGetter* GetRequestContext(); 226 virtual URLRequestContextGetter* GetRequestContext();
227 virtual URLRequestContextGetter* GetRequestContext(const Extension* app);
227 void CreateRequestContext(); 228 void CreateRequestContext();
228 // Clears out the created request context (which must be done before shutting 229 // Clears out the created request context (which must be done before shutting
229 // down the IO thread to avoid leaks). 230 // down the IO thread to avoid leaks).
230 void ResetRequestContext(); 231 void ResetRequestContext();
231 232
232 virtual URLRequestContextGetter* GetRequestContextForMedia() { return NULL; } 233 virtual URLRequestContextGetter* GetRequestContextForMedia() { return NULL; }
233 virtual URLRequestContextGetter* GetRequestContextForExtensions(); 234 virtual URLRequestContextGetter* GetRequestContextForExtensions();
235 virtual URLRequestContextGetter* GetRequestContextForIsolatedApp(
236 const Extension* installed_app);
234 237
235 virtual net::SSLConfigService* GetSSLConfigService() { return NULL; } 238 virtual net::SSLConfigService* GetSSLConfigService() { return NULL; }
236 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { return NULL; } 239 virtual UserStyleSheetWatcher* GetUserStyleSheetWatcher() { return NULL; }
237 virtual FindBarState* GetFindBarState(); 240 virtual FindBarState* GetFindBarState();
238 virtual HostContentSettingsMap* GetHostContentSettingsMap(); 241 virtual HostContentSettingsMap* GetHostContentSettingsMap();
239 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap(); 242 virtual GeolocationContentSettingsMap* GetGeolocationContentSettingsMap();
240 virtual GeolocationPermissionContext* GetGeolocationPermissionContext(); 243 virtual GeolocationPermissionContext* GetGeolocationPermissionContext();
241 virtual HostZoomMap* GetHostZoomMap() { return NULL; } 244 virtual HostZoomMap* GetHostZoomMap() { return NULL; }
242 void set_session_service(SessionService* session_service); 245 void set_session_service(SessionService* session_service);
243 virtual SessionService* GetSessionService() { return session_service_.get(); } 246 virtual SessionService* GetSessionService() { return session_service_.get(); }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 442
440 virtual ProfileId GetRuntimeId() { 443 virtual ProfileId GetRuntimeId() {
441 return original_profile_->GetRuntimeId(); 444 return original_profile_->GetRuntimeId();
442 } 445 }
443 446
444 protected: 447 protected:
445 Profile* original_profile_; 448 Profile* original_profile_;
446 }; 449 };
447 450
448 #endif // CHROME_TEST_TESTING_PROFILE_H_ 451 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698