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

Side by Side Diff: chrome/browser/ui/webui/chromeos/first_run/first_run_actor.cc

Issue 2957863005: Replace WrapUnique with MakeUnique (Closed)
Patch Set: fix syntax error Created 3 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/webui/chromeos/first_run/first_run_actor.h" 5 #include "chrome/browser/ui/webui/chromeos/first_run/first_run_actor.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 27 matching lines...) Expand all
38 return *this; 38 return *this;
39 } 39 }
40 40
41 FirstRunActor::StepPosition& FirstRunActor::StepPosition::SetLeft(int left) { 41 FirstRunActor::StepPosition& FirstRunActor::StepPosition::SetLeft(int left) {
42 left_ = left; 42 left_ = left;
43 return *this; 43 return *this;
44 } 44 }
45 45
46 std::unique_ptr<base::DictionaryValue> FirstRunActor::StepPosition::AsValue() 46 std::unique_ptr<base::DictionaryValue> FirstRunActor::StepPosition::AsValue()
47 const { 47 const {
48 base::DictionaryValue* result = new base::DictionaryValue(); 48 auto result = base::MakeUnique<base::DictionaryValue>();
49 if (top_ != kNoneValue) 49 if (top_ != kNoneValue)
50 result->SetInteger("top", top_); 50 result->SetInteger("top", top_);
51 if (right_ != kNoneValue) 51 if (right_ != kNoneValue)
52 result->SetInteger("right", right_); 52 result->SetInteger("right", right_);
53 if (bottom_ != kNoneValue) 53 if (bottom_ != kNoneValue)
54 result->SetInteger("bottom", bottom_); 54 result->SetInteger("bottom", bottom_);
55 if (left_ != kNoneValue) 55 if (left_ != kNoneValue)
56 result->SetInteger("left", left_); 56 result->SetInteger("left", left_);
57 return base::WrapUnique(result); 57 return result;
58 } 58 }
59 59
60 FirstRunActor::FirstRunActor() 60 FirstRunActor::FirstRunActor()
61 : delegate_(NULL) { 61 : delegate_(NULL) {
62 } 62 }
63 63
64 FirstRunActor::~FirstRunActor() { 64 FirstRunActor::~FirstRunActor() {
65 if (delegate()) 65 if (delegate())
66 delegate()->OnActorDestroyed(); 66 delegate()->OnActorDestroyed();
67 delegate_ = NULL; 67 delegate_ = NULL;
68 } 68 }
69 69
70 } // namespace chromeos 70 } // namespace chromeos
71 71
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/chromeos/login/l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698