Revert "Revert "Revert "Attemp2."""

This reverts commit 62557d9b33f2c58619a97175b2b7ded7f815dfcf.

Reason for revert:
test revert I951343f3f90a5d56a69d396a29cdbed55ef77f18

Original change's description:
> Revert "Revert "Attemp2.""
>
> This reverts commit 9e792c5308f42117445bc79a1127bd115497348a.
>
> Reason for revert:
> test revert 691189
>
> Original change's description:
> > Revert "Attemp2."
> >
> > This reverts commit a61777e17d7e7b1301b42603459b42f260b5504d.
> >
> > Reason for revert: <INSERT REASONING HERE>
> >
> > Original change's description:
> > > Attemp2.
> > >
> > > Change-Id: Idbb0524a569874039863ffab9f0fa379bbf903af
> > > Reviewed-on: https://chromium-review.googlesource.com/691124
> > > Reviewed-by: Chan Li <chanli@chromium.org>
> >
> > TBR=chanli@chromium.org
> >
> > Change-Id: Ic2d166e149a82caf525dedd4f2ed06693a2c6c55
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://chromium-review.googlesource.com/691189
> > Reviewed-by: Chan Li <chanli@chromium.org>
>
>
> Change-Id: I951343f3f90a5d56a69d396a29cdbed55ef77f18
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://chromium-review.googlesource.com/691190

Change-Id: I1ef8b4bd7ccc0bd8a2df384cdcd481697915cb45
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/691191
Reviewed-by: Chan Li <chanli@chromium.org>
diff --git a/extract_deps_info_pipeline.py b/extract_deps_info_pipeline.py
new file mode 100644
index 0000000..994dcaa
--- /dev/null
+++ b/extract_deps_info_pipeline.py
@@ -0,0 +1,59 @@
+# Copyright 2015 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.
+
+from gae_libs.gitiles.cached_gitiles_repository import CachedGitilesRepository
+from gae_libs.http.http_client_appengine import HttpClientAppengine
+from gae_libs.pipeline_wrapper import BasePipeline
+from libs.deps import chrome_dependency_fetcher
+from services import deps
+
+
+class ExtractDEPSInfoPipeline(BasePipeline):
+  """A pipeline to extract information of DEPS and dependency rolls."""
+
+  # Arguments number differs from overridden method - pylint: disable=W0221
+  def run(self, failure_info, change_logs):
+    """
+    Args:
+      failure_info (dict): Output of pipeline DetectFirstFailurePipeline.run().
+      change_logs (dict): Output of pipeline PullChangelogPipeline.run().
+
+    Returns:
+      A dict with the following form:
+      {
+        'deps': {
+          'path/to/dependency/': {
+            'revision': 'git_hash',
+            'repo_url': 'https://url/to/dependency/repo.git',
+          },
+          ...
+        },
+        'deps_rolls': {
+          'git_revision': [
+            {
+              'path': 'src/path/to/dependency/',
+              'repo_url': 'https://url/to/dependency/repo.git',
+              'new_revision': 'git_hash1',
+              'old_revision': 'git_hash2',
+            },
+            ...
+          ],
+          ...
+        }
+      }
+    """
+
+    chromium_revision = failure_info['chromium_revision']
+    os_platform = deps.GetOSPlatformName(failure_info['master_name'],
+                                         failure_info['builder_name'])
+
+    dep_fetcher = chrome_dependency_fetcher.ChromeDependencyFetcher(
+        CachedGitilesRepository.Factory(HttpClientAppengine()))
+
+    return {
+        'deps':
+            deps.GetDependencies(chromium_revision, os_platform, dep_fetcher),
+        'deps_rolls':
+            deps.DetectDependencyRolls(change_logs, os_platform, dep_fetcher)
+    }