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

Side by Side Diff: chrome/browser/extensions/api/instance_id/instance_id_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/extensions/api/instance_id/instance_id_api.h" 5 #include "chrome/browser/extensions/api/instance_id/instance_id_api.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "chrome/browser/gcm/instance_id/instance_id_profile_service.h" 10 #include "chrome/browser/gcm/instance_id/instance_id_profile_service.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 ExtensionFunction::ResponseAction InstanceIDGetCreationTimeFunction::DoWork() { 105 ExtensionFunction::ResponseAction InstanceIDGetCreationTimeFunction::DoWork() {
106 GetInstanceID()->GetCreationTime( 106 GetInstanceID()->GetCreationTime(
107 base::Bind(&InstanceIDGetCreationTimeFunction::GetCreationTimeCompleted, 107 base::Bind(&InstanceIDGetCreationTimeFunction::GetCreationTimeCompleted,
108 this)); 108 this));
109 return RespondLater(); 109 return RespondLater();
110 } 110 }
111 111
112 void InstanceIDGetCreationTimeFunction::GetCreationTimeCompleted( 112 void InstanceIDGetCreationTimeFunction::GetCreationTimeCompleted(
113 const base::Time& creation_time) { 113 const base::Time& creation_time) {
114 Respond(OneArgument( 114 Respond(
115 base::MakeUnique<base::FundamentalValue>(creation_time.ToDoubleT()))); 115 OneArgument(base::MakeUnique<base::Value>(creation_time.ToDoubleT())));
116 } 116 }
117 117
118 InstanceIDGetTokenFunction::InstanceIDGetTokenFunction() {} 118 InstanceIDGetTokenFunction::InstanceIDGetTokenFunction() {}
119 119
120 InstanceIDGetTokenFunction::~InstanceIDGetTokenFunction() {} 120 InstanceIDGetTokenFunction::~InstanceIDGetTokenFunction() {}
121 121
122 ExtensionFunction::ResponseAction InstanceIDGetTokenFunction::DoWork() { 122 ExtensionFunction::ResponseAction InstanceIDGetTokenFunction::DoWork() {
123 std::unique_ptr<api::instance_id::GetToken::Params> params = 123 std::unique_ptr<api::instance_id::GetToken::Params> params =
124 api::instance_id::GetToken::Params::Create(*args_); 124 api::instance_id::GetToken::Params::Create(*args_);
125 EXTENSION_FUNCTION_VALIDATE(params.get()); 125 EXTENSION_FUNCTION_VALIDATE(params.get());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 184
185 void InstanceIDDeleteIDFunction::DeleteIDCompleted( 185 void InstanceIDDeleteIDFunction::DeleteIDCompleted(
186 instance_id::InstanceID::Result result) { 186 instance_id::InstanceID::Result result) {
187 if (result == instance_id::InstanceID::SUCCESS) 187 if (result == instance_id::InstanceID::SUCCESS)
188 Respond(NoArguments()); 188 Respond(NoArguments());
189 else 189 else
190 Respond(Error(InstanceIDResultToError(result))); 190 Respond(Error(InstanceIDResultToError(result)));
191 } 191 }
192 192
193 } // namespace extensions 193 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698