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

Unified Diff: chrome/browser/ui/app_list/search/webstore/webstore_provider.cc

Issue 448543002: Allow installing paid apps from the launcher search results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: partially clang format Created 6 years, 4 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/ui/app_list/search/webstore/webstore_provider_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
diff --git a/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc b/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
index da9a25f25bff19b0176fff515d81c1ea4a960666..7bd86711c881dae84131fc64945b16b9c7fa9ae2 100644
--- a/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
+++ b/chrome/browser/ui/app_list/search/webstore/webstore_provider.cc
@@ -28,6 +28,7 @@ const char kKeyResults[] = "results";
const char kKeyId[] = "id";
const char kKeyLocalizedName[] = "localized_name";
const char kKeyIconUrl[] = "icon_url";
+const char kKeyIsPaid[] = "is_paid";
const char kKeyItemType[] = "item_type";
const char kPlatformAppType[] = "platform_app";
@@ -152,9 +153,11 @@ scoped_ptr<ChromeSearchResult> WebstoreProvider::CreateResult(
std::string app_id;
std::string localized_name;
std::string icon_url_string;
+ bool is_paid = false;
if (!dict.GetString(kKeyId, &app_id) ||
!dict.GetString(kKeyLocalizedName, &localized_name) ||
- !dict.GetString(kKeyIconUrl, &icon_url_string)) {
+ !dict.GetString(kKeyIconUrl, &icon_url_string) ||
+ !dict.GetBoolean(kKeyIsPaid, &is_paid)) {
return result.Pass();
}
@@ -166,8 +169,13 @@ scoped_ptr<ChromeSearchResult> WebstoreProvider::CreateResult(
dict.GetString(kKeyItemType, &item_type_string);
extensions::Manifest::Type item_type = ParseItemType(item_type_string);
- result.reset(new WebstoreResult(
- profile_, app_id, localized_name, icon_url, item_type, controller_));
+ result.reset(new WebstoreResult(profile_,
+ app_id,
+ localized_name,
+ icon_url,
+ is_paid,
+ item_type,
+ controller_));
return result.Pass();
}
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/webstore/webstore_provider_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698