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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/base_screen_handler.cc

Issue 2251263003: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.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/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/chromeos/login/screens/base_screen.h" 10 #include "chrome/browser/chromeos/login/screens/base_screen.h"
(...skipping 25 matching lines...) Expand all
36 void BaseScreenHandler::InitializeBase() { 36 void BaseScreenHandler::InitializeBase() {
37 page_is_ready_ = true; 37 page_is_ready_ = true;
38 Initialize(); 38 Initialize();
39 if (!pending_context_changes_.empty()) { 39 if (!pending_context_changes_.empty()) {
40 CommitContextChanges(pending_context_changes_); 40 CommitContextChanges(pending_context_changes_);
41 pending_context_changes_.Clear(); 41 pending_context_changes_.Clear();
42 } 42 }
43 } 43 }
44 44
45 void BaseScreenHandler::GetLocalizedStrings(base::DictionaryValue* dict) { 45 void BaseScreenHandler::GetLocalizedStrings(base::DictionaryValue* dict) {
46 auto builder = base::WrapUnique(new ::login::LocalizedValuesBuilder(dict)); 46 auto builder = base::MakeUnique<::login::LocalizedValuesBuilder>(dict);
47 DeclareLocalizedValues(builder.get()); 47 DeclareLocalizedValues(builder.get());
48 GetAdditionalParameters(dict); 48 GetAdditionalParameters(dict);
49 } 49 }
50 50
51 void BaseScreenHandler::RegisterMessages() { 51 void BaseScreenHandler::RegisterMessages() {
52 AddPrefixedCallback("userActed", 52 AddPrefixedCallback("userActed",
53 &BaseScreenHandler::HandleUserAction); 53 &BaseScreenHandler::HandleUserAction);
54 AddPrefixedCallback("contextChanged", 54 AddPrefixedCallback("contextChanged",
55 &BaseScreenHandler::HandleContextChanged); 55 &BaseScreenHandler::HandleContextChanged);
56 DeclareJSCallbacks(); 56 DeclareJSCallbacks();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 base_screen_->OnUserAction(action_id); 118 base_screen_->OnUserAction(action_id);
119 } 119 }
120 120
121 void BaseScreenHandler::HandleContextChanged( 121 void BaseScreenHandler::HandleContextChanged(
122 const base::DictionaryValue* diff) { 122 const base::DictionaryValue* diff) {
123 if (diff && base_screen_) 123 if (diff && base_screen_)
124 base_screen_->OnContextChanged(*diff); 124 base_screen_->OnContextChanged(*diff);
125 } 125 }
126 126
127 } // namespace chromeos 127 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698