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

Unified Diff: chrome/browser/chromeos/drive/drive_app_registry.cc

Issue 125553004: Parse createUrl field of apps.list Drive API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/chromeos/drive/drive_app_registry.h ('k') | chrome/test/data/drive/applist.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/drive/drive_app_registry.cc
diff --git a/chrome/browser/chromeos/drive/drive_app_registry.cc b/chrome/browser/chromeos/drive/drive_app_registry.cc
index 629a2d975eeb712549e28c5c87a86c7d3fc3232b..3311cd9a01e0244b539e08804948667bc5272940 100644
--- a/chrome/browser/chromeos/drive/drive_app_registry.cc
+++ b/chrome/browser/chromeos/drive/drive_app_registry.cc
@@ -53,14 +53,16 @@ DriveAppInfo::DriveAppInfo(
const std::string& web_store_id,
const std::string& app_name,
const std::string& object_type,
- bool is_primary_selector)
+ bool is_primary_selector,
+ const GURL& create_url)
: app_id(app_id),
app_icons(app_icons),
document_icons(document_icons),
web_store_id(web_store_id),
app_name(app_name),
object_type(object_type),
- is_primary_selector(is_primary_selector) {
+ is_primary_selector(is_primary_selector),
+ create_url(create_url) {
}
DriveAppInfo::~DriveAppInfo() {
@@ -167,6 +169,7 @@ void DriveAppRegistry::UpdateFromAppList(
app.object_type(),
app.application_id(),
true, // primary
+ app.create_url(),
app.primary_mimetypes(),
&app_mimetypes_map_);
AddAppSelectorList(web_store_id,
@@ -176,6 +179,7 @@ void DriveAppRegistry::UpdateFromAppList(
app.object_type(),
app.application_id(),
false, // primary
+ app.create_url(),
app.secondary_mimetypes(),
&app_mimetypes_map_);
AddAppSelectorList(web_store_id,
@@ -185,6 +189,7 @@ void DriveAppRegistry::UpdateFromAppList(
app.object_type(),
app.application_id(),
true, // primary
+ app.create_url(),
app.primary_file_extensions(),
&app_extension_map_);
AddAppSelectorList(web_store_id,
@@ -194,6 +199,7 @@ void DriveAppRegistry::UpdateFromAppList(
app.object_type(),
app.application_id(),
false, // primary
+ app.create_url(),
app.secondary_file_extensions(),
&app_extension_map_);
}
@@ -208,6 +214,7 @@ void DriveAppRegistry::AddAppSelectorList(
const std::string& object_type,
const std::string& app_id,
bool is_primary_selector,
+ const GURL& create_url,
const ScopedVector<std::string>& selectors,
DriveAppFileSelectorMap* map) {
for (ScopedVector<std::string>::const_iterator it = selectors.begin();
@@ -220,7 +227,8 @@ void DriveAppRegistry::AddAppSelectorList(
web_store_id,
app_name,
object_type,
- is_primary_selector)));
+ is_primary_selector,
+ create_url)));
}
}
« no previous file with comments | « chrome/browser/chromeos/drive/drive_app_registry.h ('k') | chrome/test/data/drive/applist.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698