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

Side by Side Diff: chrome/browser/google_apis/gdata_wapi_url_generator.cc

Issue 12585003: drive: Add showroot=true to WAPI feed URLs and ignore "no parent" entries. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix browser_tests. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/google_apis/gdata_wapi_url_generator.h" 5 #include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "net/base/escape.h" 10 #include "net/base/escape.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 } // namespace 72 } // namespace
73 73
74 const char GDataWapiUrlGenerator::kBaseUrlForProduction[] = 74 const char GDataWapiUrlGenerator::kBaseUrlForProduction[] =
75 "https://docs.google.com/"; 75 "https://docs.google.com/";
76 76
77 // static 77 // static
78 GURL GDataWapiUrlGenerator::AddStandardUrlParams(const GURL& url) { 78 GURL GDataWapiUrlGenerator::AddStandardUrlParams(const GURL& url) {
79 GURL result = net::AppendOrReplaceQueryParameter(url, "v", "3"); 79 GURL result = net::AppendOrReplaceQueryParameter(url, "v", "3");
80 result = net::AppendOrReplaceQueryParameter(result, "alt", "json"); 80 result = net::AppendOrReplaceQueryParameter(result, "alt", "json");
81 result = net::AppendOrReplaceQueryParameter(result, "showroot", "true");
81 return result; 82 return result;
82 } 83 }
83 84
84 // static 85 // static
85 GURL GDataWapiUrlGenerator::AddInitiateUploadUrlParams(const GURL& url) { 86 GURL GDataWapiUrlGenerator::AddInitiateUploadUrlParams(const GURL& url) {
86 GURL result = net::AppendOrReplaceQueryParameter(url, "convert", "false"); 87 GURL result = net::AppendOrReplaceQueryParameter(url, "convert", "false");
87 return AddStandardUrlParams(result); 88 return AddStandardUrlParams(result);
88 } 89 }
89 90
90 // static 91 // static
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 bool include_installed_apps) const { 218 bool include_installed_apps) const {
218 GURL result = AddStandardUrlParams(base_url_.Resolve(kAccountMetadataURL)); 219 GURL result = AddStandardUrlParams(base_url_.Resolve(kAccountMetadataURL));
219 if (include_installed_apps) { 220 if (include_installed_apps) {
220 result = net::AppendOrReplaceQueryParameter( 221 result = net::AppendOrReplaceQueryParameter(
221 result, "include-installed-apps", "true"); 222 result, "include-installed-apps", "true");
222 } 223 }
223 return result; 224 return result;
224 } 225 }
225 226
226 } // namespace google_apis 227 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698