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

Side by Side Diff: ios/chrome/browser/favicon/ios_chrome_favicon_loader_factory.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/browser/favicon/ios_chrome_favicon_loader_factory.h" 5 #include "ios/chrome/browser/favicon/ios_chrome_favicon_loader_factory.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "components/keyed_service/core/service_access_type.h" 9 #include "components/keyed_service/core/service_access_type.h"
10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 10 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
(...skipping 25 matching lines...) Expand all
36 DependsOn(ios::FaviconServiceFactory::GetInstance()); 36 DependsOn(ios::FaviconServiceFactory::GetInstance());
37 } 37 }
38 38
39 IOSChromeFaviconLoaderFactory::~IOSChromeFaviconLoaderFactory() {} 39 IOSChromeFaviconLoaderFactory::~IOSChromeFaviconLoaderFactory() {}
40 40
41 std::unique_ptr<KeyedService> 41 std::unique_ptr<KeyedService>
42 IOSChromeFaviconLoaderFactory::BuildServiceInstanceFor( 42 IOSChromeFaviconLoaderFactory::BuildServiceInstanceFor(
43 web::BrowserState* context) const { 43 web::BrowserState* context) const {
44 ios::ChromeBrowserState* browser_state = 44 ios::ChromeBrowserState* browser_state =
45 ios::ChromeBrowserState::FromBrowserState(context); 45 ios::ChromeBrowserState::FromBrowserState(context);
46 return base::WrapUnique( 46 return base::MakeUnique<FaviconLoader>(
47 new FaviconLoader(ios::FaviconServiceFactory::GetForBrowserState( 47 ios::FaviconServiceFactory::GetForBrowserState(
48 browser_state, ServiceAccessType::IMPLICIT_ACCESS))); 48 browser_state, ServiceAccessType::IMPLICIT_ACCESS));
49 } 49 }
50 50
51 web::BrowserState* IOSChromeFaviconLoaderFactory::GetBrowserStateToUse( 51 web::BrowserState* IOSChromeFaviconLoaderFactory::GetBrowserStateToUse(
52 web::BrowserState* context) const { 52 web::BrowserState* context) const {
53 return GetBrowserStateRedirectedInIncognito(context); 53 return GetBrowserStateRedirectedInIncognito(context);
54 } 54 }
55 55
56 bool IOSChromeFaviconLoaderFactory::ServiceIsNULLWhileTesting() const { 56 bool IOSChromeFaviconLoaderFactory::ServiceIsNULLWhileTesting() const {
57 return true; 57 return true;
58 } 58 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698