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

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

Issue 15875007: app_list: Search result launch history and boost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win7_aura unit_test Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/history.h » ('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/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/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 21 matching lines...) Expand all
32 TokenizedString indexed_name_; 32 TokenizedString indexed_name_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(App); 34 DISALLOW_COPY_AND_ASSIGN(App);
35 }; 35 };
36 36
37 AppSearchProvider::AppSearchProvider( 37 AppSearchProvider::AppSearchProvider(
38 Profile* profile, 38 Profile* profile,
39 AppListControllerDelegate* list_controller) 39 AppListControllerDelegate* list_controller)
40 : profile_(profile), 40 : profile_(profile),
41 list_controller_(list_controller) { 41 list_controller_(list_controller) {
42 DCHECK(!profile_->IsOffTheRecord());
43 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, 42 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED,
44 content::Source<Profile>(profile_)); 43 content::Source<Profile>(profile_->GetOriginalProfile()));
45 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED, 44 registrar_.Add(this, chrome::NOTIFICATION_EXTENSION_UNLOADED,
46 content::Source<Profile>(profile_)); 45 content::Source<Profile>(profile_->GetOriginalProfile()));
47 RefreshApps(); 46 RefreshApps();
48 } 47 }
49 48
50 AppSearchProvider::~AppSearchProvider() {} 49 AppSearchProvider::~AppSearchProvider() {}
51 50
52 void AppSearchProvider::Start(const string16& query) { 51 void AppSearchProvider::Start(const string16& query) {
53 const TokenizedString query_terms(query); 52 const TokenizedString query_terms(query);
54 53
55 ClearResults(); 54 ClearResults();
56 55
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 } 91 }
93 } 92 }
94 93
95 void AppSearchProvider::Observe(int type, 94 void AppSearchProvider::Observe(int type,
96 const content::NotificationSource& source, 95 const content::NotificationSource& source,
97 const content::NotificationDetails& detaila) { 96 const content::NotificationDetails& detaila) {
98 RefreshApps(); 97 RefreshApps();
99 } 98 }
100 99
101 } // namespace app_list 100 } // namespace app_list
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/app_list/search/history.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698