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

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: fix a bad merge 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h" 72 #include "chrome/browser/ui/webui/ntp/ntp_resource_cache.h"
73 #include "chrome/browser/user_style_sheet_watcher.h" 73 #include "chrome/browser/user_style_sheet_watcher.h"
74 #include "chrome/browser/visitedlink/visitedlink_event_listener.h" 74 #include "chrome/browser/visitedlink/visitedlink_event_listener.h"
75 #include "chrome/browser/visitedlink/visitedlink_master.h" 75 #include "chrome/browser/visitedlink/visitedlink_master.h"
76 #include "chrome/browser/web_resource/promo_resource_service.h" 76 #include "chrome/browser/web_resource/promo_resource_service.h"
77 #include "chrome/browser/webdata/web_data_service.h" 77 #include "chrome/browser/webdata/web_data_service.h"
78 #include "chrome/common/chrome_constants.h" 78 #include "chrome/common/chrome_constants.h"
79 #include "chrome/common/chrome_paths.h" 79 #include "chrome/common/chrome_paths.h"
80 #include "chrome/common/chrome_paths_internal.h" 80 #include "chrome/common/chrome_paths_internal.h"
81 #include "chrome/common/chrome_switches.h" 81 #include "chrome/common/chrome_switches.h"
82 #include "chrome/common/extensions/extension_permission_set.h"
82 #include "chrome/common/json_pref_store.h" 83 #include "chrome/common/json_pref_store.h"
83 #include "chrome/common/pref_names.h" 84 #include "chrome/common/pref_names.h"
84 #include "chrome/common/render_messages.h" 85 #include "chrome/common/render_messages.h"
85 #include "chrome/common/spellcheck_messages.h" 86 #include "chrome/common/spellcheck_messages.h"
86 #include "content/browser/appcache/chrome_appcache_service.h" 87 #include "content/browser/appcache/chrome_appcache_service.h"
87 #include "content/browser/browser_thread.h" 88 #include "content/browser/browser_thread.h"
88 #include "content/browser/chrome_blob_storage_context.h" 89 #include "content/browser/chrome_blob_storage_context.h"
89 #include "content/browser/file_system/browser_file_system_helper.h" 90 #include "content/browser/file_system/browser_file_system_helper.h"
90 #include "content/browser/geolocation/geolocation_permission_context.h" 91 #include "content/browser/geolocation/geolocation_permission_context.h"
91 #include "content/browser/host_zoom_map.h" 92 #include "content/browser/host_zoom_map.h"
(...skipping 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 868
868 return request_context; 869 return request_context;
869 } 870 }
870 871
871 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess( 872 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForRenderProcess(
872 int renderer_child_id) { 873 int renderer_child_id) {
873 if (extension_service_.get()) { 874 if (extension_service_.get()) {
874 const Extension* installed_app = extension_service_-> 875 const Extension* installed_app = extension_service_->
875 GetInstalledAppForRenderer(renderer_child_id); 876 GetInstalledAppForRenderer(renderer_child_id);
876 if (installed_app != NULL && installed_app->is_storage_isolated() && 877 if (installed_app != NULL && installed_app->is_storage_isolated() &&
877 installed_app->HasApiPermission(Extension::kExperimentalPermission)) { 878 installed_app->HasApiPermission(
879 ExtensionAPIPermission::Experimental())) {
878 return GetRequestContextForIsolatedApp(installed_app->id()); 880 return GetRequestContextForIsolatedApp(installed_app->id());
879 } 881 }
880 } 882 }
881 return GetRequestContext(); 883 return GetRequestContext();
882 } 884 }
883 885
884 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() { 886 net::URLRequestContextGetter* ProfileImpl::GetRequestContextForMedia() {
885 return io_data_.GetMediaRequestContextGetter(); 887 return io_data_.GetMediaRequestContextGetter();
886 } 888 }
887 889
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 if (!prerender::PrerenderManager::IsPrerenderingPossible()) 1629 if (!prerender::PrerenderManager::IsPrerenderingPossible())
1628 return NULL; 1630 return NULL;
1629 if (!prerender_manager_.get()) { 1631 if (!prerender_manager_.get()) {
1630 CHECK(g_browser_process->prerender_tracker()); 1632 CHECK(g_browser_process->prerender_tracker());
1631 prerender_manager_.reset( 1633 prerender_manager_.reset(
1632 new prerender::PrerenderManager( 1634 new prerender::PrerenderManager(
1633 this, g_browser_process->prerender_tracker())); 1635 this, g_browser_process->prerender_tracker()));
1634 } 1636 }
1635 return prerender_manager_.get(); 1637 return prerender_manager_.get();
1636 } 1638 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698