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

Side by Side Diff: chrome/browser/search_engines/template_url_service_test_util.cc

Issue 366523002: Stop depending on chrome/browser/rlz/rlz.h from TemplateURLService (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comment Created 6 years, 5 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/search_engines/template_url_service_test_util.h" 5 #include "chrome/browser/search_engines/template_url_service_test_util.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 13 matching lines...) Expand all
24 24
25 // Trivial subclass of TemplateURLService that records the last invocation of 25 // Trivial subclass of TemplateURLService that records the last invocation of
26 // SetKeywordSearchTermsForURL. 26 // SetKeywordSearchTermsForURL.
27 class TestingTemplateURLService : public TemplateURLService { 27 class TestingTemplateURLService : public TemplateURLService {
28 public: 28 public:
29 static KeyedService* Build(content::BrowserContext* profile) { 29 static KeyedService* Build(content::BrowserContext* profile) {
30 return new TestingTemplateURLService(static_cast<Profile*>(profile)); 30 return new TestingTemplateURLService(static_cast<Profile*>(profile));
31 } 31 }
32 32
33 explicit TestingTemplateURLService(Profile* profile) 33 explicit TestingTemplateURLService(Profile* profile)
34 : TemplateURLService(profile, NULL) { 34 : TemplateURLService(profile, NULL, base::Closure()) {
35 } 35 }
36 36
37 base::string16 GetAndClearSearchTerm() { 37 base::string16 GetAndClearSearchTerm() {
38 base::string16 search_term; 38 base::string16 search_term;
39 search_term.swap(search_term_); 39 search_term.swap(search_term_);
40 return search_term; 40 return search_term;
41 } 41 }
42 42
43 protected: 43 protected:
44 virtual void SetKeywordSearchTermsForURL( 44 virtual void SetKeywordSearchTermsForURL(
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 UIThreadSearchTermsData::SetGoogleBaseURL(std::string()); 224 UIThreadSearchTermsData::SetGoogleBaseURL(std::string());
225 225
226 // Flush the message loop to make application verifiers happy. 226 // Flush the message loop to make application verifiers happy.
227 base::RunLoop().RunUntilIdle(); 227 base::RunLoop().RunUntilIdle();
228 } 228 }
229 229
230 TestingProfile* TemplateURLServiceTestUtil::profile() const { 230 TestingProfile* TemplateURLServiceTestUtil::profile() const {
231 return profile_.get(); 231 return profile_.get();
232 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_service_sync_unittest.cc ('k') | chrome/browser/ui/bookmarks/bookmark_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698