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 #ifndef CHROME_BROWSER_CHROMEOS_CONTACTS_GDATA_CONTACTS_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CONTACTS_GDATA_CONTACTS_SERVICE_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CONTACTS_GDATA_CONTACTS_SERVICE_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CONTACTS_GDATA_CONTACTS_SERVICE_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
16 #include "base/time.h" | 16 #include "base/time.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 | 18 |
19 class Profile; | 19 class Profile; |
20 | 20 |
21 namespace base { | 21 namespace base { |
22 class Value; | 22 class Value; |
23 } // namespace base | 23 } // namespace base |
24 | 24 |
25 namespace google_apis { | 25 namespace google_apis { |
26 class AuthService; | 26 class AuthService; |
27 class OperationRunner; | 27 class RequestSender; |
28 } // namespace google_apis | 28 } // namespace google_apis |
29 | 29 |
30 namespace net { | 30 namespace net { |
31 class URLRequestContextGetter; | 31 class URLRequestContextGetter; |
32 } // namespace net | 32 } // namespace net |
33 | 33 |
34 namespace contacts { | 34 namespace contacts { |
35 | 35 |
36 class Contact; | 36 class Contact; |
37 | 37 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 private: | 105 private: |
106 class DownloadContactsRequest; | 106 class DownloadContactsRequest; |
107 | 107 |
108 // Invoked by a download request once it's finished (either successfully or | 108 // Invoked by a download request once it's finished (either successfully or |
109 // unsuccessfully). | 109 // unsuccessfully). |
110 void OnRequestComplete(DownloadContactsRequest* request); | 110 void OnRequestComplete(DownloadContactsRequest* request); |
111 | 111 |
112 net::URLRequestContextGetter* url_request_context_getter_; // not owned | 112 net::URLRequestContextGetter* url_request_context_getter_; // not owned |
113 | 113 |
114 scoped_ptr<google_apis::OperationRunner> runner_; | 114 scoped_ptr<google_apis::RequestSender> sender_; |
115 | 115 |
116 // Group ID for the "My Contacts" system contacts group. | 116 // Group ID for the "My Contacts" system contacts group. |
117 // Cached after a DownloadContactsRequest has completed. | 117 // Cached after a DownloadContactsRequest has completed. |
118 std::string cached_my_contacts_group_id_; | 118 std::string cached_my_contacts_group_id_; |
119 | 119 |
120 // In-progress download requests. Pointers are owned by this class. | 120 // In-progress download requests. Pointers are owned by this class. |
121 std::set<DownloadContactsRequest*> requests_; | 121 std::set<DownloadContactsRequest*> requests_; |
122 | 122 |
123 // Maximum number of photos we'll try to download per second (per | 123 // Maximum number of photos we'll try to download per second (per |
124 // DownloadContacts() request). | 124 // DownloadContacts() request). |
(...skipping 12 matching lines...) Expand all Loading... |
137 // This is needed for tests that serve static feed data from a host/port | 137 // This is needed for tests that serve static feed data from a host/port |
138 // that's only known at runtime. | 138 // that's only known at runtime. |
139 RewritePhotoUrlCallback rewrite_photo_url_callback_for_testing_; | 139 RewritePhotoUrlCallback rewrite_photo_url_callback_for_testing_; |
140 | 140 |
141 DISALLOW_COPY_AND_ASSIGN(GDataContactsService); | 141 DISALLOW_COPY_AND_ASSIGN(GDataContactsService); |
142 }; | 142 }; |
143 | 143 |
144 } // namespace contacts | 144 } // namespace contacts |
145 | 145 |
146 #endif // CHROME_BROWSER_CHROMEOS_CONTACTS_GDATA_CONTACTS_SERVICE_H_ | 146 #endif // CHROME_BROWSER_CHROMEOS_CONTACTS_GDATA_CONTACTS_SERVICE_H_ |
OLD | NEW |