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

Side by Side Diff: chrome/browser/ui/webui/gcm_internals_ui.cc

Issue 344033002: Remove GCMDriver::IsGCMClientReady (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/gcm_internals.js ('k') | components/gcm_driver/fake_gcm_driver.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 "chrome/browser/ui/webui/gcm_internals_ui.h" 5 #include "chrome/browser/ui/webui/gcm_internals_ui.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 base::DictionaryValue results; 150 base::DictionaryValue results;
151 base::DictionaryValue* device_info = new base::DictionaryValue(); 151 base::DictionaryValue* device_info = new base::DictionaryValue();
152 results.Set("deviceInfo", device_info); 152 results.Set("deviceInfo", device_info);
153 153
154 device_info->SetBoolean("profileServiceCreated", profile_service != NULL); 154 device_info->SetBoolean("profileServiceCreated", profile_service != NULL);
155 device_info->SetBoolean("gcmEnabled", 155 device_info->SetBoolean("gcmEnabled",
156 gcm::GCMProfileService::IsGCMEnabled(profile)); 156 gcm::GCMProfileService::IsGCMEnabled(profile));
157 if (profile_service) { 157 if (profile_service) {
158 device_info->SetString("signedInUserName", 158 device_info->SetString("signedInUserName",
159 profile_service->SignedInUserName()); 159 profile_service->SignedInUserName());
160 device_info->SetBoolean("gcmClientReady",
161 profile_service->driver()->IsGCMClientReady());
162 } 160 }
163 if (stats) { 161 if (stats) {
164 results.SetBoolean("isRecording", stats->is_recording); 162 results.SetBoolean("isRecording", stats->is_recording);
165 device_info->SetBoolean("gcmClientCreated", stats->gcm_client_created); 163 device_info->SetBoolean("gcmClientCreated", stats->gcm_client_created);
166 device_info->SetString("gcmClientState", stats->gcm_client_state); 164 device_info->SetString("gcmClientState", stats->gcm_client_state);
167 device_info->SetBoolean("connectionClientCreated", 165 device_info->SetBoolean("connectionClientCreated",
168 stats->connection_client_created); 166 stats->connection_client_created);
169 device_info->SetString("registeredAppIds", 167 device_info->SetString("registeredAppIds",
170 JoinString(stats->registered_app_ids, ",")); 168 JoinString(stats->registered_app_ids, ","));
171 if (stats->connection_client_created) 169 if (stats->connection_client_created)
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 html_source->AddResourcePath("gcm_internals.js", IDR_GCM_INTERNALS_JS); 305 html_source->AddResourcePath("gcm_internals.js", IDR_GCM_INTERNALS_JS);
308 html_source->SetDefaultResource(IDR_GCM_INTERNALS_HTML); 306 html_source->SetDefaultResource(IDR_GCM_INTERNALS_HTML);
309 307
310 Profile* profile = Profile::FromWebUI(web_ui); 308 Profile* profile = Profile::FromWebUI(web_ui);
311 content::WebUIDataSource::Add(profile, html_source); 309 content::WebUIDataSource::Add(profile, html_source);
312 310
313 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler()); 311 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler());
314 } 312 }
315 313
316 GCMInternalsUI::~GCMInternalsUI() {} 314 GCMInternalsUI::~GCMInternalsUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/resources/gcm_internals.js ('k') | components/gcm_driver/fake_gcm_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698