diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 12:44:49 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-28 12:44:49 +0000 |
commit | c38831a108f9f905ce9e68503ee67274939cc950 (patch) | |
tree | 7c93c8afd386fdc11a0f03855cee62c2d3449d63 /chrome/browser/search_engines | |
parent | 75c753a51b150912055d7a8305cf77134d24816a (diff) | |
download | chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.zip chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.gz chromium_src-c38831a108f9f905ce9e68503ee67274939cc950.tar.bz2 |
Split BrowserThread into public API and private implementation, step 1.
Only content/ now has the ability to create BrowserThread objects,
with the exception that tests can create the
content::TestBrowserThread subclass, and (temporarily) code in chrome/
can create the DeprecatedBrowserThread subclass.
A follow-up change will make content/ take care of its own thread
creation, remove DeprecatedBrowserThread, and move all state and
non-trivial constructors from BrowserThread down to BrowserThreadImpl.
Also moved BrowserProcessSubThread into content/ namespace. As part
of follow-up cleanup, chrome/ will stop using this class.
BUG=98716
TEST=existing
Review URL: http://codereview.chromium.org/8392042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/search_engines')
7 files changed, 15 insertions, 14 deletions
diff --git a/chrome/browser/search_engines/search_provider_install_data.cc b/chrome/browser/search_engines/search_provider_install_data.cc index 4682b2a..d0ddfd8 100644 --- a/chrome/browser/search_engines/search_provider_install_data.cc +++ b/chrome/browser/search_engines/search_provider_install_data.cc @@ -17,7 +17,7 @@ #include "chrome/browser/search_engines/util.h" #include "chrome/browser/webdata/web_data_service.h" #include "chrome/common/chrome_notification_types.h" -#include "content/browser/browser_thread.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/notification_service.h" diff --git a/chrome/browser/search_engines/search_provider_install_data_unittest.cc b/chrome/browser/search_engines/search_provider_install_data_unittest.cc index fb12aad..66bc630 100644 --- a/chrome/browser/search_engines/search_provider_install_data_unittest.cc +++ b/chrome/browser/search_engines/search_provider_install_data_unittest.cc @@ -17,9 +17,9 @@ #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" -#include "content/browser/browser_thread.h" #include "content/public/browser/notification_service.h" #include "content/public/browser/notification_source.h" +#include "content/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" // Create a TemplateURL. The caller owns the returned TemplateURL*. diff --git a/chrome/browser/search_engines/search_terms_data.cc b/chrome/browser/search_engines/search_terms_data.cc index 3f99aa1..a0ab0ff 100644 --- a/chrome/browser/search_engines/search_terms_data.cc +++ b/chrome/browser/search_engines/search_terms_data.cc @@ -9,7 +9,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/google/google_url_tracker.h" #include "chrome/browser/instant/instant_field_trial.h" -#include "content/browser/browser_thread.h" +#include "content/public/browser/browser_thread.h" #include "googleurl/src/gurl.h" #if defined(OS_WIN) && defined(GOOGLE_CHROME_BUILD) diff --git a/chrome/browser/search_engines/template_url_service_test_util.cc b/chrome/browser/search_engines/template_url_service_test_util.cc index 45e5206..d980428 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.cc +++ b/chrome/browser/search_engines/template_url_service_test_util.cc @@ -14,6 +14,7 @@ #include "chrome/common/chrome_notification_types.h" #include "chrome/test/base/testing_profile.h" #include "content/public/browser/notification_service.h" +#include "content/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -74,8 +75,8 @@ class TemplateURLServiceTestingProfile : public TestingProfile { private: scoped_refptr<WebDataService> service_; ScopedTempDir temp_dir_; - BrowserThread db_thread_; - BrowserThread io_thread_; + content::TestBrowserThread db_thread_; + content::TestBrowserThread io_thread_; }; // Trivial subclass of TemplateURLService that records the last invocation of diff --git a/chrome/browser/search_engines/template_url_service_test_util.h b/chrome/browser/search_engines/template_url_service_test_util.h index 606cfd1..ae90b0c 100644 --- a/chrome/browser/search_engines/template_url_service_test_util.h +++ b/chrome/browser/search_engines/template_url_service_test_util.h @@ -15,7 +15,7 @@ #include "base/string16.h" #include "chrome/browser/search_engines/template_url_service_observer.h" #include "chrome/test/base/testing_browser_process.h" -#include "content/browser/browser_thread.h" +#include "content/test/test_browser_thread.h" class TemplateURLService; class TemplateURLServiceTestingProfile; @@ -93,7 +93,7 @@ class TemplateURLServiceTestUtil : public TemplateURLServiceObserver { MessageLoopForUI message_loop_; // Needed to make the DeleteOnUIThread trait of WebDataService work // properly. - BrowserThread ui_thread_; + content::TestBrowserThread ui_thread_; scoped_ptr<TemplateURLServiceTestingProfile> profile_; scoped_ptr<TestingTemplateURLService> model_; int changed_count_; diff --git a/chrome/browser/search_engines/template_url_service_unittest.cc b/chrome/browser/search_engines/template_url_service_unittest.cc index 6eeada95..0d0bb96c 100644 --- a/chrome/browser/search_engines/template_url_service_unittest.cc +++ b/chrome/browser/search_engines/template_url_service_unittest.cc @@ -7,9 +7,9 @@ #include "base/callback.h" #include "base/memory/ref_counted.h" #include "base/memory/scoped_vector.h" -#include "base/test/mock_time_provider.h" #include "base/string_split.h" #include "base/string_util.h" +#include "base/test/mock_time_provider.h" #include "base/threading/thread.h" #include "base/utf_string_conversions.h" #include "chrome/browser/history/history.h" @@ -17,17 +17,17 @@ #include "chrome/browser/search_engines/search_host_to_urls_map.h" #include "chrome/browser/search_engines/search_terms_data.h" #include "chrome/browser/search_engines/template_url.h" +#include "chrome/browser/search_engines/template_url_prepopulate_data.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_test_util.h" -#include "chrome/browser/search_engines/template_url_prepopulate_data.h" #include "chrome/browser/webdata/web_database.h" #include "chrome/common/chrome_notification_types.h" #include "chrome/common/pref_names.h" #include "chrome/test/base/testing_pref_service.h" #include "chrome/test/base/testing_profile.h" -#include "content/browser/browser_thread.h" #include "content/public/browser/notification_details.h" #include "content/public/browser/notification_source.h" +#include "content/test/test_browser_thread.h" #include "testing/gtest/include/gtest/gtest.h" using base::Time; diff --git a/chrome/browser/search_engines/util.cc b/chrome/browser/search_engines/util.cc index f2b8512..893c23c 100644 --- a/chrome/browser/search_engines/util.cc +++ b/chrome/browser/search_engines/util.cc @@ -8,13 +8,13 @@ #include <vector> #include "base/logging.h" +#include "chrome/browser/prefs/pref_service.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/search_engines/template_url.h" +#include "chrome/browser/search_engines/template_url_prepopulate_data.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" -#include "chrome/browser/search_engines/template_url_prepopulate_data.h" -#include "chrome/browser/prefs/pref_service.h" -#include "chrome/browser/profiles/profile.h" -#include "content/browser/browser_thread.h" +#include "content/public/browser/browser_thread.h" string16 GetDefaultSearchEngineName(Profile* profile) { if (!profile) { |