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

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

Issue 2476493003: Remove FundamentalValue
Patch Set: Fix Created 4 years, 1 month 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
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 <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 if (service) { 162 if (service) {
163 service->GetAllNodes( 163 service->GetAllNodes(
164 base::Bind(&SyncInternalsMessageHandler::OnReceivedAllNodes, 164 base::Bind(&SyncInternalsMessageHandler::OnReceivedAllNodes,
165 weak_ptr_factory_.GetWeakPtr(), request_id)); 165 weak_ptr_factory_.GetWeakPtr(), request_id));
166 } 166 }
167 } 167 }
168 168
169 void SyncInternalsMessageHandler::OnReceivedAllNodes( 169 void SyncInternalsMessageHandler::OnReceivedAllNodes(
170 int request_id, 170 int request_id,
171 std::unique_ptr<base::ListValue> nodes) { 171 std::unique_ptr<base::ListValue> nodes) {
172 base::FundamentalValue id(request_id); 172 base::Value id(request_id);
173 web_ui()->CallJavascriptFunctionUnsafe( 173 web_ui()->CallJavascriptFunctionUnsafe(
174 syncer::sync_ui_util::kGetAllNodesCallback, id, *nodes); 174 syncer::sync_ui_util::kGetAllNodesCallback, id, *nodes);
175 } 175 }
176 176
177 void SyncInternalsMessageHandler::OnStateChanged() { 177 void SyncInternalsMessageHandler::OnStateChanged() {
178 SendAboutInfo(); 178 SendAboutInfo();
179 } 179 }
180 180
181 void SyncInternalsMessageHandler::OnProtocolEvent( 181 void SyncInternalsMessageHandler::OnProtocolEvent(
182 const syncer::ProtocolEvent& event) { 182 const syncer::ProtocolEvent& event) {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 base::StringValue(syncer::sync_ui_util::kOnAboutInfoUpdated), *value); 239 base::StringValue(syncer::sync_ui_util::kOnAboutInfoUpdated), *value);
240 } 240 }
241 241
242 // Gets the ProfileSyncService of the underlying original profile. 242 // Gets the ProfileSyncService of the underlying original profile.
243 // May return NULL (e.g., if sync is disabled on the command line). 243 // May return NULL (e.g., if sync is disabled on the command line).
244 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() { 244 ProfileSyncService* SyncInternalsMessageHandler::GetProfileSyncService() {
245 Profile* profile = Profile::FromWebUI(web_ui()); 245 Profile* profile = Profile::FromWebUI(web_ui());
246 return ProfileSyncServiceFactory::GetForProfile( 246 return ProfileSyncServiceFactory::GetForProfile(
247 profile->GetOriginalProfile()); 247 profile->GetOriginalProfile());
248 } 248 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/snippets_internals_message_handler.cc ('k') | chrome/browser/ui/webui/sync_internals_ui_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698