Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

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

Issue 2802015: Massively simplify the NetworkChangeNotifier infrastructure:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 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 | Annotate | Revision Log
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/env_var.h" 10 #include "base/env_var.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 #include "chrome/browser/pref_value_store.h" 49 #include "chrome/browser/pref_value_store.h"
50 #include "chrome/browser/privacy_blacklist/blacklist.h" 50 #include "chrome/browser/privacy_blacklist/blacklist.h"
51 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" 51 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h"
52 #include "chrome/browser/profile_manager.h" 52 #include "chrome/browser/profile_manager.h"
53 #include "chrome/browser/renderer_host/render_process_host.h" 53 #include "chrome/browser/renderer_host/render_process_host.h"
54 #include "chrome/browser/search_engines/template_url_fetcher.h" 54 #include "chrome/browser/search_engines/template_url_fetcher.h"
55 #include "chrome/browser/search_engines/template_url_model.h" 55 #include "chrome/browser/search_engines/template_url_model.h"
56 #include "chrome/browser/sessions/session_service.h" 56 #include "chrome/browser/sessions/session_service.h"
57 #include "chrome/browser/sessions/tab_restore_service.h" 57 #include "chrome/browser/sessions/tab_restore_service.h"
58 #include "chrome/browser/ssl/ssl_host_state.h" 58 #include "chrome/browser/ssl/ssl_host_state.h"
59 #include "chrome/browser/sync/net/network_change_notifier_io_thread.h"
60 #include "chrome/browser/sync/profile_sync_service.h" 59 #include "chrome/browser/sync/profile_sync_service.h"
61 #include "chrome/browser/sync/profile_sync_factory_impl.h" 60 #include "chrome/browser/sync/profile_sync_factory_impl.h"
62 #include "chrome/browser/tabs/pinned_tab_service.h" 61 #include "chrome/browser/tabs/pinned_tab_service.h"
63 #include "chrome/browser/thumbnail_store.h" 62 #include "chrome/browser/thumbnail_store.h"
64 #include "chrome/browser/user_style_sheet_watcher.h" 63 #include "chrome/browser/user_style_sheet_watcher.h"
65 #include "chrome/browser/visitedlink_master.h" 64 #include "chrome/browser/visitedlink_master.h"
66 #include "chrome/browser/visitedlink_event_listener.h" 65 #include "chrome/browser/visitedlink_event_listener.h"
67 #include "chrome/browser/webdata/web_data_service.h" 66 #include "chrome/browser/webdata/web_data_service.h"
68 #include "chrome/browser/web_resource/web_resource_service.h" 67 #include "chrome/browser/web_resource/web_resource_service.h"
69 #include "chrome/common/chrome_constants.h" 68 #include "chrome/common/chrome_constants.h"
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1673 return sync_service_.get(); 1672 return sync_service_.get();
1674 } 1673 }
1675 1674
1676 CloudPrintProxyService* ProfileImpl::GetCloudPrintProxyService() { 1675 CloudPrintProxyService* ProfileImpl::GetCloudPrintProxyService() {
1677 if (!cloud_print_proxy_service_.get()) 1676 if (!cloud_print_proxy_service_.get())
1678 InitCloudPrintProxyService(); 1677 InitCloudPrintProxyService();
1679 return cloud_print_proxy_service_.get(); 1678 return cloud_print_proxy_service_.get();
1680 } 1679 }
1681 1680
1682 void ProfileImpl::InitSyncService() { 1681 void ProfileImpl::InitSyncService() {
1683 network_change_notifier_thread_.reset(
1684 new NetworkChangeNotifierIOThread(g_browser_process->io_thread()));
1685 profile_sync_factory_.reset( 1682 profile_sync_factory_.reset(
1686 new ProfileSyncFactoryImpl(this, 1683 new ProfileSyncFactoryImpl(this, CommandLine::ForCurrentProcess()));
1687 network_change_notifier_thread_.get(),
1688 CommandLine::ForCurrentProcess()));
1689 sync_service_.reset( 1684 sync_service_.reset(
1690 profile_sync_factory_->CreateProfileSyncService()); 1685 profile_sync_factory_->CreateProfileSyncService());
1691 sync_service_->Initialize(); 1686 sync_service_->Initialize();
1692 } 1687 }
1693 1688
1694 void ProfileImpl::InitCloudPrintProxyService() { 1689 void ProfileImpl::InitCloudPrintProxyService() {
1695 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); 1690 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this));
1696 cloud_print_proxy_service_->Initialize(); 1691 cloud_print_proxy_service_->Initialize();
1697 } 1692 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698