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

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

Issue 11615002: Exclude PluginService for builds with enable_plugins==0 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ifdef out VersionHandler::OnGotPlugins Created 8 years 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/callback.h" 8 #include "base/callback.h"
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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 504
505 io_data_.Init(cookie_path, server_bound_cert_path, cache_path, 505 io_data_.Init(cookie_path, server_bound_cert_path, cache_path,
506 cache_max_size, media_cache_path, media_cache_max_size, 506 cache_max_size, media_cache_path, media_cache_max_size,
507 extensions_cookie_path, GetPath(), infinite_cache_path, 507 extensions_cookie_path, GetPath(), infinite_cache_path,
508 predictor_, 508 predictor_,
509 g_browser_process->local_state(), 509 g_browser_process->local_state(),
510 g_browser_process->io_thread(), 510 g_browser_process->io_thread(),
511 restore_old_session_cookies, 511 restore_old_session_cookies,
512 GetSpecialStoragePolicy()); 512 GetSpecialStoragePolicy());
513 513
514 #if defined(ENABLE_PLUGINS)
514 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext( 515 ChromePluginServiceFilter::GetInstance()->RegisterResourceContext(
515 PluginPrefs::GetForProfile(this), 516 PluginPrefs::GetForProfile(this),
516 io_data_.GetResourceContextNoInit()); 517 io_data_.GetResourceContextNoInit());
518 #endif
517 519
518 // Delay README creation to not impact startup performance. 520 // Delay README creation to not impact startup performance.
519 BrowserThread::PostDelayedTask( 521 BrowserThread::PostDelayedTask(
520 BrowserThread::FILE, FROM_HERE, 522 BrowserThread::FILE, FROM_HERE,
521 base::Bind(&EnsureReadmeFile, GetPath()), 523 base::Bind(&EnsureReadmeFile, GetPath()),
522 base::TimeDelta::FromMilliseconds(create_readme_delay_ms)); 524 base::TimeDelta::FromMilliseconds(create_readme_delay_ms));
523 525
524 if (!CommandLine::ForCurrentProcess()->HasSwitch( 526 if (!CommandLine::ForCurrentProcess()->HasSwitch(
525 switches::kDisableRestoreSessionState)) { 527 switches::kDisableRestoreSessionState)) {
526 content::BrowserContext::GetDefaultStoragePartition(this)-> 528 content::BrowserContext::GetDefaultStoragePartition(this)->
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
583 bool prefs_loaded = prefs_->GetInitializationStatus() != 585 bool prefs_loaded = prefs_->GetInitializationStatus() !=
584 PrefService::INITIALIZATION_STATUS_WAITING; 586 PrefService::INITIALIZATION_STATUS_WAITING;
585 587
586 #if defined(ENABLE_SESSION_SERVICE) 588 #if defined(ENABLE_SESSION_SERVICE)
587 StopCreateSessionServiceTimer(); 589 StopCreateSessionServiceTimer();
588 #endif 590 #endif
589 591
590 // Remove pref observers 592 // Remove pref observers
591 pref_change_registrar_.RemoveAll(); 593 pref_change_registrar_.RemoveAll();
592 594
595 #if defined(ENABLE_PLUGINS)
593 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext( 596 ChromePluginServiceFilter::GetInstance()->UnregisterResourceContext(
594 io_data_.GetResourceContextNoInit()); 597 io_data_.GetResourceContextNoInit());
598 #endif
595 599
596 // Destroy OTR profile and its profile services first. 600 // Destroy OTR profile and its profile services first.
597 if (off_the_record_profile_.get()) { 601 if (off_the_record_profile_.get()) {
598 ProfileDestroyer::DestroyOffTheRecordProfileNow( 602 ProfileDestroyer::DestroyOffTheRecordProfileNow(
599 off_the_record_profile_.get()); 603 off_the_record_profile_.get());
600 } else { 604 } else {
601 ExtensionPrefValueMapFactory::GetForProfile(this)-> 605 ExtensionPrefValueMapFactory::GetForProfile(this)->
602 ClearAllIncognitoSessionOnlyPreferences(); 606 ClearAllIncognitoSessionOnlyPreferences();
603 } 607 }
604 608
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 if (!path.empty()) 1157 if (!path.empty())
1154 *cache_path = path; 1158 *cache_path = path;
1155 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) : 1159 *max_size = is_media_context ? prefs_->GetInteger(prefs::kMediaCacheSize) :
1156 prefs_->GetInteger(prefs::kDiskCacheSize); 1160 prefs_->GetInteger(prefs::kDiskCacheSize);
1157 } 1161 }
1158 1162
1159 base::Callback<ChromeURLDataManagerBackend*(void)> 1163 base::Callback<ChromeURLDataManagerBackend*(void)>
1160 ProfileImpl::GetChromeURLDataManagerBackendGetter() const { 1164 ProfileImpl::GetChromeURLDataManagerBackendGetter() const {
1161 return io_data_.GetChromeURLDataManagerBackendGetter(); 1165 return io_data_.GetChromeURLDataManagerBackendGetter();
1162 } 1166 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698