Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/search_controller_factory.h" | 5 #include "chrome/browser/ui/app_list/search/search_controller_factory.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/time/default_clock.h" | 10 #include "base/time/default_clock.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 48 controller->AddProvider(Mixer::MAIN_GROUP, | 48 controller->AddProvider(Mixer::MAIN_GROUP, |
| 49 scoped_ptr<SearchProvider>(new AppSearchProvider( | 49 scoped_ptr<SearchProvider>(new AppSearchProvider( |
| 50 profile, list_controller, | 50 profile, list_controller, |
| 51 make_scoped_ptr(new base::DefaultClock())))); | 51 make_scoped_ptr(new base::DefaultClock())))); |
| 52 controller->AddProvider(Mixer::OMNIBOX_GROUP, | 52 controller->AddProvider(Mixer::OMNIBOX_GROUP, |
| 53 scoped_ptr<SearchProvider>( | 53 scoped_ptr<SearchProvider>( |
| 54 new OmniboxProvider(profile, list_controller))); | 54 new OmniboxProvider(profile, list_controller))); |
| 55 controller->AddProvider(Mixer::WEBSTORE_GROUP, | 55 controller->AddProvider(Mixer::WEBSTORE_GROUP, |
| 56 scoped_ptr<SearchProvider>( | 56 scoped_ptr<SearchProvider>( |
| 57 new WebstoreProvider(profile, list_controller))); | 57 new WebstoreProvider(profile, list_controller))); |
| 58 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | |
| 59 switches::kDisablePeopleSearch)) { | |
| 60 controller->AddProvider(Mixer::PEOPLE_GROUP, | |
|
Matt Giuca
2015/01/15 01:43:57
You are removing a NOT of the switch, therefore, t
| |
| 61 scoped_ptr<SearchProvider>( | |
| 62 new PeopleProvider(profile, list_controller))); | |
| 63 } | |
| 64 if (IsSuggestionsSearchProviderEnabled()) { | 58 if (IsSuggestionsSearchProviderEnabled()) { |
| 65 controller->AddProvider( | 59 controller->AddProvider( |
| 66 Mixer::SUGGESTIONS_GROUP, | 60 Mixer::SUGGESTIONS_GROUP, |
| 67 scoped_ptr<SearchProvider>( | 61 scoped_ptr<SearchProvider>( |
| 68 new SuggestionsSearchProvider(profile, list_controller))); | 62 new SuggestionsSearchProvider(profile, list_controller))); |
| 69 } | 63 } |
| 70 | 64 |
| 71 return controller.Pass(); | 65 return controller.Pass(); |
| 72 } | 66 } |
| 73 | 67 |
| 74 } // namespace app_list | 68 } // namespace app_list |
| OLD | NEW |