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

Side by Side Diff: chrome/browser/autocomplete/history_contents_provider_unittest.cc

Issue 15517005: Remove references to Profile from browser_context_keyed_service. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase & style Created 7 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/autocomplete/history_contents_provider.h" 5 #include "chrome/browser/autocomplete/history_contents_provider.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/autocomplete/autocomplete_match.h" 10 #include "chrome/browser/autocomplete/autocomplete_match.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 const ACMatches& matches() const { return provider_->matches(); } 62 const ACMatches& matches() const { return provider_->matches(); }
63 TestingProfile* profile() const { return profile_.get(); } 63 TestingProfile* profile() const { return profile_.get(); }
64 HistoryContentsProvider* provider() const { return provider_.get(); } 64 HistoryContentsProvider* provider() const { return provider_.get(); }
65 65
66 protected: 66 protected:
67 virtual bool BodyOnly() { return false; } 67 virtual bool BodyOnly() { return false; }
68 68
69 private: 69 private:
70 static ProfileKeyedService* CreateTemplateURLService( 70 static BrowserContextKeyedService* CreateTemplateURLService(
71 content::BrowserContext* profile) { 71 content::BrowserContext* profile) {
72 return new TemplateURLService(static_cast<Profile*>(profile)); 72 return new TemplateURLService(static_cast<Profile*>(profile));
73 } 73 }
74 74
75 // testing::Test 75 // testing::Test
76 virtual void SetUp() { 76 virtual void SetUp() {
77 profile_.reset(new TestingProfile()); 77 profile_.reset(new TestingProfile());
78 profile_->CreateHistoryService(false, false); 78 profile_->CreateHistoryService(false, false);
79 79
80 HistoryService* history_service = 80 HistoryService* history_service =
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 // Run a query that is found on a search result page and on the main page 281 // Run a query that is found on a search result page and on the main page
282 // of the default search engine. The result should be the main page, the 282 // of the default search engine. The result should be the main page, the
283 // SRP should be culled. 283 // SRP should be culled.
284 const ACMatches& m = matches(); 284 const ACMatches& m = matches();
285 ASSERT_EQ(1U, m.size()); 285 ASSERT_EQ(1U, m.size());
286 EXPECT_EQ(test_entries[4].url, m[0].destination_url.spec()); 286 EXPECT_EQ(test_entries[4].url, m[0].destination_url.spec());
287 } 287 }
288 288
289 } // namespace 289 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698