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/chromeos/contacts/gdata_contacts_service.h" | 5 #include "chrome/browser/chromeos/contacts/gdata_contacts_service.h" |
6 | 6 |
7 #include <cstring> | 7 #include <cstring> |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/json/json_value_converter.h" | 12 #include "base/json/json_value_converter.h" |
13 #include "base/json/json_writer.h" | 13 #include "base/json/json_writer.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/threading/sequenced_worker_pool.h" | 19 #include "base/threading/sequenced_worker_pool.h" |
20 #include "base/time/time.h" | 20 #include "base/time/time.h" |
21 #include "base/timer/timer.h" | 21 #include "base/timer/timer.h" |
22 #include "base/values.h" | 22 #include "base/values.h" |
23 #include "chrome/browser/chromeos/contacts/contact.pb.h" | 23 #include "chrome/browser/chromeos/contacts/contact.pb.h" |
24 #include "chrome/browser/google_apis/gdata_contacts_requests.h" | |
25 #include "chrome/browser/google_apis/gdata_errorcode.h" | |
26 #include "chrome/browser/google_apis/request_sender.h" | |
27 #include "chrome/browser/google_apis/time_util.h" | |
28 #include "content/public/browser/browser_thread.h" | 24 #include "content/public/browser/browser_thread.h" |
| 25 #include "google_apis/drive/gdata_contacts_requests.h" |
| 26 #include "google_apis/drive/gdata_errorcode.h" |
| 27 #include "google_apis/drive/request_sender.h" |
| 28 #include "google_apis/drive/time_util.h" |
29 | 29 |
30 using content::BrowserThread; | 30 using content::BrowserThread; |
31 | 31 |
32 namespace contacts { | 32 namespace contacts { |
33 | 33 |
34 namespace { | 34 namespace { |
35 | 35 |
36 // Download outcomes reported via the "Contacts.FullUpdateResult" and | 36 // Download outcomes reported via the "Contacts.FullUpdateResult" and |
37 // "Contacts.IncrementalUpdateResult" histograms. | 37 // "Contacts.IncrementalUpdateResult" histograms. |
38 enum HistogramResult { | 38 enum HistogramResult { |
(...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
885 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 885 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
886 DCHECK(request); | 886 DCHECK(request); |
887 VLOG(1) << "Download request " << request << " complete"; | 887 VLOG(1) << "Download request " << request << " complete"; |
888 if (!request->my_contacts_group_id().empty()) | 888 if (!request->my_contacts_group_id().empty()) |
889 cached_my_contacts_group_id_ = request->my_contacts_group_id(); | 889 cached_my_contacts_group_id_ = request->my_contacts_group_id(); |
890 requests_.erase(request); | 890 requests_.erase(request); |
891 delete request; | 891 delete request; |
892 } | 892 } |
893 | 893 |
894 } // namespace contacts | 894 } // namespace contacts |
OLD | NEW |