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

Side by Side Diff: chrome/browser/extensions/api/feedback_private/feedback_private_api.cc

Issue 2664753002: Remove base::StringValue (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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/feedback_private/feedback_private_api.h" 5 #include "chrome/browser/extensions/api/feedback_private/feedback_private_api.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 216
217 if (test_callback_ && !test_callback_->is_null()) 217 if (test_callback_ && !test_callback_->is_null())
218 test_callback_->Run(); 218 test_callback_->Run();
219 219
220 return RespondNow(OneArgument(std::move(dict))); 220 return RespondNow(OneArgument(std::move(dict)));
221 } 221 }
222 222
223 ExtensionFunction::ResponseAction FeedbackPrivateGetUserEmailFunction::Run() { 223 ExtensionFunction::ResponseAction FeedbackPrivateGetUserEmailFunction::Run() {
224 SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile( 224 SigninManagerBase* signin_manager = SigninManagerFactory::GetForProfile(
225 Profile::FromBrowserContext(browser_context())); 225 Profile::FromBrowserContext(browser_context()));
226 return RespondNow(OneArgument(base::MakeUnique<base::StringValue>( 226 return RespondNow(OneArgument(base::MakeUnique<base::Value>(
227 signin_manager ? signin_manager->GetAuthenticatedAccountInfo().email 227 signin_manager ? signin_manager->GetAuthenticatedAccountInfo().email
228 : std::string()))); 228 : std::string())));
229 } 229 }
230 230
231 ExtensionFunction::ResponseAction 231 ExtensionFunction::ResponseAction
232 FeedbackPrivateGetSystemInformationFunction::Run() { 232 FeedbackPrivateGetSystemInformationFunction::Run() {
233 FeedbackService* service = FeedbackPrivateAPI::GetFactoryInstance() 233 FeedbackService* service = FeedbackPrivateAPI::GetFactoryInstance()
234 ->Get(browser_context()) 234 ->Get(browser_context())
235 ->GetService(); 235 ->GetService();
236 DCHECK(service); 236 DCHECK(service);
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 content::RecordAction( 358 content::RecordAction(
359 base::UserMetricsAction("Feedback.SrtPromptClosed")); 359 base::UserMetricsAction("Feedback.SrtPromptClosed"));
360 break; 360 break;
361 default: 361 default:
362 return RespondNow(Error("Invalid arugment.")); 362 return RespondNow(Error("Invalid arugment."));
363 } 363 }
364 return RespondNow(NoArguments()); 364 return RespondNow(NoArguments());
365 } 365 }
366 366
367 } // namespace extensions 367 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698