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

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

Issue 10782038: Revert 147045 - Bring up a content settings icon for ungestured registerProtocolHandler call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 | « chrome/test/base/testing_profile.h ('k') | no next file » | 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 #include "chrome/test/base/testing_profile.h" 5 #include "chrome/test/base/testing_profile.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "base/base_paths.h" 9 #include "base/base_paths.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/message_loop_proxy.h" 12 #include "base/message_loop_proxy.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/run_loop.h" 14 #include "base/run_loop.h"
15 #include "base/string_number_conversions.h" 15 #include "base/string_number_conversions.h"
16 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 16 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
17 #include "chrome/browser/bookmarks/bookmark_model.h" 17 #include "chrome/browser/bookmarks/bookmark_model.h"
18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
19 #include "chrome/browser/browser_process.h" 19 #include "chrome/browser/browser_process.h"
20 #include "chrome/browser/content_settings/host_content_settings_map.h" 20 #include "chrome/browser/content_settings/host_content_settings_map.h"
21 #include "chrome/browser/custom_handlers/protocol_handler_registry.h"
21 #include "chrome/browser/extensions/extension_service.h" 22 #include "chrome/browser/extensions/extension_service.h"
22 #include "chrome/browser/extensions/extension_special_storage_policy.h" 23 #include "chrome/browser/extensions/extension_special_storage_policy.h"
23 #include "chrome/browser/extensions/extension_system.h" 24 #include "chrome/browser/extensions/extension_system.h"
24 #include "chrome/browser/extensions/extension_system_factory.h" 25 #include "chrome/browser/extensions/extension_system_factory.h"
25 #include "chrome/browser/extensions/test_extension_system.h" 26 #include "chrome/browser/extensions/test_extension_system.h"
26 #include "chrome/browser/favicon/favicon_service.h" 27 #include "chrome/browser/favicon/favicon_service.h"
27 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h" 28 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
28 #include "chrome/browser/history/history.h" 29 #include "chrome/browser/history/history.h"
29 #include "chrome/browser/history/history_backend.h" 30 #include "chrome/browser/history/history_backend.h"
30 #include "chrome/browser/history/history_service_factory.h" 31 #include "chrome/browser/history/history_service_factory.h"
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 HistoryServiceFactory::GetForProfileWithoutCreating(this).get(); 363 HistoryServiceFactory::GetForProfileWithoutCreating(this).get();
363 if (history_service) { 364 if (history_service) {
364 history_service->history_backend_->bookmark_service_ = 365 history_service->history_backend_->bookmark_service_ =
365 bookmark_service; 366 bookmark_service;
366 history_service->history_backend_->expirer_.bookmark_service_ = 367 history_service->history_backend_->expirer_.bookmark_service_ =
367 bookmark_service; 368 bookmark_service;
368 } 369 }
369 } 370 }
370 371
371 void TestingProfile::CreateProtocolHandlerRegistry() { 372 void TestingProfile::CreateProtocolHandlerRegistry() {
372 CreateProtocolHandlerRegistry( 373 protocol_handler_registry_ = new ProtocolHandlerRegistry(this,
373 new ProtocolHandlerRegistry::Delegate()); 374 new ProtocolHandlerRegistry::Delegate());
374 } 375 }
375 376
376 void TestingProfile::CreateProtocolHandlerRegistry(
377 ProtocolHandlerRegistry::Delegate* delegate) {
378 protocol_handler_registry_ = new ProtocolHandlerRegistry(this, delegate);
379 }
380
381 static scoped_refptr<RefcountedProfileKeyedService> BuildWebDataService( 377 static scoped_refptr<RefcountedProfileKeyedService> BuildWebDataService(
382 Profile* profile) { 378 Profile* profile) {
383 WebDataService* web_data_service = new WebDataService(); 379 WebDataService* web_data_service = new WebDataService();
384 if (web_data_service) 380 if (web_data_service)
385 web_data_service->Init(profile->GetPath()); 381 web_data_service->Init(profile->GetPath());
386 return web_data_service; 382 return web_data_service;
387 } 383 }
388 384
389 void TestingProfile::CreateWebDataService() { 385 void TestingProfile::CreateWebDataService() {
390 WebDataServiceFactory::GetInstance()->SetTestingFactory( 386 WebDataServiceFactory::GetInstance()->SetTestingFactory(
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
739 } 735 }
740 736
741 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) { 737 bool TestingProfile::WasCreatedByVersionOrLater(const std::string& version) {
742 return true; 738 return true;
743 } 739 }
744 740
745 base::Callback<ChromeURLDataManagerBackend*(void)> 741 base::Callback<ChromeURLDataManagerBackend*(void)>
746 TestingProfile::GetChromeURLDataManagerBackendGetter() const { 742 TestingProfile::GetChromeURLDataManagerBackendGetter() const {
747 return base::Callback<ChromeURLDataManagerBackend*(void)>(); 743 return base::Callback<ChromeURLDataManagerBackend*(void)>();
748 } 744 }
OLDNEW
« no previous file with comments | « chrome/test/base/testing_profile.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698