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" |
11 #include "net/base/url_util.h" | 11 #include "net/base/url_util.h" |
12 | 12 |
13 namespace google_apis { | 13 namespace google_apis { |
14 namespace { | 14 namespace { |
15 | 15 |
16 // URL requesting resource list that belong to the authenticated user only | 16 // URL requesting resource list that belong to the authenticated user only |
17 // (handled with '/-/mine' part). | 17 // (handled with '/-/mine' part). |
18 const char kGetResourceListURLForAllDocuments[] = | 18 const char kGetResourceListURLForAllDocuments[] = |
19 "/feeds/default/private/full/-/mine"; | 19 "/feeds/default/private/full/-/mine"; |
20 | 20 |
21 // URL requesting resource list in a particular directory specified by "%s" | 21 // URL requesting resource list in a particular directory specified by "%s" |
22 // that belong to the authenticated user only (handled with '/-/mine' part). | 22 // that belong to the authenticated user only (handled with '/-/mine' part). |
23 const char kGetResourceListURLForDirectoryFormat[] = | 23 const char kGetResourceListURLForDirectoryFormat[] = |
24 "/feeds/default/private/full/%s/contents/-/mine"; | 24 "/feeds/default/private/full/%s/contents/-/mine"; |
25 | 25 |
26 // Content URL for modification in a particular directory specifyied by "%s" | 26 // Content URL for modification in a particular directory specified by "%s" |
27 // which will be replaced with its resource id. | 27 // which will be replaced with its resource id. |
28 const char kContentURLFormat[] = "/feeds/default/private/full/%s/contents"; | 28 const char kContentURLFormat[] = "/feeds/default/private/full/%s/contents"; |
29 | 29 |
30 // Content URL for removing a resource specified by the latter "%s" from the | 30 // Content URL for removing a resource specified by the latter "%s" from the |
31 // directory specified by the former "%s". | 31 // directory specified by the former "%s". |
32 const char kResourceURLForRemovalFormat[] = | 32 const char kResourceURLForRemovalFormat[] = |
33 "/feeds/default/private/full/%s/contents/%s"; | 33 "/feeds/default/private/full/%s/contents/%s"; |
34 | 34 |
35 // URL requesting single resource entry whose resource id is followed by this | 35 // URL requesting single resource entry whose resource id is followed by this |
36 // prefix. | 36 // prefix. |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 GURL GDataWapiUrlGenerator::GenerateResourceListRootUrl() const { | 196 GURL GDataWapiUrlGenerator::GenerateResourceListRootUrl() const { |
197 return AddStandardUrlParams(base_url_.Resolve(kResourceListRootURL)); | 197 return AddStandardUrlParams(base_url_.Resolve(kResourceListRootURL)); |
198 } | 198 } |
199 | 199 |
200 GURL GDataWapiUrlGenerator::GenerateAccountMetadataUrl() const { | 200 GURL GDataWapiUrlGenerator::GenerateAccountMetadataUrl() const { |
201 return AddMetadataUrlParams(base_url_.Resolve(kAccountMetadataURL)); | 201 return AddMetadataUrlParams(base_url_.Resolve(kAccountMetadataURL)); |
202 } | 202 } |
203 | 203 |
204 } // namespace google_apis | 204 } // namespace google_apis |
OLD | NEW |