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

Side by Side Diff: chrome/browser/chromeos/arc/arc_support_host.cc

Issue 2215993002: Allow changing metrics reporting state without callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix func name Created 4 years, 4 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 | « no previous file | chrome/browser/chromeos/login/wizard_controller.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/chromeos/arc/arc_support_host.h" 5 #include "chrome/browser/chromeos/arc/arc_support_host.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/common/system/chromeos/devicetype_utils.h" 9 #include "ash/common/system/chromeos/devicetype_utils.h"
10 #include "base/i18n/timezone.h" 10 #include "base/i18n/timezone.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 base::DictionaryValue response; 258 base::DictionaryValue response;
259 response.SetString(kAction, kActionShowPage); 259 response.SetString(kAction, kActionShowPage);
260 response.SetInteger(kPage, static_cast<int>(page)); 260 response.SetInteger(kPage, static_cast<int>(page));
261 response.SetString(kStatus, status); 261 response.SetString(kStatus, status);
262 std::string response_string; 262 std::string response_string;
263 base::JSONWriter::Write(response, &response_string); 263 base::JSONWriter::Write(response, &response_string);
264 client_->PostMessageFromNativeHost(response_string); 264 client_->PostMessageFromNativeHost(response_string);
265 } 265 }
266 266
267 void ArcSupportHost::EnableMetrics(bool is_enabled) { 267 void ArcSupportHost::EnableMetrics(bool is_enabled) {
268 InitiateMetricsReportingChange(is_enabled, OnMetricsReportingCallbackType()); 268 ChangeMetricsReportingState(is_enabled);
269 } 269 }
270 270
271 void ArcSupportHost::EnableBackupRestore(bool is_enabled) { 271 void ArcSupportHost::EnableBackupRestore(bool is_enabled) {
272 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get(); 272 arc::ArcAuthService* arc_auth_service = arc::ArcAuthService::Get();
273 DCHECK(arc_auth_service && arc_auth_service->IsAllowed()); 273 DCHECK(arc_auth_service && arc_auth_service->IsAllowed());
274 PrefService* pref_service = arc_auth_service->profile()->GetPrefs(); 274 PrefService* pref_service = arc_auth_service->profile()->GetPrefs();
275 pref_service->SetBoolean(prefs::kArcBackupRestoreEnabled, is_enabled); 275 pref_service->SetBoolean(prefs::kArcBackupRestoreEnabled, is_enabled);
276 } 276 }
277 277
278 void ArcSupportHost::EnableLocationService(bool is_enabled) { 278 void ArcSupportHost::EnableLocationService(bool is_enabled) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 EnableLocationService(is_enabled); 336 EnableLocationService(is_enabled);
337 } else { 337 } else {
338 NOTREACHED(); 338 NOTREACHED();
339 } 339 }
340 } 340 }
341 341
342 scoped_refptr<base::SingleThreadTaskRunner> ArcSupportHost::task_runner() 342 scoped_refptr<base::SingleThreadTaskRunner> ArcSupportHost::task_runner()
343 const { 343 const {
344 return base::ThreadTaskRunnerHandle::Get(); 344 return base::ThreadTaskRunnerHandle::Get();
345 } 345 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/wizard_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698