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

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

Issue 217633003: sync: Remove TrafficRecorder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/sync_internals_message_handler.h" 5 #include "chrome/browser/ui/webui/sync_internals_message_handler.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 "requestUpdatedAboutInfo", 54 "requestUpdatedAboutInfo",
55 base::Bind(&SyncInternalsMessageHandler::HandleRequestUpdatedAboutInfo, 55 base::Bind(&SyncInternalsMessageHandler::HandleRequestUpdatedAboutInfo,
56 base::Unretained(this))); 56 base::Unretained(this)));
57 57
58 web_ui()->RegisterMessageCallback( 58 web_ui()->RegisterMessageCallback(
59 "requestListOfTypes", 59 "requestListOfTypes",
60 base::Bind(&SyncInternalsMessageHandler::HandleRequestListOfTypes, 60 base::Bind(&SyncInternalsMessageHandler::HandleRequestListOfTypes,
61 base::Unretained(this))); 61 base::Unretained(this)));
62 62
63 RegisterJsControllerCallback("getAllNodes"); 63 RegisterJsControllerCallback("getAllNodes");
64 RegisterJsControllerCallback("getClientServerTraffic");
65 } 64 }
66 65
67 void SyncInternalsMessageHandler::HandleRequestUpdatedAboutInfo( 66 void SyncInternalsMessageHandler::HandleRequestUpdatedAboutInfo(
68 const base::ListValue* args) { 67 const base::ListValue* args) {
69 DCHECK(args->empty()); 68 DCHECK(args->empty());
70 SendAboutInfo(); 69 SendAboutInfo();
71 } 70 }
72 71
73 void SyncInternalsMessageHandler::HandleRequestListOfTypes( 72 void SyncInternalsMessageHandler::HandleRequestListOfTypes(
74 const base::ListValue* args) { 73 const base::ListValue* args) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 153 }
155 154
156 // Gets the ProfileSyncService of the underlying original profile. 155 // Gets the ProfileSyncService of the underlying original profile.
157 // May return NULL (e.g., if sync is disabled on the command line). 156 // May return NULL (e.g., if sync is disabled on the command line).
158 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() { 157 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() {
159 Profile* profile = Profile::FromWebUI(web_ui()); 158 Profile* profile = Profile::FromWebUI(web_ui());
160 ProfileSyncServiceFactory* factory = ProfileSyncServiceFactory::GetInstance(); 159 ProfileSyncServiceFactory* factory = ProfileSyncServiceFactory::GetInstance();
161 return factory->GetForProfile(profile->GetOriginalProfile()); 160 return factory->GetForProfile(profile->GetOriginalProfile());
162 } 161 }
163 162
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698