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

Side by Side Diff: google_apis/gcm/engine/gcm_store.cc

Issue 1183843002: Do not create GCM store if it is not needed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback + fix test Created 5 years, 6 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 unified diff | Download patch
« no previous file with comments | « google_apis/gcm/engine/gcm_store.h ('k') | google_apis/gcm/engine/gcm_store_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "google_apis/gcm/engine/gcm_store.h" 5 #include "google_apis/gcm/engine/gcm_store.h"
6 6
7 namespace gcm { 7 namespace gcm {
8 8
9 GCMStore::LoadResult::LoadResult() 9 GCMStore::LoadResult::LoadResult()
10 : success(false), 10 : success(false),
11 store_does_not_exist(false),
11 device_android_id(0), 12 device_android_id(0),
12 device_security_token(0) { 13 device_security_token(0) {
13 } 14 }
14 15
15 GCMStore::LoadResult::~LoadResult() {} 16 GCMStore::LoadResult::~LoadResult() {}
16 17
17 void GCMStore::LoadResult::Reset() { 18 void GCMStore::LoadResult::Reset() {
18 device_android_id = 0; 19 device_android_id = 0;
19 device_security_token = 0; 20 device_security_token = 0;
20 registrations.clear(); 21 registrations.clear();
21 incoming_messages.clear(); 22 incoming_messages.clear();
22 outgoing_messages.clear(); 23 outgoing_messages.clear();
23 gservices_settings.clear(); 24 gservices_settings.clear();
24 gservices_digest.clear(); 25 gservices_digest.clear();
25 last_checkin_time = base::Time::FromInternalValue(0LL); 26 last_checkin_time = base::Time::FromInternalValue(0LL);
26 last_token_fetch_time = base::Time::FromInternalValue(0LL); 27 last_token_fetch_time = base::Time::FromInternalValue(0LL);
27 last_checkin_accounts.clear(); 28 last_checkin_accounts.clear();
28 account_mappings.clear(); 29 account_mappings.clear();
29 heartbeat_intervals.clear(); 30 heartbeat_intervals.clear();
30 success = false; 31 success = false;
32 store_does_not_exist = false;
31 instance_id_data.clear(); 33 instance_id_data.clear();
32 } 34 }
33 35
34 GCMStore::GCMStore() {} 36 GCMStore::GCMStore() {}
35 37
36 GCMStore::~GCMStore() {} 38 GCMStore::~GCMStore() {}
37 39
38 } // namespace gcm 40 } // namespace gcm
OLDNEW
« no previous file with comments | « google_apis/gcm/engine/gcm_store.h ('k') | google_apis/gcm/engine/gcm_store_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698