diff options
author | tburkard@chromium.org <tburkard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 15:54:37 +0000 |
---|---|---|
committer | tburkard@chromium.org <tburkard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 15:54:37 +0000 |
commit | 938b77711a26427c1f517d75db9120af34f1d454 (patch) | |
tree | a9a1508420a9a0f12fc3e4cd254e4e12bad68c14 /chrome/browser/profiles | |
parent | bb6bd1f3beed051238f36bd0fca9014ebfa9bffc (diff) | |
download | chromium_src-938b77711a26427c1f517d75db9120af34f1d454.zip chromium_src-938b77711a26427c1f517d75db9120af34f1d454.tar.gz chromium_src-938b77711a26427c1f517d75db9120af34f1d454.tar.bz2 |
Plumbing for the Infinite Cache.
R=rvargas@chromium.org, willchan@chromium.org
Review URL: https://chromiumcodereview.appspot.com/10905110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155738 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/profiles')
-rw-r--r-- | chrome/browser/profiles/profile_impl.cc | 7 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_impl_io_data.cc | 3 | ||||
-rw-r--r-- | chrome/browser/profiles/profile_impl_io_data.h | 2 |
3 files changed, 11 insertions, 1 deletions
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 8a492e4..a550e5e 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc @@ -384,6 +384,10 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) { FilePath app_path = GetPath().Append(content::kStoragePartitionDirname); + FilePath infinite_cache_path = GetPath(); + infinite_cache_path = + infinite_cache_path.Append(FILE_PATH_LITERAL("Infinite Cache")); + #if defined(OS_ANDROID) SessionStartupPref::Type startup_pref_type = SessionStartupPref::GetDefaultStartupType(); @@ -403,7 +407,8 @@ void ProfileImpl::DoFinalInit(bool is_new_profile) { io_data_.Init(cookie_path, server_bound_cert_path, cache_path, cache_max_size, media_cache_path, media_cache_max_size, - extensions_cookie_path, app_path, predictor_, + extensions_cookie_path, app_path, infinite_cache_path, + predictor_, g_browser_process->local_state(), g_browser_process->io_thread(), restore_old_session_cookies, diff --git a/chrome/browser/profiles/profile_impl_io_data.cc b/chrome/browser/profiles/profile_impl_io_data.cc index ed86c63..ed27494 100644 --- a/chrome/browser/profiles/profile_impl_io_data.cc +++ b/chrome/browser/profiles/profile_impl_io_data.cc @@ -96,6 +96,7 @@ void ProfileImplIOData::Handle::Init( int media_cache_max_size, const FilePath& extensions_cookie_path, const FilePath& app_path, + const FilePath& infinite_cache_path, chrome_browser_net::Predictor* predictor, PrefService* local_state, IOThread* io_thread, @@ -114,6 +115,7 @@ void ProfileImplIOData::Handle::Init( lazy_params->media_cache_path = media_cache_path; lazy_params->media_cache_max_size = media_cache_max_size; lazy_params->extensions_cookie_path = extensions_cookie_path; + lazy_params->infinite_cache_path = infinite_cache_path; lazy_params->restore_old_session_cookies = restore_old_session_cookies; lazy_params->special_storage_policy = special_storage_policy; @@ -416,6 +418,7 @@ void ProfileImplIOData::LazyInitializeInternal( PopulateNetworkSessionParams(profile_params, &network_session_params); net::HttpCache* main_cache = new net::HttpCache( network_session_params, main_backend); + main_cache->InitializeInfiniteCache(lazy_params_->infinite_cache_path); if (record_mode || playback_mode) { main_cache->set_mode( diff --git a/chrome/browser/profiles/profile_impl_io_data.h b/chrome/browser/profiles/profile_impl_io_data.h index 83b2148..3cfad74 100644 --- a/chrome/browser/profiles/profile_impl_io_data.h +++ b/chrome/browser/profiles/profile_impl_io_data.h @@ -45,6 +45,7 @@ class ProfileImplIOData : public ProfileIOData { int media_cache_max_size, const FilePath& extensions_cookie_path, const FilePath& app_path, + const FilePath& infinite_cache_path, chrome_browser_net::Predictor* predictor, PrefService* local_state, IOThread* io_thread, @@ -123,6 +124,7 @@ class ProfileImplIOData : public ProfileIOData { FilePath media_cache_path; int media_cache_max_size; FilePath extensions_cookie_path; + FilePath infinite_cache_path; bool restore_old_session_cookies; scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy; }; |