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

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

Issue 12069004: google_apis: Move AppendQueryParameter() etc. from common/net/url_util.h to net/base/url_util.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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_contacts_operations.h" 5 #include "chrome/browser/google_apis/gdata_contacts_operations.h"
6 6
7 #include "chrome/browser/google_apis/time_util.h" 7 #include "chrome/browser/google_apis/time_util.h"
8 #include "chrome/common/net/url_util.h"
9 #include "googleurl/src/gurl.h" 8 #include "googleurl/src/gurl.h"
9 #include "net/base/url_util.h"
10 10
11 namespace google_apis { 11 namespace google_apis {
12 12
13 namespace { 13 namespace {
14 14
15 // URL requesting all contact groups. 15 // URL requesting all contact groups.
16 const char kGetContactGroupsURL[] = 16 const char kGetContactGroupsURL[] =
17 "https://www.google.com/m8/feeds/groups/default/full?alt=json"; 17 "https://www.google.com/m8/feeds/groups/default/full?alt=json";
18 18
19 // URL requesting all contacts. 19 // URL requesting all contacts.
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 GetContactsOperation::~GetContactsOperation() {} 67 GetContactsOperation::~GetContactsOperation() {}
68 68
69 GURL GetContactsOperation::GetURL() const { 69 GURL GetContactsOperation::GetURL() const {
70 if (!feed_url_for_testing_.is_empty()) 70 if (!feed_url_for_testing_.is_empty())
71 return GURL(feed_url_for_testing_); 71 return GURL(feed_url_for_testing_);
72 72
73 GURL url(kGetContactsURL); 73 GURL url(kGetContactsURL);
74 74
75 if (!group_id_.empty()) { 75 if (!group_id_.empty()) {
76 url = chrome_common_net::AppendQueryParameter( 76 url = net::AppendQueryParameter(url, kGetContactsGroupParam, group_id_);
77 url, kGetContactsGroupParam, group_id_);
78 } 77 }
79 if (!min_update_time_.is_null()) { 78 if (!min_update_time_.is_null()) {
80 std::string time_rfc3339 = util::FormatTimeAsString(min_update_time_); 79 std::string time_rfc3339 = util::FormatTimeAsString(min_update_time_);
81 url = chrome_common_net::AppendQueryParameter( 80 url = net::AppendQueryParameter(
82 url, kGetContactsUpdatedMinParam, time_rfc3339); 81 url, kGetContactsUpdatedMinParam, time_rfc3339);
83 } 82 }
84 return url; 83 return url;
85 } 84 }
86 85
87 //========================== GetContactPhotoOperation ========================== 86 //========================== GetContactPhotoOperation ==========================
88 87
89 GetContactPhotoOperation::GetContactPhotoOperation( 88 GetContactPhotoOperation::GetContactPhotoOperation(
90 OperationRegistry* registry, 89 OperationRegistry* registry,
91 net::URLRequestContextGetter* url_request_context_getter, 90 net::URLRequestContextGetter* url_request_context_getter,
92 const GURL& photo_url, 91 const GURL& photo_url,
(...skipping 18 matching lines...) Expand all
111 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS); 110 OnProcessURLFetchResultsComplete(code == HTTP_SUCCESS);
112 } 111 }
113 112
114 void GetContactPhotoOperation::RunCallbackOnPrematureFailure( 113 void GetContactPhotoOperation::RunCallbackOnPrematureFailure(
115 GDataErrorCode code) { 114 GDataErrorCode code) {
116 scoped_ptr<std::string> data(new std::string); 115 scoped_ptr<std::string> data(new std::string);
117 callback_.Run(code, data.Pass()); 116 callback_.Run(code, data.Pass());
118 } 117 }
119 118
120 } // namespace google_apis 119 } // namespace google_apis
OLDNEW
« no previous file with comments | « chrome/browser/google_apis/drive_api_url_generator.cc ('k') | chrome/browser/google_apis/gdata_wapi_operations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698