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

Side by Side Diff: extensions/browser/api/alarms/alarms_api.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "extensions/browser/api/alarms/alarms_api.h" 5 #include "extensions/browser/api/alarms/alarms_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 173
174 std::string name = params->name.get() ? *params->name : kDefaultAlarmName; 174 std::string name = params->name.get() ? *params->name : kDefaultAlarmName;
175 AlarmManager::Get(browser_context()) 175 AlarmManager::Get(browser_context())
176 ->RemoveAlarm(extension_id(), name, 176 ->RemoveAlarm(extension_id(), name,
177 base::Bind(&AlarmsClearFunction::Callback, this, name)); 177 base::Bind(&AlarmsClearFunction::Callback, this, name));
178 178
179 return true; 179 return true;
180 } 180 }
181 181
182 void AlarmsClearFunction::Callback(const std::string& name, bool success) { 182 void AlarmsClearFunction::Callback(const std::string& name, bool success) {
183 SetResult(base::MakeUnique<base::FundamentalValue>(success)); 183 SetResult(base::MakeUnique<base::Value>(success));
184 SendResponse(true); 184 SendResponse(true);
185 } 185 }
186 186
187 bool AlarmsClearAllFunction::RunAsync() { 187 bool AlarmsClearAllFunction::RunAsync() {
188 AlarmManager::Get(browser_context()) 188 AlarmManager::Get(browser_context())
189 ->RemoveAllAlarms(extension_id(), 189 ->RemoveAllAlarms(extension_id(),
190 base::Bind(&AlarmsClearAllFunction::Callback, this)); 190 base::Bind(&AlarmsClearAllFunction::Callback, this));
191 return true; 191 return true;
192 } 192 }
193 193
194 void AlarmsClearAllFunction::Callback() { 194 void AlarmsClearAllFunction::Callback() {
195 SetResult(base::MakeUnique<base::FundamentalValue>(true)); 195 SetResult(base::MakeUnique<base::Value>(true));
196 SendResponse(true); 196 SendResponse(true);
197 } 197 }
198 198
199 } // namespace extensions 199 } // namespace extensions
OLDNEW
« no previous file with comments | « device/bluetooth/dbus/fake_bluetooth_device_client.cc ('k') | extensions/browser/api/app_window/app_window_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698