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

Unified Diff: chrome/browser/chromeos/contacts/google_contact_store.cc

Issue 19511002: Change google_api::RequestSender to take an AuthService instead of a Profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/contacts/google_contact_store.cc
diff --git a/chrome/browser/chromeos/contacts/google_contact_store.cc b/chrome/browser/chromeos/contacts/google_contact_store.cc
index f5765bf9db53976039080cd93f39898541191d39..d788ff631e4be29df0645cb4f5df477cdac15a8d 100644
--- a/chrome/browser/chromeos/contacts/google_contact_store.cc
+++ b/chrome/browser/chromeos/contacts/google_contact_store.cc
@@ -50,6 +50,9 @@ const int kUpdateFailureInitialRetrySec = 5;
// Amount by which |update_delay_on_next_failure_| is multiplied on failure.
const int kUpdateFailureBackoffFactor = 2;
+// OAuth2 scope for the Contacts API.
+const char kContactsScope[] = "https://www.google.com/m8/feeds/";
+
} // namespace
GoogleContactStore::TestAPI::TestAPI(GoogleContactStore* store)
@@ -120,9 +123,13 @@ void GoogleContactStore::Init() {
// Create a GData service if one hasn't already been assigned for testing.
if (!gdata_service_.get()) {
+ std::vector<std::string> scopes;
+ scopes.push_back(kContactsScope);
+
gdata_service_.reset(new GDataContactsService(
- url_request_context_getter_, profile_));
- gdata_service_->Initialize();
+ url_request_context_getter_,
+ new google_apis::AuthService(
+ profile_, url_request_context_getter_, scopes)));
}
base::FilePath db_path = profile_->GetPath().Append(kDatabaseDirectoryName);
« no previous file with comments | « chrome/browser/chromeos/contacts/gdata_contacts_service_unittest.cc ('k') | chrome/browser/drive/drive_api_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698