Load resources.pak earlier in content_main_runner

Reland "Load resources.pak earlier in service manager main"

This is a reland of 13dfb3270d72c4b826e4f03b8178b22dd81a158f

Original change's description:
> Load resources.pak earlier in service manager main
>
> We need to use the content in resources.pak in service manager, but at
> that time resource bundle has not been initialized. Create data pack to
> load resources.pak and append the data pack to resource bundle during the
> initialization.
>
> Move path FILE_RESOURCES_PACK from chrome_paths.h to ui_base_paths.cc.
>
> Bug: 729596, 815230
> Change-Id: Iec3a9409cbd9c10775afb72944e66e26650f1181
> Reviewed-on: https://chromium-review.googlesource.com/962679
> Reviewed-by: Yaron Friedman <[email protected]>
> Reviewed-by: Ken Rockot <[email protected]>
> Reviewed-by: Scott Violet <[email protected]>
> Reviewed-by: Xi Han <[email protected]>
> Commit-Queue: Ran Ji <[email protected]>
> Cr-Commit-Position: refs/heads/master@{#554500}

Bug: 729596, 815230
Change-Id: Id963d1e64c70a22a29e94d8186ea0d4bcb1455fd

[email protected], [email protected], [email protected]

Change-Id: Id963d1e64c70a22a29e94d8186ea0d4bcb1455fd
Reviewed-on: https://chromium-review.googlesource.com/1034133
Commit-Queue: Xi Han <[email protected]>
Reviewed-by: Xi Han <[email protected]>
Cr-Commit-Position: refs/heads/master@{#555443}
diff --git a/chrome/browser/chrome_browser_main.h b/chrome/browser/chrome_browser_main.h
index a1e253e0..8c745da 100644
--- a/chrome/browser/chrome_browser_main.h
+++ b/chrome/browser/chrome_browser_main.h
@@ -6,10 +6,8 @@
 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
 
 #include <memory>
-#include <vector>
 
 #include "base/macros.h"
-#include "build/build_config.h"
 #include "chrome/browser/chrome_browser_field_trials.h"
 #include "chrome/browser/chrome_process_singleton.h"
 #include "chrome/browser/first_run/first_run.h"
@@ -18,6 +16,7 @@
 #include "chrome/common/thread_profiler.h"
 #include "content/public/browser/browser_main_parts.h"
 #include "content/public/common/main_function_params.h"
+#include "ui/base/resource/data_pack.h"
 
 class BrowserProcessImpl;
 class ChromeBrowserMainExtraParts;
@@ -56,8 +55,8 @@
   class DeferringTaskRunner;
 #endif
 
-  explicit ChromeBrowserMainParts(
-      const content::MainFunctionParams& parameters);
+  explicit ChromeBrowserMainParts(const content::MainFunctionParams& parameters,
+                                  std::unique_ptr<ui::DataPack> data_pack);
 
   // content::BrowserMainParts overrides.
   bool ShouldContentCreateFeatureList() override;
@@ -211,6 +210,10 @@
   scoped_refptr<DeferringTaskRunner> initial_task_runner_;
 #endif
 
+  // This is used to store the ui data pack. The data pack is moved when
+  // resource bundle gets created.
+  std::unique_ptr<ui::DataPack> service_manifest_data_pack_;
+
   DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts);
 };