summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/intents/web_intents_registry.cc2
-rw-r--r--chrome/browser/webdata/web_data_service.cc10
-rw-r--r--chrome/browser/webdata/web_data_service.h4
-rw-r--r--chrome/browser/webdata/web_data_service_unittest.cc6
-rw-r--r--chrome/browser/webdata/web_intents_table.cc2
-rw-r--r--chrome/browser/webdata/web_intents_table.h3
-rw-r--r--chrome/browser/webdata/web_intents_table_unittest.cc12
7 files changed, 21 insertions, 18 deletions
diff --git a/chrome/browser/intents/web_intents_registry.cc b/chrome/browser/intents/web_intents_registry.cc
index f56a351..314f6c8 100644
--- a/chrome/browser/intents/web_intents_registry.cc
+++ b/chrome/browser/intents/web_intents_registry.cc
@@ -354,7 +354,7 @@ void WebIntentsRegistry::GetIntentServices(
callback);
QueryAdapter* query = new QueryAdapter(this, handler);
- query->query_handle_ = wds_->GetWebIntentServices(action, query);
+ query->query_handle_ = wds_->GetWebIntentServicesForAction(action, query);
}
void WebIntentsRegistry::GetAllIntentServices(
diff --git a/chrome/browser/webdata/web_data_service.cc b/chrome/browser/webdata/web_data_service.cc
index 50e974b..e7b2839 100644
--- a/chrome/browser/webdata/web_data_service.cc
+++ b/chrome/browser/webdata/web_data_service.cc
@@ -278,7 +278,7 @@ void WebDataService::RemoveWebIntentService(
this, request));
}
-WebDataService::Handle WebDataService::GetWebIntentServices(
+WebDataService::Handle WebDataService::GetWebIntentServicesForAction(
const string16& action,
WebDataServiceConsumer* consumer) {
DCHECK(consumer);
@@ -921,10 +921,10 @@ void WebDataService::GetWebIntentServicesImpl(
InitializeDatabaseIfNecessary();
if (db_ && !request->IsCancelled(NULL)) {
std::vector<WebIntentServiceData> result;
- db_->GetWebIntentsTable()->GetWebIntentServices(request->arg(), &result);
- request->SetResult(
- new WDResult<std::vector<WebIntentServiceData> >(
- WEB_INTENTS_RESULT, result));
+ db_->GetWebIntentsTable()->GetWebIntentServicesForAction(request->arg(),
+ &result);
+ request->SetResult(new WDResult<std::vector<WebIntentServiceData> >(
+ WEB_INTENTS_RESULT, result));
}
request->RequestComplete();
}
diff --git a/chrome/browser/webdata/web_data_service.h b/chrome/browser/webdata/web_data_service.h
index 39e0ad4..2f29f29 100644
--- a/chrome/browser/webdata/web_data_service.h
+++ b/chrome/browser/webdata/web_data_service.h
@@ -299,8 +299,8 @@ class WebDataService
// Get all web intent services registered for the specified |action|.
// |consumer| must not be NULL.
- Handle GetWebIntentServices(const string16& action,
- WebDataServiceConsumer* consumer);
+ Handle GetWebIntentServicesForAction(const string16& action,
+ WebDataServiceConsumer* consumer);
// Get all web intent services registered using the specified |service_url|.
// |consumer| must not be NULL.
diff --git a/chrome/browser/webdata/web_data_service_unittest.cc b/chrome/browser/webdata/web_data_service_unittest.cc
index cc383af..af5201f 100644
--- a/chrome/browser/webdata/web_data_service_unittest.cc
+++ b/chrome/browser/webdata/web_data_service_unittest.cc
@@ -655,7 +655,7 @@ TEST_F(WebDataServiceAutofillTest, AutofillRemoveModifiedBetween) {
TEST_F(WebDataServiceTest, WebIntents) {
WebIntentsConsumer consumer;
- wds_->GetWebIntentServices(ASCIIToUTF16("share"), &consumer);
+ wds_->GetWebIntentServicesForAction(ASCIIToUTF16("share"), &consumer);
WaitUntilCalled();
EXPECT_EQ(0U, consumer.services_.size());
@@ -672,7 +672,7 @@ TEST_F(WebDataServiceTest, WebIntents) {
service.type = ASCIIToUTF16("video/*");
wds_->AddWebIntentService(service);
- wds_->GetWebIntentServices(ASCIIToUTF16("share"), &consumer);
+ wds_->GetWebIntentServicesForAction(ASCIIToUTF16("share"), &consumer);
WaitUntilCalled();
ASSERT_EQ(2U, consumer.services_.size());
@@ -689,7 +689,7 @@ TEST_F(WebDataServiceTest, WebIntents) {
service.type = ASCIIToUTF16("image/*");
wds_->RemoveWebIntentService(service);
- wds_->GetWebIntentServices(ASCIIToUTF16("share"), &consumer);
+ wds_->GetWebIntentServicesForAction(ASCIIToUTF16("share"), &consumer);
WaitUntilCalled();
ASSERT_EQ(1U, consumer.services_.size());
diff --git a/chrome/browser/webdata/web_intents_table.cc b/chrome/browser/webdata/web_intents_table.cc
index 99709d7..4d6dd05 100644
--- a/chrome/browser/webdata/web_intents_table.cc
+++ b/chrome/browser/webdata/web_intents_table.cc
@@ -155,7 +155,7 @@ bool WebIntentsTable::MigrateToVersion46AddSchemeColumn() {
return true;
}
-bool WebIntentsTable::GetWebIntentServices(
+bool WebIntentsTable::GetWebIntentServicesForAction(
const string16& action,
std::vector<WebIntentServiceData>* services) {
DCHECK(services);
diff --git a/chrome/browser/webdata/web_intents_table.h b/chrome/browser/webdata/web_intents_table.h
index 4fa1f1a..6ae391e 100644
--- a/chrome/browser/webdata/web_intents_table.h
+++ b/chrome/browser/webdata/web_intents_table.h
@@ -62,9 +62,8 @@ class WebIntentsTable : public WebDatabaseTable {
// If |service| already exists, replaces it.
bool SetWebIntentService(const webkit_glue::WebIntentServiceData& service);
- // TODO(smckay): rename to GetWebIntentServicesForAction
// Retrieve all |services| from WebIntents table that match |action|.
- bool GetWebIntentServices(
+ bool GetWebIntentServicesForAction(
const string16& action,
std::vector<webkit_glue::WebIntentServiceData>* services);
diff --git a/chrome/browser/webdata/web_intents_table_unittest.cc b/chrome/browser/webdata/web_intents_table_unittest.cc
index 5b3ffe1..cb77066 100644
--- a/chrome/browser/webdata/web_intents_table_unittest.cc
+++ b/chrome/browser/webdata/web_intents_table_unittest.cc
@@ -81,7 +81,8 @@ TEST_F(WebIntentsTableTest, ActionIntents) {
std::vector<WebIntentServiceData> services;
// By default, no intent services exist.
- EXPECT_TRUE(IntentsTable()->GetWebIntentServices(test_action, &services));
+ EXPECT_TRUE(IntentsTable()->GetWebIntentServicesForAction(test_action,
+ &services));
EXPECT_EQ(0U, services.size());
// Now adding one.
@@ -90,7 +91,8 @@ TEST_F(WebIntentsTableTest, ActionIntents) {
EXPECT_TRUE(IntentsTable()->SetWebIntentService(service));
// Make sure that service can now be fetched
- EXPECT_TRUE(IntentsTable()->GetWebIntentServices(test_action, &services));
+ EXPECT_TRUE(IntentsTable()->GetWebIntentServicesForAction(test_action,
+ &services));
ASSERT_EQ(1U, services.size());
EXPECT_EQ(service, services[0]);
@@ -99,7 +101,8 @@ TEST_F(WebIntentsTableTest, ActionIntents) {
// Should now be gone.
services.clear();
- EXPECT_TRUE(IntentsTable()->GetWebIntentServices(test_action, &services));
+ EXPECT_TRUE(IntentsTable()->GetWebIntentServicesForAction(test_action,
+ &services));
EXPECT_EQ(0U, services.size());
}
@@ -164,7 +167,8 @@ TEST_F(WebIntentsTableTest, SetMultipleIntents) {
EXPECT_TRUE(IntentsTable()->SetWebIntentService(service));
// Recover stored intent services from DB.
- EXPECT_TRUE(IntentsTable()->GetWebIntentServices(test_action, &services));
+ EXPECT_TRUE(IntentsTable()->GetWebIntentServicesForAction(test_action,
+ &services));
ASSERT_EQ(2U, services.size());
// WebIntentsTable does not guarantee order, so ensure order here.