Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 return AddStandardUrlParams(result); | 87 return AddStandardUrlParams(result); |
| 88 } | 88 } |
| 89 | 89 |
| 90 // static | 90 // static |
| 91 GURL GDataWapiUrlGenerator::AddFeedUrlParams( | 91 GURL GDataWapiUrlGenerator::AddFeedUrlParams( |
| 92 const GURL& url, | 92 const GURL& url, |
| 93 int num_items_to_fetch, | 93 int num_items_to_fetch, |
| 94 int changestamp, | 94 int changestamp, |
| 95 const std::string& search_string) { | 95 const std::string& search_string) { |
| 96 GURL result = AddStandardUrlParams(url); | 96 GURL result = AddStandardUrlParams(url); |
| 97 result = net::AppendOrReplaceQueryParameter(result, "showroot", "true"); | |
|
kinaba
2013/03/11 09:22:38
I think this should be moved to AddStandardUrlPara
Haruki Sato
2013/03/11 14:15:35
Done.
Thanks.
| |
| 97 result = net::AppendOrReplaceQueryParameter(result, "showfolders", "true"); | 98 result = net::AppendOrReplaceQueryParameter(result, "showfolders", "true"); |
| 98 result = net::AppendOrReplaceQueryParameter( | 99 result = net::AppendOrReplaceQueryParameter( |
| 99 result, | 100 result, |
| 100 "max-results", | 101 "max-results", |
| 101 base::StringPrintf("%d", num_items_to_fetch)); | 102 base::StringPrintf("%d", num_items_to_fetch)); |
| 102 result = net::AppendOrReplaceQueryParameter( | 103 result = net::AppendOrReplaceQueryParameter( |
| 103 result, "include-installed-apps", "true"); | 104 result, "include-installed-apps", "true"); |
| 104 | 105 |
| 105 if (changestamp) { | 106 if (changestamp) { |
| 106 result = net::AppendQueryParameter(result, | 107 result = net::AppendQueryParameter(result, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 |
| OLD | NEW |