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

Side by Side Diff: ios/public/test/test_chrome_browser_provider.mm

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 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
« no previous file with comments | « ios/public/test/test_chrome_browser_provider.h ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/public/test/test_chrome_browser_provider.h" 5 #include "ios/public/test/test_chrome_browser_provider.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/public/test/fake_search_provider.h"
9 #include "ios/public/test/fake_string_provider.h" 8 #include "ios/public/test/fake_string_provider.h"
10 9
11 namespace { 10 namespace {
12 const char kUIScheme[] = "uischeme"; 11 const char kUIScheme[] = "uischeme";
13 } 12 }
14 13
15 namespace ios { 14 namespace ios {
16 15
17 TestChromeBrowserProvider::TestChromeBrowserProvider() 16 TestChromeBrowserProvider::TestChromeBrowserProvider()
18 : string_provider_(new FakeStringProvider), 17 : string_provider_(new FakeStringProvider) {
19 search_provider_(new FakeSearchProvider) {
20 } 18 }
21 19
22 TestChromeBrowserProvider::~TestChromeBrowserProvider() { 20 TestChromeBrowserProvider::~TestChromeBrowserProvider() {
23 } 21 }
24 22
25 // static 23 // static
26 TestChromeBrowserProvider* TestChromeBrowserProvider::GetTestProvider() { 24 TestChromeBrowserProvider* TestChromeBrowserProvider::GetTestProvider() {
27 ChromeBrowserProvider* provider = GetChromeBrowserProvider(); 25 ChromeBrowserProvider* provider = GetChromeBrowserProvider();
28 DCHECK(provider); 26 DCHECK(provider);
29 return static_cast<TestChromeBrowserProvider*>(provider); 27 return static_cast<TestChromeBrowserProvider*>(provider);
30 } 28 }
31 29
32 StringProvider* TestChromeBrowserProvider::GetStringProvider() { 30 StringProvider* TestChromeBrowserProvider::GetStringProvider() {
33 return string_provider_.get(); 31 return string_provider_.get();
34 } 32 }
35 33
36 const char* TestChromeBrowserProvider::GetChromeUIScheme() { 34 const char* TestChromeBrowserProvider::GetChromeUIScheme() {
37 return kUIScheme; 35 return kUIScheme;
38 } 36 }
39 37
40 SearchProvider* TestChromeBrowserProvider::GetSearchProvider() {
41 return search_provider_.get();
42 }
43
44 } // namespace ios 38 } // namespace ios
OLDNEW
« no previous file with comments | « ios/public/test/test_chrome_browser_provider.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698