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

Unified Diff: chrome/browser/extensions/api/discovery/discovery_api.cc

Issue 10647003: Discovery API supports specifying a tile in a URL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 5 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 | « no previous file | chrome/browser/extensions/api/discovery/suggested_link.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/discovery/discovery_api.cc
diff --git a/chrome/browser/extensions/api/discovery/discovery_api.cc b/chrome/browser/extensions/api/discovery/discovery_api.cc
index 4392f2a8eb82cc83e666dd1ee70fff9ffadb8e3d..7cc351ff4b31ab2fb157c4727a00fccbaaf32a82 100644
--- a/chrome/browser/extensions/api/discovery/discovery_api.cc
+++ b/chrome/browser/extensions/api/discovery/discovery_api.cc
@@ -34,11 +34,18 @@ bool DiscoverySuggestFunction::RunImpl() {
}
}
+ std::string empty;
+ const std::string* url_image = ∅
+ if (params->details.url_image != NULL)
+ url_image = params->details.url_image.get();
+
extensions::SuggestedLinksRegistry* registry =
extensions::SuggestedLinksRegistryFactory::GetForProfile(profile());
scoped_ptr<extensions::SuggestedLink> suggested_link(
new extensions::SuggestedLink(params->details.link_url,
- params->details.link_text, score));
+ params->details.link_text,
+ *url_image,
+ score));
registry->Add(extension_id(), suggested_link.Pass());
return true;
}
« no previous file with comments | « no previous file | chrome/browser/extensions/api/discovery/suggested_link.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698