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

Unified Diff: components/gcm_driver/fake_gcm_client.cc

Issue 848503002: [GCM] Remove GCMDriver::Purge and GCMClient::CheckOut (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « components/gcm_driver/fake_gcm_client.h ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/gcm_driver/fake_gcm_client.cc
diff --git a/components/gcm_driver/fake_gcm_client.cc b/components/gcm_driver/fake_gcm_client.cc
index ea45c23388767775034b80d70c8f0ca9dd1e8dc3..4e1444cc8af5a62cca4f46153ff4d289410264da 100644
--- a/components/gcm_driver/fake_gcm_client.cc
+++ b/components/gcm_driver/fake_gcm_client.cc
@@ -24,7 +24,7 @@ FakeGCMClient::FakeGCMClient(
const scoped_refptr<base::SequencedTaskRunner>& io_thread)
: delegate_(NULL),
sequence_id_(0),
- status_(UNINITIALIZED),
+ started_(false),
start_mode_(start_mode),
ui_thread_(ui_thread),
io_thread_(io_thread),
@@ -47,7 +47,7 @@ void FakeGCMClient::Initialize(
void FakeGCMClient::Start() {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
- DCHECK_NE(STARTED, status_);
+ DCHECK(!started_);
if (start_mode_ == DELAY_START)
return;
@@ -55,7 +55,7 @@ void FakeGCMClient::Start() {
}
void FakeGCMClient::DoLoading() {
- status_ = STARTED;
+ started_ = true;
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&FakeGCMClient::CheckinFinished,
@@ -64,16 +64,10 @@ void FakeGCMClient::DoLoading() {
void FakeGCMClient::Stop() {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
- status_ = STOPPED;
+ started_ = false;
delegate_->OnDisconnected();
}
-void FakeGCMClient::CheckOut() {
- DCHECK(io_thread_->RunsTasksOnCurrentThread());
- status_ = CHECKED_OUT;
- sequence_id_++;
-}
-
void FakeGCMClient::Register(const std::string& app_id,
const std::vector<std::string>& sender_ids) {
DCHECK(io_thread_->RunsTasksOnCurrentThread());
« no previous file with comments | « components/gcm_driver/fake_gcm_client.h ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698