Chromium Code Reviews
[email protected] (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: chrome/browser/profile.cc

Issue 1026005: Makes pinned tab restore on startup if you haven't enabled session (Closed)
Patch Set: check Created 10 years, 9 months 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
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/profile.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698