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

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

Issue 815983002: Topsites become keyedService based. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extra inclusion from testing_profile.h Created 5 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
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/testing_profile.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_TEST_BASE_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 bool CreateHistoryService(bool delete_file, bool no_db) WARN_UNUSED_RESULT; 176 bool CreateHistoryService(bool delete_file, bool no_db) WARN_UNUSED_RESULT;
177 177
178 // Shuts down and nulls out the reference to HistoryService. 178 // Shuts down and nulls out the reference to HistoryService.
179 void DestroyHistoryService(); 179 void DestroyHistoryService();
180 180
181 // Creates TopSites. This returns immediately, and top sites may not be 181 // Creates TopSites. This returns immediately, and top sites may not be
182 // loaded. Use BlockUntilTopSitesLoaded to ensure TopSites has finished 182 // loaded. Use BlockUntilTopSitesLoaded to ensure TopSites has finished
183 // loading. 183 // loading.
184 void CreateTopSites(); 184 void CreateTopSites();
185 185
186 // Allows to set a test implementation |top_sites|. Testing profile owns
187 // the reference and is responsible for releasing memory.
188 void SetTopSites(history::TopSites* top_sites);
189
190 // Shuts down and nulls out the reference to TopSites.
191 void DestroyTopSites(); 186 void DestroyTopSites();
192 187
193 // Creates the BookmarkBarModel. If not invoked the bookmark bar model is 188 // Creates the BookmarkBarModel. If not invoked the bookmark bar model is
194 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then 189 // NULL. If |delete_file| is true, the bookmarks file is deleted first, then
195 // the model is created. As TestingProfile deletes the directory containing 190 // the model is created. As TestingProfile deletes the directory containing
196 // the files used by HistoryService, the boolean only matters if you're 191 // the files used by HistoryService, the boolean only matters if you're
197 // recreating the BookmarkModel. 192 // recreating the BookmarkModel.
198 // 193 //
199 // NOTE: this does not block until the bookmarks are loaded. For that use 194 // NOTE: this does not block until the bookmarks are loaded. For that use
200 // WaitForBookmarkModelToLoad(). 195 // WaitForBookmarkModelToLoad().
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 ExtensionSpecialStoragePolicy* extension_special_storage_policy); 269 ExtensionSpecialStoragePolicy* extension_special_storage_policy);
275 #endif 270 #endif
276 ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override; 271 ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override;
277 // TODO(ajwong): Remove this API in favor of directly retrieving the 272 // TODO(ajwong): Remove this API in favor of directly retrieving the
278 // CookieStore from the StoragePartition after ExtensionURLRequestContext 273 // CookieStore from the StoragePartition after ExtensionURLRequestContext
279 // has been removed. 274 // has been removed.
280 net::CookieMonster* GetCookieMonster(); 275 net::CookieMonster* GetCookieMonster();
281 276
282 PrefService* GetPrefs() override; 277 PrefService* GetPrefs() override;
283 278
284 history::TopSites* GetTopSites() override;
285 history::TopSites* GetTopSitesWithoutCreating() override;
286
287 net::URLRequestContextGetter* GetMediaRequestContext() override; 279 net::URLRequestContextGetter* GetMediaRequestContext() override;
288 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess( 280 net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(
289 int renderer_child_id) override; 281 int renderer_child_id) override;
290 net::URLRequestContextGetter* GetRequestContextForExtensions() override; 282 net::URLRequestContextGetter* GetRequestContextForExtensions() override;
291 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( 283 net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition(
292 const base::FilePath& partition_path, 284 const base::FilePath& partition_path,
293 bool in_memory) override; 285 bool in_memory) override;
294 net::URLRequestContextGetter* CreateRequestContextForStoragePartition( 286 net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
295 const base::FilePath& partition_path, 287 const base::FilePath& partition_path,
296 bool in_memory, 288 bool in_memory,
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 bool guest_session_; 364 bool guest_session_;
373 365
374 std::string supervised_user_id_; 366 std::string supervised_user_id_;
375 367
376 // Did the last session exit cleanly? Default is true. 368 // Did the last session exit cleanly? Default is true.
377 bool last_session_exited_cleanly_; 369 bool last_session_exited_cleanly_;
378 370
379 scoped_refptr<HostContentSettingsMap> host_content_settings_map_; 371 scoped_refptr<HostContentSettingsMap> host_content_settings_map_;
380 372
381 base::FilePath last_selected_directory_; 373 base::FilePath last_selected_directory_;
382 scoped_refptr<history::TopSites> top_sites_; // For history and thumbnails.
383 374
384 #if defined(ENABLE_EXTENSIONS) 375 #if defined(ENABLE_EXTENSIONS)
385 scoped_refptr<ExtensionSpecialStoragePolicy> 376 scoped_refptr<ExtensionSpecialStoragePolicy>
386 extension_special_storage_policy_; 377 extension_special_storage_policy_;
387 #endif 378 #endif
388 379
389 // The proxy prefs tracker. 380 // The proxy prefs tracker.
390 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_; 381 scoped_ptr<PrefProxyConfigTracker> pref_proxy_config_tracker_;
391 382
392 // We use a temporary directory to store testing profile data. In a multi- 383 // We use a temporary directory to store testing profile data. In a multi-
(...skipping 20 matching lines...) Expand all
413 404
414 // Weak pointer to a delegate for indicating that a profile was created. 405 // Weak pointer to a delegate for indicating that a profile was created.
415 Delegate* delegate_; 406 Delegate* delegate_;
416 407
417 std::string profile_name_; 408 std::string profile_name_;
418 409
419 scoped_ptr<policy::PolicyService> policy_service_; 410 scoped_ptr<policy::PolicyService> policy_service_;
420 }; 411 };
421 412
422 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 413 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698