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

Side by Side Diff: ui/app_list/search/mixer_unittest.cc

Issue 922923002: ui: Cleanup the usage of scoped_ptr throughout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REBASE Created 5 years, 10 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 | ui/chromeos/touch_exploration_controller.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 <set> 5 #include <set>
6 #include <string> 6 #include <string>
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 17 matching lines...) Expand all
28 set_relevance(relevance); 28 set_relevance(relevance);
29 } 29 }
30 ~TestSearchResult() override {} 30 ~TestSearchResult() override {}
31 31
32 using SearchResult::set_voice_result; 32 using SearchResult::set_voice_result;
33 33
34 // SearchResult overrides: 34 // SearchResult overrides:
35 void Open(int event_flags) override {} 35 void Open(int event_flags) override {}
36 void InvokeAction(int action_index, int event_flags) override {} 36 void InvokeAction(int action_index, int event_flags) override {}
37 scoped_ptr<SearchResult> Duplicate() const override { 37 scoped_ptr<SearchResult> Duplicate() const override {
38 return scoped_ptr<SearchResult>(new TestSearchResult(id(), relevance())); 38 return make_scoped_ptr(new TestSearchResult(id(), relevance()));
39 } 39 }
40 40
41 // For reference equality testing. (Addresses cannot be used to test reference 41 // For reference equality testing. (Addresses cannot be used to test reference
42 // equality because it is possible that an object will be allocated at the 42 // equality because it is possible that an object will be allocated at the
43 // same address as a previously deleted one.) 43 // same address as a previously deleted one.)
44 static int GetInstanceId(SearchResult* result) { 44 static int GetInstanceId(SearchResult* result) {
45 return static_cast<const TestSearchResult*>(result)->instance_id_; 45 return static_cast<const TestSearchResult*>(result)->instance_id_;
46 } 46 }
47 47
48 private: 48 private:
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 EXPECT_EQ(old_ui_result_ids[0], 372 EXPECT_EQ(old_ui_result_ids[0],
373 TestSearchResult::GetInstanceId(ui_results.GetItemAt(3))); 373 TestSearchResult::GetInstanceId(ui_results.GetItemAt(3)));
374 EXPECT_EQ(old_ui_result_ids[1], 374 EXPECT_EQ(old_ui_result_ids[1],
375 TestSearchResult::GetInstanceId(ui_results.GetItemAt(0))); 375 TestSearchResult::GetInstanceId(ui_results.GetItemAt(0)));
376 EXPECT_EQ(old_ui_result_ids[2], 376 EXPECT_EQ(old_ui_result_ids[2],
377 TestSearchResult::GetInstanceId(ui_results.GetItemAt(2))); 377 TestSearchResult::GetInstanceId(ui_results.GetItemAt(2)));
378 } 378 }
379 379
380 } // namespace test 380 } // namespace test
381 } // namespace app_list 381 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | ui/chromeos/touch_exploration_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698