Make LoadIconFromExtension check Chrome-OS-ness

The icon loading helper functions, prior to both this CL and
http://crrev.com/c/1373450, called app_list image processing functions
unconditionally, which broke the build, as app_list is Chrome OS only.

The quick fix was to build app_icon_factory.cc conditionally, only for
Chrome OS. This was http://crrev.com/c/1373450

This fix is to make more of app_icon_factory.cc conditional on #ifdef
OS_CHROMEOS. The App Service isn't necessarily Chrome OS only.

A longer term possibility is to move the app_list image processing
function out of //chrome/browser/ui/app_list per se, and build it
unconditionally. This would be a user-visible change (in that extension
icons on desktop Chrome might look different), but arguably a change
that improves consistency. In any case, doing that is out of scope of
this CL. In the initial stage, the App Service aims to be a
user-invisible refactoring.

BUG=826982

Change-Id: Ic4fd3db27789117bb57e72e6b557b3e56b28fb7f
Reviewed-on: https://chromium-review.googlesource.com/c/1374889
Commit-Queue: Nigel Tao <[email protected]>
Reviewed-by: Dominick Ng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#616190}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 2ed7fe1..8c17a3d 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2590,6 +2590,8 @@
     sources += [
       "accessibility/invert_bubble_prefs.cc",
       "accessibility/invert_bubble_prefs.h",
+      "apps/app_service/app_icon_factory.cc",
+      "apps/app_service/app_icon_factory.h",
       "apps/app_service/app_icon_source.cc",
       "apps/app_service/app_icon_source.h",
       "apps/app_service/app_service_proxy.cc",
@@ -3120,8 +3122,6 @@
 
   if (is_chromeos) {
     sources += [
-      "apps/app_service/app_icon_factory.cc",
-      "apps/app_service/app_icon_factory.h",
       "apps/app_service/built_in_chromeos_apps.cc",
       "apps/app_service/built_in_chromeos_apps.h",
       "apps/app_service/extension_apps.cc",