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

Unified Diff: chrome/browser/ui/webui/copresence_ui_handler.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/copresence_ui.cc ('k') | chrome/browser/ui/webui/domain_reliability_internals_ui.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/copresence_ui_handler.cc
diff --git a/chrome/browser/ui/webui/copresence_ui_handler.cc b/chrome/browser/ui/webui/copresence_ui_handler.cc
index 9bacd39e2166fbed9a2bc4c9b605b9c73a329cae..3fc03abf69b3d2851d5b38cb488f8fd976763841 100644
--- a/chrome/browser/ui/webui/copresence_ui_handler.cc
+++ b/chrome/browser/ui/webui/copresence_ui_handler.cc
@@ -87,9 +87,9 @@ std::string ConvertStatus(const ReceivedToken& token) {
}
}
-template<class T>
-scoped_ptr<DictionaryValue> FormatToken(const T& token) {
- scoped_ptr<DictionaryValue> js_token(new DictionaryValue);
+template <class T>
+std::unique_ptr<DictionaryValue> FormatToken(const T& token) {
+ std::unique_ptr<DictionaryValue> js_token(new DictionaryValue);
js_token->SetString("id", token.id);
js_token->SetString("statuses", ConvertStatus(token));
@@ -157,7 +157,7 @@ void CopresenceUIHandler::RegisterMessages() {
void CopresenceUIHandler::DirectivesUpdated() {
ListValue js_directives;
for (const Directive& directive : state_->active_directives()) {
- scoped_ptr<DictionaryValue> js_directive(new DictionaryValue);
+ std::unique_ptr<DictionaryValue> js_directive(new DictionaryValue);
js_directive->SetString("type", FormatInstructionType(
directive.token_instruction().token_instruction_type()));
« no previous file with comments | « chrome/browser/ui/webui/copresence_ui.cc ('k') | chrome/browser/ui/webui/domain_reliability_internals_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698