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

Side by Side Diff: components/proximity_auth/screenlock_bridge.cc

Issue 1912433002: Convert //components/proximity_auth from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/proximity_auth/screenlock_bridge.h" 5 #include "components/proximity_auth/screenlock_bridge.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "components/proximity_auth/logging/logging.h" 9 #include "components/proximity_auth/logging/logging.h"
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 54
55 ScreenlockBridge::UserPodCustomIconOptions::UserPodCustomIconOptions() 55 ScreenlockBridge::UserPodCustomIconOptions::UserPodCustomIconOptions()
56 : autoshow_tooltip_(false), 56 : autoshow_tooltip_(false),
57 hardlock_on_click_(false), 57 hardlock_on_click_(false),
58 is_trial_run_(false) { 58 is_trial_run_(false) {
59 } 59 }
60 60
61 ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() { 61 ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() {
62 } 62 }
63 63
64 scoped_ptr<base::DictionaryValue> 64 std::unique_ptr<base::DictionaryValue>
65 ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const { 65 ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
66 scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue()); 66 std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
67 std::string icon_id = GetIdForIcon(icon_); 67 std::string icon_id = GetIdForIcon(icon_);
68 result->SetString("id", icon_id); 68 result->SetString("id", icon_id);
69 69
70 if (!tooltip_.empty()) { 70 if (!tooltip_.empty()) {
71 base::DictionaryValue* tooltip_options = new base::DictionaryValue(); 71 base::DictionaryValue* tooltip_options = new base::DictionaryValue();
72 tooltip_options->SetString("text", tooltip_); 72 tooltip_options->SetString("text", tooltip_);
73 tooltip_options->SetBoolean("autoshow", autoshow_tooltip_); 73 tooltip_options->SetBoolean("autoshow", autoshow_tooltip_);
74 result->Set("tooltip", tooltip_options); 74 result->Set("tooltip", tooltip_options);
75 } 75 }
76 76
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 observers_.RemoveObserver(observer); 175 observers_.RemoveObserver(observer);
176 } 176 }
177 177
178 ScreenlockBridge::ScreenlockBridge() 178 ScreenlockBridge::ScreenlockBridge()
179 : lock_handler_(nullptr), focused_account_id_(EmptyAccountId()) {} 179 : lock_handler_(nullptr), focused_account_id_(EmptyAccountId()) {}
180 180
181 ScreenlockBridge::~ScreenlockBridge() { 181 ScreenlockBridge::~ScreenlockBridge() {
182 } 182 }
183 183
184 } // namespace proximity_auth 184 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/screenlock_bridge.h ('k') | components/proximity_auth/throttled_bluetooth_connection_finder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698