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

Side by Side Diff: chrome/browser/ui/webui/settings/reset_settings_handler_unittest.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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/profile_resetter/profile_resetter.h" 9 #include "chrome/browser/profile_resetter/profile_resetter.h"
10 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h" 10 #include "chrome/browser/ui/webui/settings/reset_settings_handler.h"
(...skipping 12 matching lines...) Expand all
23 public: 23 public:
24 explicit MockProfileResetter(TestingProfile* profile) 24 explicit MockProfileResetter(TestingProfile* profile)
25 : ProfileResetter(profile) { 25 : ProfileResetter(profile) {
26 } 26 }
27 27
28 bool IsActive() const override { 28 bool IsActive() const override {
29 return false; 29 return false;
30 } 30 }
31 31
32 void Reset(ResettableFlags resettable_flags, 32 void Reset(ResettableFlags resettable_flags,
33 scoped_ptr<BrandcodedDefaultSettings> master_settings, 33 std::unique_ptr<BrandcodedDefaultSettings> master_settings,
34 const base::Closure& callback) override { 34 const base::Closure& callback) override {
35 resets_++; 35 resets_++;
36 callback.Run(); 36 callback.Run();
37 } 37 }
38 38
39 size_t resets() const { 39 size_t resets() const {
40 return resets_; 40 return resets_;
41 } 41 }
42 42
43 private: 43 private:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 EXPECT_EQ(1u, handler()->resets()); 94 EXPECT_EQ(1u, handler()->resets());
95 // Check that Javascript side is notified after resetting is done. 95 // Check that Javascript side is notified after resetting is done.
96 EXPECT_EQ("cr.webUIResponse", 96 EXPECT_EQ("cr.webUIResponse",
97 web_ui()->call_data()[0]->function_name()); 97 web_ui()->call_data()[0]->function_name());
98 std::string callback_id; 98 std::string callback_id;
99 EXPECT_TRUE(web_ui()->call_data()[0]->arg1()->GetAsString(&callback_id)); 99 EXPECT_TRUE(web_ui()->call_data()[0]->arg1()->GetAsString(&callback_id));
100 EXPECT_EQ(expected_callback_id, callback_id); 100 EXPECT_EQ(expected_callback_id, callback_id);
101 } 101 }
102 102
103 } // namespace 103 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/settings/reset_settings_handler.cc ('k') | chrome/browser/ui/webui/settings/search_engines_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698