Chromium Code Reviews| Index: chrome/browser/profiles/profile_impl.cc |
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc |
| index 7e89356c589e0ef9c207b4caadf9f95d8ad1e065..9d5dde7dcf653fc8cf6fc61ad69c1781251208b5 100644 |
| --- a/chrome/browser/profiles/profile_impl.cc |
| +++ b/chrome/browser/profiles/profile_impl.cc |
| @@ -98,6 +98,10 @@ |
| #include "chrome/browser/chromeos/proxy_config_service_impl.h" |
| #endif |
| +#if !defined(OS_ANDROID) |
| +#include "chrome/browser/usb/usb_service.h" |
| +#endif // !defined(OS_ANDROID) |
|
miket_OOO
2012/04/25 21:24:36
This include approximately duplicates the one in t
|
| + |
| using base::Time; |
| using base::TimeDelta; |
| using content::BrowserThread; |
| @@ -529,6 +533,10 @@ ProfileImpl::~ProfileImpl() { |
| // HistoryService first. |
| favicon_service_.reset(); |
| + if (usb_service_.get()) |
| + usb_service_->Cleanup(); |
| + usb_service_.reset(NULL); |
|
miket_OOO
2012/04/25 21:24:36
Might as well put the reset inside the block. A fe
|
| + |
| if (pref_proxy_config_tracker_.get()) |
| pref_proxy_config_tracker_->DetachFromPrefService(); |
| @@ -663,6 +671,15 @@ bool ProfileImpl::WasCreatedByVersionOrLater(const std::string& version) { |
| return (profile_version.CompareTo(arg_version) >= 0); |
| } |
| +#if !defined(OS_ANDROID) |
| +UsbService* ProfileImpl::GetUsbService() { |
| + if (!usb_service_.get()) { |
| + usb_service_.reset(new UsbService()); |
| + } |
| + return usb_service_.get(); |
| +} |
| +#endif // !defined(OS_ANDROID) |
| + |
| PrefService* ProfileImpl::GetPrefs() { |
| DCHECK(prefs_.get()); // Should explicitly be initialized. |
| return prefs_.get(); |