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

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

Issue 12851008: Create a common base class for all the webdatas (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase on trunk and comments Created 7 years, 9 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 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_
6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/string16.h" 14 #include "base/string16.h"
15 #include "chrome/browser/search_engines/template_url_service_observer.h" 15 #include "chrome/browser/search_engines/template_url_service_observer.h"
16 #include "chrome/test/base/testing_browser_process.h" 16 #include "chrome/test/base/testing_browser_process.h"
17 #include "content/public/test/test_browser_thread.h" 17 #include "content/public/test/test_browser_thread.h"
18 18
19 class GURL; 19 class GURL;
20 class TemplateURLService; 20 class TemplateURLService;
21 class TemplateURLServiceTestingProfile; 21 class TestingProfile;
22 class TestingTemplateURLService; 22 class TestingTemplateURLService;
23 class TestingProfile; 23 class TestingProfile;
24 class WebDataService; 24 class WebDataService;
25 25
26 // Implements functionality to make it easier to test TemplateURLService and 26 // Implements functionality to make it easier to test TemplateURLService and
27 // make changes to it. 27 // make changes to it.
28 class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { 28 class TemplateURLServiceTestUtil : public TemplateURLServiceObserver {
29 public: 29 public:
30 TemplateURLServiceTestUtil(); 30 TemplateURLServiceTestUtil();
31 31
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 void StartIOThread(); 105 void StartIOThread();
106 106
107 // Runs all pending tasks on the UI loop. 107 // Runs all pending tasks on the UI loop.
108 void PumpLoop(); 108 void PumpLoop();
109 109
110 private: 110 private:
111 MessageLoopForUI message_loop_; 111 MessageLoopForUI message_loop_;
112 // Needed to make the DeleteOnUIThread trait of WebDataService work 112 // Needed to make the DeleteOnUIThread trait of WebDataService work
113 // properly. 113 // properly.
114 content::TestBrowserThread ui_thread_; 114 content::TestBrowserThread ui_thread_;
115 scoped_ptr<TemplateURLServiceTestingProfile> profile_; 115 content::TestBrowserThread db_thread_;
116 content::TestBrowserThread io_thread_;
117 scoped_ptr<TestingProfile> profile_;
116 int changed_count_; 118 int changed_count_;
117 119
118 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil); 120 DISALLOW_COPY_AND_ASSIGN(TemplateURLServiceTestUtil);
119 }; 121 };
120 122
121 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_ 123 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_TEST_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698