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

Side by Side Diff: chrome/browser/ui/app_list/search/app_search_provider.cc

Issue 918443002: Make experimental app list use short names for app search results. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_uninstall_again
Patch Set: always use short name 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 | no next file » | 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/app_list/search/app_search_provider.h" 5 #include "chrome/browser/ui/app_list/search/app_search_provider.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 14 matching lines...) Expand all
25 25
26 using extensions::ExtensionRegistry; 26 using extensions::ExtensionRegistry;
27 27
28 namespace app_list { 28 namespace app_list {
29 29
30 class AppSearchProvider::App { 30 class AppSearchProvider::App {
31 public: 31 public:
32 explicit App(const extensions::Extension* extension, 32 explicit App(const extensions::Extension* extension,
33 const base::Time& last_launch_time) 33 const base::Time& last_launch_time)
34 : app_id_(extension->id()), 34 : app_id_(extension->id()),
35 indexed_name_(base::UTF8ToUTF16(extension->name())), 35 indexed_name_(base::UTF8ToUTF16(extension->short_name())),
36 last_launch_time_(last_launch_time) {} 36 last_launch_time_(last_launch_time) {}
37 ~App() {} 37 ~App() {}
38 38
39 const std::string& app_id() const { return app_id_; } 39 const std::string& app_id() const { return app_id_; }
40 const TokenizedString& indexed_name() const { return indexed_name_; } 40 const TokenizedString& indexed_name() const { return indexed_name_; }
41 const base::Time& last_launch_time() const { return last_launch_time_; } 41 const base::Time& last_launch_time() const { return last_launch_time_; }
42 42
43 private: 43 private:
44 const std::string app_id_; 44 const std::string app_id_;
45 TokenizedString indexed_name_; 45 TokenizedString indexed_name_;
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 RefreshApps(); 152 RefreshApps();
153 if (!update_results_factory_.HasWeakPtrs()) { 153 if (!update_results_factory_.HasWeakPtrs()) {
154 base::MessageLoop::current()->PostTask( 154 base::MessageLoop::current()->PostTask(
155 FROM_HERE, 155 FROM_HERE,
156 base::Bind(&AppSearchProvider::UpdateResults, 156 base::Bind(&AppSearchProvider::UpdateResults,
157 update_results_factory_.GetWeakPtr())); 157 update_results_factory_.GetWeakPtr()));
158 } 158 }
159 } 159 }
160 160
161 } // namespace app_list 161 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698