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 25 matching lines...) Expand all Loading... |
36 #include "chrome/browser/history/history.h" | 36 #include "chrome/browser/history/history.h" |
37 #include "chrome/browser/host_content_settings_map.h" | 37 #include "chrome/browser/host_content_settings_map.h" |
38 #include "chrome/browser/host_zoom_map.h" | 38 #include "chrome/browser/host_zoom_map.h" |
39 #include "chrome/browser/in_process_webkit/webkit_context.h" | 39 #include "chrome/browser/in_process_webkit/webkit_context.h" |
40 #include "chrome/browser/net/chrome_url_request_context.h" | 40 #include "chrome/browser/net/chrome_url_request_context.h" |
41 #include "chrome/browser/net/ssl_config_service_manager.h" | 41 #include "chrome/browser/net/ssl_config_service_manager.h" |
42 #include "chrome/browser/notifications/desktop_notification_service.h" | 42 #include "chrome/browser/notifications/desktop_notification_service.h" |
43 #include "chrome/browser/password_manager/password_store_default.h" | 43 #include "chrome/browser/password_manager/password_store_default.h" |
44 #include "chrome/browser/password_manager/password_store_linux.h" | 44 #include "chrome/browser/password_manager/password_store_linux.h" |
45 #include "chrome/browser/privacy_blacklist/blacklist.h" | 45 #include "chrome/browser/privacy_blacklist/blacklist.h" |
| 46 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
46 #include "chrome/browser/profile_manager.h" | 47 #include "chrome/browser/profile_manager.h" |
47 #include "chrome/browser/renderer_host/render_process_host.h" | 48 #include "chrome/browser/renderer_host/render_process_host.h" |
48 #include "chrome/browser/search_engines/template_url_fetcher.h" | 49 #include "chrome/browser/search_engines/template_url_fetcher.h" |
49 #include "chrome/browser/search_engines/template_url_model.h" | 50 #include "chrome/browser/search_engines/template_url_model.h" |
50 #include "chrome/browser/sessions/session_service.h" | 51 #include "chrome/browser/sessions/session_service.h" |
51 #include "chrome/browser/sessions/tab_restore_service.h" | 52 #include "chrome/browser/sessions/tab_restore_service.h" |
52 #include "chrome/browser/ssl/ssl_host_state.h" | 53 #include "chrome/browser/ssl/ssl_host_state.h" |
53 #include "chrome/browser/sync/profile_sync_service.h" | 54 #include "chrome/browser/sync/profile_sync_service.h" |
54 #include "chrome/browser/sync/profile_sync_factory_impl.h" | 55 #include "chrome/browser/sync/profile_sync_factory_impl.h" |
55 #include "chrome/browser/tabs/pinned_tab_service.h" | 56 #include "chrome/browser/tabs/pinned_tab_service.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 desktop_notification_service_.reset(new DesktopNotificationService( | 490 desktop_notification_service_.reset(new DesktopNotificationService( |
490 this, g_browser_process->notification_ui_manager())); | 491 this, g_browser_process->notification_ui_manager())); |
491 } | 492 } |
492 return desktop_notification_service_.get(); | 493 return desktop_notification_service_.get(); |
493 } | 494 } |
494 | 495 |
495 virtual ProfileSyncService* GetProfileSyncService() { | 496 virtual ProfileSyncService* GetProfileSyncService() { |
496 return NULL; | 497 return NULL; |
497 } | 498 } |
498 | 499 |
| 500 virtual CloudPrintProxyService* GetCloudPrintProxyService() { |
| 501 return NULL; |
| 502 } |
| 503 |
499 virtual bool IsSameProfile(Profile* profile) { | 504 virtual bool IsSameProfile(Profile* profile) { |
500 return (profile == this) || (profile == profile_); | 505 return (profile == this) || (profile == profile_); |
501 } | 506 } |
502 | 507 |
503 virtual Time GetStartTime() const { | 508 virtual Time GetStartTime() const { |
504 return start_time_; | 509 return start_time_; |
505 } | 510 } |
506 | 511 |
507 virtual TabRestoreService* GetTabRestoreService() { | 512 virtual TabRestoreService* GetTabRestoreService() { |
508 return NULL; | 513 return NULL; |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 | 1446 |
1442 ProfileSyncService* ProfileImpl::GetProfileSyncService() { | 1447 ProfileSyncService* ProfileImpl::GetProfileSyncService() { |
1443 if (!ProfileSyncService::IsSyncEnabled()) { | 1448 if (!ProfileSyncService::IsSyncEnabled()) { |
1444 return NULL; | 1449 return NULL; |
1445 } | 1450 } |
1446 if (!sync_service_.get()) | 1451 if (!sync_service_.get()) |
1447 InitSyncService(); | 1452 InitSyncService(); |
1448 return sync_service_.get(); | 1453 return sync_service_.get(); |
1449 } | 1454 } |
1450 | 1455 |
| 1456 CloudPrintProxyService* ProfileImpl::GetCloudPrintProxyService() { |
| 1457 if (!cloud_print_proxy_service_.get()) |
| 1458 InitCloudPrintProxyService(); |
| 1459 return cloud_print_proxy_service_.get(); |
| 1460 } |
| 1461 |
1451 void ProfileImpl::InitSyncService() { | 1462 void ProfileImpl::InitSyncService() { |
1452 profile_sync_factory_.reset( | 1463 profile_sync_factory_.reset( |
1453 new ProfileSyncFactoryImpl(this, | 1464 new ProfileSyncFactoryImpl(this, |
1454 CommandLine::ForCurrentProcess())); | 1465 CommandLine::ForCurrentProcess())); |
1455 sync_service_.reset( | 1466 sync_service_.reset( |
1456 profile_sync_factory_->CreateProfileSyncService()); | 1467 profile_sync_factory_->CreateProfileSyncService()); |
1457 sync_service_->Initialize(); | 1468 sync_service_->Initialize(); |
1458 } | 1469 } |
| 1470 |
| 1471 void ProfileImpl::InitCloudPrintProxyService() { |
| 1472 cloud_print_proxy_service_.reset(new CloudPrintProxyService(this)); |
| 1473 cloud_print_proxy_service_->Initialize(); |
| 1474 } |
| 1475 |
OLD | NEW |