| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ios/chrome/app/startup/provider_registration.h" | 5 #include "ios/chrome/app/startup/provider_registration.h" |
| 6 | 6 |
| 7 #include "ios/chrome/browser/web/web_controller_provider_factory_impl.h" | |
| 8 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" | 7 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" |
| 9 | 8 |
| 10 @implementation ProviderRegistration | 9 @implementation ProviderRegistration |
| 11 | 10 |
| 12 + (void)registerProviders { | 11 + (void)registerProviders { |
| 13 std::unique_ptr<ios::ChromeBrowserProvider> provider = | 12 std::unique_ptr<ios::ChromeBrowserProvider> provider = |
| 14 ios::CreateChromeBrowserProvider(); | 13 ios::CreateChromeBrowserProvider(); |
| 15 | 14 |
| 16 // Leak the providers. | 15 // Leak the providers. |
| 17 ios::SetChromeBrowserProvider(provider.release()); | 16 ios::SetChromeBrowserProvider(provider.release()); |
| 18 ios::SetWebControllerProviderFactory(new WebControllerProviderFactoryImpl()); | |
| 19 } | 17 } |
| 20 | 18 |
| 21 @end | 19 @end |
| OLD | NEW |