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

Side by Side Diff: chrome/browser/profiles/profile.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.h" 5 #include "chrome/browser/profiles/profile.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 CreateQuotaManagerAndClients(); 447 CreateQuotaManagerAndClients();
448 return quota_manager_.get(); 448 return quota_manager_.get();
449 } 449 }
450 450
451 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess( 451 virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(
452 int renderer_child_id) { 452 int renderer_child_id) {
453 if (GetExtensionService()) { 453 if (GetExtensionService()) {
454 const Extension* installed_app = GetExtensionService()-> 454 const Extension* installed_app = GetExtensionService()->
455 GetInstalledAppForRenderer(renderer_child_id); 455 GetInstalledAppForRenderer(renderer_child_id);
456 if (installed_app != NULL && installed_app->is_storage_isolated() && 456 if (installed_app != NULL && installed_app->is_storage_isolated() &&
457 installed_app->HasApiPermission(Extension::kExperimentalPermission)) { 457 installed_app->HasApiPermission(
458 ExtensionAPIPermission::Experimental())) {
458 return GetRequestContextForIsolatedApp(installed_app->id()); 459 return GetRequestContextForIsolatedApp(installed_app->id());
459 } 460 }
460 } 461 }
461 return GetRequestContext(); 462 return GetRequestContext();
462 } 463 }
463 464
464 virtual net::URLRequestContextGetter* GetRequestContextForMedia() { 465 virtual net::URLRequestContextGetter* GetRequestContextForMedia() {
465 // In OTR mode, media request context is the same as the original one. 466 // In OTR mode, media request context is the same as the original one.
466 return io_data_.GetMainRequestContextGetter(); 467 return io_data_.GetMainRequestContextGetter();
467 } 468 }
(...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
827 }; 828 };
828 #endif 829 #endif
829 830
830 Profile* Profile::CreateOffTheRecordProfile() { 831 Profile* Profile::CreateOffTheRecordProfile() {
831 #if defined(OS_CHROMEOS) 832 #if defined(OS_CHROMEOS)
832 if (Profile::IsGuestSession()) 833 if (Profile::IsGuestSession())
833 return new GuestSessionProfile(this); 834 return new GuestSessionProfile(this);
834 #endif 835 #endif
835 return new OffTheRecordProfileImpl(this); 836 return new OffTheRecordProfileImpl(this);
836 } 837 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698