OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/profile.h" | 5 #include "chrome/browser/profile.h" |
6 | 6 |
7 #include "app/resource_bundle.h" | 7 #include "app/resource_bundle.h" |
8 #include "app/theme_provider.h" | 8 #include "app/theme_provider.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 #include "chrome/browser/profile_manager.h" | 42 #include "chrome/browser/profile_manager.h" |
43 #include "chrome/browser/renderer_host/render_process_host.h" | 43 #include "chrome/browser/renderer_host/render_process_host.h" |
44 #include "chrome/browser/search_versus_navigate_classifier.h" | 44 #include "chrome/browser/search_versus_navigate_classifier.h" |
45 #include "chrome/browser/search_engines/template_url_fetcher.h" | 45 #include "chrome/browser/search_engines/template_url_fetcher.h" |
46 #include "chrome/browser/search_engines/template_url_model.h" | 46 #include "chrome/browser/search_engines/template_url_model.h" |
47 #include "chrome/browser/sessions/session_service.h" | 47 #include "chrome/browser/sessions/session_service.h" |
48 #include "chrome/browser/sessions/tab_restore_service.h" | 48 #include "chrome/browser/sessions/tab_restore_service.h" |
49 #include "chrome/browser/ssl/ssl_host_state.h" | 49 #include "chrome/browser/ssl/ssl_host_state.h" |
50 #include "chrome/browser/sync/profile_sync_service.h" | 50 #include "chrome/browser/sync/profile_sync_service.h" |
51 #include "chrome/browser/sync/profile_sync_factory_impl.h" | 51 #include "chrome/browser/sync/profile_sync_factory_impl.h" |
| 52 #include "chrome/browser/tabs/pinned_tab_service.h" |
52 #include "chrome/browser/thumbnail_store.h" | 53 #include "chrome/browser/thumbnail_store.h" |
53 #include "chrome/browser/user_style_sheet_watcher.h" | 54 #include "chrome/browser/user_style_sheet_watcher.h" |
54 #include "chrome/browser/visitedlink_master.h" | 55 #include "chrome/browser/visitedlink_master.h" |
55 #include "chrome/browser/visitedlink_event_listener.h" | 56 #include "chrome/browser/visitedlink_event_listener.h" |
56 #include "chrome/browser/webdata/web_data_service.h" | 57 #include "chrome/browser/webdata/web_data_service.h" |
57 #include "chrome/browser/web_resource/web_resource_service.h" | 58 #include "chrome/browser/web_resource/web_resource_service.h" |
58 #include "chrome/common/chrome_constants.h" | 59 #include "chrome/common/chrome_constants.h" |
59 #include "chrome/common/chrome_paths.h" | 60 #include "chrome/common/chrome_paths.h" |
60 #include "chrome/common/chrome_switches.h" | 61 #include "chrome/common/chrome_switches.h" |
61 #include "chrome/common/extensions/extension_error_reporter.h" | 62 #include "chrome/common/extensions/extension_error_reporter.h" |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
639 // Listen for bookmark model load, to bootstrap the sync service. | 640 // Listen for bookmark model load, to bootstrap the sync service. |
640 registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED, | 641 registrar_.Add(this, NotificationType::BOOKMARK_MODEL_LOADED, |
641 Source<Profile>(this)); | 642 Source<Profile>(this)); |
642 | 643 |
643 ssl_config_service_manager_.reset( | 644 ssl_config_service_manager_.reset( |
644 SSLConfigServiceManager::CreateDefaultManager(this)); | 645 SSLConfigServiceManager::CreateDefaultManager(this)); |
645 | 646 |
646 #if defined(OS_CHROMEOS) | 647 #if defined(OS_CHROMEOS) |
647 chromeos_preferences_.Init(prefs); | 648 chromeos_preferences_.Init(prefs); |
648 #endif | 649 #endif |
| 650 |
| 651 pinned_tab_service_.reset(new PinnedTabService(this)); |
649 } | 652 } |
650 | 653 |
651 void ProfileImpl::InitExtensions() { | 654 void ProfileImpl::InitExtensions() { |
652 if (user_script_master_ || extensions_service_) | 655 if (user_script_master_ || extensions_service_) |
653 return; // Already initialized. | 656 return; // Already initialized. |
654 | 657 |
655 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 658 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
656 ExtensionErrorReporter::Init(true); // allow noisy errors. | 659 ExtensionErrorReporter::Init(true); // allow noisy errors. |
657 | 660 |
658 FilePath script_dir; // Don't look for user scripts in any directory. | 661 FilePath script_dir; // Don't look for user scripts in any directory. |
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1343 } | 1346 } |
1344 | 1347 |
1345 void ProfileImpl::InitSyncService() { | 1348 void ProfileImpl::InitSyncService() { |
1346 profile_sync_factory_.reset( | 1349 profile_sync_factory_.reset( |
1347 new ProfileSyncFactoryImpl(this, | 1350 new ProfileSyncFactoryImpl(this, |
1348 CommandLine::ForCurrentProcess())); | 1351 CommandLine::ForCurrentProcess())); |
1349 sync_service_.reset( | 1352 sync_service_.reset( |
1350 profile_sync_factory_->CreateProfileSyncService()); | 1353 profile_sync_factory_->CreateProfileSyncService()); |
1351 sync_service_->Initialize(); | 1354 sync_service_->Initialize(); |
1352 } | 1355 } |
OLD | NEW |