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

Side by Side Diff: ios/chrome/browser/google/google_logo_service_factory.mm

Issue 2511043004: [ObjC ARC] Converts ios/chrome/browser/google:google_logo to ARC.Automatically generated ARCMigra… (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « ios/chrome/browser/google/google_logo_service.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/google/google_logo_service_factory.h" 5 #include "ios/chrome/browser/google/google_logo_service_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/ios/browser_state_dependency_manager.h" 9 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
10 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h" 10 #include "ios/chrome/browser/browser_state/browser_state_otr_helper.h"
11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 11 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
12 #include "ios/chrome/browser/google/google_logo_service.h" 12 #include "ios/chrome/browser/google/google_logo_service.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 // static 18 // static
15 GoogleLogoService* GoogleLogoServiceFactory::GetForBrowserState( 19 GoogleLogoService* GoogleLogoServiceFactory::GetForBrowserState(
16 ios::ChromeBrowserState* browser_state) { 20 ios::ChromeBrowserState* browser_state) {
17 return static_cast<GoogleLogoService*>( 21 return static_cast<GoogleLogoService*>(
18 GetInstance()->GetServiceForBrowserState(browser_state, true)); 22 GetInstance()->GetServiceForBrowserState(browser_state, true));
19 } 23 }
20 24
21 // static 25 // static
22 GoogleLogoServiceFactory* GoogleLogoServiceFactory::GetInstance() { 26 GoogleLogoServiceFactory* GoogleLogoServiceFactory::GetInstance() {
23 return base::Singleton<GoogleLogoServiceFactory>::get(); 27 return base::Singleton<GoogleLogoServiceFactory>::get();
(...skipping 10 matching lines...) Expand all
34 web::BrowserState* context) const { 38 web::BrowserState* context) const {
35 ios::ChromeBrowserState* browser_state = 39 ios::ChromeBrowserState* browser_state =
36 ios::ChromeBrowserState::FromBrowserState(context); 40 ios::ChromeBrowserState::FromBrowserState(context);
37 return base::MakeUnique<GoogleLogoService>(browser_state); 41 return base::MakeUnique<GoogleLogoService>(browser_state);
38 } 42 }
39 43
40 web::BrowserState* GoogleLogoServiceFactory::GetBrowserStateToUse( 44 web::BrowserState* GoogleLogoServiceFactory::GetBrowserStateToUse(
41 web::BrowserState* context) const { 45 web::BrowserState* context) const {
42 return GetBrowserStateOwnInstanceInIncognito(context); 46 return GetBrowserStateOwnInstanceInIncognito(context);
43 } 47 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/google/google_logo_service.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698