| OLD | NEW |
| 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_impl.h" | 5 #include "chrome/browser/profiles/profile_impl.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 #include "chrome/browser/history/top_sites.h" | 41 #include "chrome/browser/history/top_sites.h" |
| 42 #include "chrome/browser/instant/instant_controller.h" | 42 #include "chrome/browser/instant/instant_controller.h" |
| 43 #include "chrome/browser/net/chrome_url_request_context.h" | 43 #include "chrome/browser/net/chrome_url_request_context.h" |
| 44 #include "chrome/browser/net/gaia/token_service.h" | 44 #include "chrome/browser/net/gaia/token_service.h" |
| 45 #include "chrome/browser/net/net_pref_observer.h" | 45 #include "chrome/browser/net/net_pref_observer.h" |
| 46 #include "chrome/browser/net/pref_proxy_config_service.h" | 46 #include "chrome/browser/net/pref_proxy_config_service.h" |
| 47 #include "chrome/browser/net/ssl_config_service_manager.h" | 47 #include "chrome/browser/net/ssl_config_service_manager.h" |
| 48 #include "chrome/browser/password_manager/password_store_default.h" | 48 #include "chrome/browser/password_manager/password_store_default.h" |
| 49 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 49 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
| 50 #include "chrome/browser/policy/configuration_policy_provider.h" | 50 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 51 #include "chrome/browser/policy/profile_policy_connector.h" | |
| 52 #include "chrome/browser/policy/profile_policy_connector_factory.h" | |
| 53 #include "chrome/browser/prefs/browser_prefs.h" | 51 #include "chrome/browser/prefs/browser_prefs.h" |
| 54 #include "chrome/browser/prefs/pref_value_store.h" | 52 #include "chrome/browser/prefs/pref_value_store.h" |
| 55 #include "chrome/browser/prerender/prerender_manager.h" | 53 #include "chrome/browser/prerender/prerender_manager.h" |
| 56 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 54 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
| 57 #include "chrome/browser/profiles/profile_dependency_manager.h" | 55 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 58 #include "chrome/browser/profiles/profile_manager.h" | 56 #include "chrome/browser/profiles/profile_manager.h" |
| 59 #include "chrome/browser/search_engines/template_url_fetcher.h" | 57 #include "chrome/browser/search_engines/template_url_fetcher.h" |
| 60 #include "chrome/browser/search_engines/template_url_model.h" | 58 #include "chrome/browser/search_engines/template_url_model.h" |
| 61 #include "chrome/browser/sessions/session_service_factory.h" | 59 #include "chrome/browser/sessions/session_service_factory.h" |
| 62 #include "chrome/browser/spellcheck_host.h" | 60 #include "chrome/browser/spellcheck_host.h" |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); | 400 extensions_cookie_path.Append(chrome::kExtensionsCookieFilename); |
| 403 | 401 |
| 404 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); | 402 FilePath app_path = GetPath().Append(chrome::kIsolatedAppStateDirname); |
| 405 | 403 |
| 406 // Make sure we initialize the ProfileIOData after everything else has been | 404 // Make sure we initialize the ProfileIOData after everything else has been |
| 407 // initialized that we might be reading from the IO thread. | 405 // initialized that we might be reading from the IO thread. |
| 408 io_data_.Init(cookie_path, cache_path, cache_max_size, | 406 io_data_.Init(cookie_path, cache_path, cache_max_size, |
| 409 media_cache_path, media_cache_max_size, extensions_cookie_path, | 407 media_cache_path, media_cache_max_size, extensions_cookie_path, |
| 410 app_path); | 408 app_path); |
| 411 | 409 |
| 412 policy::ProfilePolicyConnector* policy_connector = | |
| 413 policy::ProfilePolicyConnectorFactory::GetForProfile(this); | |
| 414 policy_connector->Initialize(); | |
| 415 | |
| 416 // Creation has been finished. | 410 // Creation has been finished. |
| 417 if (delegate_) | 411 if (delegate_) |
| 418 delegate_->OnProfileCreated(this, true); | 412 delegate_->OnProfileCreated(this, true); |
| 419 } | 413 } |
| 420 | 414 |
| 421 void ProfileImpl::InitExtensions(bool extensions_enabled) { | 415 void ProfileImpl::InitExtensions(bool extensions_enabled) { |
| 422 if (user_script_master_ || extension_service_.get()) | 416 if (user_script_master_ || extension_service_.get()) |
| 423 return; // Already initialized. | 417 return; // Already initialized. |
| 424 | 418 |
| 425 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 419 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 return pref_proxy_config_tracker_; | 1579 return pref_proxy_config_tracker_; |
| 1586 } | 1580 } |
| 1587 | 1581 |
| 1588 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { | 1582 prerender::PrerenderManager* ProfileImpl::GetPrerenderManager() { |
| 1589 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1583 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
| 1590 return NULL; | 1584 return NULL; |
| 1591 if (!prerender_manager_.get()) | 1585 if (!prerender_manager_.get()) |
| 1592 prerender_manager_.reset(new prerender::PrerenderManager(this)); | 1586 prerender_manager_.reset(new prerender::PrerenderManager(this)); |
| 1593 return prerender_manager_.get(); | 1587 return prerender_manager_.get(); |
| 1594 } | 1588 } |
| OLD | NEW |