| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |