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

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

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Continued work from last year 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) 2011 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"
11 #include "base/scoped_temp_dir.h" 11 #include "base/scoped_temp_dir.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void SetTemplateURLModel(TemplateURLModel* model); 108 void SetTemplateURLModel(TemplateURLModel* model);
109 109
110 // Uses a specific theme provider for this profile. TestingProfile takes 110 // Uses a specific theme provider for this profile. TestingProfile takes
111 // ownership of |theme_provider|. 111 // ownership of |theme_provider|.
112 void UseThemeProvider(BrowserThemeProvider* theme_provider); 112 void UseThemeProvider(BrowserThemeProvider* theme_provider);
113 113
114 // Creates an ExtensionService initialized with the testing profile and 114 // Creates an ExtensionService initialized with the testing profile and
115 // returns it. The profile keeps its own copy of a scoped_refptr to the 115 // returns it. The profile keeps its own copy of a scoped_refptr to the
116 // ExtensionService to make sure that is still alive to be notified when the 116 // ExtensionService to make sure that is still alive to be notified when the
117 // profile is destroyed. 117 // profile is destroyed.
118 scoped_refptr<ExtensionService> CreateExtensionService( 118 ExtensionService* CreateExtensionService(const CommandLine* command_line,
Mattias Nissler (ping if slow) 2011/01/05 12:08:07 What's the reason from making this refcounted?
battre 2011/01/05 20:23:08 n/a
119 const CommandLine* command_line, 119 const FilePath& install_directory);
120 const FilePath& install_directory);
121 120
122 TestingPrefService* GetTestingPrefService(); 121 TestingPrefService* GetTestingPrefService();
123 122
124 virtual ProfileId GetRuntimeId() { 123 virtual ProfileId GetRuntimeId() {
125 return reinterpret_cast<ProfileId>(this); 124 return reinterpret_cast<ProfileId>(this);
126 } 125 }
127 126
128 virtual FilePath GetPath(); 127 virtual FilePath GetPath();
129 128
130 // Sets whether we're off the record. Default is false. 129 // Sets whether we're off the record. Default is false.
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 geolocation_content_settings_map_; 401 geolocation_content_settings_map_;
403 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_; 402 scoped_refptr<GeolocationPermissionContext> geolocation_permission_context_;
404 scoped_ptr<DesktopNotificationService> desktop_notification_service_; 403 scoped_ptr<DesktopNotificationService> desktop_notification_service_;
405 404
406 // Find bar state. Created lazily by GetFindBarState(). 405 // Find bar state. Created lazily by GetFindBarState().
407 scoped_ptr<FindBarState> find_bar_state_; 406 scoped_ptr<FindBarState> find_bar_state_;
408 407
409 FilePath last_selected_directory_; 408 FilePath last_selected_directory_;
410 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails. 409 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails.
411 410
412 // Extension pref store, created for use by |extension_prefs_|.
413 scoped_ptr<ExtensionPrefStore> extension_pref_store_;
414
415 // The Extension Preferences. Only created if CreateExtensionService is 411 // The Extension Preferences. Only created if CreateExtensionService is
416 // invoked. 412 // invoked.
417 scoped_ptr<ExtensionPrefs> extension_prefs_; 413 scoped_ptr<ExtensionPrefs> extension_prefs_;
418 414
419 // For properly notifying the ExtensionService when the profile 415 // For properly notifying the ExtensionService when the profile
420 // is disposed. 416 // is disposed.
421 scoped_refptr<ExtensionService> extensions_service_; 417 scoped_refptr<ExtensionService> extensions_service_;
422 418
423 // The proxy prefs tracker. 419 // The proxy prefs tracker.
424 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 420 scoped_refptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
(...skipping 12 matching lines...) Expand all
437 433
438 virtual ProfileId GetRuntimeId() { 434 virtual ProfileId GetRuntimeId() {
439 return original_profile_->GetRuntimeId(); 435 return original_profile_->GetRuntimeId();
440 } 436 }
441 437
442 protected: 438 protected:
443 Profile* original_profile_; 439 Profile* original_profile_;
444 }; 440 };
445 441
446 #endif // CHROME_TEST_TESTING_PROFILE_H_ 442 #endif // CHROME_TEST_TESTING_PROFILE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698