| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 #include "chrome/browser/profiles/profile_metrics.h" | 68 #include "chrome/browser/profiles/profile_metrics.h" |
| 69 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" | 69 #include "chrome/browser/push_messaging/push_messaging_service_factory.h" |
| 70 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" | 70 #include "chrome/browser/push_messaging/push_messaging_service_impl.h" |
| 71 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 71 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 72 #include "chrome/browser/sessions/session_service_factory.h" | 72 #include "chrome/browser/sessions/session_service_factory.h" |
| 73 #include "chrome/browser/signin/signin_manager_factory.h" | 73 #include "chrome/browser/signin/signin_manager_factory.h" |
| 74 #include "chrome/browser/signin/signin_ui_util.h" | 74 #include "chrome/browser/signin/signin_ui_util.h" |
| 75 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" | 75 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate.h" |
| 76 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" | 76 #include "chrome/browser/ssl/chrome_ssl_host_state_delegate_factory.h" |
| 77 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 77 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
| 78 #include "chrome/browser/ui/webui/prefs_internals_source.h" |
| 78 #include "chrome/common/chrome_constants.h" | 79 #include "chrome/common/chrome_constants.h" |
| 79 #include "chrome/common/chrome_features.h" | 80 #include "chrome/common/chrome_features.h" |
| 80 #include "chrome/common/chrome_paths.h" | 81 #include "chrome/common/chrome_paths.h" |
| 81 #include "chrome/common/chrome_paths_internal.h" | 82 #include "chrome/common/chrome_paths_internal.h" |
| 82 #include "chrome/common/chrome_switches.h" | 83 #include "chrome/common/chrome_switches.h" |
| 83 #include "chrome/common/features.h" | 84 #include "chrome/common/features.h" |
| 84 #include "chrome/common/pref_names.h" | 85 #include "chrome/common/pref_names.h" |
| 85 #include "chrome/common/url_constants.h" | 86 #include "chrome/common/url_constants.h" |
| 86 #include "chrome/grit/chromium_strings.h" | 87 #include "chrome/grit/chromium_strings.h" |
| 87 #include "components/bookmarks/browser/bookmark_model.h" | 88 #include "components/bookmarks/browser/bookmark_model.h" |
| (...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 685 // On CrOS sync service will be initialized after sign in. | 686 // On CrOS sync service will be initialized after sign in. |
| 686 BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(this); | 687 BookmarkModel* model = BookmarkModelFactory::GetForBrowserContext(this); |
| 687 model->AddObserver(new BookmarkModelLoadedObserver(this)); | 688 model->AddObserver(new BookmarkModelLoadedObserver(this)); |
| 688 #endif | 689 #endif |
| 689 | 690 |
| 690 PushMessagingServiceImpl::InitializeForProfile(this); | 691 PushMessagingServiceImpl::InitializeForProfile(this); |
| 691 | 692 |
| 692 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) | 693 #if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) |
| 693 signin_ui_util::InitializePrefsForProfile(this); | 694 signin_ui_util::InitializePrefsForProfile(this); |
| 694 #endif | 695 #endif |
| 696 |
| 697 content::URLDataSource::Add(this, new PrefsInternalsSource(this)); |
| 695 } | 698 } |
| 696 | 699 |
| 697 base::FilePath ProfileImpl::last_selected_directory() { | 700 base::FilePath ProfileImpl::last_selected_directory() { |
| 698 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); | 701 return GetPrefs()->GetFilePath(prefs::kSelectFileLastDirectory); |
| 699 } | 702 } |
| 700 | 703 |
| 701 void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { | 704 void ProfileImpl::set_last_selected_directory(const base::FilePath& path) { |
| 702 GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path); | 705 GetPrefs()->SetFilePath(prefs::kSelectFileLastDirectory, path); |
| 703 } | 706 } |
| 704 | 707 |
| (...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1323 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { | 1326 ProfileImpl::CreateDomainReliabilityMonitor(PrefService* local_state) { |
| 1324 domain_reliability::DomainReliabilityService* service = | 1327 domain_reliability::DomainReliabilityService* service = |
| 1325 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> | 1328 domain_reliability::DomainReliabilityServiceFactory::GetInstance()-> |
| 1326 GetForBrowserContext(this); | 1329 GetForBrowserContext(this); |
| 1327 if (!service) | 1330 if (!service) |
| 1328 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); | 1331 return std::unique_ptr<domain_reliability::DomainReliabilityMonitor>(); |
| 1329 | 1332 |
| 1330 return service->CreateMonitor( | 1333 return service->CreateMonitor( |
| 1331 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); | 1334 BrowserThread::GetTaskRunnerForThread(BrowserThread::IO)); |
| 1332 } | 1335 } |
| OLD | NEW |