| 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 "chrome/common/net/url_util.h" | 9 #include "chrome/common/net/url_util.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // URL requesting single resource entry whose resource id is specified by "%s". | 26 // URL requesting single resource entry whose resource id is specified by "%s". |
| 27 const char kGetResourceEntryURLFormat[] = "/feeds/default/private/full/%s"; | 27 const char kGetResourceEntryURLFormat[] = "/feeds/default/private/full/%s"; |
| 28 | 28 |
| 29 // Root resource list url. | 29 // Root resource list url. |
| 30 const char kResourceListRootURL[] = "/feeds/default/private/full"; | 30 const char kResourceListRootURL[] = "/feeds/default/private/full"; |
| 31 | 31 |
| 32 // Metadata feed with things like user quota. | 32 // Metadata feed with things like user quota. |
| 33 const char kAccountMetadataURL[] = "/feeds/metadata/default"; | 33 const char kAccountMetadataURL[] = "/feeds/metadata/default"; |
| 34 | 34 |
| 35 // URL for the content_url of the root directory. |
| 36 const char kRootContentURL[] = |
| 37 "/feeds/default/private/full/folder%3Aroot/contents"; |
| 38 |
| 35 #ifndef NDEBUG | 39 #ifndef NDEBUG |
| 36 // Use smaller 'page' size while debugging to ensure we hit feed reload | 40 // Use smaller 'page' size while debugging to ensure we hit feed reload |
| 37 // almost always. Be careful not to use something too small on account that | 41 // almost always. Be careful not to use something too small on account that |
| 38 // have many items because server side 503 error might kick in. | 42 // have many items because server side 503 error might kick in. |
| 39 const int kMaxDocumentsPerFeed = 500; | 43 const int kMaxDocumentsPerFeed = 500; |
| 40 const int kMaxDocumentsPerSearchFeed = 50; | 44 const int kMaxDocumentsPerSearchFeed = 50; |
| 41 #else | 45 #else |
| 42 const int kMaxDocumentsPerFeed = 500; | 46 const int kMaxDocumentsPerFeed = 500; |
| 43 const int kMaxDocumentsPerSearchFeed = 50; | 47 const int kMaxDocumentsPerSearchFeed = 50; |
| 44 #endif | 48 #endif |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 } | 158 } |
| 155 | 159 |
| 156 GURL GDataWapiUrlGenerator::GenerateResourceListRootUrl() const { | 160 GURL GDataWapiUrlGenerator::GenerateResourceListRootUrl() const { |
| 157 return AddStandardUrlParams(base_url_.Resolve(kResourceListRootURL)); | 161 return AddStandardUrlParams(base_url_.Resolve(kResourceListRootURL)); |
| 158 } | 162 } |
| 159 | 163 |
| 160 GURL GDataWapiUrlGenerator::GenerateAccountMetadataUrl() const { | 164 GURL GDataWapiUrlGenerator::GenerateAccountMetadataUrl() const { |
| 161 return AddMetadataUrlParams(base_url_.Resolve(kAccountMetadataURL)); | 165 return AddMetadataUrlParams(base_url_.Resolve(kAccountMetadataURL)); |
| 162 } | 166 } |
| 163 | 167 |
| 168 GURL GDataWapiUrlGenerator::GenerateRootContentUrl() const { |
| 169 return base_url_.Resolve(kRootContentURL); |
| 170 } |
| 171 |
| 164 } // namespace google_apis | 172 } // namespace google_apis |
| OLD | NEW |