summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 09:31:08 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-07-19 09:31:08 +0000
commite353940295ce88232a58f3452f03825c49ed0d7b (patch)
tree76ce6760eca5430ca62ec4bbc95b344e9981d936 /webkit
parent4845451c687815680b14e38b33f98d993321a9b6 (diff)
downloadchromium_src-e353940295ce88232a58f3452f03825c49ed0d7b.zip
chromium_src-e353940295ce88232a58f3452f03825c49ed0d7b.tar.gz
chromium_src-e353940295ce88232a58f3452f03825c49ed0d7b.tar.bz2
Deprecate RegisterProtocolFactory/(Un)RegisterInterceptor.
Mark those APIs as private and friend existing uses. BUG=none TEST=none Review URL: http://codereview.chromium.org/7397008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92992 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/appcache/appcache_interceptor.cc6
-rw-r--r--webkit/appcache/appcache_request_handler_unittest.cc5
-rw-r--r--webkit/appcache/appcache_url_request_job_unittest.cc5
-rw-r--r--webkit/blob/blob_url_request_job_unittest.cc5
-rw-r--r--webkit/fileapi/file_system_dir_url_request_job_unittest.cc11
-rw-r--r--webkit/fileapi/file_system_operation_write_unittest.cc5
-rw-r--r--webkit/fileapi/file_system_url_request_job_unittest.cc10
-rw-r--r--webkit/fileapi/file_writer_delegate_unittest.cc4
8 files changed, 32 insertions, 19 deletions
diff --git a/webkit/appcache/appcache_interceptor.cc b/webkit/appcache/appcache_interceptor.cc
index 1c76df4..f1be933 100644
--- a/webkit/appcache/appcache_interceptor.cc
+++ b/webkit/appcache/appcache_interceptor.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -63,11 +63,11 @@ void AppCacheInterceptor::GetExtraResponseInfo(net::URLRequest* request,
}
AppCacheInterceptor::AppCacheInterceptor() {
- net::URLRequest::RegisterRequestInterceptor(this);
+ net::URLRequest::Deprecated::RegisterRequestInterceptor(this);
}
AppCacheInterceptor::~AppCacheInterceptor() {
- net::URLRequest::UnregisterRequestInterceptor(this);
+ net::URLRequest::Deprecated::UnregisterRequestInterceptor(this);
}
net::URLRequestJob* AppCacheInterceptor::MaybeIntercept(
diff --git a/webkit/appcache/appcache_request_handler_unittest.cc b/webkit/appcache/appcache_request_handler_unittest.cc
index a40d294..4ea421a 100644
--- a/webkit/appcache/appcache_request_handler_unittest.cc
+++ b/webkit/appcache/appcache_request_handler_unittest.cc
@@ -169,7 +169,7 @@ class AppCacheRequestHandlerTest : public testing::Test {
void SetUpTest() {
DCHECK(MessageLoop::current() == io_thread_->message_loop());
- orig_http_factory_ = net::URLRequest::RegisterProtocolFactory(
+ orig_http_factory_ = net::URLRequest::Deprecated::RegisterProtocolFactory(
"http", MockHttpJobFactory);
mock_service_.reset(new MockAppCacheService);
mock_frontend_.reset(new MockFrontend);
@@ -184,7 +184,8 @@ class AppCacheRequestHandlerTest : public testing::Test {
void TearDownTest() {
DCHECK(MessageLoop::current() == io_thread_->message_loop());
DCHECK(!mock_factory_job_);
- net::URLRequest::RegisterProtocolFactory("http", orig_http_factory_);
+ net::URLRequest::Deprecated::RegisterProtocolFactory(
+ "http", orig_http_factory_);
orig_http_factory_ = NULL;
job_ = NULL;
handler_.reset();
diff --git a/webkit/appcache/appcache_url_request_job_unittest.cc b/webkit/appcache/appcache_url_request_job_unittest.cc
index e1772c3..711df69 100644
--- a/webkit/appcache/appcache_url_request_job_unittest.cc
+++ b/webkit/appcache/appcache_url_request_job_unittest.cc
@@ -187,7 +187,7 @@ class AppCacheURLRequestJobTest : public testing::Test {
void SetUpTest() {
DCHECK(MessageLoop::current() == io_thread_->message_loop());
DCHECK(task_stack_.empty());
- orig_http_factory_ = net::URLRequest::RegisterProtocolFactory(
+ orig_http_factory_ = net::URLRequest::Deprecated::RegisterProtocolFactory(
"http", MockHttpJobFactory);
url_request_delegate_.reset(new MockURLRequestDelegate(this));
storage_delegate_.reset(new MockStorageDelegate(this));
@@ -205,7 +205,8 @@ class AppCacheURLRequestJobTest : public testing::Test {
void TearDownTest() {
DCHECK(MessageLoop::current() == io_thread_->message_loop());
- net::URLRequest::RegisterProtocolFactory("http", orig_http_factory_);
+ net::URLRequest::Deprecated::RegisterProtocolFactory(
+ "http", orig_http_factory_);
orig_http_factory_ = NULL;
request_.reset();
url_request_delegate_.reset();
diff --git a/webkit/blob/blob_url_request_job_unittest.cc b/webkit/blob/blob_url_request_job_unittest.cc
index c5f6240..6a0bb6f 100644
--- a/webkit/blob/blob_url_request_job_unittest.cc
+++ b/webkit/blob/blob_url_request_job_unittest.cc
@@ -174,7 +174,8 @@ class BlobURLRequestJobTest : public testing::Test {
void SetUpTest() {
DCHECK(MessageLoop::current() == io_thread_->message_loop());
- net::URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory);
+ net::URLRequest::Deprecated::RegisterProtocolFactory(
+ "blob", &BlobURLRequestJobFactory);
url_request_delegate_.reset(new MockURLRequestDelegate(this));
}
@@ -185,7 +186,7 @@ class BlobURLRequestJobTest : public testing::Test {
url_request_delegate_.reset();
DCHECK(!blob_url_request_job_);
- net::URLRequest::RegisterProtocolFactory("blob", NULL);
+ net::URLRequest::Deprecated::RegisterProtocolFactory("blob", NULL);
}
void TestFinished() {
diff --git a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
index b913466..a8f250a 100644
--- a/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_dir_url_request_job_unittest.cc
@@ -36,7 +36,8 @@ namespace fileapi {
namespace {
// We always use the TEMPORARY FileSystem in this test.
-static const char kFileSystemURLPrefix[] = "filesystem:http://remote/temporary/";
+static const char kFileSystemURLPrefix[] =
+ "filesystem:http://remote/temporary/";
class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy {
public:
@@ -53,6 +54,8 @@ class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy {
}
};
+} // namespace
+
class FileSystemDirURLRequestJobTest : public testing::Test {
protected:
FileSystemDirURLRequestJobTest()
@@ -83,7 +86,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
&FileSystemDirURLRequestJobTest::OnGetRootPath));
MessageLoop::current()->RunAllPending();
- net::URLRequest::RegisterProtocolFactory(
+ net::URLRequest::Deprecated::RegisterProtocolFactory(
"filesystem", &FileSystemDirURLRequestJobFactory);
}
@@ -92,7 +95,7 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
request_.reset(NULL);
delegate_.reset(NULL);
- net::URLRequest::RegisterProtocolFactory("filesystem", NULL);
+ net::URLRequest::Deprecated::RegisterProtocolFactory("filesystem", NULL);
}
void OnGetRootPath(bool success, const FilePath& root_path,
@@ -173,6 +176,8 @@ class FileSystemDirURLRequestJobTest : public testing::Test {
// static
net::URLRequestJob* FileSystemDirURLRequestJobTest::job_ = NULL;
+namespace {
+
// TODO(adamk): Write tighter tests once we've decided on a format for directory
// listing responses.
TEST_F(FileSystemDirURLRequestJobTest, DirectoryListing) {
diff --git a/webkit/fileapi/file_system_operation_write_unittest.cc b/webkit/fileapi/file_system_operation_write_unittest.cc
index 04b7c9d..769ea2d 100644
--- a/webkit/fileapi/file_system_operation_write_unittest.cc
+++ b/webkit/fileapi/file_system_operation_write_unittest.cc
@@ -203,11 +203,12 @@ void FileSystemOperationWriteTest::SetUp() {
ASSERT_TRUE(file_util::CreateTemporaryFileInDir(filesystem_dir_, &file_));
virtual_path_ = file_.BaseName();
- net::URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory);
+ net::URLRequest::Deprecated::RegisterProtocolFactory(
+ "blob", &BlobURLRequestJobFactory);
}
void FileSystemOperationWriteTest::TearDown() {
- net::URLRequest::RegisterProtocolFactory("blob", NULL);
+ net::URLRequest::Deprecated::RegisterProtocolFactory("blob", NULL);
quota_manager_ = NULL;
test_helper_.TearDown();
}
diff --git a/webkit/fileapi/file_system_url_request_job_unittest.cc b/webkit/fileapi/file_system_url_request_job_unittest.cc
index 53f1222..987adb1 100644
--- a/webkit/fileapi/file_system_url_request_job_unittest.cc
+++ b/webkit/fileapi/file_system_url_request_job_unittest.cc
@@ -75,6 +75,8 @@ class TestSpecialStoragePolicy : public quota::SpecialStoragePolicy {
}
};
+} // namespace
+
class FileSystemURLRequestJobTest : public testing::Test {
protected:
FileSystemURLRequestJobTest()
@@ -105,12 +107,12 @@ class FileSystemURLRequestJobTest : public testing::Test {
&FileSystemURLRequestJobTest::OnGetRootPath));
MessageLoop::current()->RunAllPending();
- net::URLRequest::RegisterProtocolFactory("filesystem",
- &FileSystemURLRequestJobFactory);
+ net::URLRequest::Deprecated::RegisterProtocolFactory(
+ "filesystem", &FileSystemURLRequestJobFactory);
}
virtual void TearDown() {
- net::URLRequest::RegisterProtocolFactory("filesystem", NULL);
+ net::URLRequest::Deprecated::RegisterProtocolFactory("filesystem", NULL);
}
void OnGetRootPath(bool success, const FilePath& root_path,
@@ -228,6 +230,8 @@ class FileSystemURLRequestJobTest : public testing::Test {
// static
net::URLRequestJob* FileSystemURLRequestJobTest::job_ = NULL;
+namespace {
+
TEST_F(FileSystemURLRequestJobTest, FileTest) {
WriteFile("file1.dat", kTestFileData, arraysize(kTestFileData) - 1);
TestRequest(CreateFileSystemURL("file1.dat"));
diff --git a/webkit/fileapi/file_writer_delegate_unittest.cc b/webkit/fileapi/file_writer_delegate_unittest.cc
index 2200b8c..4281bee 100644
--- a/webkit/fileapi/file_writer_delegate_unittest.cc
+++ b/webkit/fileapi/file_writer_delegate_unittest.cc
@@ -222,11 +222,11 @@ void FileWriterDelegateTest::SetUp() {
SetUpTestHelper(base_dir);
ASSERT_TRUE(file_util::CreateTemporaryFileInDir(
test_helper_.GetOriginRootPath(), &file_path_));
- net::URLRequest::RegisterProtocolFactory("blob", &Factory);
+ net::URLRequest::Deprecated::RegisterProtocolFactory("blob", &Factory);
}
void FileWriterDelegateTest::TearDown() {
- net::URLRequest::RegisterProtocolFactory("blob", NULL);
+ net::URLRequest::Deprecated::RegisterProtocolFactory("blob", NULL);
base::ClosePlatformFile(file_);
test_helper_.TearDown();
}