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/google_contact_store.h" | 5 #include "chrome/browser/chromeos/contacts/google_contact_store.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
11 #include "base/logging.h" | 11 #include "base/logging.h" |
12 #include "chrome/browser/browser_process.h" | 12 #include "chrome/browser/browser_process.h" |
13 #include "chrome/browser/chromeos/contacts/contact.pb.h" | 13 #include "chrome/browser/chromeos/contacts/contact.pb.h" |
14 #include "chrome/browser/chromeos/contacts/contact_database.h" | 14 #include "chrome/browser/chromeos/contacts/contact_database.h" |
15 #include "chrome/browser/chromeos/contacts/contact_store_observer.h" | 15 #include "chrome/browser/chromeos/contacts/contact_store_observer.h" |
16 #include "chrome/browser/chromeos/contacts/gdata_contacts_service.h" | 16 #include "chrome/browser/chromeos/contacts/gdata_contacts_service.h" |
17 #include "chrome/browser/chromeos/profiles/profile_util.h" | 17 #include "chrome/browser/chromeos/profiles/profile_util.h" |
18 #include "chrome/browser/google_apis/auth_service.h" | |
19 #include "chrome/browser/google_apis/time_util.h" | |
20 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
21 #include "chrome/browser/signin/profile_oauth2_token_service.h" | 19 #include "chrome/browser/signin/profile_oauth2_token_service.h" |
22 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" | 20 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h" |
23 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
| 22 #include "google_apis/drive/auth_service.h" |
| 23 #include "google_apis/drive/time_util.h" |
24 | 24 |
25 using content::BrowserThread; | 25 using content::BrowserThread; |
26 | 26 |
27 namespace contacts { | 27 namespace contacts { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // Name of the directory within the profile directory where the contact database | 31 // Name of the directory within the profile directory where the contact database |
32 // is stored. | 32 // is stored. |
33 const base::FilePath::CharType kDatabaseDirectoryName[] = | 33 const base::FilePath::CharType kDatabaseDirectoryName[] = |
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 } | 421 } |
422 | 422 |
423 ContactStore* GoogleContactStoreFactory::CreateContactStore(Profile* profile) { | 423 ContactStore* GoogleContactStoreFactory::CreateContactStore(Profile* profile) { |
424 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 424 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
425 DCHECK(CanCreateContactStoreForProfile(profile)); | 425 DCHECK(CanCreateContactStoreForProfile(profile)); |
426 return new GoogleContactStore( | 426 return new GoogleContactStore( |
427 g_browser_process->system_request_context(), profile); | 427 g_browser_process->system_request_context(), profile); |
428 } | 428 } |
429 | 429 |
430 } // namespace contacts | 430 } // namespace contacts |
OLD | NEW |