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

Unified Diff: google_apis/gcm/gcm_client_impl.cc

Issue 261853012: Componentize GCM Part 1: create GCM component and move some files over (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove os_crypt dependency from google_apis/gcm Created 6 years, 7 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: google_apis/gcm/gcm_client_impl.cc
diff --git a/google_apis/gcm/gcm_client_impl.cc b/google_apis/gcm/gcm_client_impl.cc
index 5b027960d4dbed98472c7f2b5279afad3087e22f..c18a885e297e4dbbbc011ebe5edbad96e40d7bdf 100644
--- a/google_apis/gcm/gcm_client_impl.cc
+++ b/google_apis/gcm/gcm_client_impl.cc
@@ -14,6 +14,7 @@
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/time/default_clock.h"
+#include "google_apis/gcm/base/encryptor.h"
#include "google_apis/gcm/base/mcs_message.h"
#include "google_apis/gcm/base/mcs_util.h"
#include "google_apis/gcm/engine/checkin_request.h"
@@ -156,8 +157,10 @@ scoped_ptr<ConnectionFactory> GCMInternalsBuilder::BuildConnectionFactory(
recorder));
}
-GCMClientImpl::GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder)
+GCMClientImpl::GCMClientImpl(scoped_ptr<GCMInternalsBuilder> internals_builder,
+ scoped_ptr<Encryptor> encryptor)
: internals_builder_(internals_builder.Pass()),
+ encryptor_(encryptor.Pass()),
state_(UNINITIALIZED),
clock_(internals_builder_->BuildClock()),
url_request_context_getter_(NULL),
@@ -193,7 +196,8 @@ void GCMClientImpl::Initialize(
chrome_build_proto_.CopyFrom(chrome_build_proto);
account_ids_ = account_ids;
- gcm_store_.reset(new GCMStoreImpl(path, blocking_task_runner));
+ gcm_store_.reset(
+ new GCMStoreImpl(path, blocking_task_runner, encryptor_.get()));
gservices_settings_.reset(new GServicesSettings(gcm_store_.get()));
delegate_ = delegate;

Powered by Google App Engine
This is Rietveld 408576698