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

Unified Diff: chrome/browser/autocomplete/autocomplete_controller.cc

Issue 10542076: ABANDONED: chromeos: Download contacts (work in progress). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ContactProvider cleanup and tests Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_match.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/autocomplete_controller.cc
diff --git a/chrome/browser/autocomplete/autocomplete_controller.cc b/chrome/browser/autocomplete/autocomplete_controller.cc
index 8bfa3518cefe099f0094e51434f635d30221a354..4a0d672fd8f280e8ecb85c393e00c2c5b7db40dc 100644
--- a/chrome/browser/autocomplete/autocomplete_controller.cc
+++ b/chrome/browser/autocomplete/autocomplete_controller.cc
@@ -7,6 +7,7 @@
#include <set>
#include <string>
+#include "base/command_line.h"
#include "base/format_macros.h"
#include "base/logging.h"
#include "base/metrics/histogram.h"
@@ -25,11 +26,17 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_switches.h"
#include "content/public/browser/notification_service.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/autocomplete/contact_provider_chromeos.h"
+#include "chrome/browser/chromeos/contacts/contact_manager.h"
+#endif
+
namespace {
// Converts the given type to an integer based on the AQS specification.
@@ -101,6 +108,15 @@ AutocompleteController::AutocompleteController(
providers_.push_back(new HistoryContentsProvider(this, profile, hqp_enabled));
providers_.push_back(new BuiltinProvider(this, profile));
providers_.push_back(new ExtensionAppProvider(this, profile));
+#if defined(OS_CHROMEOS)
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableContacts)) {
+ providers_.push_back(
+ new ContactProvider(
+ this,
+ profile,
+ contacts::ContactManager::GetInstance()->GetWeakPtr()));
+ }
+#endif
for (ACProviders::iterator i(providers_.begin()); i != providers_.end(); ++i)
(*i)->AddRef();
}
« no previous file with comments | « no previous file | chrome/browser/autocomplete/autocomplete_match.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698