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

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

Issue 10913265: Redo the Storage Partition directory layout to support guest tags and origin based partitions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 8 years, 3 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/environment.h" 10 #include "base/environment.h"
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 FilePath media_cache_path = base_cache_path_; 376 FilePath media_cache_path = base_cache_path_;
377 int media_cache_max_size; 377 int media_cache_max_size;
378 GetCacheParameters(true, &media_cache_path, &media_cache_max_size); 378 GetCacheParameters(true, &media_cache_path, &media_cache_max_size);
379 media_cache_path = GetMediaCachePath(media_cache_path); 379 media_cache_path = GetMediaCachePath(media_cache_path);
380 380
381 FilePath extensions_cookie_path = GetPath(); 381 FilePath extensions_cookie_path = GetPath();
382 extensions_cookie_path = 382 extensions_cookie_path =
383 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); 383 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename);
384 384
385 FilePath app_path = GetPath().Append(content::kStoragePartitionDirname);
386
387 FilePath infinite_cache_path = GetPath(); 385 FilePath infinite_cache_path = GetPath();
388 infinite_cache_path = 386 infinite_cache_path =
389 infinite_cache_path.Append(FILE_PATH_LITERAL("Infinite Cache")); 387 infinite_cache_path.Append(FILE_PATH_LITERAL("Infinite Cache"));
390 388
391 #if defined(OS_ANDROID) 389 #if defined(OS_ANDROID)
392 SessionStartupPref::Type startup_pref_type = 390 SessionStartupPref::Type startup_pref_type =
393 SessionStartupPref::GetDefaultStartupType(); 391 SessionStartupPref::GetDefaultStartupType();
394 #else 392 #else
395 SessionStartupPref::Type startup_pref_type = 393 SessionStartupPref::Type startup_pref_type =
396 StartupBrowserCreator::GetSessionStartupPref( 394 StartupBrowserCreator::GetSessionStartupPref(
397 *CommandLine::ForCurrentProcess(), this).type; 395 *CommandLine::ForCurrentProcess(), this).type;
398 #endif 396 #endif
399 bool restore_old_session_cookies = 397 bool restore_old_session_cookies =
400 (!DidLastSessionExitCleanly() || 398 (!DidLastSessionExitCleanly() ||
401 startup_pref_type == SessionStartupPref::LAST); 399 startup_pref_type == SessionStartupPref::LAST);
402 400
403 InitHostZoomMap(); 401 InitHostZoomMap();
404 402
405 // Make sure we initialize the ProfileIOData after everything else has been 403 // Make sure we initialize the ProfileIOData after everything else has been
406 // initialized that we might be reading from the IO thread. 404 // initialized that we might be reading from the IO thread.
407 405
408 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, 406 io_data_.Init(cookie_path, server_bound_cert_path, cache_path,
409 cache_max_size, media_cache_path, media_cache_max_size, 407 cache_max_size, media_cache_path, media_cache_max_size,
410 extensions_cookie_path, app_path, infinite_cache_path, 408 extensions_cookie_path, GetPath(), infinite_cache_path,
411 predictor_, 409 predictor_,
412 g_browser_process->local_state(), 410 g_browser_process->local_state(),
413 g_browser_process->io_thread(), 411 g_browser_process->io_thread(),
414 restore_old_session_cookies, 412 restore_old_session_cookies,
415 GetSpecialStoragePolicy()); 413 GetSpecialStoragePolicy());
416 414
417 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( 415 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
418 PluginPrefs::GetForProfile(this), 416 PluginPrefs::GetForProfile(this),
419 io_data_.GetResourceContextNoInit()); 417 io_data_.GetResourceContextNoInit());
420 418
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 if (!path.empty()) 1090 if (!path.empty())
1093 *cache_path = path; 1091 *cache_path = path;
1094 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1092 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1095 prefs_->GetInteger(prefs::kDiskCacheSize); 1093 prefs_->GetInteger(prefs::kDiskCacheSize);
1096 } 1094 }
1097 1095
1098 base::Callback<ChromeURLDataManagerBackend*(void)> 1096 base::Callback<ChromeURLDataManagerBackend*(void)>
1099 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { 1097 ProfileImpl::GetChromeURLDataManagerBackendGetter() const {
1100 return io_data_.GetChromeURLDataManagerBackendGetter(); 1098 return io_data_.GetChromeURLDataManagerBackendGetter();
1101 } 1099 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/data_deleter.cc ('k') | chrome/browser/profiles/profile_impl_io_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698