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

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

Issue 330143002: Simplify geolocation permission request in the Content API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix layout test Created 6 years, 6 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) 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/message_loop_proxy.h" 12 #include "base/message_loop/message_loop_proxy.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/prefs/testing_pref_store.h" 14 #include "base/prefs/testing_pref_store.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "base/strings/string_number_conversions.h" 16 #include "base/strings/string_number_conversions.h"
17 #include "chrome/browser/autocomplete/autocomplete_classifier.h" 17 #include "chrome/browser/autocomplete/autocomplete_classifier.h"
18 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 18 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
19 #include "chrome/browser/bookmarks/chrome_bookmark_client.h" 19 #include "chrome/browser/bookmarks/chrome_bookmark_client.h"
20 #include "chrome/browser/browser_process.h" 20 #include "chrome/browser/browser_process.h"
21 #include "chrome/browser/chrome_notification_types.h" 21 #include "chrome/browser/chrome_notification_types.h"
22 #include "chrome/browser/content_settings/host_content_settings_map.h" 22 #include "chrome/browser/content_settings/host_content_settings_map.h"
23 #include "chrome/browser/extensions/extension_service.h" 23 #include "chrome/browser/extensions/extension_service.h"
24 #include "chrome/browser/extensions/extension_special_storage_policy.h" 24 #include "chrome/browser/extensions/extension_special_storage_policy.h"
25 #include "chrome/browser/extensions/extension_system_factory.h" 25 #include "chrome/browser/extensions/extension_system_factory.h"
26 #include "chrome/browser/extensions/test_extension_system.h" 26 #include "chrome/browser/extensions/test_extension_system.h"
27 #include "chrome/browser/favicon/favicon_service.h" 27 #include "chrome/browser/favicon/favicon_service.h"
28 #include "chrome/browser/favicon/favicon_service_factory.h" 28 #include "chrome/browser/favicon/favicon_service_factory.h"
29 #include "chrome/browser/geolocation/chrome_geolocation_permission_context.h"
30 #include "chrome/browser/geolocation/chrome_geolocation_permission_context_facto ry.h"
31 #include "chrome/browser/history/chrome_history_client.h" 29 #include "chrome/browser/history/chrome_history_client.h"
32 #include "chrome/browser/history/chrome_history_client_factory.h" 30 #include "chrome/browser/history/chrome_history_client_factory.h"
33 #include "chrome/browser/history/history_backend.h" 31 #include "chrome/browser/history/history_backend.h"
34 #include "chrome/browser/history/history_db_task.h" 32 #include "chrome/browser/history/history_db_task.h"
35 #include "chrome/browser/history/history_service.h" 33 #include "chrome/browser/history/history_service.h"
36 #include "chrome/browser/history/history_service_factory.h" 34 #include "chrome/browser/history/history_service_factory.h"
37 #include "chrome/browser/history/top_sites.h" 35 #include "chrome/browser/history/top_sites.h"
38 #include "chrome/browser/history/web_history_service_factory.h" 36 #include "chrome/browser/history/web_history_service_factory.h"
39 #include "chrome/browser/net/pref_proxy_config_tracker.h" 37 #include "chrome/browser/net/pref_proxy_config_tracker.h"
40 #include "chrome/browser/net/proxy_service_factory.h" 38 #include "chrome/browser/net/proxy_service_factory.h"
(...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false); 816 host_content_settings_map_ = new HostContentSettingsMap(GetPrefs(), false);
819 #if defined(ENABLE_EXTENSIONS) 817 #if defined(ENABLE_EXTENSIONS)
820 ExtensionService* extension_service = GetExtensionService(); 818 ExtensionService* extension_service = GetExtensionService();
821 if (extension_service) 819 if (extension_service)
822 host_content_settings_map_->RegisterExtensionService(extension_service); 820 host_content_settings_map_->RegisterExtensionService(extension_service);
823 #endif 821 #endif
824 } 822 }
825 return host_content_settings_map_.get(); 823 return host_content_settings_map_.get();
826 } 824 }
827 825
828 content::GeolocationPermissionContext*
829 TestingProfile::GetGeolocationPermissionContext() {
830 return ChromeGeolocationPermissionContextFactory::GetForProfile(this);
831 }
832
833 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() { 826 content::BrowserPluginGuestManager* TestingProfile::GetGuestManager() {
834 #if defined(ENABLE_EXTENSIONS) 827 #if defined(ENABLE_EXTENSIONS)
835 return GuestViewManager::FromBrowserContext(this); 828 return GuestViewManager::FromBrowserContext(this);
836 #else 829 #else
837 return NULL; 830 return NULL;
838 #endif 831 #endif
839 } 832 }
840 833
841 content::PushMessagingService* TestingProfile::GetPushMessagingService() { 834 content::PushMessagingService* TestingProfile::GetPushMessagingService() {
842 return NULL; 835 return NULL;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 path_, 980 path_,
988 delegate_, 981 delegate_,
989 extension_policy_, 982 extension_policy_,
990 pref_service_.Pass(), 983 pref_service_.Pass(),
991 incognito_, 984 incognito_,
992 guest_session_, 985 guest_session_,
993 supervised_user_id_, 986 supervised_user_id_,
994 policy_service_.Pass(), 987 policy_service_.Pass(),
995 testing_factories_)); 988 testing_factories_));
996 } 989 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698