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

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

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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 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
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 (!CommandLine::ForCurrentProcess()->HasSwitch( 58 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
59 switches::kDisablePeopleSearch)) { 59 switches::kDisablePeopleSearch)) {
60 controller->AddProvider(Mixer::PEOPLE_GROUP, 60 controller->AddProvider(Mixer::PEOPLE_GROUP,
61 scoped_ptr<SearchProvider>( 61 scoped_ptr<SearchProvider>(
62 new PeopleProvider(profile, list_controller))); 62 new PeopleProvider(profile, list_controller)));
63 } 63 }
64 if (IsSuggestionsSearchProviderEnabled()) { 64 if (IsSuggestionsSearchProviderEnabled()) {
65 controller->AddProvider( 65 controller->AddProvider(
66 Mixer::SUGGESTIONS_GROUP, 66 Mixer::SUGGESTIONS_GROUP,
67 scoped_ptr<SearchProvider>( 67 scoped_ptr<SearchProvider>(
68 new SuggestionsSearchProvider(profile, list_controller))); 68 new SuggestionsSearchProvider(profile, list_controller)));
69 } 69 }
70 70
71 return controller.Pass(); 71 return controller.Pass();
72 } 72 }
73 73
74 } // namespace app_list 74 } // namespace app_list
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698