OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/browser_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
6 | 6 |
7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 29 matching lines...) Expand all Loading... | |
40 #include "chrome/browser/net/url_fixer_upper.h" | 40 #include "chrome/browser/net/url_fixer_upper.h" |
41 #include "chrome/browser/notifications/desktop_notification_service.h" | 41 #include "chrome/browser/notifications/desktop_notification_service.h" |
42 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 42 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
43 #include "chrome/browser/prefs/pref_service.h" | 43 #include "chrome/browser/prefs/pref_service.h" |
44 #include "chrome/browser/prefs/session_startup_pref.h" | 44 #include "chrome/browser/prefs/session_startup_pref.h" |
45 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" | 45 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service.h" |
46 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" | 46 #include "chrome/browser/printing/cloud_print/cloud_print_proxy_service_factory. h" |
47 #include "chrome/browser/printing/print_dialog_cloud.h" | 47 #include "chrome/browser/printing/print_dialog_cloud.h" |
48 #include "chrome/browser/profiles/profile.h" | 48 #include "chrome/browser/profiles/profile.h" |
49 #include "chrome/browser/profiles/profile_io_data.h" | 49 #include "chrome/browser/profiles/profile_io_data.h" |
50 #include "chrome/browser/profiles/profile_metrics.h" | |
50 #include "chrome/browser/search_engines/template_url.h" | 51 #include "chrome/browser/search_engines/template_url.h" |
51 #include "chrome/browser/search_engines/template_url_service.h" | 52 #include "chrome/browser/search_engines/template_url_service.h" |
52 #include "chrome/browser/search_engines/template_url_service_factory.h" | 53 #include "chrome/browser/search_engines/template_url_service_factory.h" |
53 #include "chrome/browser/sessions/session_restore.h" | 54 #include "chrome/browser/sessions/session_restore.h" |
54 #include "chrome/browser/sessions/session_service.h" | 55 #include "chrome/browser/sessions/session_service.h" |
55 #include "chrome/browser/sessions/session_service_factory.h" | 56 #include "chrome/browser/sessions/session_service_factory.h" |
56 #include "chrome/browser/shell_integration.h" | 57 #include "chrome/browser/shell_integration.h" |
57 #include "chrome/browser/tab_contents/link_infobar_delegate.h" | 58 #include "chrome/browser/tab_contents/link_infobar_delegate.h" |
58 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" | 59 #include "chrome/browser/tab_contents/simple_alert_infobar_delegate.h" |
59 #include "chrome/browser/tabs/pinned_tab_codec.h" | 60 #include "chrome/browser/tabs/pinned_tab_codec.h" |
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
573 ->AddUserActionObserver(network_message_observer); | 574 ->AddUserActionObserver(network_message_observer); |
574 | 575 |
575 static chromeos::SmsObserver* sms_observer = | 576 static chromeos::SmsObserver* sms_observer = |
576 new chromeos::SmsObserver(profile); | 577 new chromeos::SmsObserver(profile); |
577 chromeos::CrosLibrary::Get()->GetNetworkLibrary() | 578 chromeos::CrosLibrary::Get()->GetNetworkLibrary() |
578 ->AddNetworkManagerObserver(sms_observer); | 579 ->AddNetworkManagerObserver(sms_observer); |
579 | 580 |
580 profile->SetupChromeOSEnterpriseExtensionObserver(); | 581 profile->SetupChromeOSEnterpriseExtensionObserver(); |
581 } | 582 } |
582 #endif | 583 #endif |
584 FilePath profile_path = profile->GetPath(); | |
585 ProfileMetrics::LogProfileLaunch(profile_path); | |
sky
2011/12/09 17:46:38
Would this make more sense some where in the profi
rpetterson
2011/12/09 21:22:09
In that case it will only get called once per brow
| |
583 return true; | 586 return true; |
584 } | 587 } |
585 | 588 |
586 | 589 |
587 // BrowserInit::LaunchWithProfile::Tab ---------------------------------------- | 590 // BrowserInit::LaunchWithProfile::Tab ---------------------------------------- |
588 | 591 |
589 BrowserInit::LaunchWithProfile::Tab::Tab() : is_app(false), is_pinned(true) {} | 592 BrowserInit::LaunchWithProfile::Tab::Tab() : is_app(false), is_pinned(true) {} |
590 | 593 |
591 BrowserInit::LaunchWithProfile::Tab::~Tab() {} | 594 BrowserInit::LaunchWithProfile::Tab::~Tab() {} |
592 | 595 |
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1490 if (!automation->InitializeChannel(channel_id)) | 1493 if (!automation->InitializeChannel(channel_id)) |
1491 return false; | 1494 return false; |
1492 automation->SetExpectedTabCount(expected_tabs); | 1495 automation->SetExpectedTabCount(expected_tabs); |
1493 | 1496 |
1494 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); | 1497 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); |
1495 DCHECK(list); | 1498 DCHECK(list); |
1496 list->AddProvider(automation); | 1499 list->AddProvider(automation); |
1497 | 1500 |
1498 return true; | 1501 return true; |
1499 } | 1502 } |
OLD | NEW |