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

Side by Side Diff: ios/chrome/browser/search_engines/template_url_service_factory.cc

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Fix more compile errors in JNI files Created 4 years 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/search_engines/template_url_service_factory.h" 5 #include "ios/chrome/browser/search_engines/template_url_service_factory.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 ios::ChromeBrowserState::FromBrowserState(context); 44 ios::ChromeBrowserState::FromBrowserState(context);
45 return base::MakeUnique<TemplateURLService>( 45 return base::MakeUnique<TemplateURLService>(
46 browser_state->GetPrefs(), 46 browser_state->GetPrefs(),
47 base::WrapUnique(new ios::UIThreadSearchTermsData(browser_state)), 47 base::WrapUnique(new ios::UIThreadSearchTermsData(browser_state)),
48 ios::WebDataServiceFactory::GetKeywordWebDataForBrowserState( 48 ios::WebDataServiceFactory::GetKeywordWebDataForBrowserState(
49 browser_state, ServiceAccessType::EXPLICIT_ACCESS), 49 browser_state, ServiceAccessType::EXPLICIT_ACCESS),
50 base::WrapUnique(new ios::TemplateURLServiceClientImpl( 50 base::WrapUnique(new ios::TemplateURLServiceClientImpl(
51 ios::HistoryServiceFactory::GetForBrowserState( 51 ios::HistoryServiceFactory::GetForBrowserState(
52 browser_state, ServiceAccessType::EXPLICIT_ACCESS))), 52 browser_state, ServiceAccessType::EXPLICIT_ACCESS))),
53 ios::GoogleURLTrackerFactory::GetForBrowserState(browser_state), 53 ios::GoogleURLTrackerFactory::GetForBrowserState(browser_state),
54 GetApplicationContext()->GetRapporService(), 54 GetApplicationContext()->GetRapporServiceImpl(),
55 GetDefaultSearchProviderChangedCallback()); 55 GetDefaultSearchProviderChangedCallback());
56 } 56 }
57 57
58 } // namespace 58 } // namespace
59 59
60 // static 60 // static
61 TemplateURLService* TemplateURLServiceFactory::GetForBrowserState( 61 TemplateURLService* TemplateURLServiceFactory::GetForBrowserState(
62 ios::ChromeBrowserState* browser_state) { 62 ios::ChromeBrowserState* browser_state) {
63 return static_cast<TemplateURLService*>( 63 return static_cast<TemplateURLService*>(
64 GetInstance()->GetServiceForBrowserState(browser_state, true)); 64 GetInstance()->GetServiceForBrowserState(browser_state, true));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 web::BrowserState* TemplateURLServiceFactory::GetBrowserStateToUse( 101 web::BrowserState* TemplateURLServiceFactory::GetBrowserStateToUse(
102 web::BrowserState* context) const { 102 web::BrowserState* context) const {
103 return GetBrowserStateRedirectedInIncognito(context); 103 return GetBrowserStateRedirectedInIncognito(context);
104 } 104 }
105 105
106 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const { 106 bool TemplateURLServiceFactory::ServiceIsNULLWhileTesting() const {
107 return true; 107 return true;
108 } 108 }
109 109
110 } // namespace ios 110 } // namespace ios
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698