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

Side by Side Diff: chrome/browser/ui/app_list/search/launcher_search/launcher_search_provider.h

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 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PROVID ER_H_ 5 #ifndef CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PROVID ER_H_
6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PROVID ER_H_ 6 #define CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PROVID ER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <memory>
9 10
10 #include "base/macros.h" 11 #include "base/macros.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/scoped_vector.h" 12 #include "base/memory/scoped_vector.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/strings/string16.h" 14 #include "base/strings/string16.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/timer/timer.h" 16 #include "base/timer/timer.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_resu lt.h" 18 #include "chrome/browser/ui/app_list/search/launcher_search/launcher_search_resu lt.h"
19 #include "extensions/common/extension.h" 19 #include "extensions/common/extension.h"
20 #include "ui/app_list/search_provider.h" 20 #include "ui/app_list/search_provider.h"
21 21
(...skipping 14 matching lines...) Expand all
36 private: 36 private:
37 // Delays query for |kLauncherSearchProviderQueryDelayInMs|. This dispatches 37 // Delays query for |kLauncherSearchProviderQueryDelayInMs|. This dispatches
38 // the latest query after no more calls to Start() for the delay duration. 38 // the latest query after no more calls to Start() for the delay duration.
39 void DelayQuery(const base::Closure& closure); 39 void DelayQuery(const base::Closure& closure);
40 40
41 // Dispatches |query| to LauncherSearchProvider service. 41 // Dispatches |query| to LauncherSearchProvider service.
42 void StartInternal(const base::string16& query); 42 void StartInternal(const base::string16& query);
43 43
44 // The search results of each extension. 44 // The search results of each extension.
45 std::map<extensions::ExtensionId, 45 std::map<extensions::ExtensionId,
46 scoped_ptr<ScopedVector<LauncherSearchResult>>> extension_results_; 46 std::unique_ptr<ScopedVector<LauncherSearchResult>>>
47 extension_results_;
47 48
48 // A timer to delay query. 49 // A timer to delay query.
49 base::OneShotTimer query_timer_; 50 base::OneShotTimer query_timer_;
50 51
51 // The timestamp of the last query. 52 // The timestamp of the last query.
52 base::Time last_query_time_; 53 base::Time last_query_time_;
53 54
54 // The reference to profile to get LauncherSearchProvider service. 55 // The reference to profile to get LauncherSearchProvider service.
55 Profile* profile_; 56 Profile* profile_;
56 57
57 base::WeakPtrFactory<LauncherSearchProvider> weak_ptr_factory_; 58 base::WeakPtrFactory<LauncherSearchProvider> weak_ptr_factory_;
58 59
59 DISALLOW_COPY_AND_ASSIGN(LauncherSearchProvider); 60 DISALLOW_COPY_AND_ASSIGN(LauncherSearchProvider);
60 }; 61 };
61 62
62 } // namespace app_list 63 } // namespace app_list
63 64
64 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PRO VIDER_H_ 65 #endif // CHROME_BROWSER_UI_APP_LIST_SEARCH_LAUNCHER_SEARCH_LAUNCHER_SEARCH_PRO VIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698