Query Tiles : Move to components/

This CL moves the most of the files from chrome/browser/upboarding to
components/query_tiles. Only a few factory classes are left in
chrome layer at chrome/browser_query_tiles. This was required as a prerequisite to be
able to build omnibox suggestions from query tiles.

[email protected]

Bug: 1074744
Change-Id: I84ed780fe4c2a71f24f8b8fa935e8e3f47815d5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2167011
Commit-Queue: Shakti Sahu <[email protected]>
Reviewed-by: Ted Choc <[email protected]>
Reviewed-by: John Abd-El-Malek <[email protected]>
Reviewed-by: Hesen Zhang <[email protected]>
Reviewed-by: David Trainor <[email protected]>
Reviewed-by: Xing Liu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#763666}
diff --git a/components/query_tiles/internal/tile_service_impl.cc b/components/query_tiles/internal/tile_service_impl.cc
new file mode 100644
index 0000000..cbcd0057
--- /dev/null
+++ b/components/query_tiles/internal/tile_service_impl.cc
@@ -0,0 +1,32 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "components/query_tiles/internal/tile_service_impl.h"
+
+#include <string>
+#include <utility>
+
+#include "ui/gfx/image/image.h"
+
+namespace upboarding {
+
+TileServiceImpl::TileServiceImpl(std::unique_ptr<ImageLoader> image_loader,
+                                 std::unique_ptr<TileManager> tile_manager,
+                                 std::unique_ptr<TileConfig> config)
+    : image_loader_(std::move(image_loader)),
+      tile_manager_(std::move(tile_manager)),
+      config_(std::move(config)) {}
+
+TileServiceImpl::~TileServiceImpl() = default;
+
+void TileServiceImpl::GetQueryTiles(GetTilesCallback callback) {
+  tile_manager_->GetTiles(std::move(callback));
+}
+
+void TileServiceImpl::GetVisuals(const std::string& tile_id,
+                                 VisualsCallback callback) {
+  NOTIMPLEMENTED();
+}
+
+}  // namespace upboarding