summaryrefslogtreecommitdiffstats
path: root/chrome/browser/safe_browsing
diff options
context:
space:
mode:
authorjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
committerjoi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-28 12:44:49 +0000
commitc38831a108f9f905ce9e68503ee67274939cc950 (patch)
tree7c93c8afd386fdc11a0f03855cee62c2d3449d63 /chrome/browser/safe_browsing
parent75c753a51b150912055d7a8305cf77134d24816a (diff)
downloadchromium_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/safe_browsing')
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.cc4
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc6
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc4
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host_unittest.cc11
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service.cc6
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_service_unittest.cc12
-rw-r--r--chrome/browser/safe_browsing/download_protection_service.cc2
-rw-r--r--chrome/browser/safe_browsing/download_protection_service_unittest.cc16
-rw-r--r--chrome/browser/safe_browsing/malware_details.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details.h2
-rw-r--r--chrome/browser/safe_browsing/malware_details_cache.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details_history.h2
-rw-r--r--chrome/browser/safe_browsing/malware_details_unittest.cc6
-rw-r--r--chrome/browser/safe_browsing/protocol_manager.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc6
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database.cc8
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_database_unittest.cc4
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc1
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.h2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc6
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_test.cc4
24 files changed, 61 insertions, 55 deletions
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index 7663551..a5e2e6b 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -14,15 +14,15 @@
#include "base/stringprintf.h"
#include "base/task.h"
#include "base/time.h"
-#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_types.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/browser_features.h"
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
-#include "content/browser/browser_thread.h"
+#include "chrome/common/safe_browsing/csd.pb.h"
#include "content/browser/cancelable_request.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/common/page_transition_types.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
index cd87e65..8e0309e 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
@@ -12,19 +12,19 @@
#include "base/message_loop.h"
#include "base/stringprintf.h"
#include "base/time.h"
-#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/history/history_backend.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/browser_features.h"
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
+#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/view_messages.h"
#include "content/public/common/page_transition_types.h"
+#include "content/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -133,7 +133,7 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
}
}
- BrowserThread ui_thread_;
+ content::TestBrowserThread ui_thread_;
int num_pending_;
scoped_ptr<BrowserFeatureExtractor> extractor_;
std::map<ClientPhishingRequest*, bool> success_;
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 3de105a..dfcce12 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -21,7 +21,6 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
@@ -29,9 +28,10 @@
#include "content/browser/renderer_host/resource_request_details.h"
#include "content/browser/tab_contents/navigation_details.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/common/view_messages.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
-#include "content/common/view_messages.h"
#include "content/public/browser/notification_types.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index 90f8028..b611524 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -16,9 +16,9 @@
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/test/test_browser_thread.h"
#include "googleurl/src/gurl.h"
#include "ipc/ipc_test_sink.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -149,10 +149,11 @@ class ClientSideDetectionHostTest : public TabContentsWrapperTestHarness {
mock_profile_ = new NiceMock<MockTestingProfile>();
browser_context_.reset(mock_profile_);
- ui_thread_.reset(new BrowserThread(BrowserThread::UI, &message_loop_));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ &message_loop_));
// Note: we're starting a real IO thread to make sure our DCHECKs that
// verify which thread is running are actually tested.
- io_thread_.reset(new BrowserThread(BrowserThread::IO));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO));
ASSERT_TRUE(io_thread_->Start());
TabContentsWrapperTestHarness::SetUp();
@@ -289,8 +290,8 @@ class ClientSideDetectionHostTest : public TabContentsWrapperTestHarness {
MockTestingProfile* mock_profile_; // We don't own this object
private:
- scoped_ptr<BrowserThread> ui_thread_;
- scoped_ptr<BrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
};
TEST_F(ClientSideDetectionHostTest, OnPhishingDetectionDoneInvalidVerdict) {
diff --git a/chrome/browser/safe_browsing/client_side_detection_service.cc b/chrome/browser/safe_browsing/client_side_detection_service.cc
index ace424f..3c3e54a 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service.cc
@@ -6,14 +6,14 @@
#include "base/command_line.h"
#include "base/logging.h"
-#include "base/time.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/metrics/histogram.h"
-#include "base/string_util.h"
#include "base/stl_util.h"
+#include "base/string_util.h"
#include "base/task.h"
#include "base/time.h"
+#include "base/time.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
@@ -23,8 +23,8 @@
#include "chrome/common/safe_browsing/client_model.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/url_fetcher.h"
diff --git a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
index 67d7b63..4faf19c 100644
--- a/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
@@ -15,7 +15,7 @@
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
#include "chrome/common/safe_browsing/client_model.pb.h"
#include "chrome/common/safe_browsing/csd.pb.h"
-#include "content/browser/browser_thread.h"
+#include "content/test/test_browser_thread.h"
#include "content/test/test_url_fetcher_factory.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
@@ -61,11 +61,13 @@ ACTION(QuitCurrentMessageLoop) {
class ClientSideDetectionServiceTest : public testing::Test {
protected:
virtual void SetUp() {
- file_thread_.reset(new BrowserThread(BrowserThread::FILE, &msg_loop_));
+ file_thread_.reset(new content::TestBrowserThread(BrowserThread::FILE,
+ &msg_loop_));
factory_.reset(new FakeURLFetcherFactory());
- browser_thread_.reset(new BrowserThread(BrowserThread::UI, &msg_loop_));
+ browser_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ &msg_loop_));
}
virtual void TearDown() {
@@ -188,8 +190,8 @@ class ClientSideDetectionServiceTest : public testing::Test {
msg_loop_.Quit();
}
- scoped_ptr<BrowserThread> browser_thread_;
- scoped_ptr<BrowserThread> file_thread_;
+ scoped_ptr<content::TestBrowserThread> browser_thread_;
+ scoped_ptr<content::TestBrowserThread> file_thread_;
GURL phishing_url_;
bool is_phishing_;
diff --git a/chrome/browser/safe_browsing/download_protection_service.cc b/chrome/browser/safe_browsing/download_protection_service.cc
index 668290b..251b87217 100644
--- a/chrome/browser/safe_browsing/download_protection_service.cc
+++ b/chrome/browser/safe_browsing/download_protection_service.cc
@@ -13,8 +13,8 @@
#include "chrome/browser/safe_browsing/signature_util.h"
#include "chrome/common/net/http_return.h"
#include "chrome/common/safe_browsing/csd.pb.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/download/download_item.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_fetcher.h"
#include "content/public/common/url_fetcher_delegate.h"
#include "net/base/load_flags.h"
diff --git a/chrome/browser/safe_browsing/download_protection_service_unittest.cc b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
index ff2cc23..f505441 100644
--- a/chrome/browser/safe_browsing/download_protection_service_unittest.cc
+++ b/chrome/browser/safe_browsing/download_protection_service_unittest.cc
@@ -13,11 +13,12 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
+#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/safe_browsing/csd.pb.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/download/download_item.h"
#include "content/public/common/url_fetcher_delegate.h"
+#include "content/test/test_browser_thread.h"
#include "content/test/test_url_fetcher_factory.h"
#include "googleurl/src/gurl.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -43,12 +44,13 @@ class MockSafeBrowsingService : public SafeBrowsingService {
class DownloadProtectionServiceTest : public testing::Test {
protected:
virtual void SetUp() {
- ui_thread_.reset(new BrowserThread(BrowserThread::UI, &msg_loop_));
+ ui_thread_.reset(new content::TestBrowserThread(BrowserThread::UI,
+ &msg_loop_));
// Start real threads for the IO and File threads so that the DCHECKs
// to test that we're on the correct thread work.
- io_thread_.reset(new BrowserThread(BrowserThread::IO));
+ io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO));
ASSERT_TRUE(io_thread_->Start());
- file_thread_.reset(new BrowserThread(BrowserThread::FILE));
+ file_thread_.reset(new content::TestBrowserThread(BrowserThread::FILE));
ASSERT_TRUE(file_thread_->Start());
sb_service_ = new MockSafeBrowsingService();
download_service_ = sb_service_->download_protection_service();
@@ -135,9 +137,9 @@ class DownloadProtectionServiceTest : public testing::Test {
DownloadProtectionService* download_service_;
MessageLoop msg_loop_;
DownloadProtectionService::DownloadCheckResult result_;
- scoped_ptr<BrowserThread> io_thread_;
- scoped_ptr<BrowserThread> file_thread_;
- scoped_ptr<BrowserThread> ui_thread_;
+ scoped_ptr<content::TestBrowserThread> io_thread_;
+ scoped_ptr<content::TestBrowserThread> file_thread_;
+ scoped_ptr<content::TestBrowserThread> ui_thread_;
};
TEST_F(DownloadProtectionServiceTest, CheckClientDownloadInvalidUrl) {
diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc
index 09a7304..cc54b7b 100644
--- a/chrome/browser/safe_browsing/malware_details.cc
+++ b/chrome/browser/safe_browsing/malware_details.cc
@@ -15,10 +15,10 @@
#include "chrome/browser/safe_browsing/report.pb.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/browser_thread.h"
#include "net/base/io_buffer.h"
#include "net/disk_cache/disk_cache.h"
#include "net/url_request/url_request_context_getter.h"
diff --git a/chrome/browser/safe_browsing/malware_details.h b/chrome/browser/safe_browsing/malware_details.h
index 2f49df3..b122443 100644
--- a/chrome/browser/safe_browsing/malware_details.h
+++ b/chrome/browser/safe_browsing/malware_details.h
@@ -21,8 +21,8 @@
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/safe_browsing/report.pb.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/tab_contents_observer.h"
+#include "content/public/browser/browser_thread.h"
#include "net/base/completion_callback.h"
class TabContents;
diff --git a/chrome/browser/safe_browsing/malware_details_cache.cc b/chrome/browser/safe_browsing/malware_details_cache.cc
index ced572a..93f5831 100644
--- a/chrome/browser/safe_browsing/malware_details_cache.cc
+++ b/chrome/browser/safe_browsing/malware_details_cache.cc
@@ -14,7 +14,7 @@
#include "chrome/browser/safe_browsing/malware_details_cache.h"
#include "chrome/browser/safe_browsing/report.pb.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
-#include "content/browser/browser_thread.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_fetcher.h"
#include "net/base/host_port_pair.h"
#include "net/base/load_flags.h"
diff --git a/chrome/browser/safe_browsing/malware_details_history.cc b/chrome/browser/safe_browsing/malware_details_history.cc
index 6cfd1db..c0cf3db 100644
--- a/chrome/browser/safe_browsing/malware_details_history.cc
+++ b/chrome/browser/safe_browsing/malware_details_history.cc
@@ -11,10 +11,10 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/malware_details.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/safe_browsing/malware_details_history.h b/chrome/browser/safe_browsing/malware_details_history.h
index 9da1c02..b0eafb7 100644
--- a/chrome/browser/safe_browsing/malware_details_history.h
+++ b/chrome/browser/safe_browsing/malware_details_history.h
@@ -16,7 +16,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/history/history.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 "net/base/completion_callback.h"
diff --git a/chrome/browser/safe_browsing/malware_details_unittest.cc b/chrome/browser/safe_browsing/malware_details_unittest.cc
index 807d9fe..dc9580c 100644
--- a/chrome/browser/safe_browsing/malware_details_unittest.cc
+++ b/chrome/browser/safe_browsing/malware_details_unittest.cc
@@ -18,9 +18,9 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/test_url_request_context_getter.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/test/test_browser_thread.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
#include "net/disk_cache/disk_cache.h"
@@ -304,8 +304,8 @@ class MalwareDetailsTest : public ChromeRenderViewHostTestHarness {
*redirects, history::SOURCE_BROWSED, false);
}
- BrowserThread ui_thread_;
- BrowserThread io_thread_;
+ content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread io_thread_;
scoped_refptr<MockSafeBrowsingService> sb_service_;
};
diff --git a/chrome/browser/safe_browsing/protocol_manager.cc b/chrome/browser/safe_browsing/protocol_manager.cc
index f68dd00..ac4ca9d 100644
--- a/chrome/browser/safe_browsing/protocol_manager.cc
+++ b/chrome/browser/safe_browsing/protocol_manager.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/env_vars.h"
-#include "content/browser/browser_thread.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/common/url_fetcher.h"
#include "net/base/escape.h"
#include "net/base/load_flags.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 4cb3b12..f461908 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -27,11 +27,11 @@
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/user_metrics.h"
+#include "content/public/browser/browser_thread.h"
#include "grit/browser_resources.h"
#include "grit/generated_resources.h"
#include "grit/locale_settings.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
index 12b32b9..faf09c0 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -12,19 +12,19 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/malware_details.h"
-#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
+#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/render_process_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/test/test_browser_thread.h"
// A SafeBrowingService class that allows us to inject the malicious URLs.
class FakeSafeBrowsingService : public SafeBrowsingService {
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index 4367305..e2115f5 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -9,10 +9,10 @@
#include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/test_tab_contents.h"
#include "content/common/view_messages.h"
+#include "content/test/test_browser_thread.h"
static const char* kGoogleURL = "http://www.google.com/";
static const char* kGoodURL = "http://www.goodguys.com/";
@@ -175,8 +175,8 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness,
UserResponse user_response_;
TestSafeBrowsingBlockingPageFactory factory_;
- BrowserThread ui_thread_;
- BrowserThread io_thread_;
+ content::TestBrowserThread ui_thread_;
+ content::TestBrowserThread io_thread_;
};
// Tests showing a blocking page for a malware page and not proceeding.
diff --git a/chrome/browser/safe_browsing/safe_browsing_database.cc b/chrome/browser/safe_browsing/safe_browsing_database.cc
index e5ac9ea..fcd6b6b 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database.cc
@@ -9,16 +9,16 @@
#include "base/bind.h"
#include "base/file_util.h"
+#include "base/message_loop.h"
#include "base/metrics/histogram.h"
#include "base/metrics/stats_counters.h"
-#include "base/time.h"
-#include "base/message_loop.h"
#include "base/process_util.h"
-#include "crypto/sha2.h"
+#include "base/time.h"
#include "chrome/browser/safe_browsing/bloom_filter.h"
#include "chrome/browser/safe_browsing/prefix_set.h"
#include "chrome/browser/safe_browsing/safe_browsing_store_file.h"
-#include "content/browser/browser_thread.h"
+#include "content/public/browser/browser_thread.h"
+#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
#if defined(OS_MACOSX)
diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
index 088701b..17451e1 100644
--- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc
@@ -12,7 +12,7 @@
#include "chrome/browser/safe_browsing/safe_browsing_database.h"
#include "chrome/browser/safe_browsing/safe_browsing_store_file.h"
#include "chrome/browser/safe_browsing/safe_browsing_store_unittest_helper.h"
-#include "content/browser/browser_thread.h"
+#include "content/test/test_browser_thread.h"
#include "crypto/sha2.h"
#include "googleurl/src/gurl.h"
#include "sql/connection.h"
@@ -1236,7 +1236,7 @@ TEST_F(SafeBrowsingDatabaseTest, Whitelists) {
MessageLoop loop(MessageLoop::TYPE_DEFAULT);
// We expect all calls to ContainsCsdWhitelistedUrl in particular to be made
// from the IO thread. In general the whitelist lookups are thread-safe.
- BrowserThread io_thread(BrowserThread::IO, &loop);
+ content::TestBrowserThread io_thread(BrowserThread::IO, &loop);
// If the whitelist is disabled everything should match the whitelist.
database_.reset(new SafeBrowsingDatabaseNew(new SafeBrowsingStoreFile(),
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index 8987512..3f99699 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -31,6 +31,7 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "net/base/registry_controlled_domain.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.h b/chrome/browser/safe_browsing/safe_browsing_service.h
index 43a1c36..65a818f 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.h
+++ b/chrome/browser/safe_browsing/safe_browsing_service.h
@@ -23,7 +23,7 @@
#include "base/task.h"
#include "base/time.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.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 "googleurl/src/gurl.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
index 72989fb..17bb343 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service_browsertest.cc
@@ -10,25 +10,25 @@
#include "base/memory/ref_counted.h"
#include "base/metrics/histogram.h"
#include "base/scoped_temp_dir.h"
-#include "crypto/sha2.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/prerender/prerender_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
+#include "chrome/browser/safe_browsing/protocol_manager.h"
#include "chrome/browser/safe_browsing/safe_browsing_database.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/safe_browsing_util.h"
-#include "chrome/browser/safe_browsing/protocol_manager.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/test/test_browser_thread.h"
+#include "crypto/sha2.h"
#include "testing/gmock/include/gmock/gmock.h"
using base::Histogram;
diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc
index 171b7b3..3252d8c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_test.cc
@@ -21,9 +21,9 @@
#include "base/environment.h"
#include "base/path_service.h"
#include "base/process_util.h"
-#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
+#include "base/stringprintf.h"
#include "base/synchronization/lock.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
@@ -37,10 +37,10 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/browser_thread.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/public/common/url_fetcher.h"
#include "content/public/common/url_fetcher_delegate.h"
+#include "content/test/test_browser_thread.h"
#include "net/base/host_resolver.h"
#include "net/base/load_flags.h"
#include "net/base/net_log.h"