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

Unified Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 10050016: Removes pinning code from TopSites as we no longer need it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove printfs Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index 9b6ac5dd83c418b2f33b1799a2a10451f5dc1398..491d4eab1db6dffe1e9fc2b5086c91af6feff934 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -2528,8 +2528,6 @@ void TestingAutomationProvider::SendJSONRequest(int handle,
&TestingAutomationProvider::MoveNTPMostVisitedThumbnail;
browser_handler_map["RemoveNTPMostVisitedThumbnail"] =
&TestingAutomationProvider::RemoveNTPMostVisitedThumbnail;
- browser_handler_map["UnpinNTPMostVisitedThumbnail"] =
- &TestingAutomationProvider::UnpinNTPMostVisitedThumbnail;
browser_handler_map["RestoreAllNTPMostVisitedThumbnails"] =
&TestingAutomationProvider::RestoreAllNTPMostVisitedThumbnails;
@@ -5617,13 +5615,6 @@ void TestingAutomationProvider::MoveNTPMostVisitedThumbnail(
reply.SendError("TopSites service is not initialized.");
return;
}
- GURL swapped;
- // If thumbnail A is switching positions with a pinned thumbnail B, B
- // should be pinned in the old index of A.
- if (top_sites->GetPinnedURLAtIndex(index, &swapped)) {
- top_sites->AddPinnedURL(swapped, old_index);
- }
- top_sites->AddPinnedURL(GURL(url), index);
reply.SendSuccess(NULL);
}
@@ -5646,25 +5637,6 @@ void TestingAutomationProvider::RemoveNTPMostVisitedThumbnail(
reply.SendSuccess(NULL);
}
-void TestingAutomationProvider::UnpinNTPMostVisitedThumbnail(
- Browser* browser,
- DictionaryValue* args,
- IPC::Message* reply_message) {
- AutomationJSONReply reply(this, reply_message);
- std::string url;
- if (!args->GetString("url", &url)) {
- reply.SendError("Missing or invalid 'url' key.");
- return;
- }
- history::TopSites* top_sites = browser->profile()->GetTopSites();
- if (!top_sites) {
- reply.SendError("TopSites service is not initialized.");
- return;
- }
- top_sites->RemovePinnedURL(GURL(url));
- reply.SendSuccess(NULL);
-}
-
void TestingAutomationProvider::RestoreAllNTPMostVisitedThumbnails(
Browser* browser,
DictionaryValue* args,
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.h ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698