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

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

Issue 310973002: Move GCMClient related files to gcm_driver component (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync 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
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"
11 #include "base/format_macros.h" 11 #include "base/format_macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/services/gcm/gcm_profile_service.h" 17 #include "chrome/browser/services/gcm/gcm_profile_service.h"
18 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h" 18 #include "chrome/browser/services/gcm/gcm_profile_service_factory.h"
19 #include "chrome/common/url_constants.h" 19 #include "chrome/common/url_constants.h"
20 #include "components/gcm_driver/gcm_client.h"
20 #include "components/gcm_driver/gcm_driver.h" 21 #include "components/gcm_driver/gcm_driver.h"
21 #include "content/public/browser/web_ui.h" 22 #include "content/public/browser/web_ui.h"
22 #include "content/public/browser/web_ui_controller.h" 23 #include "content/public/browser/web_ui_controller.h"
23 #include "content/public/browser/web_ui_data_source.h" 24 #include "content/public/browser/web_ui_data_source.h"
24 #include "content/public/browser/web_ui_message_handler.h" 25 #include "content/public/browser/web_ui_message_handler.h"
25 #include "google_apis/gcm/gcm_client.h"
26 #include "grit/browser_resources.h" 26 #include "grit/browser_resources.h"
27 27
28 namespace { 28 namespace {
29 29
30 void SetCheckinInfo( 30 void SetCheckinInfo(
31 const std::vector<gcm::CheckinActivity>& checkins, 31 const std::vector<gcm::CheckinActivity>& checkins,
32 base::ListValue* checkin_info) { 32 base::ListValue* checkin_info) {
33 std::vector<gcm::CheckinActivity>::const_iterator it = checkins.begin(); 33 std::vector<gcm::CheckinActivity>::const_iterator it = checkins.begin();
34 for (; it < checkins.end(); ++it) { 34 for (; it < checkins.end(); ++it) {
35 base::ListValue* row = new base::ListValue(); 35 base::ListValue* row = new base::ListValue();
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 html_source->AddResourcePath("gcm_internals.js", IDR_GCM_INTERNALS_JS); 307 html_source->AddResourcePath("gcm_internals.js", IDR_GCM_INTERNALS_JS);
308 html_source->SetDefaultResource(IDR_GCM_INTERNALS_HTML); 308 html_source->SetDefaultResource(IDR_GCM_INTERNALS_HTML);
309 309
310 Profile* profile = Profile::FromWebUI(web_ui); 310 Profile* profile = Profile::FromWebUI(web_ui);
311 content::WebUIDataSource::Add(profile, html_source); 311 content::WebUIDataSource::Add(profile, html_source);
312 312
313 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler()); 313 web_ui->AddMessageHandler(new GcmInternalsUIMessageHandler());
314 } 314 }
315 315
316 GCMInternalsUI::~GCMInternalsUI() {} 316 GCMInternalsUI::~GCMInternalsUI() {}
OLDNEW
« no previous file with comments | « chrome/browser/services/gcm/gcm_profile_service_unittest.cc ('k') | components/components_tests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698