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

Unified Diff: chrome/browser/google_apis/gdata_wapi_url_generator.cc

Issue 12861002: drive: Remove "/-/mine" from WAPI resource list urls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified the test feed to include an not-mine entry. Created 7 years, 9 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
Index: chrome/browser/google_apis/gdata_wapi_url_generator.cc
diff --git a/chrome/browser/google_apis/gdata_wapi_url_generator.cc b/chrome/browser/google_apis/gdata_wapi_url_generator.cc
index b080400e5f6b36df55978c34647438407bbe6c5d..a5856335570ee1da3ae98aee2f7bdd1ac3873eed 100644
--- a/chrome/browser/google_apis/gdata_wapi_url_generator.cc
+++ b/chrome/browser/google_apis/gdata_wapi_url_generator.cc
@@ -13,18 +13,8 @@
namespace google_apis {
namespace {
-// URL requesting resource list that belong to the authenticated user only
-// (handled with '/-/mine' part).
-const char kGetResourceListURLForAllDocuments[] =
- "/feeds/default/private/full/-/mine";
-
-// URL requesting resource list in a particular directory specified by "%s"
-// that belong to the authenticated user only (handled with '/-/mine' part).
-const char kGetResourceListURLForDirectoryFormat[] =
- "/feeds/default/private/full/%s/contents/-/mine";
-
-// Content URL for modification in a particular directory specified by "%s"
-// which will be replaced with its resource id.
+// Content URL for modification or resource list retrieval in a particular
+// directory specified by "%s" which will be replaced with its resource id.
const char kContentURLFormat[] = "/feeds/default/private/full/%s/contents";
// Content URL for removing a resource specified by the latter "%s" from the
@@ -143,11 +133,11 @@ GURL GDataWapiUrlGenerator::GenerateResourceListUrl(
url = base_url_.Resolve(kGetChangesListURL);
} else if (!directory_resource_id.empty()) {
url = base_url_.Resolve(
- base::StringPrintf(kGetResourceListURLForDirectoryFormat,
+ base::StringPrintf(kContentURLFormat,
net::EscapePath(
directory_resource_id).c_str()));
} else {
- url = base_url_.Resolve(kGetResourceListURLForAllDocuments);
+ url = base_url_.Resolve(kResourceListRootURL);
}
return AddFeedUrlParams(url, max_docs, start_changestamp, search_string);
}

Powered by Google App Engine
This is Rietveld 408576698