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.cc

Issue 6201005: Initial support for partitioning cookies for isolated apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix merge conflicts. Created 9 years, 9 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/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | 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) 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 17 matching lines...) Expand all
28 #include "chrome/browser/prefs/pref_service.h" 28 #include "chrome/browser/prefs/pref_service.h"
29 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" 29 #include "chrome/browser/profiles/off_the_record_profile_io_data.h"
30 #include "chrome/browser/ssl/ssl_host_state.h" 30 #include "chrome/browser/ssl/ssl_host_state.h"
31 #include "chrome/browser/sync/profile_sync_service.h" 31 #include "chrome/browser/sync/profile_sync_service.h"
32 #include "chrome/browser/themes/browser_theme_provider.h" 32 #include "chrome/browser/themes/browser_theme_provider.h"
33 #include "chrome/browser/ui/find_bar/find_bar_state.h" 33 #include "chrome/browser/ui/find_bar/find_bar_state.h"
34 #include "chrome/browser/ui/webui/chrome_url_data_manager.h" 34 #include "chrome/browser/ui/webui/chrome_url_data_manager.h"
35 #include "chrome/common/chrome_constants.h" 35 #include "chrome/common/chrome_constants.h"
36 #include "chrome/common/chrome_paths.h" 36 #include "chrome/common/chrome_paths.h"
37 #include "chrome/common/chrome_switches.h" 37 #include "chrome/common/chrome_switches.h"
38 #include "chrome/common/extensions/extension.h"
38 #include "chrome/common/json_pref_store.h" 39 #include "chrome/common/json_pref_store.h"
39 #include "chrome/common/pref_names.h" 40 #include "chrome/common/pref_names.h"
40 #include "chrome/common/render_messages.h" 41 #include "chrome/common/render_messages.h"
41 #include "content/browser/appcache/chrome_appcache_service.h" 42 #include "content/browser/appcache/chrome_appcache_service.h"
42 #include "content/browser/browser_thread.h" 43 #include "content/browser/browser_thread.h"
43 #include "content/browser/chrome_blob_storage_context.h" 44 #include "content/browser/chrome_blob_storage_context.h"
44 #include "content/browser/file_system/browser_file_system_helper.h" 45 #include "content/browser/file_system/browser_file_system_helper.h"
45 #include "content/browser/host_zoom_map.h" 46 #include "content/browser/host_zoom_map.h"
46 #include "content/browser/in_process_webkit/webkit_context.h" 47 #include "content/browser/in_process_webkit/webkit_context.h"
47 #include "content/common/notification_service.h" 48 #include "content/common/notification_service.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 } 413 }
413 414
414 virtual BrowserThemeProvider* GetThemeProvider() { 415 virtual BrowserThemeProvider* GetThemeProvider() {
415 return profile_->GetThemeProvider(); 416 return profile_->GetThemeProvider();
416 } 417 }
417 418
418 virtual URLRequestContextGetter* GetRequestContext() { 419 virtual URLRequestContextGetter* GetRequestContext() {
419 return io_data_.GetMainRequestContextGetter(); 420 return io_data_.GetMainRequestContextGetter();
420 } 421 }
421 422
423 virtual URLRequestContextGetter* GetRequestContextForPossibleApp(
424 const Extension* installed_app) {
425 if (CommandLine::ForCurrentProcess()->HasSwitch(
426 switches::kEnableExperimentalAppManifests) &&
427 installed_app != NULL &&
428 installed_app->is_storage_isolated())
429 return GetRequestContextForIsolatedApp(installed_app->id());
430
431 return GetRequestContext();
432 }
433
422 virtual URLRequestContextGetter* GetRequestContextForMedia() { 434 virtual URLRequestContextGetter* GetRequestContextForMedia() {
423 // In OTR mode, media request context is the same as the original one. 435 // In OTR mode, media request context is the same as the original one.
424 return io_data_.GetMainRequestContextGetter(); 436 return io_data_.GetMainRequestContextGetter();
425 } 437 }
426 438
427 URLRequestContextGetter* GetRequestContextForExtensions() { 439 URLRequestContextGetter* GetRequestContextForExtensions() {
428 return io_data_.GetExtensionsRequestContextGetter(); 440 return io_data_.GetExtensionsRequestContextGetter();
429 } 441 }
430 442
443 URLRequestContextGetter* GetRequestContextForIsolatedApp(
444 const std::string& app_id) {
445 return io_data_.GetIsolatedAppRequestContextGetter(app_id);
446 }
447
431 virtual net::SSLConfigService* GetSSLConfigService() { 448 virtual net::SSLConfigService* GetSSLConfigService() {
432 return profile_->GetSSLConfigService(); 449 return profile_->GetSSLConfigService();
433 } 450 }
434 451
435 virtual HostContentSettingsMap* GetHostContentSettingsMap() { 452 virtual HostContentSettingsMap* GetHostContentSettingsMap() {
436 // Retrieve the host content settings map of the parent profile in order to 453 // Retrieve the host content settings map of the parent profile in order to
437 // ensure the preferences have been migrated. 454 // ensure the preferences have been migrated.
438 profile_->GetHostContentSettingsMap(); 455 profile_->GetHostContentSettingsMap();
439 if (!host_content_settings_map_.get()) 456 if (!host_content_settings_map_.get())
440 host_content_settings_map_ = new HostContentSettingsMap(this); 457 host_content_settings_map_ = new HostContentSettingsMap(this);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 }; 788 };
772 #endif 789 #endif
773 790
774 Profile* Profile::CreateOffTheRecordProfile() { 791 Profile* Profile::CreateOffTheRecordProfile() {
775 #if defined(OS_CHROMEOS) 792 #if defined(OS_CHROMEOS)
776 if (Profile::IsGuestSession()) 793 if (Profile::IsGuestSession())
777 return new GuestSessionProfile(this); 794 return new GuestSessionProfile(this);
778 #endif 795 #endif
779 return new OffTheRecordProfileImpl(this); 796 return new OffTheRecordProfileImpl(this);
780 } 797 }
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile.h ('k') | chrome/browser/profiles/profile_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698