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

Side by Side Diff: chrome/browser/profiles/profile_impl.cc

Issue 7003098: Start refractoring extension permissions into ExtensionPermissionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup and update ExtensionPermissionSet data model. Created 9 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) 2011 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 #include "chrome/browser/profiles/profile_impl.h" 5 #include "chrome/browser/profiles/profile_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" 73 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
74 #include "chrome/browser/user_style_sheet_watcher.h" 74 #include "chrome/browser/user_style_sheet_watcher.h"
75 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" 75 #include "chrome/browser/visitedlink/visitedlink_event_listener.h"
76 #include "chrome/browser/visitedlink/visitedlink_master.h" 76 #include "chrome/browser/visitedlink/visitedlink_master.h"
77 #include "chrome/browser/web_resource/promo_resource_service.h" 77 #include "chrome/browser/web_resource/promo_resource_service.h"
78 #include "chrome/browser/webdata/web_data_service.h" 78 #include "chrome/browser/webdata/web_data_service.h"
79 #include "chrome/common/chrome_constants.h" 79 #include "chrome/common/chrome_constants.h"
80 #include "chrome/common/chrome_paths.h" 80 #include "chrome/common/chrome_paths.h"
81 #include "chrome/common/chrome_paths_internal.h" 81 #include "chrome/common/chrome_paths_internal.h"
82 #include "chrome/common/chrome_switches.h" 82 #include "chrome/common/chrome_switches.h"
83 #include "chrome/common/extensions/extension_permission_set.h"
83 #include "chrome/common/json_pref_store.h" 84 #include "chrome/common/json_pref_store.h"
84 #include "chrome/common/pref_names.h" 85 #include "chrome/common/pref_names.h"
85 #include "chrome/common/render_messages.h" 86 #include "chrome/common/render_messages.h"
86 #include "chrome/common/spellcheck_messages.h" 87 #include "chrome/common/spellcheck_messages.h"
87 #include "content/browser/appcache/chrome_appcache_service.h" 88 #include "content/browser/appcache/chrome_appcache_service.h"
88 #include "content/browser/browser_thread.h" 89 #include "content/browser/browser_thread.h"
89 #include "content/browser/chrome_blob_storage_context.h" 90 #include "content/browser/chrome_blob_storage_context.h"
90 #include "content/browser/file_system/browser_file_system_helper.h" 91 #include "content/browser/file_system/browser_file_system_helper.h"
91 #include "content/browser/geolocation/geolocation_permission_context.h" 92 #include "content/browser/geolocation/geolocation_permission_context.h"
92 #include "content/browser/host_zoom_map.h" 93 #include "content/browser/host_zoom_map.h"
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 869
869 return request_context; 870 return request_context;
870 } 871 }
871 872
872 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( 873 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
873 int renderer_child_id) { 874 int renderer_child_id) {
874 if (extension_service_.get()) { 875 if (extension_service_.get()) {
875 const Extension* installed_app = extension_service_-> 876 const Extension* installed_app = extension_service_->
876 GetInstalledAppForRenderer(renderer_child_id); 877 GetInstalledAppForRenderer(renderer_child_id);
877 if (installed_app != NULL && installed_app->is_storage_isolated() && 878 if (installed_app != NULL && installed_app->is_storage_isolated() &&
878 installed_app->HasApiPermission(Extension::kExperimentalPermission)) { 879 installed_app->HasApiPermission(
880 ExtensionAPIPermission::kExperimental)) {
879 return GetRequestContextForIsolatedApp(installed_app->id()); 881 return GetRequestContextForIsolatedApp(installed_app->id());
880 } 882 }
881 } 883 }
882 return GetRequestContext(); 884 return GetRequestContext();
883 } 885 }
884 886
885 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { 887 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() {
886 return io_data_.GetMediaRequestContextGetter(); 888 return io_data_.GetMediaRequestContextGetter();
887 } 889 }
888 890
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1637 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1639 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1638 return NULL; 1640 return NULL;
1639 if (!prerender_manager_.get()) { 1641 if (!prerender_manager_.get()) {
1640 CHECK(g_browser_process->prerender_tracker()); 1642 CHECK(g_browser_process->prerender_tracker());
1641 prerender_manager_.reset( 1643 prerender_manager_.reset(
1642 new prerender::PrerenderManager( 1644 new prerender::PrerenderManager(
1643 this, g_browser_process->prerender_tracker())); 1645 this, g_browser_process->prerender_tracker()));
1644 } 1646 }
1645 return prerender_manager_.get(); 1647 return prerender_manager_.get();
1646 } 1648 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698