| 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 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), | 1311 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::DB), |
| 1312 GetExtensionSpecialStoragePolicy()); | 1312 GetExtensionSpecialStoragePolicy()); |
| 1313 | 1313 |
| 1314 // Each consumer is responsible for registering its QuotaClient during | 1314 // Each consumer is responsible for registering its QuotaClient during |
| 1315 // its construction. | 1315 // its construction. |
| 1316 file_system_context_ = CreateFileSystemContext( | 1316 file_system_context_ = CreateFileSystemContext( |
| 1317 GetPath(), IsOffTheRecord(), | 1317 GetPath(), IsOffTheRecord(), |
| 1318 GetExtensionSpecialStoragePolicy(), | 1318 GetExtensionSpecialStoragePolicy(), |
| 1319 quota_manager_->proxy()); | 1319 quota_manager_->proxy()); |
| 1320 db_tracker_ = new webkit_database::DatabaseTracker( | 1320 db_tracker_ = new webkit_database::DatabaseTracker( |
| 1321 GetPath(), IsOffTheRecord(), GetExtensionSpecialStoragePolicy(), | 1321 GetPath(), IsOffTheRecord(), clear_local_state_on_exit_, |
| 1322 GetExtensionSpecialStoragePolicy(), |
| 1322 quota_manager_->proxy(), | 1323 quota_manager_->proxy(), |
| 1323 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); | 1324 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE)); |
| 1324 webkit_context_ = new WebKitContext( | 1325 webkit_context_ = new WebKitContext( |
| 1325 IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(), | 1326 IsOffTheRecord(), GetPath(), GetExtensionSpecialStoragePolicy(), |
| 1326 clear_local_state_on_exit_, quota_manager_->proxy(), | 1327 clear_local_state_on_exit_, quota_manager_->proxy(), |
| 1327 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT)); | 1328 BrowserThread::GetMessageLoopProxyForThread(BrowserThread::WEBKIT)); |
| 1328 appcache_service_ = new ChromeAppCacheService(quota_manager_->proxy()); | 1329 appcache_service_ = new ChromeAppCacheService(quota_manager_->proxy()); |
| 1329 BrowserThread::PostTask( | 1330 BrowserThread::PostTask( |
| 1330 BrowserThread::IO, FROM_HERE, | 1331 BrowserThread::IO, FROM_HERE, |
| 1331 NewRunnableMethod( | 1332 NewRunnableMethod( |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1386 clear_local_state_on_exit_ = | 1387 clear_local_state_on_exit_ = |
| 1387 prefs->GetBoolean(prefs::kClearSiteDataOnExit); | 1388 prefs->GetBoolean(prefs::kClearSiteDataOnExit); |
| 1388 if (webkit_context_) { | 1389 if (webkit_context_) { |
| 1389 webkit_context_->set_clear_local_state_on_exit( | 1390 webkit_context_->set_clear_local_state_on_exit( |
| 1390 clear_local_state_on_exit_); | 1391 clear_local_state_on_exit_); |
| 1391 } | 1392 } |
| 1392 if (appcache_service_) { | 1393 if (appcache_service_) { |
| 1393 appcache_service_->SetClearLocalStateOnExit( | 1394 appcache_service_->SetClearLocalStateOnExit( |
| 1394 clear_local_state_on_exit_); | 1395 clear_local_state_on_exit_); |
| 1395 } | 1396 } |
| 1397 if (db_tracker_) { |
| 1398 db_tracker_->SetClearLocalStateOnExit( |
| 1399 clear_local_state_on_exit_); |
| 1400 } |
| 1396 } else if (*pref_name_in == prefs::kGoogleServicesUsername) { | 1401 } else if (*pref_name_in == prefs::kGoogleServicesUsername) { |
| 1397 ProfileManager* profile_manager = g_browser_process->profile_manager(); | 1402 ProfileManager* profile_manager = g_browser_process->profile_manager(); |
| 1398 profile_manager->RegisterProfileName(this); | 1403 profile_manager->RegisterProfileName(this); |
| 1399 } else if (*pref_name_in == prefs::kDefaultZoomLevel) { | 1404 } else if (*pref_name_in == prefs::kDefaultZoomLevel) { |
| 1400 GetHostZoomMap()->set_default_zoom_level( | 1405 GetHostZoomMap()->set_default_zoom_level( |
| 1401 prefs->GetDouble(prefs::kDefaultZoomLevel)); | 1406 prefs->GetDouble(prefs::kDefaultZoomLevel)); |
| 1402 } | 1407 } |
| 1403 break; | 1408 break; |
| 1404 } | 1409 } |
| 1405 case NotificationType::BOOKMARK_MODEL_LOADED: | 1410 case NotificationType::BOOKMARK_MODEL_LOADED: |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1644 if (!prerender::PrerenderManager::IsPrerenderingPossible()) | 1649 if (!prerender::PrerenderManager::IsPrerenderingPossible()) |
| 1645 return NULL; | 1650 return NULL; |
| 1646 if (!prerender_manager_.get()) { | 1651 if (!prerender_manager_.get()) { |
| 1647 CHECK(g_browser_process->prerender_tracker()); | 1652 CHECK(g_browser_process->prerender_tracker()); |
| 1648 prerender_manager_.reset( | 1653 prerender_manager_.reset( |
| 1649 new prerender::PrerenderManager( | 1654 new prerender::PrerenderManager( |
| 1650 this, g_browser_process->prerender_tracker())); | 1655 this, g_browser_process->prerender_tracker())); |
| 1651 } | 1656 } |
| 1652 return prerender_manager_.get(); | 1657 return prerender_manager_.get(); |
| 1653 } | 1658 } |
| OLD | NEW |