diff --git a/DEPS b/DEPS
index 00fe1e4f..1fd824a 100644
--- a/DEPS
+++ b/DEPS
@@ -44,7 +44,7 @@
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling V8
   # and whatever else without interference from each other.
-  'v8_revision': '1391b942d80abbd43fdbe52fcc5ca4741c5effb9',
+  'v8_revision': 'b9ce6ed2c025fff19b99bfcd8fe31ffad7ad5288',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling swarming_client
   # and whatever else without interference from each other.
diff --git a/chrome/VERSION b/chrome/VERSION
index dcb0532a..b1d88ad 100644
--- a/chrome/VERSION
+++ b/chrome/VERSION
@@ -1,4 +1,4 @@
 MAJOR=58
 MINOR=0
-BUILD=2998
+BUILD=2999
 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
index 67d3d55..28e9661 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundScheduler.java
@@ -76,4 +76,25 @@
 
         gcmNetworkManager.schedule(task);
     }
+
+    /**
+     * Get the latest power conditions from the android APIs.
+     */
+    public static boolean getPowerConditions(Context context) {
+        return OfflinePageUtils.getPowerConditions(context);
+    }
+
+    /**
+     * Get the latest battery conditions from the android APIs.
+     */
+    public static int getBatteryConditions(Context context) {
+        return OfflinePageUtils.getBatteryConditions(context);
+    }
+
+    /**
+     * Get the latest network conditions from the android APIs.
+     */
+    public static int getNetworkConditions(Context context) {
+        return OfflinePageUtils.getNetworkConditions(context);
+    }
 }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
index 8491d4c7..434e74e2 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/BackgroundSchedulerBridge.java
@@ -47,6 +47,21 @@
         BackgroundScheduler.unschedule(ContextUtils.getApplicationContext());
     }
 
+    @CalledByNative
+    private static boolean getPowerConditions() {
+        return BackgroundScheduler.getPowerConditions(ContextUtils.getApplicationContext());
+    }
+
+    @CalledByNative
+    private static int getBatteryConditions() {
+        return BackgroundScheduler.getBatteryConditions(ContextUtils.getApplicationContext());
+    }
+
+    @CalledByNative
+    private static int getNetworkConditions() {
+        return BackgroundScheduler.getNetworkConditions(ContextUtils.getApplicationContext());
+    }
+
     /**
      * Used by native code to create and pass up Java object encapsulating the
      * trigger conditions.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
index ca4de08..8b0f7eb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/offlinepages/OfflinePageUtils.java
@@ -236,11 +236,37 @@
         };
     }
 
+    /**
+     * Returns a class encapsulating the current power, battery, and network conditions.
+     */
     public static DeviceConditions getDeviceConditions(Context context) {
         return getInstance().getDeviceConditionsImpl(context);
     }
 
     /**
+     * Return true if the device is plugged into wall power.
+     */
+    public static boolean getPowerConditions(Context context) {
+        // TODO(petewil): refactor to get power, network, and battery directly from both here and
+        // getDeviceConditionsImpl instead of always making a DeviceConditions object.
+        return getInstance().getDeviceConditionsImpl(context).isPowerConnected();
+    }
+
+    /**
+     * Get the percentage of battery remaining
+     */
+    public static int getBatteryConditions(Context context) {
+        return getInstance().getDeviceConditionsImpl(context).getBatteryPercentage();
+    }
+
+    /**
+     * Returns an enum representing the type of the network connection.
+     */
+    public static int getNetworkConditions(Context context) {
+        return getInstance().getDeviceConditionsImpl(context).getNetConnectionType();
+    }
+
+    /**
      * Records UMA data when the Offline Pages Background Load service awakens.
      * @param context android context
      */
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java
index 38881c2f..d9aa1ffc 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/SearchEngineAdapter.java
@@ -25,6 +25,7 @@
 
 import org.chromium.base.ApiCompatibilityUtils;
 import org.chromium.base.ContextUtils;
+import org.chromium.base.Log;
 import org.chromium.base.VisibleForTesting;
 import org.chromium.base.metrics.RecordUserAction;
 import org.chromium.chrome.R;
@@ -50,6 +51,8 @@
 public class SearchEngineAdapter extends BaseAdapter
         implements TemplateUrlService.LoadListener, TemplateUrlService.TemplateUrlServiceObserver,
                 OnClickListener {
+    private static final String TAG = "cr_SearchEngines";
+
     private static final int VIEW_TYPE_ITEM = 0;
     private static final int VIEW_TYPE_DIVIDER = 1;
     private static final int VIEW_TYPE_COUNT = 2;
@@ -248,7 +251,6 @@
     @Override
     public View getView(int position, View convertView, ViewGroup parent) {
         View view = convertView;
-        TemplateUrl templateUrl = (TemplateUrl) getItem(position);
         int itemViewType = getItemViewType(position);
         if (convertView == null) {
             view = mLayoutInflater.inflate(
@@ -280,6 +282,8 @@
 
         TextView description = (TextView) view.findViewById(R.id.name);
         Resources resources = mContext.getResources();
+
+        TemplateUrl templateUrl = (TemplateUrl) getItem(position);
         description.setText(templateUrl.getShortName());
 
         TextView url = (TextView) view.findViewById(R.id.url);
@@ -311,15 +315,20 @@
 
         TextView link = (TextView) view.findViewById(R.id.location_permission);
         link.setVisibility(selected ? View.VISIBLE : View.GONE);
-        if (selected) {
-            if (getLocationPermissionType(position, true) == ContentSetting.ASK) {
+        if (TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl(
+                templateUrl.getKeyword()) == null) {
+            Log.e(TAG, "Invalid template URL found: %s", templateUrl);
+            assert false;
+            link.setVisibility(View.GONE);
+        } else if (selected) {
+            if (getLocationPermissionType(templateUrl, true) == ContentSetting.ASK) {
                 link.setVisibility(View.GONE);
             } else {
                 ForegroundColorSpan linkSpan = new ForegroundColorSpan(
                         ApiCompatibilityUtils.getColor(resources, R.color.google_blue_700));
                 if (LocationUtils.getInstance().isSystemLocationSettingEnabled()) {
                     String message = mContext.getString(
-                            locationEnabled(position, true)
+                            locationEnabled(templateUrl, true)
                             ? R.string.search_engine_location_allowed
                             : R.string.search_engine_location_blocked);
                     SpannableString messageWithLink = new SpannableString(message);
@@ -369,9 +378,10 @@
         SharedPreferences sharedPreferences =
                 ContextUtils.getAppSharedPreferences();
         if (sharedPreferences.getBoolean(PrefServiceBridge.LOCATION_AUTO_ALLOWED, false)) {
-            if (locationEnabled(mSelectedSearchEnginePosition, false)) {
+            TemplateUrl templateUrl = (TemplateUrl) getItem(mSelectedSearchEnginePosition);
+            if (locationEnabled(templateUrl, false)) {
                 String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl(
-                        toKeyword(mSelectedSearchEnginePosition));
+                        templateUrl.getKeyword());
                 WebsitePreferenceBridge.nativeSetGeolocationSettingForOrigin(
                         url, url, ContentSetting.DEFAULT.toInt(), false);
             }
@@ -404,19 +414,27 @@
                     toKeyword(mSelectedSearchEnginePosition));
             Bundle fragmentArgs = SingleWebsitePreferences.createFragmentArgsForSite(url);
             fragmentArgs.putBoolean(SingleWebsitePreferences.EXTRA_LOCATION,
-                    locationEnabled(mSelectedSearchEnginePosition, true));
+                    locationEnabled((TemplateUrl) getItem(mSelectedSearchEnginePosition), true));
             settingsIntent.putExtra(Preferences.EXTRA_SHOW_FRAGMENT_ARGUMENTS, fragmentArgs);
             mContext.startActivity(settingsIntent);
         }
     }
 
-    private ContentSetting getLocationPermissionType(int position, boolean checkGeoHeader) {
-        if (position == -1) {
+    private ContentSetting getLocationPermissionType(
+            TemplateUrl templateUrl, boolean checkGeoHeader) {
+        if (templateUrl == null) {
+            Log.e(TAG, "Invalid null template URL found");
+            assert false;
             return ContentSetting.BLOCK;
         }
 
         String url = TemplateUrlService.getInstance().getSearchEngineUrlFromTemplateUrl(
-                toKeyword(position));
+                templateUrl.getKeyword());
+        if (url == null) {
+            Log.e(TAG, "Invalid template URL found: %s", templateUrl);
+            assert false;
+            return ContentSetting.BLOCK;
+        }
         GeolocationInfo locationSettings = new GeolocationInfo(url, null, false);
         ContentSetting locationPermission = locationSettings.getContentSetting();
         if (locationPermission == ContentSetting.ASK) {
@@ -436,8 +454,8 @@
         return locationPermission;
     }
 
-    private boolean locationEnabled(int position, boolean checkGeoHeader) {
-        return getLocationPermissionType(position, checkGeoHeader) == ContentSetting.ALLOW;
+    private boolean locationEnabled(TemplateUrl templateUrl, boolean checkGeoHeader) {
+        return getLocationPermissionType(templateUrl, checkGeoHeader) == ContentSetting.ALLOW;
     }
 
     private int computeStartIndexForRecentSearchEngines() {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/search_engines/TemplateUrlService.java b/chrome/android/java/src/org/chromium/chrome/browser/search_engines/TemplateUrlService.java
index 2bdbd77..85a498e 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/search_engines/TemplateUrlService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/search_engines/TemplateUrlService.java
@@ -16,6 +16,7 @@
 import java.lang.annotation.RetentionPolicy;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.Locale;
 
 /**
  * Android wrapper of the TemplateUrlService which provides access from the Java
@@ -68,8 +69,8 @@
 
         @CalledByNative("TemplateUrl")
         public static TemplateUrl create(
-                int id, String shortName, boolean isPrepopulated, String keyword) {
-            return new TemplateUrl(id, shortName, isPrepopulated, keyword);
+                int index, String shortName, boolean isPrepopulated, String keyword) {
+            return new TemplateUrl(index, shortName, isPrepopulated, keyword);
         }
 
         public TemplateUrl(
@@ -118,9 +119,21 @@
         public boolean equals(Object other) {
             if (!(other instanceof TemplateUrl)) return false;
             TemplateUrl otherTemplateUrl = (TemplateUrl) other;
+            // Explicitly excluding mTemplateUrlType as that will change if the search engine is
+            // set as default.
             return mIndex == otherTemplateUrl.mIndex
+                    && mIsPrepopulated == otherTemplateUrl.mIsPrepopulated
+                    && TextUtils.equals(mKeyword, otherTemplateUrl.mKeyword)
                     && TextUtils.equals(mShortName, otherTemplateUrl.mShortName);
         }
+
+        @Override
+        public String toString() {
+            return String.format(Locale.US,
+                    "TemplateURL -- keyword: %s, short name: %s, index: %d, "
+                    + "type: %d, prepopulated: %b",
+                    mKeyword, mShortName, mIndex, mTemplateUrlType, mIsPrepopulated);
+        }
     }
 
     private static TemplateUrlService sService;
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 3e134e4..2ceed93 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -2319,6 +2319,24 @@
         Create
       </message>
 
+      <!-- Web Share Target picker dialog -->
+      <if expr="not use_titlecase">
+        <message name="IDS_WEBSHARE_TARGET_PICKER_TITLE" desc="Title of the dialog to choose a target for sharing.">
+          Share via
+        </message>
+      </if>
+      <if expr="use_titlecase">
+        <message name="IDS_WEBSHARE_TARGET_PICKER_TITLE" desc="Title of the dialog to choose a target for sharing.">
+          Share Via
+        </message>
+      </if>
+      <message name="IDS_WEBSHARE_TARGET_PICKER_LABEL" desc="Text of the main label in the dialog to choose a target for sharing.">
+        Choose an app to share to:
+      </message>
+      <message name="IDS_WEBSHARE_TARGET_PICKER_COMMIT" desc="Title of the button to share content to the chosen application.">
+        Share
+      </message>
+
       <!-- Content blocking strings -->
       <message name="IDS_AUTOMATIC_DOWNLOADS_TAB_LABEL" desc="Header for multiple automatic downloads page on Content Settings dialog">
         Automatic Downloads
diff --git a/chrome/browser/android/offline_pages/background_scheduler_bridge.cc b/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
index 9c59ebb..41810ac 100644
--- a/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
+++ b/chrome/browser/android/offline_pages/background_scheduler_bridge.cc
@@ -56,6 +56,10 @@
       device_conditions, base::Bind(&ProcessingDoneCallback, j_callback_ref));
 }
 
+BackgroundSchedulerBridge::BackgroundSchedulerBridge() = default;
+
+BackgroundSchedulerBridge::~BackgroundSchedulerBridge() = default;
+
 void BackgroundSchedulerBridge::Schedule(
     const TriggerConditions& trigger_conditions) {
   JNIEnv* env = base::android::AttachCurrentThread();
@@ -92,6 +96,27 @@
       require_unmetered_network);
 }
 
+const DeviceConditions&
+BackgroundSchedulerBridge::GetCurrentDeviceConditions() {
+  JNIEnv* env = base::android::AttachCurrentThread();
+  // Call the JNI methods to get the device conditions we need.
+  jboolean jpower = Java_BackgroundSchedulerBridge_getPowerConditions(env);
+  jint jbattery = Java_BackgroundSchedulerBridge_getBatteryConditions(env);
+  jint jnetwork = Java_BackgroundSchedulerBridge_getNetworkConditions(env);
+
+  // Cast the java types back to the types we use.
+  bool power = static_cast<bool>(jpower);
+  int battery = static_cast<int>(jbattery);
+
+  net::NetworkChangeNotifier::ConnectionType network_connection_type =
+      static_cast<net::NetworkChangeNotifier::ConnectionType>(jnetwork);
+
+  // Now return the current conditions to the caller.
+  device_conditions_ = base::MakeUnique<DeviceConditions>(
+      power, battery, network_connection_type);
+  return *device_conditions_;
+}
+
 bool RegisterBackgroundSchedulerBridge(JNIEnv* env) {
   return RegisterNativesImpl(env);
 }
diff --git a/chrome/browser/android/offline_pages/background_scheduler_bridge.h b/chrome/browser/android/offline_pages/background_scheduler_bridge.h
index 7d47ca8..756cd1d 100644
--- a/chrome/browser/android/offline_pages/background_scheduler_bridge.h
+++ b/chrome/browser/android/offline_pages/background_scheduler_bridge.h
@@ -16,11 +16,15 @@
 // on Android.
 class BackgroundSchedulerBridge : public Scheduler {
  public:
+  BackgroundSchedulerBridge();
+  ~BackgroundSchedulerBridge() override;
+
   // Scheduler implementation.
   void Schedule(const TriggerConditions& trigger_conditions) override;
   void BackupSchedule(const TriggerConditions& trigger_conditions,
                       long delay_in_seconds) override;
   void Unschedule() override;
+  const DeviceConditions& GetCurrentDeviceConditions() override;
 
  private:
   base::android::ScopedJavaLocalRef<jobject> CreateTriggerConditions(
@@ -28,6 +32,7 @@
       bool require_power_connected,
       int minimum_battery_percentage,
       bool require_unmetered_network) const;
+  std::unique_ptr<DeviceConditions> device_conditions_;
 };
 
 bool RegisterBackgroundSchedulerBridge(JNIEnv* env);
diff --git a/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc b/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
index e782d7f..142b2e1 100644
--- a/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
+++ b/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.cc
@@ -14,6 +14,11 @@
 #include "components/offline_pages/core/offline_event_logger.h"
 #include "net/base/network_change_notifier.h"
 
+namespace {
+const int kBatteryPercentageHigh = 75;
+const bool kPowerRequired = true;
+}  // namespace
+
 namespace offline_pages {
 
 namespace android {
@@ -35,11 +40,7 @@
     Profile* profile = ProfileManager::GetLastUsedProfile();
     RequestCoordinator* coordinator =
         RequestCoordinatorFactory::GetInstance()->GetForBrowserContext(profile);
-    // TODO(romax) Maybe get current real condition.
-    DeviceConditions device_conditions(
-        true, 0, net::NetworkChangeNotifier::GetConnectionType());
-    coordinator->StartImmediateProcessing(device_conditions,
-                                          base::Bind(&ProcessingDoneCallback));
+    coordinator->StartImmediateProcessing(base::Bind(&ProcessingDoneCallback));
   }
 }
 
@@ -60,6 +61,13 @@
 
 }  // namespace
 
+EvaluationTestScheduler::EvaluationTestScheduler()
+    : device_conditions_(kPowerRequired,
+                         kBatteryPercentageHigh,
+                         net::NetworkChangeNotifier::CONNECTION_2G) {}
+
+EvaluationTestScheduler::~EvaluationTestScheduler() {}
+
 void EvaluationTestScheduler::Schedule(
     const TriggerConditions& trigger_conditions) {
   Profile* profile = ProfileManager::GetLastUsedProfile();
@@ -92,6 +100,10 @@
                                             " Unschedule called!");
 }
 
+DeviceConditions& EvaluationTestScheduler::GetCurrentDeviceConditions() {
+  return device_conditions_;
+}
+
 void EvaluationTestScheduler::ImmediateScheduleCallback(bool result) {
   base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE,
                                                 base::Bind(&StartProcessing));
diff --git a/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.h b/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.h
index b7acd9d..965e7d7 100644
--- a/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.h
+++ b/chrome/browser/android/offline_pages/evaluation/evaluation_test_scheduler.h
@@ -15,17 +15,22 @@
 
 class EvaluationTestScheduler : public Scheduler {
  public:
+  EvaluationTestScheduler();
+  ~EvaluationTestScheduler() override;
+
   // Scheduler implementation.
   void Schedule(const TriggerConditions& trigger_conditions) override;
   void BackupSchedule(const TriggerConditions& trigger_conditions,
                       long delay_in_seconds) override;
   void Unschedule() override;
+  DeviceConditions& GetCurrentDeviceConditions() override;
 
   // Callback used by user request.
   void ImmediateScheduleCallback(bool result);
 
  private:
   RequestCoordinator* coordinator_;
+  DeviceConditions device_conditions_;
 };
 
 }  // namespace android
diff --git a/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc
index 36a153d..b2074cf 100644
--- a/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc
+++ b/chrome/browser/android/offline_pages/evaluation/offline_page_evaluation_bridge.cc
@@ -319,11 +319,8 @@
   DCHECK(request_coordinator_);
   base::android::RunCallbackAndroid(j_callback_obj, false);
 
-  net::NetworkChangeNotifier::ConnectionType connection =
-      net::NetworkChangeNotifier::GetConnectionType();
-  DeviceConditions device_conditions(false, 0, connection);
   return request_coordinator_->StartImmediateProcessing(
-      device_conditions, base::Bind(&OnPushRequestsDone, j_callback_ref));
+      base::Bind(&OnPushRequestsDone, j_callback_ref));
 }
 
 void OfflinePageEvaluationBridge::SavePageLater(
diff --git a/chrome/browser/chromeos/arc/arc_service_launcher.cc b/chrome/browser/chromeos/arc/arc_service_launcher.cc
index a20b4d7..9ee38514 100644
--- a/chrome/browser/chromeos/arc/arc_service_launcher.cc
+++ b/chrome/browser/chromeos/arc/arc_service_launcher.cc
@@ -116,8 +116,7 @@
   arc_service_manager_->AddService(
       base::MakeUnique<ArcImeService>(arc_bridge_service));
   arc_service_manager_->AddService(base::MakeUnique<ArcIntentHelperBridge>(
-      arc_bridge_service, arc_service_manager_->icon_loader(),
-      arc_service_manager_->activity_resolver()));
+      arc_bridge_service, arc_service_manager_->activity_resolver()));
   arc_service_manager_->AddService(
       base::MakeUnique<ArcMetricsService>(arc_bridge_service));
   arc_service_manager_->AddService(
diff --git a/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc b/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
index 9161bbbbd..741c93af 100644
--- a/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
+++ b/chrome/browser/chromeos/arc/arc_session_manager_browsertest.cc
@@ -25,7 +25,6 @@
 #include "chrome/browser/profiles/profile.h"
 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
 #include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
-#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
 #include "chrome/common/pref_names.h"
 #include "chrome/test/base/in_process_browser_test.h"
 #include "chrome/test/base/testing_profile.h"
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc b/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc
index 21a2c15..bb134cf 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_external_protocol_dialog.cc
@@ -15,7 +15,6 @@
 #include "chrome/browser/ui/browser_dialogs.h"
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_service_manager.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
 #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "components/arc/intent_helper/page_transition_util.h"
 #include "content/public/browser/browser_context.h"
@@ -48,12 +47,6 @@
   new ExternalProtocolDialog(web_contents, url);
 }
 
-scoped_refptr<ActivityIconLoader> GetIconLoader() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  ArcServiceManager* arc_service_manager = ArcServiceManager::Get();
-  return arc_service_manager ? arc_service_manager->icon_loader() : nullptr;
-}
-
 void CloseTabIfNeeded(int render_process_host_id, int routing_id) {
   WebContents* web_contents =
       tab_util::GetWebContentsByID(render_process_host_id, routing_id);
@@ -332,15 +325,15 @@
     int routing_id,
     const GURL& url,
     std::vector<mojom::IntentHandlerInfoPtr> handlers,
-    std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons) {
+    std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
   using AppInfo = ArcNavigationThrottle::AppInfo;
   std::vector<AppInfo> app_info;
 
   for (const auto& handler : handlers) {
-    const ActivityIconLoader::ActivityName activity(handler->package_name,
-                                                    handler->activity_name);
+    const ArcIntentHelperBridge::ActivityName activity(handler->package_name,
+                                                       handler->activity_name);
     const auto it = icons->find(activity);
     app_info.emplace_back(
         AppInfo(it != icons->end() ? it->second.icon20 : gfx::Image(),
@@ -372,9 +365,9 @@
 
   auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
       arc_service_manager->arc_bridge_service()->intent_helper(), HandleUrl);
-  scoped_refptr<ActivityIconLoader> icon_loader = GetIconLoader();
-
-  if (!instance || !icon_loader) {
+  auto* intent_helper_bridge =
+      ArcServiceManager::GetGlobalService<ArcIntentHelperBridge>();
+  if (!instance || !intent_helper_bridge) {
     // ARC is not running anymore. Show the Chrome OS dialog.
     ShowFallbackExternalProtocolDialog(render_process_host_id, routing_id, url);
     return;
@@ -401,11 +394,11 @@
     std::swap(handlers[indices.first], handlers[indices.second]);
 
   // Then request the icons.
-  std::vector<ActivityIconLoader::ActivityName> activities;
+  std::vector<ArcIntentHelperBridge::ActivityName> activities;
   for (const auto& handler : handlers) {
     activities.emplace_back(handler->package_name, handler->activity_name);
   }
-  icon_loader->GetActivityIcons(
+  intent_helper_bridge->GetActivityIcons(
       activities, base::Bind(OnAppIconsReceived, render_process_host_id,
                              routing_id, url, base::Passed(&handlers)));
 }
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
index e009095..fbe3db0 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.cc
@@ -27,12 +27,6 @@
 
 namespace {
 
-scoped_refptr<ActivityIconLoader> GetIconLoader() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  ArcServiceManager* arc_service_manager = ArcServiceManager::Get();
-  return arc_service_manager ? arc_service_manager->icon_loader() : nullptr;
-}
-
 // Compares the host name of the referrer and target URL to decide whether
 // the navigation needs to be overriden.
 bool ShouldOverrideUrlLoading(const GURL& previous_url,
@@ -247,16 +241,17 @@
   if (IsSwapElementsNeeded(handlers, &indices))
     std::swap(handlers[indices.first], handlers[indices.second]);
 
-  scoped_refptr<ActivityIconLoader> icon_loader = GetIconLoader();
-  if (!icon_loader) {
-    LOG(ERROR) << "Cannot get an instance of ActivityIconLoader";
+  auto* intent_helper_bridge =
+      ArcServiceManager::GetGlobalService<ArcIntentHelperBridge>();
+  if (!intent_helper_bridge) {
+    LOG(ERROR) << "Cannot get an instance of ArcIntentHelperBridge";
     navigation_handle()->Resume();
     return;
   }
-  std::vector<ActivityIconLoader::ActivityName> activities;
+  std::vector<ArcIntentHelperBridge::ActivityName> activities;
   for (const auto& handler : handlers)
     activities.emplace_back(handler->package_name, handler->activity_name);
-  icon_loader->GetActivityIcons(
+  intent_helper_bridge->GetActivityIcons(
       activities,
       base::Bind(&ArcNavigationThrottle::OnAppIconsReceived,
                  weak_ptr_factory_.GetWeakPtr(), base::Passed(&handlers)));
@@ -264,14 +259,14 @@
 
 void ArcNavigationThrottle::OnAppIconsReceived(
     std::vector<mojom::IntentHandlerInfoPtr> handlers,
-    std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons) {
+    std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   std::vector<AppInfo> app_info;
 
   for (const auto& handler : handlers) {
     gfx::Image icon;
-    const ActivityIconLoader::ActivityName activity(handler->package_name,
-                                                    handler->activity_name);
+    const ArcIntentHelperBridge::ActivityName activity(handler->package_name,
+                                                       handler->activity_name);
     const auto it = icons->find(activity);
 
     app_info.emplace_back(
diff --git a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
index b2cdee6..8bf5268 100644
--- a/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
+++ b/chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h
@@ -13,7 +13,7 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "content/public/browser/navigation_throttle.h"
 #include "ui/gfx/image/image.h"
 #include "url/gurl.h"
@@ -113,7 +113,7 @@
       std::vector<mojom::IntentHandlerInfoPtr> handlers);
   void OnAppIconsReceived(
       std::vector<mojom::IntentHandlerInfoPtr> handlers,
-      std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons);
+      std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons);
   void OnIntentPickerClosed(std::vector<mojom::IntentHandlerInfoPtr> handlers,
                             const std::string& selected_app_package,
                             CloseReason close_reason);
diff --git a/chrome/browser/chromeos/extensions/file_manager/event_router.cc b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
index 61bf079..61726a1 100644
--- a/chrome/browser/chromeos/extensions/file_manager/event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/event_router.cc
@@ -39,6 +39,7 @@
 #include "chromeos/login/login_state.h"
 #include "chromeos/network/network_handler.h"
 #include "chromeos/network/network_state_handler.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "components/drive/chromeos/file_system_interface.h"
 #include "components/drive/drive_pref_names.h"
 #include "components/drive/file_change.h"
diff --git a/chrome/browser/chromeos/file_manager/arc_file_tasks.cc b/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
index 6ab612ee..d6027e8 100644
--- a/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
+++ b/chrome/browser/chromeos/file_manager/arc_file_tasks.cc
@@ -20,7 +20,6 @@
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_service_manager.h"
 #include "components/arc/common/intent_helper.mojom.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
 #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "components/arc/intent_helper/intent_constants.h"
 #include "content/public/browser/browser_thread.h"
@@ -35,16 +34,6 @@
 
 constexpr char kAppIdSeparator = '/';
 
-// Returns the icon loader that wraps the Mojo interface for ARC Intent Helper.
-scoped_refptr<arc::ActivityIconLoader> GetArcActivityIconLoader() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-
-  arc::ArcServiceManager* arc_service_manager = arc::ArcServiceManager::Get();
-  if (!arc_service_manager)
-    return nullptr;
-  return arc_service_manager->icon_loader();
-}
-
 // Converts an Android intent action (see kIntentAction* in
 // components/arc/intent_helper/intent_constants.h) to a file task action ID
 // (see chrome/browser/chromeos/file_manager/file_tasks.h).
@@ -102,7 +91,7 @@
     std::unique_ptr<std::vector<FullTaskDescriptor>> result_list,
     const FindTasksCallback& callback,
     std::vector<arc::mojom::IntentHandlerInfoPtr> handlers,
-    std::unique_ptr<arc::ActivityIconLoader::ActivityToIconsMap> icons);
+    std::unique_ptr<arc::ArcIntentHelperBridge::ActivityToIconsMap> icons);
 
 // Called after the handlers from ARC is obtained. Proceeds to OnArcIconLoaded.
 void OnArcHandlerList(
@@ -111,20 +100,20 @@
     std::vector<arc::mojom::IntentHandlerInfoPtr> handlers) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
-  scoped_refptr<arc::ActivityIconLoader> icon_loader =
-      GetArcActivityIconLoader();
-  if (!icon_loader) {
+  auto* intent_helper_bridge =
+      arc::ArcServiceManager::GetGlobalService<arc::ArcIntentHelperBridge>();
+  if (!intent_helper_bridge) {
     callback.Run(std::move(result_list));
     return;
   }
 
   std::vector<arc::mojom::IntentHandlerInfoPtr> handlers_filtered =
       arc::ArcIntentHelperBridge::FilterOutIntentHelper(std::move(handlers));
-  std::vector<arc::ActivityIconLoader::ActivityName> activity_names;
+  std::vector<arc::ArcIntentHelperBridge::ActivityName> activity_names;
   for (const arc::mojom::IntentHandlerInfoPtr& handler : handlers_filtered)
     activity_names.emplace_back(handler->package_name, handler->activity_name);
 
-  icon_loader->GetActivityIcons(
+  intent_helper_bridge->GetActivityIcons(
       activity_names, base::Bind(&OnArcIconLoaded, base::Passed(&result_list),
                                  callback, base::Passed(&handlers_filtered)));
 }
@@ -134,7 +123,7 @@
     std::unique_ptr<std::vector<FullTaskDescriptor>> result_list,
     const FindTasksCallback& callback,
     std::vector<arc::mojom::IntentHandlerInfoPtr> handlers,
-    std::unique_ptr<arc::ActivityIconLoader::ActivityToIconsMap> icons) {
+    std::unique_ptr<arc::ArcIntentHelperBridge::ActivityToIconsMap> icons) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
   using extensions::api::file_manager_private::Verb;
@@ -148,7 +137,7 @@
         action == arc::kIntentActionSendMultiple) {
       handler_verb = Verb::VERB_SHARE_WITH;
     }
-    auto it = icons->find(arc::ActivityIconLoader::ActivityName(
+    auto it = icons->find(arc::ArcIntentHelperBridge::ActivityName(
         handler->package_name, handler->activity_name));
     const GURL& icon_url =
         (it == icons->end() ? GURL::EmptyGURL()
diff --git a/chrome/browser/chromeos/login/session/user_session_manager.cc b/chrome/browser/chromeos/login/session/user_session_manager.cc
index 1d52c50..61c3de9 100644
--- a/chrome/browser/chromeos/login/session/user_session_manager.cc
+++ b/chrome/browser/chromeos/login/session/user_session_manager.cc
@@ -76,7 +76,6 @@
 #include "chrome/browser/supervised_user/child_accounts/child_account_service_factory.h"
 #include "chrome/browser/ui/app_list/app_list_service.h"
 #include "chrome/browser/ui/ash/ash_util.h"
-#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
 #include "chrome/browser/ui/startup/startup_browser_creator.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/common/logging_chrome.h"
diff --git a/chrome/browser/notifications/message_center_notification_manager.cc b/chrome/browser/notifications/message_center_notification_manager.cc
index 72dd5dd6..bf036d6 100644
--- a/chrome/browser/notifications/message_center_notification_manager.cc
+++ b/chrome/browser/notifications/message_center_notification_manager.cc
@@ -34,7 +34,6 @@
 
 #if defined(OS_CHROMEOS)
 #include "chrome/browser/notifications/login_state_notification_blocker_chromeos.h"
-#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
 #endif
 
 #if defined(USE_ASH)
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index 57affc5f..2483791 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -202,7 +202,6 @@
 #include "chrome/browser/chromeos/system/timezone_resolver_manager.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/ui/ash/chrome_screenshot_grabber.h"
-#include "chrome/browser/ui/ash/multi_user/multi_user_util.h"
 #include "chromeos/audio/cras_audio_handler.h"
 #include "chromeos/chromeos_switches.h"
 #include "chromeos/cryptohome/cryptohome_parameters.h"
diff --git a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.html b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.html
index ace9d40..d5412c5d 100644
--- a/chrome/browser/resources/settings/about_page/about_page_browser_proxy.html
+++ b/chrome/browser/resources/settings/about_page/about_page_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/about_page/about_page_browser_proxy.js"></script>
+<script src="about_page_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.html b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.html
index d95f5e7..a2d5ed6 100644
--- a/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.html
+++ b/chrome/browser/resources/settings/android_apps_page/android_apps_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/android_apps_page/android_apps_browser_proxy.js"></script>
+<script src="android_apps_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/animation/animation.html b/chrome/browser/resources/settings/animation/animation.html
index ecff82f..f35052f 100644
--- a/chrome/browser/resources/settings/animation/animation.html
+++ b/chrome/browser/resources/settings/animation/animation.html
@@ -1,3 +1,3 @@
 <link rel="import" href="chrome://resources/html/cr.html">
 <link rel="import" href="chrome://resources/html/cr/event_target.html">
-<script src="/animation/animation.js"></script>
+<script src="animation.js"></script>
diff --git a/chrome/browser/resources/settings/animation/animation_group.html b/chrome/browser/resources/settings/animation/animation_group.html
index d2ee19ed..ba28c97a 100644
--- a/chrome/browser/resources/settings/animation/animation_group.html
+++ b/chrome/browser/resources/settings/animation/animation_group.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/animation/animation_group.js"></script>
+<script src="animation_group.js"></script>
diff --git a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.html b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.html
index b7dd3eff..9f8635bc 100644
--- a/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.html
+++ b/chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.html
@@ -1,3 +1,3 @@
 <link rel="href" src="chrome://resources/html/cr.html">
 <link rel="href" src="chrome://resources/html/load_time_data.html">
-<script src="/appearance_page/appearance_browser_proxy.js"></script>
+<script src="appearance_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.html b/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.html
index ddc01b73..9af65285 100644
--- a/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.html
+++ b/chrome/browser/resources/settings/appearance_page/fonts_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="href" src="chrome://resources/html/cr.html">
-<script src="/appearance_page/fonts_browser_proxy.js"></script>
+<script src="fonts_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
index 80a33f7e..b4a00c2 100644
--- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
+++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_dialog.html
@@ -172,5 +172,5 @@
       </div>
     </dialog>
   </template>
-  <script src="/bluetooth_page/bluetooth_device_dialog.js"></script>
+  <script src="bluetooth_device_dialog.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificate_manager_types.html b/chrome/browser/resources/settings/certificate_manager_page/certificate_manager_types.html
index 3ba4f12..271b266 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificate_manager_types.html
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificate_manager_types.html
@@ -1 +1 @@
-<script src="/certificate_manager_page/certificate_manager_types.js"></script>
+<script src="certificate_manager_types.js"></script>
diff --git a/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.html b/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.html
index 31592479..0dc7c57 100644
--- a/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.html
+++ b/chrome/browser/resources/settings/certificate_manager_page/certificates_browser_proxy.html
@@ -1 +1 @@
-<script src="/certificate_manager_page/certificates_browser_proxy.js"></script>
+<script src="certificates_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.html b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.html
index 637d6ab2..03eb050 100644
--- a/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.html
+++ b/chrome/browser/resources/settings/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/clear_browsing_data_dialog/clear_browsing_data_browser_proxy.js"></script>
+<script src="clear_browsing_data_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/controls/controlled_button.html b/chrome/browser/resources/settings/controls/controlled_button.html
index d9df92a..3f13f70 100644
--- a/chrome/browser/resources/settings/controls/controlled_button.html
+++ b/chrome/browser/resources/settings/controls/controlled_button.html
@@ -49,5 +49,5 @@
     </template>
 
   </template>
-  <script src="/controls/controlled_button.js"></script>
+  <script src="controlled_button.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/controls/controlled_radio_button.html b/chrome/browser/resources/settings/controls/controlled_radio_button.html
index b96b8fb..6440dd85 100644
--- a/chrome/browser/resources/settings/controls/controlled_radio_button.html
+++ b/chrome/browser/resources/settings/controls/controlled_radio_button.html
@@ -43,5 +43,5 @@
     </template>
 
   </template>
-  <script src="/controls/controlled_radio_button.js"></script>
+  <script src="controlled_radio_button.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/controls/extension_controlled_indicator.html b/chrome/browser/resources/settings/controls/extension_controlled_indicator.html
index cb96ae2..e67aee5f 100644
--- a/chrome/browser/resources/settings/controls/extension_controlled_indicator.html
+++ b/chrome/browser/resources/settings/controls/extension_controlled_indicator.html
@@ -35,4 +35,4 @@
   </template>
 </dom-module>
 
-<script src="/controls/extension_controlled_indicator.js"></script>
+<script src="extension_controlled_indicator.js"></script>
diff --git a/chrome/browser/resources/settings/date_time_page/date_time_page.html b/chrome/browser/resources/settings/date_time_page/date_time_page.html
index 185df7e..d5862c7 100644
--- a/chrome/browser/resources/settings/date_time_page/date_time_page.html
+++ b/chrome/browser/resources/settings/date_time_page/date_time_page.html
@@ -54,5 +54,5 @@
       <button class="subpage-arrow" is="paper-icon-button-light"></button>
     </div>
   </template>
-  <script src="/date_time_page/date_time_page.js"></script>
+  <script src="date_time_page.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.html b/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.html
index 34f42e9..ae0ae417 100644
--- a/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.html
+++ b/chrome/browser/resources/settings/default_browser_page/default_browser_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/default_browser_page/default_browser_browser_proxy.js"></script>
+<script src="default_browser_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.html b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.html
index 49746ad..b375f99e 100644
--- a/chrome/browser/resources/settings/device_page/device_page_browser_proxy.html
+++ b/chrome/browser/resources/settings/device_page/device_page_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/device_page/device_page_browser_proxy.js"></script>
+<script src="device_page_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/device_page/drive_cache_dialog.html b/chrome/browser/resources/settings/device_page/drive_cache_dialog.html
index b8f0f8e..ea6e9c6 100644
--- a/chrome/browser/resources/settings/device_page/drive_cache_dialog.html
+++ b/chrome/browser/resources/settings/device_page/drive_cache_dialog.html
@@ -24,5 +24,5 @@
       </div>
     </dialog>
   </template>
-  <script src="/device_page/drive_cache_dialog.js"></script>
+  <script src="drive_cache_dialog.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/device_page/storage.html b/chrome/browser/resources/settings/device_page/storage.html
index 26acedc..8da9432 100644
--- a/chrome/browser/resources/settings/device_page/storage.html
+++ b/chrome/browser/resources/settings/device_page/storage.html
@@ -216,5 +216,5 @@
     <settings-drive-cache-dialog id="storageDriveCache">
     </settings-drive-cache-dialog>
   </template>
-  <script src="/device_page/storage.js"></script>
+  <script src="storage.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/direction_delegate.html b/chrome/browser/resources/settings/direction_delegate.html
index 4722b8d..a1bbafa9 100644
--- a/chrome/browser/resources/settings/direction_delegate.html
+++ b/chrome/browser/resources/settings/direction_delegate.html
@@ -1,4 +1,4 @@
 <link rel="import" href="/i18n_setup.html">
 <link rel="import" href="chrome://resources/html/assert.html">
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/direction_delegate.js"></script>
+<script src="direction_delegate.js"></script>
diff --git a/chrome/browser/resources/settings/extension_control_browser_proxy.html b/chrome/browser/resources/settings/extension_control_browser_proxy.html
index 1135be5..4578d45 100644
--- a/chrome/browser/resources/settings/extension_control_browser_proxy.html
+++ b/chrome/browser/resources/settings/extension_control_browser_proxy.html
@@ -1,3 +1,3 @@
 <link rel="import" href="chrome://resources/html/assert.html">
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/extension_control_browser_proxy.js"></script>
+<script src="extension_control_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/languages_page/languages.html b/chrome/browser/resources/settings/languages_page/languages.html
index e61809c..1b86236 100644
--- a/chrome/browser/resources/settings/languages_page/languages.html
+++ b/chrome/browser/resources/settings/languages_page/languages.html
@@ -4,4 +4,4 @@
 <link rel="import" href="chrome://resources/html/promise_resolver.html">
 <link rel="import" href="/prefs/prefs.html">
 <link rel="import" href="/prefs/prefs_behavior.html">
-<script src="/languages_page/languages.js"></script>
+<script src="languages.js"></script>
diff --git a/chrome/browser/resources/settings/lifetime_browser_proxy.html b/chrome/browser/resources/settings/lifetime_browser_proxy.html
index 5d571d93..8cccd328 100644
--- a/chrome/browser/resources/settings/lifetime_browser_proxy.html
+++ b/chrome/browser/resources/settings/lifetime_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/lifetime_browser_proxy.js"></script>
+<script src="lifetime_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.html b/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.html
index f30b3b1..2ea2bbd 100644
--- a/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.html
+++ b/chrome/browser/resources/settings/on_startup_page/on_startup_browser_proxy.html
@@ -1,3 +1,3 @@
 <link rel="import" href="chrome://resources/html/assert.html">
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/on_startup_page/on_startup_browser_proxy.js"></script>
+<script src="on_startup_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.html b/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.html
index 61cadd1..73c53f0 100644
--- a/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.html
+++ b/chrome/browser/resources/settings/on_startup_page/startup_urls_page_browser_proxy.html
@@ -1,4 +1,4 @@
 <link rel="href" src="chrome://resources/html/assert.html">
 <link rel="href" src="chrome://resources/html/cr.html">
 <link rel="href" src="chrome://resources/html/promise_resolver.html">
-<script src="/on_startup_page/startup_urls_page_browser_proxy.js"></script>
+<script src="startup_urls_page_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
index 204a016..5d74ca8 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
@@ -119,5 +119,5 @@
       </div>
     </dialog>
   </template>
-  <script src="/passwords_and_forms_page/address_edit_dialog.js"></script>
+  <script src="address_edit_dialog.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html
index 275186eb..a12e153 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/autofill_section.html
@@ -162,5 +162,5 @@
       </settings-credit-card-edit-dialog>
     </template>
   </template>
-  <script src="/passwords_and_forms_page/autofill_section.js"></script>
+  <script src="autofill_section.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/credit_card_edit_dialog.html b/chrome/browser/resources/settings/passwords_and_forms_page/credit_card_edit_dialog.html
index fabfee03..cae4a0a 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/credit_card_edit_dialog.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/credit_card_edit_dialog.html
@@ -89,5 +89,5 @@
       </div>
     </dialog>
   </template>
-  <script src="/passwords_and_forms_page/credit_card_edit_dialog.js"></script>
+  <script src="credit_card_edit_dialog.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
index 0042f80..da01a95 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/password_edit_dialog.html
@@ -48,5 +48,5 @@
       </div>
     </dialog>
   </template>
-  <script src="/passwords_and_forms_page/password_edit_dialog.js"></script>
+  <script src="password_edit_dialog.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.html b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.html
index b22bead..2e1d3e2e 100644
--- a/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.html
+++ b/chrome/browser/resources/settings/passwords_and_forms_page/passwords_section.html
@@ -149,5 +149,5 @@
       </div>
     </div>
   </template>
-  <script src="/passwords_and_forms_page/passwords_section.js"></script>
+  <script src="passwords_section.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.html b/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.html
index 530bde6..6a983e4 100644
--- a/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.html
+++ b/chrome/browser/resources/settings/people_page/change_picture_browser_proxy.html
@@ -1 +1 @@
-<script src="/people_page/change_picture_browser_proxy.js"></script>
+<script src="change_picture_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.html b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.html
index d8522d3..cd7138a 100644
--- a/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.html
+++ b/chrome/browser/resources/settings/people_page/easy_unlock_browser_proxy.html
@@ -1 +1 @@
-<script src="/people_page/easy_unlock_browser_proxy.js"></script>
+<script src="easy_unlock_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/people_page/import_data_browser_proxy.html b/chrome/browser/resources/settings/people_page/import_data_browser_proxy.html
index 32b9190..d49dd93b 100644
--- a/chrome/browser/resources/settings/people_page/import_data_browser_proxy.html
+++ b/chrome/browser/resources/settings/people_page/import_data_browser_proxy.html
@@ -1 +1 @@
-<script src="/people_page/import_data_browser_proxy.js"></script>
+<script src="import_data_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/people_page/lock_screen_constants.html b/chrome/browser/resources/settings/people_page/lock_screen_constants.html
index 5992c0c..19addb1 100644
--- a/chrome/browser/resources/settings/people_page/lock_screen_constants.html
+++ b/chrome/browser/resources/settings/people_page/lock_screen_constants.html
@@ -1 +1 @@
-<script src="/people_page/lock_screen_constants.js"></script>
+<script src="lock_screen_constants.js"></script>
diff --git a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.html b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.html
index b1f9a8c..6e30760 100644
--- a/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.html
+++ b/chrome/browser/resources/settings/people_page/manage_profile_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/people_page/manage_profile_browser_proxy.js"></script>
+<script src="manage_profile_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.html b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.html
index d5d8a6c2..76290dd 100644
--- a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.html
+++ b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/people_page/profile_info_browser_proxy.js"></script>
+<script src="profile_info_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/people_page/sync_browser_proxy.html b/chrome/browser/resources/settings/people_page/sync_browser_proxy.html
index 5953327e..53d2f4e 100644
--- a/chrome/browser/resources/settings/people_page/sync_browser_proxy.html
+++ b/chrome/browser/resources/settings/people_page/sync_browser_proxy.html
@@ -1,3 +1,3 @@
 <link rel="import" href="/i18n_setup.html">
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/people_page/sync_browser_proxy.js"></script>
+<script src="sync_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.html b/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.html
index 1423729..0c0f54f 100644
--- a/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.html
+++ b/chrome/browser/resources/settings/printing_page/cups_printers_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/printing_page/cups_printers_browser_proxy.js"></script>
+<script src="cups_printers_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.html b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.html
index 433ba81..f8934ce 100644
--- a/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.html
+++ b/chrome/browser/resources/settings/privacy_page/privacy_page_browser_proxy.html
@@ -1,3 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/privacy_page/privacy_page_browser_proxy.js">
-</script>
+<script src="privacy_page_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.html b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.html
index 1909a45..e34f0cf 100644
--- a/chrome/browser/resources/settings/reset_page/reset_browser_proxy.html
+++ b/chrome/browser/resources/settings/reset_page/reset_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/reset_page/reset_browser_proxy.js"></script>
+<script src="reset_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/reset_page/reset_page.html b/chrome/browser/resources/settings/reset_page/reset_page.html
index 2333b12..0038e583 100644
--- a/chrome/browser/resources/settings/reset_page/reset_page.html
+++ b/chrome/browser/resources/settings/reset_page/reset_page.html
@@ -40,5 +40,5 @@
     </template>
 </if>
   </template>
-  <script src="/reset_page/reset_page.js"></script>
+  <script src="reset_page.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.html b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.html
index f1eb0be0..89d04364 100644
--- a/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.html
+++ b/chrome/browser/resources/settings/search_engines_page/search_engines_browser_proxy.html
@@ -1 +1 @@
-<script src="/search_engines_page/search_engines_browser_proxy.js"></script>
+<script src="search_engines_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/settings_main/settings_main.html b/chrome/browser/resources/settings/settings_main/settings_main.html
index 3023de7..e462724 100644
--- a/chrome/browser/resources/settings/settings_main/settings_main.html
+++ b/chrome/browser/resources/settings/settings_main/settings_main.html
@@ -48,5 +48,5 @@
     <div id="overscroll" style="padding-bottom: [[overscroll_]]px"></div>
   </template>
   <script src="settings_main.js"></script>
-  <script src="/search_settings.js"></script>
+  <script src="../search_settings.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/settings_page/main_page_behavior.html b/chrome/browser/resources/settings/settings_page/main_page_behavior.html
index 77db2c1..97b3a549 100644
--- a/chrome/browser/resources/settings/settings_page/main_page_behavior.html
+++ b/chrome/browser/resources/settings/settings_page/main_page_behavior.html
@@ -1,4 +1,4 @@
 <link rel="import" href="chrome://resources/html/assert.html">
 <link rel="import" href="chrome://resources/html/polymer.html">
 <link rel="import" href="/route.html">
-<script src="/settings_page/main_page_behavior.js"></script>
+<script src="main_page_behavior.js"></script>
diff --git a/chrome/browser/resources/settings/site_settings/constants.html b/chrome/browser/resources/settings/site_settings/constants.html
index c954998..f6c8603 100644
--- a/chrome/browser/resources/settings/site_settings/constants.html
+++ b/chrome/browser/resources/settings/site_settings/constants.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/site_settings/constants.js"></script>
+<script src="constants.js"></script>
diff --git a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.html b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.html
index d0506db..945c6eb 100644
--- a/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.html
+++ b/chrome/browser/resources/settings/site_settings/site_settings_prefs_browser_proxy.html
@@ -1 +1 @@
-<script src="/site_settings/site_settings_prefs_browser_proxy.js"></script>
+<script src="site_settings_prefs_browser_proxy.js"></script>
diff --git a/chrome/browser/resources/settings/site_settings/website_usage_private_api.html b/chrome/browser/resources/settings/site_settings/website_usage_private_api.html
index 82fd5d45..4590df8 100644
--- a/chrome/browser/resources/settings/site_settings/website_usage_private_api.html
+++ b/chrome/browser/resources/settings/site_settings/website_usage_private_api.html
@@ -1,3 +1,3 @@
 <link rel="import" href="chrome://resources/html/cr.html">
 <link rel="import" href="chrome://resources/html/polymer.html">
-<script src="/site_settings/website_usage_private_api.js"></script>
+<script src="website_usage_private_api.js"></script>
diff --git a/chrome/browser/resources/settings/system_page/system_page.html b/chrome/browser/resources/settings/system_page/system_page.html
index 7018147..65faa371 100644
--- a/chrome/browser/resources/settings/system_page/system_page.html
+++ b/chrome/browser/resources/settings/system_page/system_page.html
@@ -48,5 +48,5 @@
       </div>
     </template>
   </template>
-  <script src="/system_page/system_page.js"></script>
+  <script src="system_page.js"></script>
 </dom-module>
diff --git a/chrome/browser/resources/settings/system_page/system_page_browser_proxy.html b/chrome/browser/resources/settings/system_page/system_page_browser_proxy.html
index 93f5869f..47d587f 100644
--- a/chrome/browser/resources/settings/system_page/system_page_browser_proxy.html
+++ b/chrome/browser/resources/settings/system_page/system_page_browser_proxy.html
@@ -1,2 +1,2 @@
 <link rel="import" href="chrome://resources/html/cr.html">
-<script src="/system_page/system_page_browser_proxy.js"></script>
+<script src="system_page_browser_proxy.js"></script>
diff --git a/chrome/browser/search_engines/template_url_service_android.cc b/chrome/browser/search_engines/template_url_service_android.cc
index bccd8d7..a5b5b39 100644
--- a/chrome/browser/search_engines/template_url_service_android.cc
+++ b/chrome/browser/search_engines/template_url_service_android.cc
@@ -301,7 +301,8 @@
       base::android::ConvertJavaStringToUTF16(env, jkeyword);
   TemplateURL* template_url =
       template_url_service_->GetTemplateURLForKeyword(keyword);
-  CHECK(template_url) << "Failed to find template URL for keyword: " << keyword;
+  if (!template_url)
+    return base::android::ScopedJavaLocalRef<jstring>(env, nullptr);
   std::string url(template_url->url_ref().ReplaceSearchTerms(
       TemplateURLRef::SearchTermsArgs(base::ASCIIToUTF16("query")),
       template_url_service_->search_terms_data()));
diff --git a/chrome/browser/task_manager/providers/arc/arc_process_task.cc b/chrome/browser/task_manager/providers/arc/arc_process_task.cc
index 6b32713..13070da 100644
--- a/chrome/browser/task_manager/providers/arc/arc_process_task.cc
+++ b/chrome/browser/task_manager/providers/arc/arc_process_task.cc
@@ -12,6 +12,7 @@
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_service_manager.h"
 #include "components/arc/common/process.mojom.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/common/child_process_host.h"
 #include "ui/base/l10n/l10n_util.h"
@@ -49,14 +50,6 @@
   return title;
 }
 
-scoped_refptr<arc::ActivityIconLoader> GetIconLoader() {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  arc::ArcServiceManager* arc_service_manager = arc::ArcServiceManager::Get();
-  if (!arc_service_manager)
-    return nullptr;
-  return arc_service_manager->icon_loader();
-}
-
 // An activity name for retrieving the package's default icon without
 // specifying an activity name.
 constexpr char kEmptyActivityName[] = "";
@@ -88,22 +81,23 @@
 void ArcProcessTask::StartIconLoading() {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
 
-  scoped_refptr<arc::ActivityIconLoader> icon_loader = GetIconLoader();
-  arc::ActivityIconLoader::GetResult result =
-      arc::ActivityIconLoader::GetResult::FAILED_ARC_NOT_READY;
-  if (icon_loader) {
+  auto* intent_helper_bridge =
+      arc::ArcServiceManager::GetGlobalService<arc::ArcIntentHelperBridge>();
+  arc::ArcIntentHelperBridge::GetResult result =
+      arc::ArcIntentHelperBridge::GetResult::FAILED_ARC_NOT_READY;
+  if (intent_helper_bridge) {
     // In some case, the package_name_ does not exists, it would be expected to
     // get default process icon. For example, daemon processes in android
     // container such like surfaceflinger, debuggerd or installd. Each of them
     // would be shown on task manager but does not have a package name.
-    std::vector<arc::ActivityIconLoader::ActivityName> activities = {
+    std::vector<arc::ArcIntentHelperBridge::ActivityName> activities = {
         {package_name_, kEmptyActivityName}};
-    result = icon_loader->GetActivityIcons(
+    result = intent_helper_bridge->GetActivityIcons(
         activities, base::Bind(&ArcProcessTask::OnIconLoaded,
                                weak_ptr_factory_.GetWeakPtr()));
   }
 
-  if (result == arc::ActivityIconLoader::GetResult::FAILED_ARC_NOT_READY) {
+  if (result == arc::ArcIntentHelperBridge::GetResult::FAILED_ARC_NOT_READY) {
     // Need to retry loading the icon.
     arc::ArcServiceManager::Get()
         ->arc_bridge_service()
@@ -158,7 +152,7 @@
 
   // Instead of calling into StartIconLoading() directly, return to the main
   // loop first to make sure other ArcBridgeService observers are notified.
-  // Otherwise, arc::ActivityIconLoader::GetActivityIcon() may fail again.
+  // Otherwise, arc::ArcIntentHelperBridge::GetActivityIcon() may fail again.
   content::BrowserThread::PostTask(content::BrowserThread::UI, FROM_HERE,
                                    base::Bind(&ArcProcessTask::StartIconLoading,
                                               weak_ptr_factory_.GetWeakPtr()));
@@ -169,7 +163,7 @@
 }
 
 void ArcProcessTask::OnIconLoaded(
-    std::unique_ptr<arc::ActivityIconLoader::ActivityToIconsMap> icons) {
+    std::unique_ptr<arc::ArcIntentHelperBridge::ActivityToIconsMap> icons) {
   DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
   for (const auto& kv : *icons) {
     const gfx::Image& icon = kv.second.icon16;
diff --git a/chrome/browser/task_manager/providers/arc/arc_process_task.h b/chrome/browser/task_manager/providers/arc/arc_process_task.h
index 85d86ab1b..07fb354 100644
--- a/chrome/browser/task_manager/providers/arc/arc_process_task.h
+++ b/chrome/browser/task_manager/providers/arc/arc_process_task.h
@@ -15,7 +15,7 @@
 #include "components/arc/common/intent_helper.mojom.h"
 #include "components/arc/common/process.mojom.h"
 #include "components/arc/instance_holder.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 
 namespace task_manager {
 
@@ -48,7 +48,7 @@
  private:
   void StartIconLoading();
   void OnIconLoaded(
-      std::unique_ptr<arc::ActivityIconLoader::ActivityToIconsMap> icons);
+      std::unique_ptr<arc::ArcIntentHelperBridge::ActivityToIconsMap> icons);
 
   const base::ProcessId nspid_;
   const std::string process_name_;
diff --git a/chrome/browser/ui/BUILD.gn b/chrome/browser/ui/BUILD.gn
index 8c4e1f7..eb01d3f57 100644
--- a/chrome/browser/ui/BUILD.gn
+++ b/chrome/browser/ui/BUILD.gn
@@ -1894,6 +1894,8 @@
         "views/translate/translate_icon_view.h",
         "views/validation_message_bubble_view.cc",
         "views/validation_message_bubble_view.h",
+        "views/webshare/webshare_target_picker_view.cc",
+        "views/webshare/webshare_target_picker_view.h",
         "views/website_settings/chooser_bubble_ui_view.cc",
         "views/website_settings/chooser_bubble_ui_view.h",
         "views/website_settings/permission_prompt_impl_views.cc",
diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h
index 66d37aa..2cdf3e1 100644
--- a/chrome/browser/ui/browser_dialogs.h
+++ b/chrome/browser/ui/browser_dialogs.h
@@ -12,6 +12,7 @@
 #include "base/callback.h"
 #include "build/build_config.h"
 #include "chrome/browser/ui/bookmarks/bookmark_editor.h"
+#include "chrome/browser/webshare/share_service_impl.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/native_widget_types.h"
 
@@ -157,6 +158,15 @@
 payments::PaymentRequestDialog* CreatePaymentRequestDialog(
     payments::PaymentRequest* request);
 
+// Shows the dialog to choose a share target app. |targets| is a list of app
+// titles that will be shown in a list. Calls |callback| with SHARE if an app
+// was chosen, or CANCEL if the dialog was cancelled.
+// TODO(mgiuca): Callback should provide info about the picked app.
+void ShowWebShareTargetPickerDialog(
+    gfx::NativeWindow parent_window,
+    const std::vector<base::string16>& targets,
+    const base::Callback<void(SharePickerResult)>& callback);
+
 #if defined(OS_MACOSX)
 
 // This is a class so that it can be friended from ContentSettingBubbleContents,
diff --git a/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc b/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
new file mode 100644
index 0000000..05ed1c26
--- /dev/null
+++ b/chrome/browser/ui/views/webshare/webshare_target_picker_view.cc
@@ -0,0 +1,108 @@
+// Copyright 2017 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 "chrome/browser/ui/views/webshare/webshare_target_picker_view.h"
+
+#include "chrome/grit/generated_resources.h"
+#include "components/constrained_window/constrained_window_views.h"
+#include "ui/base/l10n/l10n_util.h"
+#include "ui/gfx/native_widget_types.h"
+#include "ui/views/controls/label.h"
+#include "ui/views/controls/table/table_view.h"
+#include "ui/views/layout/box_layout.h"
+#include "ui/views/layout/layout_constants.h"
+
+namespace {
+
+int kDialogWidth = 500;
+int kDialogHeight = 400;
+
+}  // namespace
+
+namespace chrome {
+
+void ShowWebShareTargetPickerDialog(
+    gfx::NativeWindow parent_window,
+    const std::vector<base::string16>& targets,
+    const base::Callback<void(SharePickerResult)>& callback) {
+  constrained_window::CreateBrowserModalDialogViews(
+      new WebShareTargetPickerView(targets, callback), parent_window)
+      ->Show();
+}
+
+}  // namespace chrome
+
+WebShareTargetPickerView::WebShareTargetPickerView(
+    const std::vector<base::string16>& targets,
+    const base::Callback<void(SharePickerResult)>& close_callback)
+    : targets_(targets), close_callback_(close_callback) {
+  views::BoxLayout* layout = new views::BoxLayout(
+      views::BoxLayout::kVertical, views::kPanelHorizMargin,
+      views::kPanelVertMargin, views::kRelatedControlVerticalSpacing);
+  SetLayoutManager(layout);
+
+  views::Label* overview_label = new views::Label(
+      l10n_util::GetStringUTF16(IDS_WEBSHARE_TARGET_PICKER_LABEL));
+  AddChildView(overview_label);
+
+  std::vector<ui::TableColumn> table_columns{ui::TableColumn()};
+  views::TableView* table =
+      new views::TableView(this, table_columns, views::TEXT_ONLY, true);
+  // Select the first row.
+  if (RowCount() > 0)
+    table->Select(0);
+
+  // Create the table parent (a ScrollView which includes the scroll bars and
+  // border). We add this parent (not the table itself) to the dialog.
+  views::View* table_parent = table->CreateParentIfNecessary();
+  AddChildView(table_parent);
+  // Make the table expand to fill the space.
+  layout->SetFlexForView(table_parent, 1);
+}
+
+WebShareTargetPickerView::~WebShareTargetPickerView() {}
+
+gfx::Size WebShareTargetPickerView::GetPreferredSize() const {
+  return gfx::Size(kDialogWidth, kDialogHeight);
+}
+
+ui::ModalType WebShareTargetPickerView::GetModalType() const {
+  return ui::MODAL_TYPE_WINDOW;
+}
+
+base::string16 WebShareTargetPickerView::GetWindowTitle() const {
+  return l10n_util::GetStringUTF16(IDS_WEBSHARE_TARGET_PICKER_TITLE);
+}
+
+bool WebShareTargetPickerView::Cancel() {
+  if (!close_callback_.is_null())
+    close_callback_.Run(SharePickerResult::CANCEL);
+
+  return true;
+}
+
+bool WebShareTargetPickerView::Accept() {
+  if (!close_callback_.is_null())
+    close_callback_.Run(SharePickerResult::SHARE);
+
+  return true;
+}
+
+base::string16 WebShareTargetPickerView::GetDialogButtonLabel(
+    ui::DialogButton button) const {
+  if (button == ui::DIALOG_BUTTON_OK)
+    return l10n_util::GetStringUTF16(IDS_WEBSHARE_TARGET_PICKER_COMMIT);
+
+  return views::DialogDelegateView::GetDialogButtonLabel(button);
+}
+
+int WebShareTargetPickerView::RowCount() {
+  return targets_.size();
+}
+
+base::string16 WebShareTargetPickerView::GetText(int row, int /*column_id*/) {
+  return targets_[row];
+}
+
+void WebShareTargetPickerView::SetObserver(ui::TableModelObserver* observer) {}
diff --git a/chrome/browser/ui/views/webshare/webshare_target_picker_view.h b/chrome/browser/ui/views/webshare/webshare_target_picker_view.h
new file mode 100644
index 0000000..324955eb
--- /dev/null
+++ b/chrome/browser/ui/views/webshare/webshare_target_picker_view.h
@@ -0,0 +1,60 @@
+// Copyright 2017 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.
+
+#ifndef CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_
+#define CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_
+
+#include <vector>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "base/strings/string16.h"
+#include "chrome/browser/ui/browser_dialogs.h"
+#include "ui/base/models/table_model.h"
+#include "ui/base/ui_base_types.h"
+#include "ui/views/window/dialog_delegate.h"
+
+// Dialog that presents the user with a list of share target apps. Allows the
+// user to pick one target to be opened and have data passed to it.
+//
+// NOTE: This dialog has *not* been UI-reviewed, and is being used by an
+// in-development feature (Web Share) behind a runtime flag. It should not be
+// used by any released code until going through UI review.
+class WebShareTargetPickerView : public views::DialogDelegateView,
+                                 public ui::TableModel {
+ public:
+  // |targets| is a list of app titles that will be shown in a list. Calls
+  // |close_callback| with SHARE if an app was chosen, or CANCEL if the dialog
+  // was cancelled.
+  WebShareTargetPickerView(
+      const std::vector<base::string16>& targets,
+      const base::Callback<void(SharePickerResult)>& close_callback);
+  ~WebShareTargetPickerView() override;
+
+  // views::View overrides:
+  gfx::Size GetPreferredSize() const override;
+
+  // views::WidgetDelegate overrides:
+  ui::ModalType GetModalType() const override;
+  base::string16 GetWindowTitle() const override;
+
+  // views::DialogDelegate overrides:
+  bool Cancel() override;
+  bool Accept() override;
+  base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
+
+  // ui::TableModel overrides:
+  int RowCount() override;
+  base::string16 GetText(int row, int column_id) override;
+  void SetObserver(ui::TableModelObserver* observer) override;
+
+ private:
+  const std::vector<base::string16> targets_;
+
+  base::Callback<void(SharePickerResult)> close_callback_;
+
+  DISALLOW_COPY_AND_ASSIGN(WebShareTargetPickerView);
+};
+
+#endif  // CHROME_BROWSER_UI_VIEWS_WEBSHARE_WEBSHARE_TARGET_PICKER_VIEW_H_
diff --git a/chrome/browser/webshare/share_service_impl.cc b/chrome/browser/webshare/share_service_impl.cc
index 6b12400..051bb65 100644
--- a/chrome/browser/webshare/share_service_impl.cc
+++ b/chrome/browser/webshare/share_service_impl.cc
@@ -9,8 +9,10 @@
 #include <utility>
 
 #include "base/strings/string_util.h"
+#include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/browser_dialogs.h"
 #include "chrome/browser/ui/browser_list.h"
 #include "chrome/browser/ui/browser_tabstrip.h"
 #include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -111,6 +113,18 @@
   return true;
 }
 
+void ShareServiceImpl::ShowPickerDialog(
+    const std::vector<base::string16>& targets,
+    const base::Callback<void(SharePickerResult)>& callback) {
+  // TODO(mgiuca): Get the browser window as |parent_window|.
+#if defined(OS_LINUX) || defined(OS_WIN)
+  chrome::ShowWebShareTargetPickerDialog(nullptr /* parent_window */, targets,
+                                         callback);
+#else
+  callback.Run(SharePickerResult::CANCEL);
+#endif
+}
+
 void ShareServiceImpl::OpenTargetURL(const GURL& target_url) {
 // TODO(constantina): Prevent this code from being run/compiled in android.
 #if defined(OS_LINUX) || defined(OS_WIN)
@@ -124,6 +138,25 @@
                              const std::string& text,
                              const GURL& share_url,
                              const ShareCallback& callback) {
+  // TODO(constantina): Replace hard-coded name with the registered target list.
+  constexpr char kTargetName[] = "Web Share Target Test App";
+  std::vector<base::string16> targets{base::ASCIIToUTF16(kTargetName)};
+
+  ShowPickerDialog(targets, base::Bind(&ShareServiceImpl::OnPickerClosed,
+                                       base::Unretained(this), title, text,
+                                       share_url, callback));
+}
+
+void ShareServiceImpl::OnPickerClosed(const std::string& title,
+                                      const std::string& text,
+                                      const GURL& share_url,
+                                      const ShareCallback& callback,
+                                      SharePickerResult result) {
+  if (result == SharePickerResult::CANCEL) {
+    callback.Run(base::Optional<std::string>("Share was cancelled"));
+    return;
+  }
+
   // TODO(constantina): replace hard-coded URL with one from user-chosen site.
   constexpr char kUrlBase[] = "https://wicg.github.io/web-share-target/";
   constexpr char kUrlTemplate[] =
diff --git a/chrome/browser/webshare/share_service_impl.h b/chrome/browser/webshare/share_service_impl.h
index 8bd381f7..bcc2a55 100644
--- a/chrome/browser/webshare/share_service_impl.h
+++ b/chrome/browser/webshare/share_service_impl.h
@@ -8,11 +8,17 @@
 #include <string>
 
 #include "base/gtest_prod_util.h"
+#include "base/strings/string16.h"
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "third_party/WebKit/public/platform/modules/webshare/webshare.mojom.h"
 
 class GURL;
 
+enum class SharePickerResult {
+  CANCEL,
+  SHARE
+};
+
 // Desktop implementation of the ShareService Mojo service.
 class ShareServiceImpl : public blink::mojom::ShareService {
  public:
@@ -30,6 +36,13 @@
  private:
   FRIEND_TEST_ALL_PREFIXES(ShareServiceImplUnittest, ReplacePlaceholders);
 
+  // Shows the share picker dialog with |targets| as the list of applications
+  // presented to the user. Passes the result to |callback|. Virtual for
+  // testing.
+  virtual void ShowPickerDialog(
+      const std::vector<base::string16>& targets,
+      const base::Callback<void(SharePickerResult)>& callback);
+
   // Opens a new tab and navigates to |target_url|.
   // Virtual for testing purposes.
   virtual void OpenTargetURL(const GURL& target_url);
@@ -48,6 +61,12 @@
                                   const GURL& share_url,
                                   std::string* url_template_filled);
 
+  void OnPickerClosed(const std::string& title,
+                      const std::string& text,
+                      const GURL& share_url,
+                      const ShareCallback& callback,
+                      SharePickerResult result);
+
   DISALLOW_COPY_AND_ASSIGN(ShareServiceImpl);
 };
 
diff --git a/chrome/browser/webshare/share_service_impl_unittest.cc b/chrome/browser/webshare/share_service_impl_unittest.cc
index aba1777..0e6eaf56 100644
--- a/chrome/browser/webshare/share_service_impl_unittest.cc
+++ b/chrome/browser/webshare/share_service_impl_unittest.cc
@@ -32,11 +32,22 @@
     return share_service_helper_raw;
   }
 
+  void set_picker_result(SharePickerResult result) {
+    picker_result_ = result;
+  }
+
   const std::string& GetLastUsedTargetURL() { return last_used_target_url_; }
 
  private:
+  SharePickerResult picker_result_ = SharePickerResult::SHARE;
   std::string last_used_target_url_;
 
+  void ShowPickerDialog(
+      const std::vector<base::string16>& targets,
+      const base::Callback<void(SharePickerResult)>& callback) override {
+    callback.Run(picker_result_);
+  }
+
   void OpenTargetURL(const GURL& target_url) override {
     last_used_target_url_ = target_url.spec();
   }
@@ -95,6 +106,26 @@
   run_loop.Run();
 }
 
+// Tests the result of cancelling the share in the picker UI.
+TEST_F(ShareServiceImplUnittest, ShareCancel) {
+  // Ask that the dialog be cancelled.
+  share_service_helper_->set_picker_result(SharePickerResult::CANCEL);
+
+  // Expect an error message in response.
+  base::Callback<void(const base::Optional<std::string>&)> callback =
+      base::Bind(&ShareServiceImplUnittest::DidShare, base::Unretained(this),
+                 std::string(),
+                 base::Optional<std::string>("Share was cancelled"));
+
+  base::RunLoop run_loop;
+  on_callback_ = run_loop.QuitClosure();
+
+  const GURL url(kUrlSpec);
+  share_service_->Share(kTitle, kText, url, callback);
+
+  run_loop.Run();
+}
+
 // Replace various numbers of placeholders in various orders. Placeholders are
 // adjacent to eachother; there are no padding characters.
 TEST_F(ShareServiceImplUnittest, ReplacePlaceholders) {
diff --git a/chrome/test/media_router/resources/common.js b/chrome/test/media_router/resources/common.js
index 3f61ae4..d7f4241 100644
--- a/chrome/test/media_router/resources/common.js
+++ b/chrome/test/media_router/resources/common.js
@@ -71,18 +71,7 @@
       } else {
         // set the new session
         startedConnection = session;
-        console.log('connection state is "' + startedConnection.state + '"');
-        if (startedConnection.state == "connected") {
-          sendResult(true, '');
-        } else if (startedConnection.state == "connecting") {
-          startedConnection.onconnect = () => {
-            sendResult(true, '');
-          };
-        } else {
-          sendResult(false,
-            'Expect connection state to be "connecting" or "connected", ' +
-            'actual "' + startedConnection.state + '"');
-        }
+        waitForConnectedStateAndSendResult(startedConnection);
       }
     }).catch(function(e) {
       // terminate old session if exists
@@ -93,6 +82,26 @@
 }
 
 /**
+ * Asserts the current state of the connection is 'connected' or 'connecting'.
+ * If the current state is connecting, waits for it to become 'connected'.
+ * @param {!PresentationConnection} connection
+ */
+function waitForConnectedStateAndSendResult(connection) {
+  console.log(`connection state is "${connection.state}"`);
+  if (connection.state == 'connected') {
+    sendResult(true, '');
+  } else if (connection.state == 'connecting') {
+    connection.onconnect = () => {
+      sendResult(true, '');
+    };
+  } else {
+    sendResult(false,
+      `Expect connection state to be "connecting" or "connected", actual: \
+      "${connection.state}"`);
+  }
+}
+
+/**
  * Checks the start() request fails with expected error and message substring.
  * @param {!string} expectedErrorName
  * @param {!string} expectedErrorMessageSubstring
@@ -184,7 +193,7 @@
       sendResult(false, 'reconnectSession returned null session');
     } else {
       reconnectedSession = session;
-      sendResult(true, '');
+      waitForConnectedStateAndSendResult(reconnectedSession);
     }
   }).catch(function(error) {
     sendResult(false, 'reconnectSession failed: ' + error.message);
diff --git a/components/arc/arc_service_manager.cc b/components/arc/arc_service_manager.cc
index 00177619..a9585bd3 100644
--- a/components/arc/arc_service_manager.cc
+++ b/components/arc/arc_service_manager.cc
@@ -24,7 +24,6 @@
     scoped_refptr<base::TaskRunner> blocking_task_runner)
     : blocking_task_runner_(blocking_task_runner),
       arc_bridge_service_(base::MakeUnique<ArcBridgeService>()),
-      icon_loader_(new ActivityIconLoader()),
       activity_resolver_(new LocalActivityResolver()) {
   DCHECK(!g_arc_service_manager);
   g_arc_service_manager = this;
@@ -79,7 +78,6 @@
 
 void ArcServiceManager::Shutdown() {
   DCHECK(thread_checker_.CalledOnValidThread());
-  icon_loader_ = nullptr;
   activity_resolver_ = nullptr;
   services_.clear();
 }
diff --git a/components/arc/arc_service_manager.h b/components/arc/arc_service_manager.h
index 31d2b23..7d540a0c 100644
--- a/components/arc/arc_service_manager.h
+++ b/components/arc/arc_service_manager.h
@@ -16,13 +16,12 @@
 #include "base/memory/ref_counted.h"
 #include "base/task_runner.h"
 #include "base/threading/thread_checker.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
+#include "components/arc/arc_service.h"
 #include "components/arc/intent_helper/local_activity_resolver.h"
 
 namespace arc {
 
 class ArcBridgeService;
-class ArcService;
 
 namespace internal {
 
@@ -107,9 +106,6 @@
     return blocking_task_runner_;
   }
 
-  // Returns the icon loader owned by ArcServiceManager and shared by services.
-  scoped_refptr<ActivityIconLoader> icon_loader() { return icon_loader_; }
-
   // Returns the activity resolver owned by ArcServiceManager.
   scoped_refptr<LocalActivityResolver> activity_resolver() {
     return activity_resolver_;
@@ -128,7 +124,6 @@
 
   std::unique_ptr<ArcBridgeService> arc_bridge_service_;
   std::unordered_multimap<std::string, std::unique_ptr<ArcService>> services_;
-  scoped_refptr<ActivityIconLoader> icon_loader_;
   scoped_refptr<LocalActivityResolver> activity_resolver_;
 
   DISALLOW_COPY_AND_ASSIGN(ArcServiceManager);
diff --git a/components/arc/intent_helper/activity_icon_loader.cc b/components/arc/intent_helper/activity_icon_loader.cc
index 715b6bd8..0424872 100644
--- a/components/arc/intent_helper/activity_icon_loader.cc
+++ b/components/arc/intent_helper/activity_icon_loader.cc
@@ -12,14 +12,17 @@
 #include "base/base64.h"
 #include "base/bind.h"
 #include "base/memory/ptr_util.h"
+#include "base/memory/ref_counted.h"
 #include "base/task_runner_util.h"
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_service_manager.h"
+#include "components/arc/arc_util.h"
 #include "ui/base/layout.h"
 #include "ui/gfx/image/image_skia.h"
 #include "ui/gfx/image/image_skia_operations.h"
 
 namespace arc {
+namespace internal {
 
 namespace {
 
@@ -36,148 +39,49 @@
 
 // Returns an instance for calling RequestActivityIcons().
 mojom::IntentHelperInstance* GetInstanceForRequestActivityIcons(
-    ArcIntentHelperBridge::GetResult* out_error_code) {
-  if (!ArcIntentHelperBridge::IsIntentHelperAvailable(out_error_code))
+    ActivityIconLoader::GetResult* out_error_code) {
+  auto* arc_service_manager = ArcServiceManager::Get();
+  if (!arc_service_manager) {
+    // TODO(hidehiko): IsArcAvailable() looks not the condition to be checked
+    // here, because ArcServiceManager instance is created regardless of ARC
+    // availability. This happens only before MessageLoop starts or after
+    // MessageLoop stops, practically.
+    // Also, returning FAILED_ARC_NOT_READY looks problematic at the moment,
+    // because ArcProcessTask::StartIconLoading accesses to
+    // ArcServiceManager::Get() return value, which can be nullptr.
+    if (!IsArcAvailable()) {
+      VLOG(2) << "ARC bridge is not supported.";
+      if (out_error_code) {
+        *out_error_code =
+            ActivityIconLoader::GetResult::FAILED_ARC_NOT_SUPPORTED;
+      }
+    } else {
+      VLOG(2) << "ARC bridge is not ready.";
+      if (out_error_code)
+        *out_error_code = ActivityIconLoader::GetResult::FAILED_ARC_NOT_READY;
+    }
     return nullptr;
-  auto* instance = ARC_GET_INSTANCE_FOR_METHOD(
-      ArcServiceManager::Get()->arc_bridge_service()->intent_helper(),
-      RequestActivityIcons);
-  if (!instance && out_error_code) {
-    *out_error_code =
-        ArcIntentHelperBridge::GetResult::FAILED_ARC_NOT_SUPPORTED;
   }
+
+  auto* intent_helper_holder =
+      arc_service_manager->arc_bridge_service()->intent_helper();
+  if (!intent_helper_holder->has_instance()) {
+    VLOG(2) << "ARC intent helper instance is not ready.";
+    if (out_error_code)
+      *out_error_code = ActivityIconLoader::GetResult::FAILED_ARC_NOT_READY;
+    return nullptr;
+  }
+
+  auto* instance = ARC_GET_INSTANCE_FOR_METHOD(intent_helper_holder,
+                                               RequestActivityIcons);
+  if (!instance && out_error_code)
+    *out_error_code = ActivityIconLoader::GetResult::FAILED_ARC_NOT_SUPPORTED;
   return instance;
 }
 
-}  // namespace
-
-ActivityIconLoader::Icons::Icons(
-    const gfx::Image& icon16,
-    const gfx::Image& icon20,
-    const scoped_refptr<base::RefCountedData<GURL>>& icon16_dataurl)
-    : icon16(icon16), icon20(icon20), icon16_dataurl(icon16_dataurl) {}
-
-ActivityIconLoader::Icons::Icons(const Icons& other) = default;
-
-ActivityIconLoader::Icons::~Icons() = default;
-
-ActivityIconLoader::ActivityName::ActivityName(const std::string& package_name,
-                                               const std::string& activity_name)
-    : package_name(package_name), activity_name(activity_name) {}
-
-bool ActivityIconLoader::ActivityName::operator<(
-    const ActivityName& other) const {
-  return std::tie(package_name, activity_name) <
-         std::tie(other.package_name, other.activity_name);
-}
-
-ActivityIconLoader::ActivityIconLoader()
-    : scale_factor_(GetSupportedScaleFactor()) {}
-
-ActivityIconLoader::~ActivityIconLoader() {}
-
-void ActivityIconLoader::InvalidateIcons(const std::string& package_name) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  for (auto it = cached_icons_.begin(); it != cached_icons_.end();) {
-    if (it->first.package_name == package_name)
-      it = cached_icons_.erase(it);
-    else
-      ++it;
-  }
-}
-
-ActivityIconLoader::GetResult ActivityIconLoader::GetActivityIcons(
-    const std::vector<ActivityName>& activities,
-    const OnIconsReadyCallback& cb) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  std::unique_ptr<ActivityToIconsMap> result(new ActivityToIconsMap);
-  std::vector<mojom::ActivityNamePtr> activities_to_fetch;
-
-  for (const auto& activity : activities) {
-    const auto& it = cached_icons_.find(activity);
-    if (it == cached_icons_.end()) {
-      mojom::ActivityNamePtr name(mojom::ActivityName::New());
-      name->package_name = activity.package_name;
-      name->activity_name = activity.activity_name;
-      activities_to_fetch.push_back(std::move(name));
-    } else {
-      result->insert(std::make_pair(activity, it->second));
-    }
-  }
-
-  if (activities_to_fetch.empty()) {
-    // If there's nothing to fetch, run the callback now.
-    cb.Run(std::move(result));
-    return GetResult::SUCCEEDED_SYNC;
-  }
-
-  ArcIntentHelperBridge::GetResult error_code;
-  auto* instance = GetInstanceForRequestActivityIcons(&error_code);
-  if (!instance) {
-    // The mojo channel is not yet ready (or not supported at all). Run the
-    // callback with |result| that could be empty.
-    cb.Run(std::move(result));
-    switch (error_code) {
-      case ArcIntentHelperBridge::GetResult::FAILED_ARC_NOT_READY:
-        return GetResult(GetResult::FAILED_ARC_NOT_READY);
-      case ArcIntentHelperBridge::GetResult::FAILED_ARC_NOT_SUPPORTED:
-        return GetResult(GetResult::FAILED_ARC_NOT_SUPPORTED);
-    }
-    NOTREACHED();
-  }
-
-  // Fetch icons from ARC.
-  instance->RequestActivityIcons(
-      std::move(activities_to_fetch), mojom::ScaleFactor(scale_factor_),
-      base::Bind(&ActivityIconLoader::OnIconsReady, this, base::Passed(&result),
-                 cb));
-  return GetResult::SUCCEEDED_ASYNC;
-}
-
-void ActivityIconLoader::OnIconsResizedForTesting(
-    const OnIconsReadyCallback& cb,
-    std::unique_ptr<ActivityToIconsMap> result) {
-  OnIconsResized(base::MakeUnique<ActivityToIconsMap>(), cb, std::move(result));
-}
-
-void ActivityIconLoader::AddCacheEntryForTesting(const ActivityName& activity) {
-  cached_icons_.insert(
-      std::make_pair(activity, Icons(gfx::Image(), gfx::Image(), nullptr)));
-}
-
-// static
-bool ActivityIconLoader::HasIconsReadyCallbackRun(GetResult result) {
-  switch (result) {
-    case GetResult::SUCCEEDED_ASYNC:
-      return false;
-    case GetResult::SUCCEEDED_SYNC:
-    case GetResult::FAILED_ARC_NOT_READY:
-    case GetResult::FAILED_ARC_NOT_SUPPORTED:
-      break;
-  }
-  return true;
-}
-
-void ActivityIconLoader::OnIconsReady(
-    std::unique_ptr<ActivityToIconsMap> cached_result,
-    const OnIconsReadyCallback& cb,
+std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> ResizeAndEncodeIcons(
     std::vector<mojom::ActivityIconPtr> icons) {
-  DCHECK(thread_checker_.CalledOnValidThread());
-  ArcServiceManager* manager = ArcServiceManager::Get();
-  base::PostTaskAndReplyWithResult(
-      manager->blocking_task_runner().get(), FROM_HERE,
-      base::Bind(&ActivityIconLoader::ResizeAndEncodeIcons,
-                 base::Passed(&icons)),
-      base::Bind(&ActivityIconLoader::OnIconsResized, this,
-                 base::Passed(&cached_result), cb));
-}
-
-// static
-std::unique_ptr<ActivityIconLoader::ActivityToIconsMap>
-ActivityIconLoader::ResizeAndEncodeIcons(
-    std::vector<mojom::ActivityIconPtr> icons) {
-  std::unique_ptr<ActivityToIconsMap> result(new ActivityToIconsMap);
-
+  auto result = base::MakeUnique<ActivityIconLoader::ActivityToIconsMap>();
   for (size_t i = 0; i < icons.size(); ++i) {
     static const size_t kBytesPerPixel = 4;
     const mojom::ActivityIconPtr& icon = icons.at(i);
@@ -219,14 +123,132 @@
     const std::string activity_name = icon->activity->activity_name.has_value()
                                           ? (*icon->activity->activity_name)
                                           : std::string();
-    result->insert(std::make_pair(
-        ActivityName(icon->activity->package_name, activity_name),
-        Icons(icon16, icon20, dataurl)));
+    result->insert(
+        std::make_pair(ActivityIconLoader::ActivityName(
+                           icon->activity->package_name, activity_name),
+                       ActivityIconLoader::Icons(icon16, icon20, dataurl)));
   }
 
   return result;
 }
 
+}  // namespace
+
+ActivityIconLoader::Icons::Icons(
+    const gfx::Image& icon16,
+    const gfx::Image& icon20,
+    const scoped_refptr<base::RefCountedData<GURL>>& icon16_dataurl)
+    : icon16(icon16), icon20(icon20), icon16_dataurl(icon16_dataurl) {}
+
+ActivityIconLoader::Icons::Icons(const Icons& other) = default;
+
+ActivityIconLoader::Icons::~Icons() = default;
+
+ActivityIconLoader::ActivityName::ActivityName(const std::string& package_name,
+                                               const std::string& activity_name)
+    : package_name(package_name), activity_name(activity_name) {}
+
+bool ActivityIconLoader::ActivityName::operator<(
+    const ActivityName& other) const {
+  return std::tie(package_name, activity_name) <
+         std::tie(other.package_name, other.activity_name);
+}
+
+ActivityIconLoader::ActivityIconLoader()
+    : scale_factor_(GetSupportedScaleFactor()), weak_ptr_factory_(this) {}
+
+ActivityIconLoader::~ActivityIconLoader() = default;
+
+void ActivityIconLoader::InvalidateIcons(const std::string& package_name) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  for (auto it = cached_icons_.begin(); it != cached_icons_.end();) {
+    if (it->first.package_name == package_name)
+      it = cached_icons_.erase(it);
+    else
+      ++it;
+  }
+}
+
+ActivityIconLoader::GetResult ActivityIconLoader::GetActivityIcons(
+    const std::vector<ActivityName>& activities,
+    const OnIconsReadyCallback& cb) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  std::unique_ptr<ActivityToIconsMap> result(new ActivityToIconsMap);
+  std::vector<mojom::ActivityNamePtr> activities_to_fetch;
+
+  for (const auto& activity : activities) {
+    const auto& it = cached_icons_.find(activity);
+    if (it == cached_icons_.end()) {
+      mojom::ActivityNamePtr name(mojom::ActivityName::New());
+      name->package_name = activity.package_name;
+      name->activity_name = activity.activity_name;
+      activities_to_fetch.push_back(std::move(name));
+    } else {
+      result->insert(std::make_pair(activity, it->second));
+    }
+  }
+
+  if (activities_to_fetch.empty()) {
+    // If there's nothing to fetch, run the callback now.
+    cb.Run(std::move(result));
+    return GetResult::SUCCEEDED_SYNC;
+  }
+
+  GetResult error_code;
+  auto* instance = GetInstanceForRequestActivityIcons(&error_code);
+  if (!instance) {
+    // The mojo channel is not yet ready (or not supported at all). Run the
+    // callback with |result| that could be empty.
+    cb.Run(std::move(result));
+    return error_code;
+  }
+
+  // Fetch icons from ARC.
+  instance->RequestActivityIcons(
+      std::move(activities_to_fetch), mojom::ScaleFactor(scale_factor_),
+      base::Bind(&ActivityIconLoader::OnIconsReady,
+                 weak_ptr_factory_.GetWeakPtr(), base::Passed(&result), cb));
+  return GetResult::SUCCEEDED_ASYNC;
+}
+
+void ActivityIconLoader::OnIconsResizedForTesting(
+    const OnIconsReadyCallback& cb,
+    std::unique_ptr<ActivityToIconsMap> result) {
+  OnIconsResized(base::MakeUnique<ActivityToIconsMap>(), cb, std::move(result));
+}
+
+void ActivityIconLoader::AddCacheEntryForTesting(const ActivityName& activity) {
+  cached_icons_.insert(
+      std::make_pair(activity, Icons(gfx::Image(), gfx::Image(), nullptr)));
+}
+
+// static
+bool ActivityIconLoader::HasIconsReadyCallbackRun(GetResult result) {
+  switch (result) {
+    case GetResult::SUCCEEDED_ASYNC:
+      return false;
+    case GetResult::SUCCEEDED_SYNC:
+    case GetResult::FAILED_ARC_NOT_READY:
+    case GetResult::FAILED_ARC_NOT_SUPPORTED:
+      break;
+  }
+  return true;
+}
+
+void ActivityIconLoader::OnIconsReady(
+    std::unique_ptr<ActivityToIconsMap> cached_result,
+    const OnIconsReadyCallback& cb,
+    std::vector<mojom::ActivityIconPtr> icons) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  ArcServiceManager* manager = ArcServiceManager::Get();
+  base::PostTaskAndReplyWithResult(
+      manager->blocking_task_runner().get(), FROM_HERE,
+      base::Bind(&ResizeAndEncodeIcons, base::Passed(&icons)),
+      base::Bind(&ActivityIconLoader::OnIconsResized,
+                 weak_ptr_factory_.GetWeakPtr(), base::Passed(&cached_result),
+                 cb));
+}
+
 void ActivityIconLoader::OnIconsResized(
     std::unique_ptr<ActivityToIconsMap> cached_result,
     const OnIconsReadyCallback& cb,
@@ -243,4 +265,5 @@
   cb.Run(std::move(result));
 }
 
+}  // namespace internal
 }  // namespace arc
diff --git a/components/arc/intent_helper/activity_icon_loader.h b/components/arc/intent_helper/activity_icon_loader.h
index 58b7892..b182fac 100644
--- a/components/arc/intent_helper/activity_icon_loader.h
+++ b/components/arc/intent_helper/activity_icon_loader.h
@@ -13,18 +13,19 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
+#include "base/memory/weak_ptr.h"
 #include "base/threading/thread_checker.h"
 #include "components/arc/arc_service.h"
 #include "components/arc/common/intent_helper.mojom.h"
-#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "ui/base/layout.h"
 #include "ui/gfx/image/image.h"
 #include "url/gurl.h"
 
 namespace arc {
+namespace internal {
 
 // A class which retrieves an activity icon from ARC.
-class ActivityIconLoader : public base::RefCounted<ActivityIconLoader> {
+class ActivityIconLoader {
  public:
   struct Icons {
     Icons(const gfx::Image& icon16, const gfx::Image& icon20,
@@ -69,6 +70,7 @@
       base::Callback<void(std::unique_ptr<ActivityToIconsMap>)>;
 
   ActivityIconLoader();
+  ~ActivityIconLoader();
 
   // Removes icons associated with |package_name| from the cache.
   void InvalidateIcons(const std::string& package_name);
@@ -92,18 +94,11 @@
   const ActivityToIconsMap& cached_icons_for_testing() { return cached_icons_; }
 
  private:
-  friend class base::RefCounted<ActivityIconLoader>;
-  ~ActivityIconLoader();
-
   // A function called when the mojo IPC returns.
   void OnIconsReady(std::unique_ptr<ActivityToIconsMap> cached_result,
                     const OnIconsReadyCallback& cb,
                     std::vector<mojom::ActivityIconPtr> icons);
 
-  // Resizes and encodes |icons| and returns the results as ActivityToIconsMap.
-  static std::unique_ptr<ActivityToIconsMap> ResizeAndEncodeIcons(
-      std::vector<mojom::ActivityIconPtr> icons);
-
   // A function called when ResizeIcons finishes. Append items in |result| to
   // |cached_icons_|.
   void OnIconsResized(std::unique_ptr<ActivityToIconsMap> cached_result,
@@ -117,9 +112,13 @@
 
   base::ThreadChecker thread_checker_;
 
+  // This must come last to make sure weak pointers are invalidated first.
+  base::WeakPtrFactory<ActivityIconLoader> weak_ptr_factory_;
+
   DISALLOW_COPY_AND_ASSIGN(ActivityIconLoader);
 };
 
+}  // namespace internal
 }  // namespace arc
 
 #endif  // COMPONENTS_ARC_INTENT_HELPER_ACTIVITY_ICON_LOADER_H_
diff --git a/components/arc/intent_helper/activity_icon_loader_unittest.cc b/components/arc/intent_helper/activity_icon_loader_unittest.cc
index 072be80..586897e 100644
--- a/components/arc/intent_helper/activity_icon_loader_unittest.cc
+++ b/components/arc/intent_helper/activity_icon_loader_unittest.cc
@@ -9,11 +9,10 @@
 #include <vector>
 
 #include "base/bind.h"
-#include "base/memory/ref_counted.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 namespace arc {
-
+namespace internal {
 namespace {
 
 void OnIconsReady0(
@@ -48,35 +47,33 @@
                     ActivityIconLoader::ActivityName("p2", "a2")));
 }
 
-}  // namespace
-
 // Tests if InvalidateIcons properly cleans up the cache.
 TEST(ActivityIconLoaderTest, TestInvalidateIcons) {
-  scoped_refptr<ActivityIconLoader> loader(new ActivityIconLoader);
-  loader->AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p0", "a0"));
-  loader->AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p0", "a1"));
-  loader->AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p1", "a0"));
-  EXPECT_EQ(3U, loader->cached_icons_for_testing().size());
+  ActivityIconLoader loader;
+  loader.AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p0", "a0"));
+  loader.AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p0", "a1"));
+  loader.AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p1", "a0"));
+  EXPECT_EQ(3U, loader.cached_icons_for_testing().size());
 
-  loader->InvalidateIcons("p2");  // delete none.
-  EXPECT_EQ(3U, loader->cached_icons_for_testing().size());
+  loader.InvalidateIcons("p2");  // delete none.
+  EXPECT_EQ(3U, loader.cached_icons_for_testing().size());
 
-  loader->InvalidateIcons("p0");  // delete 2 entries.
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().size());
+  loader.InvalidateIcons("p0");  // delete 2 entries.
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().size());
 
-  loader->InvalidateIcons("p2");  // delete none.
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().size());
+  loader.InvalidateIcons("p2");  // delete none.
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().size());
 
-  loader->InvalidateIcons("p1");  // delete 1 entry.
-  EXPECT_EQ(0U, loader->cached_icons_for_testing().size());
+  loader.InvalidateIcons("p1");  // delete 1 entry.
+  EXPECT_EQ(0U, loader.cached_icons_for_testing().size());
 }
 
 // Tests if GetActivityIcons immediately returns cached icons.
 TEST(ActivityIconLoaderTest, TestGetActivityIcons) {
-  scoped_refptr<ActivityIconLoader> loader(new ActivityIconLoader);
-  loader->AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p0", "a0"));
-  loader->AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p1", "a1"));
-  loader->AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p1", "a0"));
+  ActivityIconLoader loader;
+  loader.AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p0", "a0"));
+  loader.AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p1", "a1"));
+  loader.AddCacheEntryForTesting(ActivityIconLoader::ActivityName("p1", "a0"));
 
   // Check that GetActivityIcons() immediately calls OnIconsReady0() with all
   // locally cached icons.
@@ -85,24 +82,23 @@
   activities.emplace_back("p1", "a1");
   activities.emplace_back("p1", "a0");
   EXPECT_EQ(ActivityIconLoader::GetResult::SUCCEEDED_SYNC,
-            loader->GetActivityIcons(activities, base::Bind(&OnIconsReady0)));
+            loader.GetActivityIcons(activities, base::Bind(&OnIconsReady0)));
 
   // Test with different |activities|.
   activities.clear();
   activities.emplace_back("p1", "a1");
   EXPECT_EQ(ActivityIconLoader::GetResult::SUCCEEDED_SYNC,
-            loader->GetActivityIcons(activities, base::Bind(&OnIconsReady1)));
+            loader.GetActivityIcons(activities, base::Bind(&OnIconsReady1)));
   activities.clear();
   EXPECT_EQ(ActivityIconLoader::GetResult::SUCCEEDED_SYNC,
-            loader->GetActivityIcons(activities, base::Bind(&OnIconsReady2)));
+            loader.GetActivityIcons(activities, base::Bind(&OnIconsReady2)));
   activities.emplace_back("p1", "a_unknown");
   EXPECT_EQ(ActivityIconLoader::GetResult::FAILED_ARC_NOT_SUPPORTED,
-            loader->GetActivityIcons(activities, base::Bind(&OnIconsReady2)));
+            loader.GetActivityIcons(activities, base::Bind(&OnIconsReady2)));
 }
 
 // Tests if OnIconsResized updates the cache.
 TEST(ActivityIconLoaderTest, TestOnIconsResized) {
-  scoped_refptr<ActivityIconLoader> loader(new ActivityIconLoader);
   std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> activity_to_icons(
       new ActivityIconLoader::ActivityToIconsMap);
   activity_to_icons->insert(std::make_pair(
@@ -119,15 +115,17 @@
       ActivityIconLoader::ActivityName("p0", "a0"),
       ActivityIconLoader::Icons(gfx::Image(), gfx::Image(), nullptr)));
 
+  ActivityIconLoader loader;
+
   // Call OnIconsResized() and check that the cache is properly updated.
-  loader->OnIconsResizedForTesting(base::Bind(&OnIconsReady0),
-                                   std::move(activity_to_icons));
-  EXPECT_EQ(3U, loader->cached_icons_for_testing().size());
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  loader.OnIconsResizedForTesting(base::Bind(&OnIconsReady0),
+                                  std::move(activity_to_icons));
+  EXPECT_EQ(3U, loader.cached_icons_for_testing().size());
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p0", "a0")));
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p1", "a1")));
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p1", "a0")));
 
   // Call OnIconsResized() again to make sure that the second call does not
@@ -141,17 +139,19 @@
   activity_to_icons->insert(std::make_pair(
       ActivityIconLoader::ActivityName("p2", "a2"),
       ActivityIconLoader::Icons(gfx::Image(), gfx::Image(), nullptr)));
-  loader->OnIconsResizedForTesting(base::Bind(&OnIconsReady3),
-                                   std::move(activity_to_icons));
-  EXPECT_EQ(4U, loader->cached_icons_for_testing().size());
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  loader.OnIconsResizedForTesting(base::Bind(&OnIconsReady3),
+                                  std::move(activity_to_icons));
+  EXPECT_EQ(4U, loader.cached_icons_for_testing().size());
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p0", "a0")));
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p1", "a1")));
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p1", "a0")));
-  EXPECT_EQ(1U, loader->cached_icons_for_testing().count(
+  EXPECT_EQ(1U, loader.cached_icons_for_testing().count(
                     ActivityIconLoader::ActivityName("p2", "a2")));
 }
 
+}  // namespace
+}  // namespace internal
 }  // namespace arc
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge.cc b/components/arc/intent_helper/arc_intent_helper_bridge.cc
index 18a29c3..b012c09 100644
--- a/components/arc/intent_helper/arc_intent_helper_bridge.cc
+++ b/components/arc/intent_helper/arc_intent_helper_bridge.cc
@@ -15,8 +15,6 @@
 #include "base/memory/weak_ptr.h"
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/arc_service_manager.h"
-#include "components/arc/arc_util.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
 #include "components/arc/intent_helper/link_handler_model_impl.h"
 #include "components/arc/intent_helper/local_activity_resolver.h"
 #include "ui/base/layout.h"
@@ -34,11 +32,9 @@
 
 ArcIntentHelperBridge::ArcIntentHelperBridge(
     ArcBridgeService* bridge_service,
-    const scoped_refptr<ActivityIconLoader>& icon_loader,
     const scoped_refptr<LocalActivityResolver>& activity_resolver)
     : ArcService(bridge_service),
       binding_(this),
-      icon_loader_(icon_loader),
       activity_resolver_(activity_resolver) {
   DCHECK(thread_checker_.CalledOnValidThread());
   arc_bridge_service()->intent_helper()->AddObserver(this);
@@ -65,7 +61,7 @@
 
 void ArcIntentHelperBridge::OnIconInvalidated(const std::string& package_name) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  icon_loader_->InvalidateIcons(package_name);
+  icon_loader_.InvalidateIcons(package_name);
 }
 
 void ArcIntentHelperBridge::OnOpenDownloads() {
@@ -93,6 +89,13 @@
   LOG(ERROR) << "IntentHelper.SetWallpaper is deprecated";
 }
 
+ArcIntentHelperBridge::GetResult ArcIntentHelperBridge::GetActivityIcons(
+    const std::vector<ActivityName>& activities,
+    const OnIconsReadyCallback& callback) {
+  DCHECK(thread_checker_.CalledOnValidThread());
+  return icon_loader_.GetActivityIcons(activities, callback);
+}
+
 void ArcIntentHelperBridge::AddObserver(ArcIntentHelperObserver* observer) {
   observer_list_.AddObserver(observer);
 }
@@ -104,8 +107,7 @@
 std::unique_ptr<ash::LinkHandlerModel> ArcIntentHelperBridge::CreateModel(
     const GURL& url) {
   DCHECK(thread_checker_.CalledOnValidThread());
-  std::unique_ptr<LinkHandlerModelImpl> impl(
-      new LinkHandlerModelImpl(icon_loader_));
+  auto impl = base::MakeUnique<LinkHandlerModelImpl>();
   if (!impl->Init(url))
     return nullptr;
   return std::move(impl);
@@ -130,41 +132,6 @@
   return handlers_filtered;
 }
 
-// static
-bool ArcIntentHelperBridge::IsIntentHelperAvailable(GetResult* out_error_code) {
-  auto* arc_service_manager = ArcServiceManager::Get();
-  if (!arc_service_manager) {
-    // TODO(hidehiko): IsArcAvailable() looks not the condition to be checked
-    // here, because ArcServiceManager instance is created regardless of ARC
-    // availability. This happens only before MessageLoop starts or after
-    // MessageLoop stops, practically.
-    // Also, returning FAILED_ARC_NOT_READY looks problematic at the moment,
-    // because ArcProcessTask::StartIconLoading accesses to
-    // ArcServiceManager::Get() return value, which can be nullptr.
-    if (!IsArcAvailable()) {
-      VLOG(2) << "ARC bridge is not supported.";
-      if (out_error_code)
-        *out_error_code = GetResult::FAILED_ARC_NOT_SUPPORTED;
-    } else {
-      VLOG(2) << "ARC bridge is not ready.";
-      if (out_error_code)
-        *out_error_code = GetResult::FAILED_ARC_NOT_READY;
-    }
-    return false;
-  }
-
-  auto* intent_helper_holder =
-      arc_service_manager->arc_bridge_service()->intent_helper();
-  if (!intent_helper_holder->has_instance()) {
-    VLOG(2) << "ARC intent helper instance is not ready.";
-    if (out_error_code)
-      *out_error_code = GetResult::FAILED_ARC_NOT_READY;
-    return false;
-  }
-
-  return true;
-}
-
 void ArcIntentHelperBridge::OnIntentFiltersUpdated(
     std::vector<IntentFilter> filters) {
   DCHECK(thread_checker_.CalledOnValidThread());
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge.h b/components/arc/intent_helper/arc_intent_helper_bridge.h
index 2a3a567..06e58aa 100644
--- a/components/arc/intent_helper/arc_intent_helper_bridge.h
+++ b/components/arc/intent_helper/arc_intent_helper_bridge.h
@@ -17,6 +17,7 @@
 #include "components/arc/arc_service.h"
 #include "components/arc/common/intent_helper.mojom.h"
 #include "components/arc/instance_holder.h"
+#include "components/arc/intent_helper/activity_icon_loader.h"
 #include "components/arc/intent_helper/arc_intent_helper_observer.h"
 #include "mojo/public/cpp/bindings/binding.h"
 
@@ -28,7 +29,6 @@
 
 namespace arc {
 
-class ActivityIconLoader;
 class ArcBridgeService;
 class IntentFilter;
 class LocalActivityResolver;
@@ -40,18 +40,8 @@
       public mojom::IntentHelperHost,
       public ash::LinkHandlerModelFactory {
  public:
-  enum class GetResult {
-    // Failed. The intent_helper instance is not yet ready. This is a temporary
-    // error.
-    FAILED_ARC_NOT_READY,
-    // Failed. Either ARC is not supported at all or intent_helper instance
-    // version is too old.
-    FAILED_ARC_NOT_SUPPORTED,
-  };
-
   ArcIntentHelperBridge(
       ArcBridgeService* bridge_service,
-      const scoped_refptr<ActivityIconLoader>& icon_loader,
       const scoped_refptr<LocalActivityResolver>& activity_resolver);
   ~ArcIntentHelperBridge() override;
 
@@ -71,6 +61,17 @@
   void OpenWallpaperPicker() override;
   void SetWallpaperDeprecated(const std::vector<uint8_t>& jpeg_data) override;
 
+  // Retrieves icons for the |activities| and calls |callback|.
+  // See ActivityIconLoader::GetActivityIcons() for more details.
+  using ActivityName = internal::ActivityIconLoader::ActivityName;
+  // A part of OnIconsReadyCallback signature.
+  using ActivityToIconsMap = internal::ActivityIconLoader::ActivityToIconsMap;
+  using OnIconsReadyCallback =
+      internal::ActivityIconLoader::OnIconsReadyCallback;
+  using GetResult = internal::ActivityIconLoader::GetResult;
+  GetResult GetActivityIcons(const std::vector<ActivityName>& activities,
+                             const OnIconsReadyCallback& callback);
+
   // ash::LinkHandlerModelFactory
   std::unique_ptr<ash::LinkHandlerModel> CreateModel(const GURL& url) override;
 
@@ -82,10 +83,6 @@
   static std::vector<mojom::IntentHandlerInfoPtr> FilterOutIntentHelper(
       std::vector<mojom::IntentHandlerInfoPtr> handlers);
 
-  // Checks if the intent helper interface is available. When it is not, returns
-  // false and updates |out_error_code| if it's not nullptr.
-  static bool IsIntentHelperAvailable(GetResult* out_error_code);
-
   // For supporting ArcServiceManager::GetService<T>().
   static const char kArcServiceName[];
 
@@ -93,7 +90,7 @@
 
  private:
   mojo::Binding<mojom::IntentHelperHost> binding_;
-  scoped_refptr<ActivityIconLoader> icon_loader_;
+  internal::ActivityIconLoader icon_loader_;
   scoped_refptr<LocalActivityResolver> activity_resolver_;
 
   base::ThreadChecker thread_checker_;
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc b/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc
index d849fe0..fd704229 100644
--- a/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc
+++ b/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc
@@ -9,7 +9,6 @@
 #include "base/memory/ptr_util.h"
 #include "components/arc/arc_bridge_service.h"
 #include "components/arc/common/intent_helper.mojom.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
 #include "components/arc/intent_helper/local_activity_resolver.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -23,23 +22,20 @@
 
  protected:
   std::unique_ptr<ArcBridgeService> arc_bridge_service_;
-  scoped_refptr<ActivityIconLoader> icon_loader_;
   scoped_refptr<LocalActivityResolver> activity_resolver_;
   std::unique_ptr<ArcIntentHelperBridge> instance_;
 
  private:
   void SetUp() override {
     arc_bridge_service_ = base::MakeUnique<ArcBridgeService>();
-    icon_loader_ = new ActivityIconLoader();
     activity_resolver_ = new LocalActivityResolver();
     instance_ = base::MakeUnique<ArcIntentHelperBridge>(
-        arc_bridge_service_.get(), icon_loader_, activity_resolver_);
+        arc_bridge_service_.get(), activity_resolver_);
   }
 
   void TearDown() override {
     instance_.reset();
     activity_resolver_ = nullptr;
-    icon_loader_ = nullptr;
     arc_bridge_service_.reset();
   }
 
diff --git a/components/arc/intent_helper/link_handler_model_impl.cc b/components/arc/intent_helper/link_handler_model_impl.cc
index 19485e17..b4c7c7d6 100644
--- a/components/arc/intent_helper/link_handler_model_impl.cc
+++ b/components/arc/intent_helper/link_handler_model_impl.cc
@@ -12,7 +12,6 @@
 #include "components/arc/arc_service_manager.h"
 #include "components/arc/intent_helper/arc_intent_helper_bridge.h"
 #include "components/google/core/browser/google_util.h"
-#include "url/gurl.h"
 #include "url/url_util.h"
 
 namespace arc {
@@ -48,11 +47,9 @@
 
 }  // namespace
 
-LinkHandlerModelImpl::LinkHandlerModelImpl(
-    scoped_refptr<ActivityIconLoader> icon_loader)
-    : icon_loader_(icon_loader), weak_ptr_factory_(this) {}
+LinkHandlerModelImpl::LinkHandlerModelImpl() : weak_ptr_factory_(this) {}
 
-LinkHandlerModelImpl::~LinkHandlerModelImpl() {}
+LinkHandlerModelImpl::~LinkHandlerModelImpl() = default;
 
 bool LinkHandlerModelImpl::Init(const GURL& url) {
   auto* arc_service_manager = ArcServiceManager::Get();
@@ -99,16 +96,20 @@
   handlers_ = ArcIntentHelperBridge::FilterOutIntentHelper(std::move(handlers));
 
   bool icon_info_notified = false;
-  if (icon_loader_) {
-    std::vector<ActivityIconLoader::ActivityName> activities;
+  auto* intent_helper_bridge =
+      ArcServiceManager::GetGlobalService<ArcIntentHelperBridge>();
+  if (intent_helper_bridge) {
+    std::vector<ArcIntentHelperBridge::ActivityName> activities;
     for (size_t i = 0; i < handlers_.size(); ++i) {
       activities.emplace_back(handlers_[i]->package_name,
                               handlers_[i]->activity_name);
     }
-    const ActivityIconLoader::GetResult result = icon_loader_->GetActivityIcons(
-        activities, base::Bind(&LinkHandlerModelImpl::NotifyObserver,
-                               weak_ptr_factory_.GetWeakPtr()));
-    icon_info_notified = ActivityIconLoader::HasIconsReadyCallbackRun(result);
+    const ArcIntentHelperBridge::GetResult result =
+        intent_helper_bridge->GetActivityIcons(
+            activities, base::Bind(&LinkHandlerModelImpl::NotifyObserver,
+                                   weak_ptr_factory_.GetWeakPtr()));
+    icon_info_notified =
+        internal::ActivityIconLoader::HasIconsReadyCallbackRun(result);
   }
 
   if (!icon_info_notified) {
@@ -120,7 +121,7 @@
 }
 
 void LinkHandlerModelImpl::NotifyObserver(
-    std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons) {
+    std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons) {
   if (icons) {
     icons_.insert(icons->begin(), icons->end());
     icons.reset();
@@ -129,7 +130,7 @@
   std::vector<ash::LinkHandlerInfo> handlers;
   for (size_t i = 0; i < handlers_.size(); ++i) {
     gfx::Image icon;
-    const ActivityIconLoader::ActivityName activity(
+    const ArcIntentHelperBridge::ActivityName activity(
         handlers_[i]->package_name, handlers_[i]->activity_name);
     const auto it = icons_.find(activity);
     if (it != icons_.end())
diff --git a/components/arc/intent_helper/link_handler_model_impl.h b/components/arc/intent_helper/link_handler_model_impl.h
index 06d4803..c6613b4 100644
--- a/components/arc/intent_helper/link_handler_model_impl.h
+++ b/components/arc/intent_helper/link_handler_model_impl.h
@@ -9,18 +9,17 @@
 #include <vector>
 
 #include "ash/link_handler_model.h"
-#include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
-#include "components/arc/arc_service.h"
 #include "components/arc/common/intent_helper.mojom.h"
-#include "components/arc/intent_helper/activity_icon_loader.h"
+#include "components/arc/intent_helper/arc_intent_helper_bridge.h"
+#include "url/gurl.h"
 
 namespace arc {
 
 class LinkHandlerModelImpl : public ash::LinkHandlerModel {
  public:
-  explicit LinkHandlerModelImpl(scoped_refptr<ActivityIconLoader> icon_loader);
+  LinkHandlerModelImpl();
   ~LinkHandlerModelImpl() override;
 
   // ash::LinkHandlerModel overrides:
@@ -38,7 +37,7 @@
   mojom::IntentHelperInstance* GetIntentHelper();
   void OnUrlHandlerList(std::vector<mojom::IntentHandlerInfoPtr> handlers);
   void NotifyObserver(
-      std::unique_ptr<ActivityIconLoader::ActivityToIconsMap> icons);
+      std::unique_ptr<ArcIntentHelperBridge::ActivityToIconsMap> icons);
 
   // Checks if the |url| matches the following pattern:
   //   "http(s)://<valid_google_hostname>/url?...&url=<valid_url>&..."
@@ -51,11 +50,7 @@
   // Url handler info passed from ARC.
   std::vector<mojom::IntentHandlerInfoPtr> handlers_;
   // Activity icon info passed from ARC.
-  ActivityIconLoader::ActivityToIconsMap icons_;
-
-  // Use refptr to retain the object even if ArcIntentHelperBridge is destructed
-  // first.
-  scoped_refptr<ActivityIconLoader> icon_loader_;
+  ArcIntentHelperBridge::ActivityToIconsMap icons_;
 
   // Always keep this the last member of this class to make sure it's the
   // first thing to be destructed.
diff --git a/components/offline_pages/core/background/request_coordinator.cc b/components/offline_pages/core/background/request_coordinator.cc
index fb066b6..83a844b09 100644
--- a/components/offline_pages/core/background/request_coordinator.cc
+++ b/components/offline_pages/core/background/request_coordinator.cc
@@ -166,8 +166,7 @@
       is_busy_(false),
       is_starting_(false),
       processing_state_(ProcessingWindowState::STOPPED),
-      use_test_connection_type_(false),
-      test_connection_type_(),
+      use_test_device_conditions_(false),
       offliner_(std::move(offliner)),
       policy_(std::move(policy)),
       queue_(std::move(queue)),
@@ -424,15 +423,6 @@
   ScheduleAsNeeded();
 }
 
-net::NetworkChangeNotifier::ConnectionType
-RequestCoordinator::GetConnectionType() {
-  // If we have a connection type set for test, use that.
-  if (use_test_connection_type_)
-    return test_connection_type_;
-
-  return net::NetworkChangeNotifier::GetConnectionType();
-}
-
 void RequestCoordinator::AddRequestResultCallback(
     RequestAvailability availability,
     AddRequestResult result,
@@ -524,27 +514,28 @@
     const DeviceConditions& device_conditions,
     const base::Callback<void(bool)>& callback) {
   DVLOG(2) << "Scheduled " << __func__;
+  current_conditions_.reset(new DeviceConditions(device_conditions));
   return StartProcessingInternal(ProcessingWindowState::SCHEDULED_WINDOW,
-                                 device_conditions, callback);
+                                 callback);
 }
 
 // Returns true if the caller should expect a callback, false otherwise.
 bool RequestCoordinator::StartImmediateProcessing(
-    const DeviceConditions& device_conditions,
     const base::Callback<void(bool)>& callback) {
+  UpdateCurrentConditionsFromAndroid();
   OfflinerImmediateStartStatus immediate_start_status =
-      TryImmediateStart(device_conditions, callback);
+      TryImmediateStart(callback);
   UMA_HISTOGRAM_ENUMERATION(
       "OfflinePages.Background.ImmediateStartStatus", immediate_start_status,
       RequestCoordinator::OfflinerImmediateStartStatus::STATUS_COUNT);
   return immediate_start_status == OfflinerImmediateStartStatus::STARTED;
 }
 
+// The current_conditions_ must be set sometime before calling
+// StartProcessingInternal on all calling code paths.
 bool RequestCoordinator::StartProcessingInternal(
     const ProcessingWindowState processing_state,
-    const DeviceConditions& device_conditions,
     const base::Callback<void(bool)>& callback) {
-  current_conditions_.reset(new DeviceConditions(device_conditions));
   if (is_starting_ || is_busy_)
     return false;
   processing_state_ = processing_state;
@@ -560,17 +551,11 @@
 }
 
 void RequestCoordinator::StartImmediatelyIfConnected() {
-  // Start processing with manufactured conservative battery conditions
-  // (i.e., assume no battery).
-  // TODO(dougarnett): Obtain actual battery conditions (from Android/Java).
-  DeviceConditions device_conditions(false, 0, GetConnectionType());
-  StartImmediateProcessing(device_conditions,
-                           internal_start_processing_callback_);
+  StartImmediateProcessing(internal_start_processing_callback_);
 }
 
 RequestCoordinator::OfflinerImmediateStartStatus
 RequestCoordinator::TryImmediateStart(
-    const DeviceConditions& device_conditions,
     const base::Callback<void(bool)>& callback) {
   DVLOG(2) << "Immediate " << __func__;
   // Make sure not already busy processing.
@@ -586,7 +571,7 @@
     return OfflinerImmediateStartStatus::NOT_STARTED_ON_SVELTE;
   }
 
-  if (device_conditions.GetNetConnectionType() ==
+  if (current_conditions_->GetNetConnectionType() ==
       net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE) {
     RequestConnectedEventForStarting();
     return OfflinerImmediateStartStatus::NO_CONNECTION;
@@ -597,7 +582,7 @@
   }
 
   if (StartProcessingInternal(ProcessingWindowState::IMMEDIATE_WINDOW,
-                              device_conditions, callback))
+                              callback))
     return OfflinerImmediateStartStatus::STARTED;
   else
     return OfflinerImmediateStartStatus::NOT_ACCEPTED;
@@ -618,8 +603,32 @@
   StartImmediatelyIfConnected();
 }
 
+void RequestCoordinator::UpdateCurrentConditionsFromAndroid() {
+  // If we have already set the connection type for testing, don't get it from
+  // android, but use what the test already set up.
+  if (use_test_device_conditions_)
+    return;
+
+  current_conditions_ = base::MakeUnique<DeviceConditions>(
+      scheduler_->GetCurrentDeviceConditions());
+}
+
 void RequestCoordinator::TryNextRequest(bool is_start_of_processing) {
   is_starting_ = true;
+
+  // If this is the first call, the device conditions are current, no need to
+  // update them.
+  // TODO(petewil): Now that we can get conditions any time, consider getting
+  // them now instead of passing them in earlier when we start scheduled
+  // processing.
+  if (!is_start_of_processing) {
+    // Get current device conditions from the Java side across the bridge.
+    // NetworkChangeNotifier will not have the right conditions if chromium is
+    // in the background in android, so prefer to always get the conditions via
+    // the android APIs.
+    UpdateCurrentConditionsFromAndroid();
+  }
+
   base::TimeDelta processing_time_budget;
   if (processing_state_ == ProcessingWindowState::SCHEDULED_WINDOW) {
     processing_time_budget = base::TimeDelta::FromSeconds(
@@ -630,14 +639,8 @@
         policy_->GetProcessingTimeBudgetForImmediateLoadInSeconds());
   }
 
-  // Determine connection type. If just starting processing, the best source is
-  // from the current device conditions (they are fresh and motivated starting
-  // processing whereas NetworkChangeNotifier may lag reality).
-  net::NetworkChangeNotifier::ConnectionType connection_type;
-  if (is_start_of_processing)
-    connection_type = current_conditions_->GetNetConnectionType();
-  else
-    connection_type = GetConnectionType();
+  net::NetworkChangeNotifier::ConnectionType connection_type =
+      current_conditions_->GetNetConnectionType();
 
   // If there is no network or no time left in the budget, return to the
   // scheduler. We do not remove the pending scheduler task that was set
diff --git a/components/offline_pages/core/background/request_coordinator.h b/components/offline_pages/core/background/request_coordinator.h
index 5f4d931..09606f2e 100644
--- a/components/offline_pages/core/background/request_coordinator.h
+++ b/components/offline_pages/core/background/request_coordinator.h
@@ -116,8 +116,7 @@
   // a callback. If processing was already active or some condition was
   // not suitable for immediate processing (e.g., network or low-end device),
   // returns false.
-  bool StartImmediateProcessing(const DeviceConditions& device_conditions,
-                                const base::Callback<void(bool)>& callback);
+  bool StartImmediateProcessing(const base::Callback<void(bool)>& callback);
 
   // Stops the current request processing if active. This is a way for
   // caller to abort processing; otherwise, processing will complete on
@@ -257,7 +256,6 @@
                              std::unique_ptr<UpdateRequestsResult> result);
 
   bool StartProcessingInternal(const ProcessingWindowState processing_state,
-                               const DeviceConditions& device_conditions,
                                const base::Callback<void(bool)>& callback);
 
   // Start processing now if connected (but with conservative assumption
@@ -265,7 +263,6 @@
   void StartImmediatelyIfConnected();
 
   OfflinerImmediateStartStatus TryImmediateStart(
-      const DeviceConditions& device_conditions,
       const base::Callback<void(bool)>& callback);
 
   // Requests a callback upon the next network connection to start processing.
@@ -332,6 +329,9 @@
   // processing window (vs. continuing within a current processing window).
   void TryNextRequest(bool is_start_of_processing);
 
+  // Cross the JNI Bridge and get the current device conditions from Android.
+  void UpdateCurrentConditionsFromAndroid();
+
   // If there is an active request in the list, cancel that request.
   bool CancelActiveRequestIfItMatches(const std::vector<int64_t>& request_ids);
 
@@ -353,17 +353,8 @@
                        const std::string& name_space,
                        std::unique_ptr<UpdateRequestsResult> result);
 
-  // Method to wrap calls to getting the connection type so it can be
-  // changed for tests.
-  net::NetworkChangeNotifier::ConnectionType GetConnectionType();
-
-  void SetNetworkConditionsForTest(
-      net::NetworkChangeNotifier::ConnectionType connection) {
-    use_test_connection_type_ = true;
-    test_connection_type_ = connection;
-  }
-
   void SetDeviceConditionsForTest(const DeviceConditions& current_conditions) {
+    use_test_device_conditions_ = true;
     current_conditions_.reset(new DeviceConditions(current_conditions));
   }
 
@@ -384,8 +375,9 @@
   bool is_starting_;
   // Identifies the type of current processing window or if processing stopped.
   ProcessingWindowState processing_state_;
-  // True if we should use the test connection type instead of the actual type.
-  bool use_test_connection_type_;
+  // True if we should use the test device conditions instead of actual
+  // conditions.
+  bool use_test_device_conditions_;
   // For use by tests, a fake network connection type
   net::NetworkChangeNotifier::ConnectionType test_connection_type_;
   // Owned pointer to the current offliner.
diff --git a/components/offline_pages/core/background/request_coordinator_unittest.cc b/components/offline_pages/core/background/request_coordinator_unittest.cc
index d277ed3..f5dc20d 100644
--- a/components/offline_pages/core/background/request_coordinator_unittest.cc
+++ b/components/offline_pages/core/background/request_coordinator_unittest.cc
@@ -130,7 +130,7 @@
   void WaitingCallbackFunction(bool result) { waiter_.Signal(); }
 
   net::NetworkChangeNotifier::ConnectionType GetConnectionType() {
-    return coordinator()->GetConnectionType();
+    return coordinator()->current_conditions_->GetNetConnectionType();
   }
 
   // Callback for Add requests.
@@ -171,24 +171,23 @@
     offliner_->enable_callback(enable);
   }
 
-  void SetNetworkConditionsForTest(
-      net::NetworkChangeNotifier::ConnectionType connection) {
-    coordinator()->SetNetworkConditionsForTest(connection);
-  }
-
   void SetEffectiveConnectionTypeForTest(net::EffectiveConnectionType type) {
     network_quality_provider_->SetEffectiveConnectionTypeForTest(type);
   }
 
   void SetNetworkConnected(bool connected) {
     if (connected) {
-      SetNetworkConditionsForTest(
-          net::NetworkChangeNotifier::ConnectionType::CONNECTION_3G);
+      DeviceConditions device_conditions(
+          !kPowerRequired, kBatteryPercentageHigh,
+          net::NetworkChangeNotifier::CONNECTION_3G);
+      SetDeviceConditionsForTest(device_conditions);
       SetEffectiveConnectionTypeForTest(
           net::EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_3G);
     } else {
-      SetNetworkConditionsForTest(
-          net::NetworkChangeNotifier::ConnectionType::CONNECTION_NONE);
+      DeviceConditions device_conditions(
+          !kPowerRequired, kBatteryPercentageHigh,
+          net::NetworkChangeNotifier::CONNECTION_NONE);
+      SetDeviceConditionsForTest(device_conditions);
       SetEffectiveConnectionTypeForTest(
           net::EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_OFFLINE);
     }
@@ -230,6 +229,10 @@
     coordinator()->SetDeviceConditionsForTest(device_conditions);
   }
 
+  DeviceConditions* GetDeviceConditions() {
+    return coordinator()->current_conditions_.get();
+  }
+
   void WaitForCallback() { waiter_.Wait(); }
 
   void AdvanceClockBy(base::TimeDelta delta) {
@@ -450,8 +453,7 @@
 }
 
 TEST_F(RequestCoordinatorTest, StartImmediateProcessingWithNoRequests) {
-  EXPECT_TRUE(coordinator()->StartImmediateProcessing(device_conditions(),
-                                                      processing_callback()));
+  EXPECT_TRUE(coordinator()->StartImmediateProcessing(processing_callback()));
   PumpLoop();
 
   EXPECT_TRUE(processing_callback_called());
@@ -464,8 +466,7 @@
   // Set as low-end device to verfiy immediate processing will not start.
   SetIsLowEndDeviceForTest(true);
 
-  EXPECT_FALSE(coordinator()->StartImmediateProcessing(device_conditions(),
-                                                       processing_callback()));
+  EXPECT_FALSE(coordinator()->StartImmediateProcessing(processing_callback()));
   histograms().ExpectBucketCount("OfflinePages.Background.ImmediateStartStatus",
                                  5 /* NOT_STARTED_ON_SVELTE */, 1);
 }
@@ -474,8 +475,8 @@
   DeviceConditions disconnected_conditions(
       !kPowerRequired, kBatteryPercentageHigh,
       net::NetworkChangeNotifier::CONNECTION_NONE);
-  EXPECT_FALSE(coordinator()->StartImmediateProcessing(disconnected_conditions,
-                                                       processing_callback()));
+  SetDeviceConditionsForTest(disconnected_conditions);
+  EXPECT_FALSE(coordinator()->StartImmediateProcessing(processing_callback()));
   histograms().ExpectBucketCount("OfflinePages.Background.ImmediateStartStatus",
                                  3 /* NO_CONNECTION */, 1);
 }
@@ -491,8 +492,7 @@
   EnableOfflinerCallback(false);
 
   // Sending the request to the offliner should make it busy.
-  EXPECT_TRUE(coordinator()->StartImmediateProcessing(device_conditions(),
-                                                      processing_callback()));
+  EXPECT_TRUE(coordinator()->StartImmediateProcessing(processing_callback()));
   PumpLoop();
 
   EXPECT_TRUE(is_busy());
@@ -500,8 +500,7 @@
   EXPECT_FALSE(processing_callback_called());
 
   // Now trying to start processing should return false since already busy.
-  EXPECT_FALSE(coordinator()->StartImmediateProcessing(device_conditions(),
-                                                       processing_callback()));
+  EXPECT_FALSE(coordinator()->StartImmediateProcessing(processing_callback()));
 
   histograms().ExpectBucketCount("OfflinePages.Background.ImmediateStartStatus",
                                  1 /* BUSY */, 1);
@@ -538,7 +537,7 @@
   EXPECT_EQ(coordinator()
                 ->GetTriggerConditions(last_requests()[0]->user_requested())
                 .minimum_battery_percentage,
-            scheduler_stub->conditions()->minimum_battery_percentage);
+            scheduler_stub->trigger_conditions()->minimum_battery_percentage);
 
   // Check that the observer got the notification that a page is available
   EXPECT_TRUE(observer().added_called());
@@ -590,7 +589,7 @@
   EXPECT_EQ(coordinator()
                 ->GetTriggerConditions(last_requests()[0]->user_requested())
                 .minimum_battery_percentage,
-            scheduler_stub->conditions()->minimum_battery_percentage);
+            scheduler_stub->trigger_conditions()->minimum_battery_percentage);
 
   // Check that the observer got the notification that a page is available
   EXPECT_TRUE(observer().added_called());
@@ -853,7 +852,8 @@
       reinterpret_cast<SchedulerStub*>(coordinator()->scheduler());
   EXPECT_TRUE(scheduler_stub->schedule_called());
   EXPECT_TRUE(scheduler_stub->unschedule_called());
-  const Scheduler::TriggerConditions* conditions = scheduler_stub->conditions();
+  const Scheduler::TriggerConditions* conditions =
+      scheduler_stub->trigger_conditions();
   EXPECT_EQ(conditions->require_power_connected,
             coordinator()->policy()->PowerRequired(!kUserRequested));
   EXPECT_EQ(
@@ -882,7 +882,8 @@
   // priority.
   SchedulerStub* scheduler_stub =
       reinterpret_cast<SchedulerStub*>(coordinator()->scheduler());
-  const Scheduler::TriggerConditions* conditions = scheduler_stub->conditions();
+  const Scheduler::TriggerConditions* conditions =
+      scheduler_stub->trigger_conditions();
   EXPECT_TRUE(scheduler_stub->schedule_called());
   EXPECT_EQ(conditions->require_power_connected,
             coordinator()->policy()->PowerRequired(kUserRequested));
@@ -1373,8 +1374,9 @@
 TEST_F(RequestCoordinatorTest,
        SavePageDoesStartProcessingWhenPoorlyConnected) {
   // Set specific network type for 2G with poor effective connection.
-  SetNetworkConditionsForTest(
-      net::NetworkChangeNotifier::ConnectionType::CONNECTION_2G);
+  DeviceConditions device_conditions(!kPowerRequired, kBatteryPercentageHigh,
+                                     net::NetworkChangeNotifier::CONNECTION_2G);
+  SetDeviceConditionsForTest(device_conditions);
   SetEffectiveConnectionTypeForTest(
       net::EffectiveConnectionType::EFFECTIVE_CONNECTION_TYPE_SLOW_2G);
 
diff --git a/components/offline_pages/core/background/scheduler.h b/components/offline_pages/core/background/scheduler.h
index 7ce0a45..818c216d 100644
--- a/components/offline_pages/core/background/scheduler.h
+++ b/components/offline_pages/core/background/scheduler.h
@@ -5,6 +5,8 @@
 #ifndef COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SCHEDULER_H_
 #define COMPONENTS_OFFLINE_PAGES_CORE_BACKGROUND_SCHEDULER_H_
 
+#include "components/offline_pages/core/background/device_conditions.h"
+
 namespace offline_pages {
 
 // Interface of a class responsible for scheduling a task to initiate
@@ -40,6 +42,9 @@
 
   // Unschedules the currently scheduled task, if any.
   virtual void Unschedule() = 0;
+
+  // Get the current device conditions from the android APIs.
+  virtual const DeviceConditions& GetCurrentDeviceConditions() = 0;
 };
 
 }  // namespace offline_pages
diff --git a/components/offline_pages/core/background/scheduler_stub.cc b/components/offline_pages/core/background/scheduler_stub.cc
index 278536aa..f80c60c 100644
--- a/components/offline_pages/core/background/scheduler_stub.cc
+++ b/components/offline_pages/core/background/scheduler_stub.cc
@@ -4,31 +4,45 @@
 
 #include "components/offline_pages/core/background/scheduler_stub.h"
 
+namespace {
+const int kBatteryPercentageHigh = 75;
+const bool kPowerRequired = true;
+}  // namespace
+
 namespace offline_pages {
 
 SchedulerStub::SchedulerStub()
     : schedule_called_(false),
       backup_schedule_called_(false),
       unschedule_called_(false),
+      get_current_device_conditions_called_(false),
       schedule_delay_(0L),
-      conditions_(false, 0, false) {}
+      device_conditions_(kPowerRequired,
+                         kBatteryPercentageHigh,
+                         net::NetworkChangeNotifier::CONNECTION_2G),
+      trigger_conditions_(false, 0, false) {}
 
 SchedulerStub::~SchedulerStub() {}
 
 void SchedulerStub::Schedule(const TriggerConditions& trigger_conditions) {
   schedule_called_ = true;
-  conditions_ = trigger_conditions;
+  trigger_conditions_ = trigger_conditions;
 }
 
 void SchedulerStub::BackupSchedule(const TriggerConditions& trigger_conditions,
                                    long delay_in_seconds) {
   backup_schedule_called_ = true;
   schedule_delay_ = delay_in_seconds;
-  conditions_ = trigger_conditions;
+  trigger_conditions_ = trigger_conditions;
 }
 
 void SchedulerStub::Unschedule() {
   unschedule_called_ = true;
 }
 
+const DeviceConditions& SchedulerStub::GetCurrentDeviceConditions() {
+  get_current_device_conditions_called_ = true;
+  return device_conditions_;
+}
+
 }  // namespace offline_pages
diff --git a/components/offline_pages/core/background/scheduler_stub.h b/components/offline_pages/core/background/scheduler_stub.h
index 7300468..fa57d1f 100644
--- a/components/offline_pages/core/background/scheduler_stub.h
+++ b/components/offline_pages/core/background/scheduler_stub.h
@@ -24,20 +24,27 @@
   // Unschedules the currently scheduled task, if any.
   void Unschedule() override;
 
+  // Get the current device conditions from the android APIs.
+  const DeviceConditions& GetCurrentDeviceConditions() override;
+
   bool schedule_called() const { return schedule_called_; }
 
   bool backup_schedule_called() const { return backup_schedule_called_; }
 
   bool unschedule_called() const { return unschedule_called_; }
 
-  TriggerConditions const* conditions() const { return &conditions_; }
+  TriggerConditions const* trigger_conditions() const {
+    return &trigger_conditions_;
+  }
 
  private:
   bool schedule_called_;
   bool backup_schedule_called_;
   bool unschedule_called_;
+  bool get_current_device_conditions_called_;
   long schedule_delay_;
-  TriggerConditions conditions_;
+  DeviceConditions device_conditions_;
+  TriggerConditions trigger_conditions_;
 };
 
 }  // namespace offline_pages
diff --git a/ios/chrome/browser/payments/resources/payment_request_manager.js b/ios/chrome/browser/payments/resources/payment_request_manager.js
index 2bf82bd..2dca58c 100644
--- a/ios/chrome/browser/payments/resources/payment_request_manager.js
+++ b/ios/chrome/browser/payments/resources/payment_request_manager.js
@@ -497,7 +497,8 @@
  *   total: (window.PaymentItem|undefined),
  *   displayItems: (!Array<!window.PaymentItem>|undefined),
  *   shippingOptions: (!Array<!window.PaymentShippingOption>|undefined),
- *   modifiers: (!Array<!window.PaymentDetailsModifier>|undefined)
+ *   modifiers: (!Array<!window.PaymentDetailsModifier>|undefined),
+ *   error: (string|undefined)
  * }}
  */
 window.PaymentDetails;
diff --git a/ios/web/payments/OWNERS b/ios/web/payments/OWNERS
index cda1316..f189e142 100644
--- a/ios/web/payments/OWNERS
+++ b/ios/web/payments/OWNERS
@@ -1,2 +1,2 @@
-jdonnelly@chromium.org
+mahmadi@chromium.org
 lpromero@chromium.org
diff --git a/ios/web/payments/payment_request.cc b/ios/web/payments/payment_request.cc
index fb586c3..383b2d0d 100644
--- a/ios/web/payments/payment_request.cc
+++ b/ios/web/payments/payment_request.cc
@@ -35,6 +35,7 @@
 static const char kPaymentCurrencyAmountValue[] = "value";
 static const char kPaymentDetails[] = "details";
 static const char kPaymentDetailsDisplayItems[] = "displayItems";
+static const char kPaymentDetailsError[] = "error";
 static const char kPaymentDetailsShippingOptions[] = "shippingOptions";
 static const char kPaymentDetailsTotal[] = "total";
 static const char kPaymentItemAmount[] = "amount";
@@ -260,7 +261,7 @@
   return this->total == other.total &&
          this->display_items == other.display_items &&
          this->shipping_options == other.shipping_options &&
-         this->modifiers == other.modifiers;
+         this->modifiers == other.modifiers && this->error == other.error;
 }
 
 bool PaymentDetails::operator!=(const PaymentDetails& other) const {
@@ -310,6 +311,9 @@
     }
   }
 
+  // Error is optional.
+  value.GetString(kPaymentDetailsError, &this->error);
+
   return true;
 }
 
diff --git a/ios/web/payments/payment_request_unittest.cc b/ios/web/payments/payment_request_unittest.cc
index afc2be2..2ac56c1 100644
--- a/ios/web/payments/payment_request_unittest.cc
+++ b/ios/web/payments/payment_request_unittest.cc
@@ -255,6 +255,7 @@
   expected_request.details.total.label = base::ASCIIToUTF16("TOTAL");
   expected_request.details.total.amount.currency = base::ASCIIToUTF16("GBP");
   expected_request.details.total.amount.value = base::ASCIIToUTF16("6.66");
+  expected_request.details.error = base::ASCIIToUTF16("Error in details");
 
   std::unique_ptr<base::DictionaryValue> details_dict(
       new base::DictionaryValue);
@@ -265,6 +266,7 @@
   amount_dict->SetString("value", "6.66");
   total_dict->Set("amount", std::move(amount_dict));
   details_dict->Set("total", std::move(total_dict));
+  details_dict->SetString("error", "Error in details");
   request_dict.Set("details", std::move(details_dict));
 
   EXPECT_TRUE(output_request.FromDictionaryValue(request_dict));
@@ -585,6 +587,13 @@
   details2.total.label = base::ASCIIToUTF16("Total");
   EXPECT_EQ(details1, details2);
 
+  details1.error = base::ASCIIToUTF16("Foo");
+  EXPECT_NE(details1, details2);
+  details2.error = base::ASCIIToUTF16("Bar");
+  EXPECT_NE(details1, details2);
+  details2.error = base::ASCIIToUTF16("Foo");
+  EXPECT_EQ(details1, details2);
+
   PaymentItem payment_item;
   payment_item.label = base::ASCIIToUTF16("Tax");
   std::vector<PaymentItem> display_items1;
diff --git a/ios/web/public/payments/payment_request.h b/ios/web/public/payments/payment_request.h
index f14a7641..742c2d9e 100644
--- a/ios/web/public/payments/payment_request.h
+++ b/ios/web/public/payments/payment_request.h
@@ -238,6 +238,10 @@
   // Modifiers for particular payment method identifiers. For example, it allows
   // adjustment to the total amount based on payment method.
   std::vector<PaymentDetailsModifier> modifiers;
+
+  // If non-empty, this is the error message the user agent should display to
+  // the user when the payment request is updated using updateWith.
+  base::string16 error;
 };
 
 // Information describing a shipping option.
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2 b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
index 70aee96..e73dca25 100644
--- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
+++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
@@ -72,7 +72,6 @@
 Bug(none) typedcssom/ [ Skip ]
 Bug(none) usb/ [ Skip ]
 Bug(none) vibration/ [ Skip ]
-Bug(none) virtual/ [ Skip ]
 Bug(none) wake_lock/ [ Skip ]
 Bug(none) web-animations-api/ [ Skip ]
 Bug(none) webaudio/ [ Skip ]
@@ -80,6 +79,40 @@
 Bug(none) webmidi/ [ Skip ]
 Bug(none) xmlviewer/ [ Skip ]
 
+Bug(none) virtual/android/ [ Skip ]
+Bug(none) virtual/color_space/ [ Skip ]
+Bug(none) virtual/display_list_2d_canvas/ [ Skip ]
+Bug(none) virtual/documentwriteevaluator/ [ Skip ]
+Bug(none) virtual/enable_asmjs/ [ Skip ]
+Bug(none) virtual/enable_wasm/ [ Skip ]
+Bug(none) virtual/feature-policy/ [ Skip ]
+Bug(none) virtual/gpu/ [ Skip ]
+Bug(none) virtual/gpu-rasterization/ [ Skip ]
+Bug(none) virtual/layout_ng/ [ Skip ]
+Bug(none) virtual/linux-subpixel/ [ Skip ]
+Bug(none) virtual/mac-antialiasedtext/ [ Skip ]
+Bug(none) virtual/media-gpu-accelerated/ [ Skip ]
+Bug(none) virtual/mojo-loading/ [ Skip ]
+Bug(none) virtual/mojo-localstorage/ [ Skip ]
+Bug(none) virtual/mse-1mb-buffers/ [ Skip ]
+Bug(none) virtual/parsehtmlonmainthread_coalesce/ [ Skip ]
+Bug(none) virtual/parsehtmlonmainthread_sync/ [ Skip ]
+Bug(none) virtual/prefer_compositing_to_lcd_text/ [ Skip ]
+Bug(none) virtual/rootlayerscrolls/ [ Skip ]
+Bug(none) virtual/scalefactor150/ [ Skip ]
+Bug(none) virtual/scalefactor200/ [ Skip ]
+Bug(none) virtual/scalefactor200withzoom/ [ Skip ]
+Bug(none) virtual/scroll_customization/ [ Skip ]
+Bug(none) virtual/service-worker-navigation-preload/ [ Skip ]
+Bug(none) virtual/service-worker-navigation-preload-disabled/ [ Skip ]
+Bug(none) virtual/sharedarraybuffer/ [ Skip ]
+Bug(none) virtual/spv2/ [ Skip ]
+Bug(none) virtual/stable/ [ Skip ]
+Bug(none) virtual/targetedstylerecalc/ [ Skip ]
+Bug(none) virtual/wheelscrolllatching/ [ Skip ]
+Bug(none) virtual/windows-directwrite/ [ Skip ]
+Bug(none) virtual/without-smil/ [ Skip ]
+
 Bug(none) compositing/3d-cube.html [ Failure ]
 Bug(none) compositing/absolute-inside-out-of-view-fixed.html [ Failure ]
 Bug(none) compositing/animation/hidden-composited.html [ Failure ]
@@ -1630,3 +1663,42 @@
 crbug.com/680325 svg/custom/mouse-move-on-svg-root-standalone.svg [ Failure ]
 crbug.com/680325 svg/custom/pattern-userSpaceOnUse-userToBaseTransform.xhtml [ Failure ]
 crbug.com/680325 svg/custom/viewport-update2.svg [ Failure ]
+
+# Some work remains to fully support composited animation and scrolling.
+crbug.com/674317 virtual/threaded/animations/composited-filter-webkit-filter.html [ Failure ]
+crbug.com/674317 virtual/threaded/animations/compositor-independent-transform-cancel.html [ Failure ]
+crbug.com/674317 virtual/threaded/fast/scroll-behavior/smooth-scroll/fixed-background-in-iframe.html [ Crash Failure ]
+crbug.com/674317 virtual/threaded/animations/KeyframeEffectReadOnly-composited-animation.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/composited-animations-rotate-zero-degrees.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/composited-animations-simple.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/composited-animations-timing-function.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/composited-animations-translate-rotate-scale.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/element-animate-positive-delay.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/img-element-transform.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/inline-block-transform.html [ Timeout ]
+crbug.com/674317 virtual/threaded/animations/transitions-retarget.html [ Timeout ]
+crbug.com/674317 virtual/threaded/fast/scroll-behavior/first-scroll-runs-on-compositor.html [ Timeout ]
+crbug.com/674317 virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-added.html [ Timeout ]
+crbug.com/674317 virtual/threaded/fast/scroll-behavior/smooth-scroll/main-thread-scrolling-reason-correctness.html [ Timeout ]
+crbug.com/674317 virtual/threaded/fast/scroll-behavior/smooth-scroll/mousewheel-scroll-interrupted.html [ Timeout ]
+
+# Compositor Worker logic has not yet been fully ported to SPv2.
+crbug.com/686897 virtual/threaded/fast/compositorworker/compositor-attribute-change-worker.html [ Timeout ]
+crbug.com/686897 virtual/threaded/fast/compositorworker/compositor-proxy-disconnect-worker.html [ Timeout ]
+crbug.com/686897 virtual/threaded/fast/compositorworker/visual-update.html [ Timeout ]
+crbug.com/686897 virtual/threaded/fast/compositorworker/basic-plumbing-main-to-worker.html [ Crash Failure Timeout ]
+crbug.com/686897 virtual/threaded/fast/compositorworker/basic-plumbing-worker-to-main.html [ Crash Failure Timeout ]
+
+# virtual/threaded variants of sub-directories and tests already skipped or marked as failing above.
+crbug.com/674317 virtual/threaded/animations/ [ Skip ]
+Bug(none) virtual/threaded/inspector/ [ Skip ]
+Bug(none) virtual/threaded/fast/scroll-behavior/ [ Skip ]
+Bug(none) virtual/threaded/compositing/visibility/layer-visible-content.html [ Failure ]
+Bug(none) virtual/threaded/compositing/visibility/overlays-persist-on-navigation.html [ Crash ]
+Bug(none) virtual/threaded/compositing/visibility/overlays.html [ Crash ]
+Bug(none) virtual/threaded/compositing/visibility/visibility-image-layers-dynamic.html [ Crash Failure ]
+Bug(none) virtual/threaded/compositing/visibility/visibility-image-layers.html [ Failure ]
+Bug(none) virtual/threaded/compositing/visibility/visibility-simple-video-layer.html [ Failure ]
+Bug(none) virtual/threaded/compositing/webgl/webgl-reflection.html [ Failure ]
+Bug(none) virtual/threaded/printing/ [ Skip ]
+Bug(none) virtual/threaded/transitions/ [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/search-config-expected.txt b/third_party/WebKit/LayoutTests/inspector/sources/search-config-expected.txt
index 9b795df..f227c261 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/search-config-expected.txt
+++ b/third_party/WebKit/LayoutTests/inspector/sources/search-config-expected.txt
@@ -6,6 +6,8 @@
 [" function"]
 Dumping parsed search query [ function file:js]:
 [" function"]
+Dumping parsed search query [file:js   function   ]:
+["function"]
 Dumping parsed search query [s]:
 ["s"]
 Dumping parsed search query [ s hello]:
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/search-config.html b/third_party/WebKit/LayoutTests/inspector/sources/search-config.html
index 3d779bb..4ab0aee1 100644
--- a/third_party/WebKit/LayoutTests/inspector/sources/search-config.html
+++ b/third_party/WebKit/LayoutTests/inspector/sources/search-config.html
@@ -14,6 +14,7 @@
     dumpParsedSearchQuery("function", false);
     dumpParsedSearchQuery(" function", false);
     dumpParsedSearchQuery(" function file:js", false);
+    dumpParsedSearchQuery("file:js   function   ", false);
     dumpParsedSearchQuery("\s", true);
     dumpParsedSearchQuery(" \s hello", true);
     InspectorTest.completeTest();
diff --git a/third_party/WebKit/Source/core/css/BUILD.gn b/third_party/WebKit/Source/core/css/BUILD.gn
index 0c0e34c..eb14532 100644
--- a/third_party/WebKit/Source/core/css/BUILD.gn
+++ b/third_party/WebKit/Source/core/css/BUILD.gn
@@ -348,6 +348,7 @@
     "properties/CSSPropertyAPI.h",
     "properties/CSSPropertyAPIAlignItems.cpp",
     "properties/CSSPropertyAPIAlignOrJustifySelf.cpp",
+    "properties/CSSPropertyAPIBaselineShift.cpp",
     "properties/CSSPropertyAPIBorderRadius.cpp",
     "properties/CSSPropertyAPICaretColor.cpp",
     "properties/CSSPropertyAPIClip.cpp",
@@ -421,6 +422,8 @@
     "properties/CSSPropertyDescriptor.h",
     "properties/CSSPropertyLengthUtils.cpp",
     "properties/CSSPropertyLengthUtils.h",
+    "properties/CSSPropertyMarginUtils.cpp",
+    "properties/CSSPropertyMarginUtils.h",
     "properties/CSSPropertyShapeUtils.cpp",
     "properties/CSSPropertyShapeUtils.h",
     "resolver/AnimatedStyleBuilder.cpp",
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
index 4ef594d..f3611ed 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -964,16 +964,16 @@
 inline CSSIdentifierValue::CSSIdentifierValue(EClear e)
     : CSSValue(IdentifierClass) {
   switch (e) {
-    case ClearNone:
+    case EClear::kNone:
       m_valueID = CSSValueNone;
       break;
-    case ClearLeft:
+    case EClear::kLeft:
       m_valueID = CSSValueLeft;
       break;
-    case ClearRight:
+    case EClear::kRight:
       m_valueID = CSSValueRight;
       break;
-    case ClearBoth:
+    case EClear::kBoth:
       m_valueID = CSSValueBoth;
       break;
   }
@@ -983,19 +983,19 @@
 inline EClear CSSIdentifierValue::convertTo() const {
   switch (m_valueID) {
     case CSSValueNone:
-      return ClearNone;
+      return EClear::kNone;
     case CSSValueLeft:
-      return ClearLeft;
+      return EClear::kLeft;
     case CSSValueRight:
-      return ClearRight;
+      return EClear::kRight;
     case CSSValueBoth:
-      return ClearBoth;
+      return EClear::kBoth;
     default:
       break;
   }
 
   ASSERT_NOT_REACHED();
-  return ClearNone;
+  return EClear::kNone;
 }
 
 template <>
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.json5 b/third_party/WebKit/Source/core/css/CSSProperties.json5
index ba84052..72b537e 100644
--- a/third_party/WebKit/Source/core/css/CSSProperties.json5
+++ b/third_party/WebKit/Source/core/css/CSSProperties.json5
@@ -573,6 +573,7 @@
     },
     {
       name: "baseline-shift",
+      api_class: true,
       custom_inherit: true,
       custom_value: true,
       interpolable: true,
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index 320348a..0327c7be 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -46,6 +46,7 @@
 #include "core/css/properties/CSSPropertyColumnUtils.h"
 #include "core/css/properties/CSSPropertyDescriptor.h"
 #include "core/css/properties/CSSPropertyLengthUtils.h"
+#include "core/css/properties/CSSPropertyMarginUtils.h"
 #include "core/css/properties/CSSPropertyPositionUtils.h"
 #include "core/css/properties/CSSPropertyShapeUtils.h"
 #include "core/frame/UseCounter.h"
@@ -475,14 +476,6 @@
   return list;
 }
 
-static CSSValue* consumeMarginOrOffset(CSSParserTokenRange& range,
-                                       CSSParserMode cssParserMode,
-                                       UnitlessQuirk unitless) {
-  if (range.peek().id() == CSSValueAuto)
-    return consumeIdent(range);
-  return consumeLengthOrPercent(range, cssParserMode, ValueRangeAll, unitless);
-}
-
 static CSSValue* consumeLocale(CSSParserTokenRange& range) {
   if (range.peek().id() == CSSValueAuto)
     return consumeIdent(range);
@@ -1156,13 +1149,6 @@
   return consumeUrl(range, context);
 }
 
-static CSSValue* consumeBaselineShift(CSSParserTokenRange& range) {
-  CSSValueID id = range.peek().id();
-  if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper)
-    return consumeIdent(range);
-  return consumeLengthOrPercent(range, SVGAttributeMode, ValueRangeAll);
-}
-
 static CSSValue* consumePerspective(CSSParserTokenRange& range,
                                     const CSSParserContext* context,
                                     CSSPropertyID unresolvedProperty) {
@@ -2107,14 +2093,14 @@
     case CSSPropertyLeft:
     case CSSPropertyRight:
     case CSSPropertyTop:
-      return consumeMarginOrOffset(m_range, m_context->mode(),
-                                   UnitlessQuirk::Allow);
+      return CSSPropertyMarginUtils::consumeMarginOrOffset(
+          m_range, m_context->mode(), UnitlessQuirk::Allow);
     case CSSPropertyWebkitMarginStart:
     case CSSPropertyWebkitMarginEnd:
     case CSSPropertyWebkitMarginBefore:
     case CSSPropertyWebkitMarginAfter:
-      return consumeMarginOrOffset(m_range, m_context->mode(),
-                                   UnitlessQuirk::Forbid);
+      return CSSPropertyMarginUtils::consumeMarginOrOffset(
+          m_range, m_context->mode(), UnitlessQuirk::Forbid);
     case CSSPropertyScrollSnapDestination:
     case CSSPropertyObjectPosition:
     case CSSPropertyPerspectiveOrigin:
@@ -2229,8 +2215,6 @@
       return consumeNumber(m_range, ValueRangeNonNegative);
     case CSSPropertyWebkitBoxFlex:
       return consumeNumber(m_range, ValueRangeAll);
-    case CSSPropertyBaselineShift:
-      return consumeBaselineShift(m_range);
     case CSSPropertyStrokeWidth:
     case CSSPropertyStrokeDashoffset:
     case CSSPropertyCx:
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBaselineShift.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBaselineShift.cpp
new file mode 100644
index 0000000..70ee0a5
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIBaselineShift.cpp
@@ -0,0 +1,22 @@
+// Copyright 2017 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 "core/css/properties/CSSPropertyAPIBaselineShift.h"
+
+#include "core/css/CSSValueList.h"
+#include "core/css/parser/CSSPropertyParserHelpers.h"
+
+namespace blink {
+
+const CSSValue* CSSPropertyAPIBaselineShift::parseSingleValue(
+    CSSParserTokenRange& range,
+    const CSSParserContext* context) {
+  CSSValueID id = range.peek().id();
+  if (id == CSSValueBaseline || id == CSSValueSub || id == CSSValueSuper)
+    return CSSPropertyParserHelpers::consumeIdent(range);
+  return CSSPropertyParserHelpers::consumeLengthOrPercent(
+      range, SVGAttributeMode, ValueRangeAll);
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyMarginUtils.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyMarginUtils.cpp
new file mode 100644
index 0000000..c14fd3a0
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyMarginUtils.cpp
@@ -0,0 +1,19 @@
+// Copyright 2017 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 "core/css/properties/CSSPropertyMarginUtils.h"
+
+namespace blink {
+
+CSSValue* CSSPropertyMarginUtils::consumeMarginOrOffset(
+    CSSParserTokenRange& range,
+    CSSParserMode cssParserMode,
+    CSSPropertyParserHelpers::UnitlessQuirk unitless) {
+  if (range.peek().id() == CSSValueAuto)
+    return CSSPropertyParserHelpers::consumeIdent(range);
+  return CSSPropertyParserHelpers::consumeLengthOrPercent(
+      range, cssParserMode, ValueRangeAll, unitless);
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyMarginUtils.h b/third_party/WebKit/Source/core/css/properties/CSSPropertyMarginUtils.h
new file mode 100644
index 0000000..d461775
--- /dev/null
+++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyMarginUtils.h
@@ -0,0 +1,24 @@
+// Copyright 2017 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.
+
+#ifndef CSSPropertyMarginUtils_h
+#define CSSPropertyMarginUtils_h
+
+#include "core/css/parser/CSSPropertyParserHelpers.h"
+#include "wtf/Allocator.h"
+
+namespace blink {
+
+class CSSPropertyMarginUtils {
+  STATIC_ONLY(CSSPropertyMarginUtils);
+
+  static CSSValue* consumeMarginOrOffset(
+      CSSParserTokenRange&,
+      CSSParserMode,
+      CSSPropertyParserHelpers::UnitlessQuirk);
+};
+
+}  // namespace blink
+
+#endif  // CSSPropertyMarginUtils_h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index 1aba392..c7f0f27 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1495,11 +1495,13 @@
     if (child->isFloating() ||
         (child->isBox() && toLayoutBox(child)->avoidsFloats())) {
       LayoutUnit floatTotalWidth = floatLeftWidth + floatRightWidth;
-      if (childStyle->clear() & ClearLeft) {
+      if (childStyle->clear() == EClear::kBoth ||
+          childStyle->clear() == EClear::kLeft) {
         maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
         floatLeftWidth = LayoutUnit();
       }
-      if (childStyle->clear() & ClearRight) {
+      if (childStyle->clear() == EClear::kBoth ||
+          childStyle->clear() == EClear::kRight) {
         maxLogicalWidth = std::max(floatTotalWidth, maxLogicalWidth);
         floatRightWidth = LayoutUnit();
       }
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
index 359acb05..bd5f8ce 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -2055,7 +2055,7 @@
   // require clearance to move past any floats. If that's the case we want to be
   // sure we estimate the correct position including margins after any floats
   // rather than use 'clearance' later which could give us the wrong position.
-  if (grandchildBox->style()->clear() != ClearNone &&
+  if (grandchildBox->style()->clear() != EClear::kNone &&
       childBlockFlow->marginBeforeForChild(*grandchildBox) == 0)
     return;
 
@@ -2701,7 +2701,7 @@
 
   // We also clear floats if we are too big to sit on the same line as a float
   // (and wish to avoid floats by default).
-  LayoutUnit result = clear != ClearNone
+  LayoutUnit result = clear != EClear::kNone
                           ? (logicalBottom - logicalTop).clampNegativeToZero()
                           : LayoutUnit();
   if (!result && child->avoidsFloats()) {
@@ -3913,13 +3913,14 @@
 }
 
 LayoutUnit LayoutBlockFlow::lowestFloatLogicalBottom(EClear clear) const {
-  if (clear == ClearNone || !m_floatingObjects)
+  if (clear == EClear::kNone || !m_floatingObjects)
     return LayoutUnit();
 
-  FloatingObject::Type floatType =
-      clear == ClearLeft ? FloatingObject::FloatLeft
-                         : clear == ClearRight ? FloatingObject::FloatRight
-                                               : FloatingObject::FloatLeftRight;
+  FloatingObject::Type floatType = clear == EClear::kLeft
+                                       ? FloatingObject::FloatLeft
+                                       : clear == EClear::kRight
+                                             ? FloatingObject::FloatRight
+                                             : FloatingObject::FloatLeftRight;
   return m_floatingObjects->lowestFloatLogicalBottom(floatType);
 }
 
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
index 0267305..846fb58 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.h
@@ -382,7 +382,7 @@
 
   PositionWithAffinity positionForPoint(const LayoutPoint&) override;
 
-  LayoutUnit lowestFloatLogicalBottom(EClear = ClearBoth) const;
+  LayoutUnit lowestFloatLogicalBottom(EClear = EClear::kBoth) const;
 
   bool hasOverhangingFloats() const {
     return parent() && containsFloats() &&
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
index 50348ea..8fb9566e 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -1675,9 +1675,11 @@
           clearPreviousFloat =
               (prevFloat &&
                ((prevFloat->styleRef().floating() == EFloat::kLeft &&
-                 (childStyle.clear() & ClearLeft)) ||
+                 (childStyle.clear() == EClear::kBoth ||
+                  childStyle.clear() == EClear::kLeft)) ||
                 (prevFloat->styleRef().floating() == EFloat::kRight &&
-                 (childStyle.clear() & ClearRight))));
+                 (childStyle.clear() == EClear::kBoth ||
+                  childStyle.clear() == EClear::kRight))));
           prevFloat = child;
         } else {
           clearPreviousFloat = false;
@@ -2137,7 +2139,7 @@
                            ? curr->lastLeafChild()
                            : curr->firstLeafChild();
   return lastBox && lastBox->getLineLayoutItem().isBR() &&
-         lastBox->getLineLayoutItem().style()->clear() != ClearNone;
+         lastBox->getLineLayoutItem().style()->clear() != EClear::kNone;
 }
 
 void LayoutBlockFlow::determineEndPosition(LineLayoutState& layoutState,
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index 583ec5c0..6a4a5b07 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -2430,9 +2430,26 @@
     }
 
     void setPositionedState(int positionState) {
-      // This mask maps FixedPosition and AbsolutePosition to
+      // This maps FixedPosition and AbsolutePosition to
       // IsOutOfFlowPositioned, saving one bit.
-      m_positionedState = static_cast<PositionedState>(positionState & 0x3);
+      switch (positionState) {
+        case StaticPosition:
+          m_positionedState = IsStaticallyPositioned;
+          break;
+        case RelativePosition:
+          m_positionedState = IsRelativelyPositioned;
+          break;
+        case AbsolutePosition:
+        case FixedPosition:
+          m_positionedState = IsOutOfFlowPositioned;
+          break;
+        case StickyPosition:
+          m_positionedState = IsStickyPositioned;
+          break;
+        default:
+          NOTREACHED();
+          break;
+      }
     }
     void clearPositionedState() { m_positionedState = StaticPosition; }
 
diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
index 21638f79..e329fe3 100644
--- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
+++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -406,7 +406,7 @@
     // A <br> with clearance always needs a linebox in case the lines below it
     // get dirtied later and need to check for floats to clear - so if we're
     // ignoring spaces, stop ignoring them and add a run for this object.
-    if (m_ignoringSpaces && m_currentStyle->clear() != ClearNone)
+    if (m_ignoringSpaces && m_currentStyle->clear() != EClear::kNone)
       ensureLineBoxInsideIgnoredSpaces(&m_lineMidpointState, br);
 
     if (!m_lineInfo.isEmpty())
diff --git a/third_party/WebKit/Source/core/layout/line/LineBreaker.cpp b/third_party/WebKit/Source/core/layout/line/LineBreaker.cpp
index e2d6ab1..564d463 100644
--- a/third_party/WebKit/Source/core/layout/line/LineBreaker.cpp
+++ b/third_party/WebKit/Source/core/layout/line/LineBreaker.cpp
@@ -53,7 +53,7 @@
 void LineBreaker::reset() {
   m_positionedObjects.clear();
   m_hyphenated = false;
-  m_clear = ClearNone;
+  m_clear = EClear::kNone;
 }
 
 InlineIterator LineBreaker::nextLineBreak(InlineBidiResolver& resolver,
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
index cfbeae94..e41fcf8 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -43,15 +43,15 @@
       right_exclusion ? right_exclusion->rect.BlockEndOffset() : *content_size;
 
   switch (style.clear()) {
-    case EClear::ClearNone:
+    case EClear::kNone:
       return;  // nothing to do here.
-    case EClear::ClearLeft:
+    case EClear::kLeft:
       *content_size = left_block_end_offset;
       break;
-    case EClear::ClearRight:
+    case EClear::kRight:
       *content_size = right_block_end_offset;
       break;
-    case EClear::ClearBoth:
+    case EClear::kBoth:
       *content_size = std::max(left_block_end_offset, right_block_end_offset);
       break;
     default:
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
index ff60378..8a3bf39 100644
--- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
+++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -1115,7 +1115,7 @@
   };
 
   // clear: none
-  run_with_clearance(EClear::ClearNone);
+  run_with_clearance(EClear::kNone);
   // 20 = std::max(body's margin 8, clearance's margins 20)
   EXPECT_EQ(LayoutUnit(20), body_fragment->TopOffset());
   EXPECT_EQ(LayoutUnit(0), container_fragment->TopOffset());
@@ -1129,7 +1129,7 @@
   EXPECT_EQ(LayoutUnit(200), adjoining_clearance_fragment->TopOffset());
 
   // clear: right
-  run_with_clearance(EClear::ClearRight);
+  run_with_clearance(EClear::kRight);
   // 8 = body's margin. This doesn't collapse its margins with 'clearance' block
   // as it's not an adjoining block to body.
   EXPECT_EQ(LayoutUnit(8), body_fragment->TopOffset());
@@ -1144,7 +1144,7 @@
   EXPECT_EQ(LayoutUnit(370), adjoining_clearance_fragment->TopOffset());
 
   // clear: left
-  run_with_clearance(EClear::ClearLeft);
+  run_with_clearance(EClear::kLeft);
   // 8 = body's margin. This doesn't collapse its margins with 'clearance' block
   // as it's not an adjoining block to body.
   EXPECT_EQ(LayoutUnit(8), body_fragment->TopOffset());
@@ -1160,7 +1160,7 @@
 
   // clear: both
   // same as clear: right
-  run_with_clearance(EClear::ClearBoth);
+  run_with_clearance(EClear::kBoth);
   EXPECT_EQ(LayoutUnit(8), body_fragment->TopOffset());
   EXPECT_EQ(LayoutUnit(0), container_fragment->TopOffset());
   EXPECT_EQ(LayoutUnit(170), clerance_fragment->TopOffset());
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 3cad814d..d7a251f 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -313,7 +313,7 @@
     m_nonInheritedData.m_overflowY = static_cast<unsigned>(initialOverflowY());
     m_nonInheritedData.m_verticalAlign =
         static_cast<unsigned>(initialVerticalAlign());
-    m_nonInheritedData.m_clear = initialClear();
+    m_nonInheritedData.m_clear = static_cast<unsigned>(initialClear());
     m_nonInheritedData.m_position = initialPosition();
     m_nonInheritedData.m_tableLayout =
         static_cast<unsigned>(initialTableLayout());
@@ -767,11 +767,13 @@
   }
 
   // clear
-  static EClear initialClear() { return ClearNone; }
+  static EClear initialClear() { return EClear::kNone; }
   EClear clear() const {
     return static_cast<EClear>(m_nonInheritedData.m_clear);
   }
-  void setClear(EClear v) { m_nonInheritedData.m_clear = v; }
+  void setClear(EClear v) {
+    m_nonInheritedData.m_clear = static_cast<unsigned>(v);
+  }
 
   // Page break properties.
   // break-after (shorthand for page-break-after and -webkit-column-break-after)
diff --git a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
index 2b33a15..998f74cd 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyleConstants.h
@@ -169,7 +169,7 @@
   Length
 };
 
-enum EClear { ClearNone = 0, ClearLeft = 1, ClearRight = 2, ClearBoth = 3 };
+enum class EClear : unsigned { kNone, kLeft, kRight, kBoth };
 
 enum class ETableLayout : unsigned { kAuto, kFixed };
 
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs.png b/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs.png
index 3418960..fbbb22d 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs.png
+++ b/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs.png
Binary files differ
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs_2x.png b/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs_2x.png
index 56566cd..b8cc2fd 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs_2x.png
+++ b/third_party/WebKit/Source/devtools/front_end/Images/resourceGlyphs_2x.png
Binary files differ
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/smallIcons.png b/third_party/WebKit/Source/devtools/front_end/Images/smallIcons.png
index ab988fb..b692b3201 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/smallIcons.png
+++ b/third_party/WebKit/Source/devtools/front_end/Images/smallIcons.png
Binary files differ
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/smallIcons_2x.png b/third_party/WebKit/Source/devtools/front_end/Images/smallIcons_2x.png
index aefc949..2fae0e3 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/smallIcons_2x.png
+++ b/third_party/WebKit/Source/devtools/front_end/Images/smallIcons_2x.png
Binary files differ
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/src/optimize_png.hashes b/third_party/WebKit/Source/devtools/front_end/Images/src/optimize_png.hashes
index 777c1b61..9921efa 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/src/optimize_png.hashes
+++ b/third_party/WebKit/Source/devtools/front_end/Images/src/optimize_png.hashes
@@ -1,12 +1,12 @@
 {
     "securityIcons.svg": "27676f7c1f1542659c7c49a8052259dc",
-    "resourceGlyphs.svg": "8e1947b1fa4aac49cbc081f85f44d412",
+    "resourceGlyphs.svg": "ae5287ef4b10714c8858b5384c348b6a",
     "audits_logo_bw.svg": "203dcb2ba32ef0f4595ad45bb8feffab",
     "breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28",
     "errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45",
-    "smallIcons.svg": "e42007c7e8da94ecab276fd254f0623e",
+    "smallIcons.svg": "d884babbd1c785b92eb46ee736c95541",
     "settingsListRemove.svg": "ce9e7c5c5cdaef28e6ee51d9478d5485",
-    "toolbarButtonGlyphs.svg": "0c0a900daedf6dc35bd5b12424d8181c",
+    "toolbarButtonGlyphs.svg": "db0b7d1af08a57a11e5609e0b2cbbc01",
     "breakpoint.svg": "69cd92d807259c022791112809b97799",
     "search.svg": "fc990dd3836aec510d7ca1f36c2a3142",
     "audits_logo.svg": "647095d7981857c22a816eef12f75b91"
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/src/resourceGlyphs.svg b/third_party/WebKit/Source/devtools/front_end/Images/src/resourceGlyphs.svg
index 11a8eb7..8dee04f3 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/src/resourceGlyphs.svg
+++ b/third_party/WebKit/Source/devtools/front_end/Images/src/resourceGlyphs.svg
@@ -1,41 +1,156 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg width="140px" height="20px" viewBox="0 0 140 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
-    <title>resourceGlyphs</title>
-    <desc>Created with Sketch.</desc>
-    <defs></defs>
-    <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
-        <g id="resourceGlyphs">
-            <g id="Cookies" transform="translate(120.000000, 0.000000)">
-                <polygon id="bounds" fill="#E8F0FE" opacity="0" points="0 0 16 0 16 16 0 16"></polygon>
-                <path d="M13.5263158,6.25 L12.0526316,6.25 L12.0526316,5.5 C12.0526316,5.086 11.7225263,4.75 11.3157895,4.75 L9.84210526,4.75 L9.84210526,4 C9.84210526,3.586 9.512,3.25 9.10526316,3.25 L8.36842105,3.25 L8.36842105,1.75 C8.36842105,1.423 8.16063158,1.153 7.874,1.0495 C7.82021053,1.021 7.74947368,1 7.63157895,1 C3.96873684,1 1,4.02175 1,7.75 C1,11.4775 3.96873684,14.5 7.63157895,14.5 C11.2944211,14.5 14.2631579,11.4775 14.2631579,7.75 L14.2631579,7 C14.2631579,6.586 13.9330526,6.25 13.5263158,6.25 L13.5263158,6.25 Z M3.57894737,8.5 C2.96818277,8.5 2.47368421,7.99667111 2.47368421,7.375 C2.47368421,6.75332889 2.96818277,6.25 3.57894737,6.25 C4.18971196,6.25 4.68421053,6.75332889 4.68421053,7.375 C4.68421053,7.99667111 4.18971196,8.5 3.57894737,8.5 L3.57894737,8.5 Z M4.68421053,4.375 C4.68421053,3.75325 5.17936842,3.25 5.78947368,3.25 C6.40031579,3.25 6.89473684,3.75325 6.89473684,4.375 C6.89473684,4.996 6.40031579,5.5 5.78947368,5.5 C5.17936842,5.5 4.68421053,4.996 4.68421053,4.375 L4.68421053,4.375 Z M6.89473684,13 C6.28414724,13 5.78947368,12.4966611 5.78947368,11.8753756 C5.78947368,11.2540902 6.28414724,10.75 6.89473684,10.75 C7.50532644,10.75 8,11.2540902 8,11.8753756 C8,12.4966611 7.50532644,13 6.89473684,13 L6.89473684,13 Z M7.26315789,9.25 C6.65305263,9.25 6.15789474,8.746 6.15789474,8.125 C6.15789474,7.504 6.65305263,7 7.26315789,7 C7.87326316,7 8.36842105,7.504 8.36842105,8.125 C8.36842105,8.746 7.87326316,9.25 7.26315789,9.25 L7.26315789,9.25 Z M10.9473684,10.75 C10.3372632,10.75 9.84210526,10.246 9.84210526,9.625 C9.84210526,9.004 10.3372632,8.5 10.9473684,8.5 C11.5574737,8.5 12.0526316,9.004 12.0526316,9.625 C12.0526316,10.246 11.5574737,10.75 10.9473684,10.75 L10.9473684,10.75 Z" id="Shape" fill="#212121"></path>
-            </g>
-            <g id="Group-2" transform="translate(60.000000, 0.000000)">
-                <rect id="Rectangle-1-Copy-3" fill="#E8F0FE" opacity="0" x="0" y="0" width="16" height="16"></rect>
-                <path d="M8,6 C11.3137085,6 14,5.1045695 14,4 C14,2.8954305 11.3137085,2 8,2 C4.6862915,2 2,2.8954305 2,4 C2,5.1045695 4.6862915,6 8,6 Z M2,13 C2,14.1045695 4.6862915,15 8,15 C11.3137085,15 14,14.1045695 14,13 L14,11 C14,12.1045695 11.3137085,13 8,13 C4.6862915,13 2,12.1045695 2,11 L2,13 Z M2,10 C2,11.1045695 4.6862915,12 8,12 C11.3137085,12 14,11.1045695 14,10 L14,8 C14,9.1045695 11.3137085,10 8,10 C4.6862915,10 2,9.1045695 2,8 L2,10 Z M2,7 C2,8.1045695 4.6862915,9 8,9 C11.3137085,9 14,8.1045695 14,7 L14,5 C14,6.1045695 11.3137085,7 8,7 C4.6862915,7 2,6.1045695 2,5 L2,7 Z" id="Combined-Shape" fill="#000000"></path>
-            </g>
-            <g id="Group-2" transform="translate(80.000000, 0.000000)">
-                <rect id="Rectangle-1-Copy-3" fill="#E8F0FE" opacity="0" x="0" y="0" width="16" height="16"></rect>
-                <path d="M2,3.99895656 C2,3.44724809 2.45097518,3 2.99077797,3 L8,3 L8,6 L2,6 L2,3.99895656 Z M2,11 L8,11 L8,14 L2.99077797,14 C2.44358641,14 2,13.5573397 2,13.0010434 L2,11 Z M2,7 L8,7 L8,10 L2,10 L2,7 Z M9,3 L14.009222,3 C14.5564136,3 15,3.44266033 15,3.99895656 L15,6 L9,6 L9,3 Z M9,11 L15,11 L15,13.0010434 C15,13.5527519 14.5490248,14 14.009222,14 L9,14 L9,11 Z M9,7 L15,7 L15,10 L9,10 L9,7 Z" id="Combined-Shape" fill="#212121"></path>
-            </g>
-            <g id="Group-2" transform="translate(100.000000, 0.000000)">
-                <rect id="Rectangle-1-Copy-3" fill="#E8F0FE" opacity="0" x="0" y="0" width="16" height="16"></rect>
-                <path d="M8.87835493,9.58602689 C8.48320663,9.84764903 8.00939505,10 7.5,10 C6.11928813,10 5,8.88071187 5,7.5 C5,6.11928813 6.11928813,5 7.5,5 C8.88071187,5 10,6.11928813 10,7.5 C10,8.00939505 9.84764903,8.48320663 9.58602689,8.87835493 L12,11.29 L11.29,12 L8.87835493,9.58602689 Z M2,3.9955775 C2,3.44573523 2.44748943,3 2.99850233,3 L14.0014977,3 C14.5529553,3 15,3.44483697 15,3.9955775 L15,13.0044225 C15,13.5542648 14.5525106,14 14.0014977,14 L2.99850233,14 C2.44704472,14 2,13.555163 2,13.0044225 L2,3.9955775 Z M7.5,9 C8.32842712,9 9,8.32842712 9,7.5 C9,6.67157288 8.32842712,6 7.5,6 C6.67157288,6 6,6.67157288 6,7.5 C6,8.32842712 6.67157288,9 7.5,9 Z" id="Combined-Shape" fill="#000000"></path>
-            </g>
-            <g id="Group-2" transform="translate(40.000000, 0.000000)">
-                <rect id="Rectangle-1-Copy-3" fill="#E8F0FE" opacity="0" x="0" y="0" width="16" height="16"></rect>
-                <path d="M3,4 L13,4 L13,13.007983 C13,14.1081436 12.1125667,15 11.000385,15 L4.99961498,15 C3.89525812,15 3,14.0998238 3,13.007983 L3,4 Z M2,2 L14,2 L14,3 L2,3 L2,2 Z M5,1 L11,1 L11,2 L5,2 L5,1 Z" id="Combined-Shape" fill="#212121"></path>
-            </g>
-            <g id="Group" transform="translate(20.000000, 0.000000)">
-                <rect id="Rectangle-1-Copy-3" fill="#E8F0FE" opacity="0" x="0" y="0" width="16" height="16"></rect>
-                <path d="M6.5,3.22890114 L6.5,1 L9.5,1 L9.5,3.22890114 C10.2076308,3.45115512 10.8474694,3.82649178 11.3807038,4.31609894 L13.3121778,3.20096189 L14.8121778,5.79903811 L12.8816495,6.91362915 C12.9591395,7.26338859 13,7.62692256 13,8 C13,8.37307744 12.9591395,8.73661141 12.8816495,9.08637085 L14.8121778,10.2009619 L13.3121778,12.7990381 L11.3807038,11.6839011 C10.8474694,12.1735082 10.2076308,12.5488449 9.5,12.7710989 L9.5,15 L6.5,15 L6.5,12.7710989 C5.79236923,12.5488449 5.15253056,12.1735082 4.61929619,11.6839011 L2.68782217,12.7990381 L1.18782217,10.2009619 L3.11835049,9.08637085 C3.04086051,8.73661141 3,8.37307744 3,8 C3,7.62692256 3.04086051,7.26338859 3.11835049,6.91362915 L1.18782217,5.79903811 L2.68782217,3.20096189 L4.61929619,4.31609894 C5.15253056,3.82649178 5.79236923,3.45115512 6.5,3.22890114 Z M8,10.5 C9.38071187,10.5 10.5,9.38071187 10.5,8 C10.5,6.61928813 9.38071187,5.5 8,5.5 C6.61928813,5.5 5.5,6.61928813 5.5,8 C5.5,9.38071187 6.61928813,10.5 8,10.5 Z" id="Combined-Shape" fill="#212121"></path>
-            </g>
-            <g id="Group-2">
-                <rect id="Rectangle-1-Copy-3" x="0" y="0" width="16" height="16"></rect>
-                <g id="Group-5" transform="translate(3.000000, 1.000000)" fill="#000000">
-                    <path d="M6,-9.43689571e-16 L0.995397568,-9.43689571e-16 C0.455664396,-9.43689571e-16 -3.55271368e-15,0.450780073 -3.55271368e-15,1.00684547 L-3.55271368e-15,12.9931545 C-3.55271368e-15,13.5500512 0.445654671,14 0.995397568,14 L9.00460243,14 C9.5443356,14 10,13.5492199 10,12.9931545 L10,4 L6,-2.1649349e-15 Z M9.28999996,4 L6,4 L6,0.710000038 L9.28999996,4 Z" id="Combined-Shape"></path>
-                </g>
-            </g>
-        </g>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="140px"
+   height="20px"
+   viewBox="0 0 140 20"
+   version="1.1"
+   id="svg3369"
+   inkscape:version="0.48.4 r9939"
+   sodipodi:docname="resourceGlyphs.svg">
+  <metadata
+     id="metadata3417">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview3415"
+     showgrid="false"
+     inkscape:zoom="2.3357143"
+     inkscape:cx="57.178711"
+     inkscape:cy="10"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg3369" />
+  <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
+  <title
+     id="title3371">resourceGlyphs</title>
+  <desc
+     id="desc3373">Created with Sketch.</desc>
+  <defs
+     id="defs3375" />
+  <g
+     style="fill:none;stroke:none"
+     id="Cookies"
+     transform="translate(120,0)">
+    <polygon
+       id="bounds"
+       points="0,0 16,0 16,16 0,16 "
+       style="opacity:0;fill:#e8f0fe" />
+    <path
+       d="m 13.526316,6.25 -1.473684,0 0,-0.75 c 0,-0.414 -0.330106,-0.75 -0.736843,-0.75 l -1.4736837,0 0,-0.75 C 9.8421053,3.586 9.512,3.25 9.1052632,3.25 l -0.7368421,0 0,-1.5 C 8.3684211,1.423 8.1606316,1.153 7.874,1.0495 7.8202105,1.021 7.7494737,1 7.6315789,1 3.9687368,1 1,4.02175 1,7.75 c 0,3.7275 2.9687368,6.75 6.6315789,6.75 3.6628421,0 6.6315791,-3.0225 6.6315791,-6.75 l 0,-0.75 c 0,-0.414 -0.330105,-0.75 -0.736842,-0.75 l 0,0 z M 3.5789474,8.5 C 2.9681828,8.5 2.4736842,7.9966711 2.4736842,7.375 c 0,-0.6216711 0.4944986,-1.125 1.1052632,-1.125 0.6107646,0 1.1052631,0.5033289 1.1052631,1.125 0,0.6216711 -0.4944985,1.125 -1.1052631,1.125 l 0,0 z M 4.6842105,4.375 c 0,-0.62175 0.4951579,-1.125 1.1052632,-1.125 0.6108421,0 1.1052631,0.50325 1.1052631,1.125 0,0.621 -0.494421,1.125 -1.1052631,1.125 C 5.1793684,5.5 4.6842105,4.996 4.6842105,4.375 l 0,0 z M 6.8947368,13 C 6.2841472,13 5.7894737,12.496661 5.7894737,11.875376 5.7894737,11.25409 6.2841472,10.75 6.8947368,10.75 7.5053264,10.75 8,11.25409 8,11.875376 8,12.496661 7.5053264,13 6.8947368,13 l 0,0 z M 7.2631579,9.25 C 6.6530526,9.25 6.1578947,8.746 6.1578947,8.125 6.1578947,7.504 6.6530526,7 7.2631579,7 c 0.6101053,0 1.1052632,0.504 1.1052632,1.125 0,0.621 -0.4951579,1.125 -1.1052632,1.125 l 0,0 z m 3.6842101,1.5 c -0.610105,0 -1.1052627,-0.504 -1.1052627,-1.125 0,-0.621 0.4951577,-1.125 1.1052627,-1.125 0.610106,0 1.105264,0.504 1.105264,1.125 0,0.621 -0.495158,1.125 -1.105264,1.125 l 0,0 z"
+       id="Shape"
+       inkscape:connector-curvature="0"
+       style="fill:#212121" />
+  </g>
+  <g
+     style="fill:none;stroke:none"
+     id="Group-2"
+     transform="translate(60,0)">
+    <rect
+       id="Rectangle-1-Copy-3"
+       x="0"
+       y="0"
+       width="16"
+       height="16"
+       style="opacity:0;fill:#e8f0fe" />
+    <path
+       d="M 8,6 C 11.313709,6 14,5.1045695 14,4 14,2.8954305 11.313709,2 8,2 4.6862915,2 2,2.8954305 2,4 2,5.1045695 4.6862915,6 8,6 z m -6,7 c 0,1.10457 2.6862915,2 6,2 3.313709,0 6,-0.89543 6,-2 l 0,-2 c 0,1.10457 -2.686291,2 -6,2 -3.3137085,0 -6,-0.89543 -6,-2 l 0,2 z m 0,-3 c 0,1.10457 2.6862915,2 6,2 3.313709,0 6,-0.89543 6,-2 L 14,8 C 14,9.1045695 11.313709,10 8,10 4.6862915,10 2,9.1045695 2,8 l 0,2 z M 2,7 c 0,1.1045695 2.6862915,2 6,2 3.313709,0 6,-0.8954305 6,-2 L 14,5 C 14,6.1045695 11.313709,7 8,7 4.6862915,7 2,6.1045695 2,5 l 0,2 z"
+       id="Combined-Shape"
+       inkscape:connector-curvature="0"
+       style="fill:#000000" />
+  </g>
+  <g
+     style="fill:none;stroke:none"
+     id="g3385"
+     transform="translate(80,0)">
+    <rect
+       id="rect3387"
+       x="0"
+       y="0"
+       width="16"
+       height="16"
+       style="opacity:0;fill:#e8f0fe" />
+    <path
+       d="M 2,3.9989566 C 2,3.4472481 2.4509752,3 2.990778,3 L 8,3 8,6 2,6 2,3.9989566 z M 2,11 8,11 8,14 2.990778,14 C 2.4435864,14 2,13.55734 2,13.001043 L 2,11 z M 2,7 8,7 8,10 2,10 2,7 z M 9,3 14.009222,3 C 14.556414,3 15,3.4426603 15,3.9989566 L 15,6 9,6 9,3 z m 0,8 6,0 0,2.001043 C 15,13.552752 14.549025,14 14.009222,14 L 9,14 9,11 z m 0,-4 6,0 0,3 -6,0 0,-3 z"
+       id="path3389"
+       inkscape:connector-curvature="0"
+       style="fill:#212121" />
+  </g>
+  <g
+     style="fill:none;stroke:none"
+     id="g3397"
+     transform="translate(40,0)">
+    <rect
+       id="rect3399"
+       x="0"
+       y="0"
+       width="16"
+       height="16"
+       style="opacity:0;fill:#e8f0fe" />
+    <path
+       d="m 3,4 10,0 0,9.007983 C 13,14.108144 12.112567,15 11.000385,15 l -6.00077,0 C 3.8952581,15 3,14.099824 3,13.007983 L 3,4 z M 2,2 14,2 14,3 2,3 2,2 z M 5,1 11,1 11,2 5,2 5,1 z"
+       id="path3401"
+       inkscape:connector-curvature="0"
+       style="fill:#212121" />
+  </g>
+  <g
+     style="fill:none;stroke:none"
+     id="Group"
+     transform="translate(20,0)">
+    <rect
+       id="rect3404"
+       x="0"
+       y="0"
+       width="16"
+       height="16"
+       style="opacity:0;fill:#e8f0fe" />
+    <path
+       d="M 6.5,3.2289011 6.5,1 l 3,0 0,2.2289011 c 0.707631,0.222254 1.347469,0.5975907 1.880704,1.0871978 l 1.931474,-1.115137 1.5,2.5980762 -1.930528,1.114591 C 12.959139,7.2633886 13,7.6269226 13,8 13,8.3730774 12.95914,8.7366114 12.88165,9.0863709 l 1.930528,1.1145911 -1.5,2.598076 -1.931474,-1.115137 C 10.847469,12.173508 10.207631,12.548845 9.5,12.771099 L 9.5,15 l -3,0 0,-2.228901 C 5.7923692,12.548845 5.1525306,12.173508 4.6192962,11.683901 l -1.931474,1.115137 -1.5,-2.598076 1.9305283,-1.1145911 C 3.0408605,8.7366114 3,8.3730774 3,8 3,7.6269226 3.0408605,7.2633886 3.1183505,6.9136291 l -1.9305283,-1.114591 1.5,-2.5980762 1.931474,1.115137 C 5.1525306,3.8264918 5.7923692,3.4511551 6.5,3.2289011 z M 8,10.5 C 9.3807119,10.5 10.5,9.3807119 10.5,8 10.5,6.6192881 9.3807119,5.5 8,5.5 6.6192881,5.5 5.5,6.6192881 5.5,8 c 0,1.3807119 1.1192881,2.5 2.5,2.5 z"
+       id="path3406"
+       inkscape:connector-curvature="0"
+       style="fill:#212121" />
+  </g>
+  <g
+     style="fill:none;stroke:none"
+     id="g3408">
+    <rect
+       id="rect3410"
+       x="0"
+       y="0"
+       width="16"
+       height="16" />
+    <g
+       id="Group-5"
+       transform="translate(3,1)"
+       style="fill:#000000">
+      <path
+         d="M 6,0 0.99539757,0 C 0.4556644,0 0,0.45078007 0,1.0068455 L 0,12.993154 C 0,13.550051 0.44565467,14 0.99539757,14 L 9.0046024,14 C 9.5443356,14 10,13.54922 10,12.993154 L 10,4 6,0 z M 9.29,4 6,4 6,0.71000004 9.29,4 z"
+         id="path3413"
+         inkscape:connector-curvature="0" />
     </g>
-</svg>
\ No newline at end of file
+  </g>
+</svg>
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/src/smallIcons.svg b/third_party/WebKit/Source/devtools/front_end/Images/src/smallIcons.svg
index 96b3d53..7f08561 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/src/smallIcons.svg
+++ b/third_party/WebKit/Source/devtools/front_end/Images/src/smallIcons.svg
@@ -298,15 +298,15 @@
      inkscape:pageopacity="0.0"
      inkscape:pageshadow="2"
      inkscape:zoom="5.5"
-     inkscape:cx="140.93508"
+     inkscape:cx="119.1169"
      inkscape:cy="10.610521"
      inkscape:document-units="px"
      inkscape:current-layer="layer1"
      showgrid="true"
-     inkscape:window-width="1384"
-     inkscape:window-height="1040"
-     inkscape:window-x="829"
-     inkscape:window-y="333"
+     inkscape:window-width="1278"
+     inkscape:window-height="746"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
      inkscape:window-maximized="0">
     <inkscape:grid
        type="xygrid"
@@ -356,25 +356,6 @@
        id="path3705"
        inkscape:connector-curvature="0"
        style="stroke:#ffffff" />
-    <g
-       id="g3234"
-       transform="translate(-205,915.3622)">
-      <path
-         style="fill:url(#linearGradient3239)"
-         inkscape:connector-curvature="0"
-         id="path3699-5"
-         d="m 250,107 c -2.76,0 -5,2.24 -5,5 0,2.76 2.24,5 5,5 2.76,0 5,-2.24 5,-5 0,-2.76 -2.24,-5 -5,-5" />
-      <path
-         id="path3701-0"
-         d="m 245.36,112 c 0,2.56 2.08,4.64 4.64,4.64 2.56,0 4.64,-2.08 4.64,-4.64 0,-2.56 -2.08,-4.64 -4.64,-4.64 -2.56,0 -4.64,2.08 -4.64,4.64"
-         inkscape:connector-curvature="0"
-         style="fill:#f4979b;fill-opacity:1" />
-      <path
-         style="fill:#ffffff;fill-opacity:1"
-         id="path3689-2"
-         d="m 248.64912,113.55532 -1.12,-1.57887 -0.94113,0.9411 1.98332,2.80777 5.01668,-5.96555 -0.8711,-1.03445 z"
-         inkscape:connector-curvature="0" />
-    </g>
     <path
        d="m 61,1031.3622 4,-8 4,8 z"
        id="path3707"
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/src/svg2png.hashes b/third_party/WebKit/Source/devtools/front_end/Images/src/svg2png.hashes
index 777c1b61..9921efa 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/src/svg2png.hashes
+++ b/third_party/WebKit/Source/devtools/front_end/Images/src/svg2png.hashes
@@ -1,12 +1,12 @@
 {
     "securityIcons.svg": "27676f7c1f1542659c7c49a8052259dc",
-    "resourceGlyphs.svg": "8e1947b1fa4aac49cbc081f85f44d412",
+    "resourceGlyphs.svg": "ae5287ef4b10714c8858b5384c348b6a",
     "audits_logo_bw.svg": "203dcb2ba32ef0f4595ad45bb8feffab",
     "breakpointConditional.svg": "4cf90210b2af2ed84db2f60b07bcde28",
     "errorWave.svg": "e183fa242a22ed4784a92f6becbc2c45",
-    "smallIcons.svg": "e42007c7e8da94ecab276fd254f0623e",
+    "smallIcons.svg": "d884babbd1c785b92eb46ee736c95541",
     "settingsListRemove.svg": "ce9e7c5c5cdaef28e6ee51d9478d5485",
-    "toolbarButtonGlyphs.svg": "0c0a900daedf6dc35bd5b12424d8181c",
+    "toolbarButtonGlyphs.svg": "db0b7d1af08a57a11e5609e0b2cbbc01",
     "breakpoint.svg": "69cd92d807259c022791112809b97799",
     "search.svg": "fc990dd3836aec510d7ca1f36c2a3142",
     "audits_logo.svg": "647095d7981857c22a816eef12f75b91"
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/src/toolbarButtonGlyphs.svg b/third_party/WebKit/Source/devtools/front_end/Images/src/toolbarButtonGlyphs.svg
index 4834fe0c..8ee47f7b 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/src/toolbarButtonGlyphs.svg
+++ b/third_party/WebKit/Source/devtools/front_end/Images/src/toolbarButtonGlyphs.svg
@@ -21,13 +21,13 @@
            rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><sodipodi:namedview
      showgrid="true"
      id="namedview3397"
-     inkscape:zoom="5.6568542"
-     inkscape:cx="272.90169"
-     inkscape:cy="91.541869"
-     inkscape:window-width="1573"
-     inkscape:window-height="1037"
-     inkscape:window-x="81"
-     inkscape:window-y="268"
+     inkscape:zoom="2.8284271"
+     inkscape:cx="182.13015"
+     inkscape:cy="85.656284"
+     inkscape:window-width="1278"
+     inkscape:window-height="746"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
      inkscape:window-maximized="0"
      inkscape:current-layer="svg3395"
      inkscape:snap-global="true"
@@ -332,9 +332,6 @@
      d="m 80.44,16.94 c -2.48,0 -4.5,-2.02 -4.5,-4.5 0,-0.88 0.26,-1.7 0.69,-2.39 l 6.2,6.2 c -0.69,0.44 -1.51,0.69 -2.39,0.69 m 4.5,-4.5 c 0,0.88 -0.26,1.7 -0.69,2.39 l -6.2,-6.2 c 0.69,-0.44 1.51,-0.69 2.39,-0.69 2.48,0 4.5,2.02 4.5,4.5 M 80.5,6 C 76.91,6 74,8.91 74,12.5 74,16.09 76.91,19 80.5,19 84.09,19 87,16.09 87,12.5 87,8.91 84.09,6 80.5,6"
      id="path3505"
      inkscape:connector-curvature="0" /><path
-     d="m 117,65 -10,0 0,-10 10,0 0,10 z"
-     id="path3507"
-     inkscape:connector-curvature="0" /><path
      d="M 149,8.33 147.67,7 144,10.67 140.33,7 139,8.33 142.67,12 139,15.67 140.33,17 144,13.33 147.67,17 149,15.67 145.33,12 149,8.33 z"
      id="path3509"
      inkscape:connector-curvature="0" /><path
@@ -377,14 +374,6 @@
      d="m 298,36 c 0,3.31 2.69,6 6,6 3.31,0 6,-2.69 6,-6 0,-3.31 -2.69,-6 -6,-6 -3.31,0 -6,2.69 -6,6"
      id="path3559"
      inkscape:connector-curvature="0" /><path
-     d="m 233.73,63.76 5.25,-3.23 5.32,2.23 4.95,-4.03"
-     stroke-miterlimit="10"
-     id="path3563"
-     inkscape:connector-curvature="0"
-     style="fill:none;stroke:#000000;stroke-width:1.48000002;stroke-miterlimit:10" /><path
-     d="m 231,67 0,-13 -1,0 0,14 21,0 0,-1 z"
-     id="path3565"
-     inkscape:connector-curvature="0" /><path
      d="m 237,11 -4,0 0,-4 4,0 0,4 z"
      id="path3567"
      inkscape:connector-curvature="0" /><path
@@ -463,17 +452,7 @@
      inkscape:connector-curvature="0" /><path
      d="m 8,111 4,7 -8,0"
      id="path3623"
-     inkscape:connector-curvature="0" /><path
-     d="m 54,105 0,7 -10,0 0,-7 z m 1,8 0,-11 -12,0 0,11 z"
-     id="path3625"
      inkscape:connector-curvature="0" /><rect
-     height="3"
-     ry="0"
-     width="12"
-     x="73"
-     y="110"
-     id="rect3627"
-     style="opacity:0.81999984" /><rect
      height="12"
      width="14"
      x="168.5"
@@ -502,22 +481,6 @@
      x="204"
      y="78"
      id="rect3639" /><path
-     d="m 118,96 c -3.87,0 -7,3.13 -7,7 0,3.87 3.13,7 7,7 3.87,0 7,-3.13 7,-7 0,-3.87 -3.13,-7 -7,-7"
-     id="path3653"
-     inkscape:connector-curvature="0"
-     style="fill:url(#m)" /><path
-     d="m 111.5,103 c 0,3.59 2.91,6.5 6.5,6.5 3.59,0 6.5,-2.91 6.5,-6.5 0,-3.59 -2.91,-6.5 -6.5,-6.5 -3.59,0 -6.5,2.91 -6.5,6.5"
-     id="path3655"
-     inkscape:connector-curvature="0"
-     style="fill:#f27d82" /><path
-     d="m 121.5,100.93 -0.93,-0.93 -2.57,2.57 -2.57,-2.57 -0.93,0.93 2.57,2.57 -2.57,2.57 0.93,0.93 2.57,-2.57 2.57,2.57 0.93,-0.93 -2.57,-2.57 2.57,-2.57 z"
-     id="path3657"
-     inkscape:connector-curvature="0"
-     style="fill-opacity:0.36000001" /><path
-     d="m 121.5,100.43 -0.93,-0.93 -2.57,2.57 -2.57,-2.57 -0.93,0.93 2.57,2.57 -2.57,2.57 0.93,0.93 2.57,-2.57 2.57,2.57 0.93,-0.93 -2.57,-2.57 2.57,-2.57 z"
-     id="path3659"
-     inkscape:connector-curvature="0"
-     style="fill:#ffffff" /><path
      d="m 138.5,100.93 -0.93,-0.93 -2.57,2.57 -2.57,-2.57 -0.93,0.93 2.57,2.57 -2.57,2.57 0.93,0.93 2.57,-2.57 2.57,2.57 0.93,-0.93 -2.57,-2.57 2.57,-2.57 z"
      id="path3661"
      inkscape:connector-curvature="0"
@@ -526,22 +489,6 @@
      id="path3663"
      inkscape:connector-curvature="0"
      style="fill:#676767" /><path
-     d="m 103,110 c 3.87,0 7,-3.13 7,-7 0,-3.87 -3.13,-7 -7,-7 -3.87,0 -7,3.13 -7,7 0,3.87 3.13,7 7,7"
-     id="path3665"
-     inkscape:connector-curvature="0"
-     style="fill:url(#o)" /><path
-     d="m 103,96.5 c -3.59,0 -6.5,2.91 -6.5,6.5 0,3.59 2.91,6.5 6.5,6.5 3.59,0 6.5,-2.91 6.5,-6.5 0,-3.59 -2.91,-6.5 -6.5,-6.5"
-     id="path3667"
-     inkscape:connector-curvature="0"
-     style="fill:url(#n)" /><path
-     d="m 106.5,100.93 -0.93,-0.93 -2.57,2.57 -2.57,-2.57 -0.93,0.93 2.57,2.57 -2.57,2.57 0.93,0.93 2.57,-2.57 2.57,2.57 0.93,-0.93 -2.57,-2.57 2.57,-2.57 z"
-     id="path3669"
-     inkscape:connector-curvature="0"
-     style="fill:#993c35" /><path
-     d="m 106.5,100.43 -0.93,-0.93 -2.57,2.57 -2.57,-2.57 -0.93,0.93 2.57,2.57 -2.57,2.57 0.93,0.93 2.57,-2.57 2.57,2.57 0.93,-0.93 -2.57,-2.57 2.57,-2.57 z"
-     id="path3671"
-     inkscape:connector-curvature="0"
-     style="fill:#ffffff" /><path
      d="m 143,102.5 c 0,3.59 2.91,6.5 6.5,6.5 3.59,0 6.5,-2.91 6.5,-6.5 0,-3.59 -2.91,-6.5 -6.5,-6.5 -3.59,0 -6.5,2.91 -6.5,6.5"
      id="path3673"
      inkscape:connector-curvature="0"
@@ -623,16 +570,7 @@
      d="m 107,33 8,0 0,6 -8,0 z"
      id="path3963"
      inkscape:connector-curvature="0"
-     sodipodi:nodetypes="ccccc" /><g
-     id="Animations-Toggle"
-     transform="translate(199.99866,124.00442)"><path
-       d="M 6,2 12,8 6,14 0,8"
-       id="path3453"
-       inkscape:connector-curvature="0" /><path
-       d="M 8.5,12.5 10,14 16,8 10,2 8.5,3.5 13,8 8.5,12.5 z"
-       id="path3455"
-       inkscape:connector-curvature="0"
-       style="opacity:0.5" /></g><path
+     sodipodi:nodetypes="ccccc" /><path
      inkscape:connector-curvature="0"
      d="m 240.76701,127 -1.53402,0 0,4.23299 -4.23299,0 0,1.53402 4.23299,0 0,4.23299 1.53402,0 0,-4.23299 4.23299,0 0,-1.53402 -4.23299,0 0,-4.23299 z"
      id="path3509-0" /><path
@@ -654,11 +592,6 @@
          id="Shape"
          sketch:type="MSShapeGroup"
          inkscape:connector-curvature="0" /></g></g><path
-     d="m 276,127 1,-1 0,-1 -8,0 0,1 1,1 0,5 -2,1 0,2 4,0 -0.0447,3.9835 L 273,140 l 1,-1 0,-4 4,0 0,-2 -2,-1 0,-5 z"
-     id="path3214"
-     inkscape:connector-curvature="0"
-     style="fill:#010101"
-     sodipodi:nodetypes="ccccccccccccccccccc" /><path
      d="M 0,24 H 24 V 48 H 0 z"
      id="path3216"
      inkscape:connector-curvature="0"
@@ -804,13 +737,6 @@
      inkscape:connector-curvature="0"
      d="M 181.51625,154.52625 C 181.00625,151.94625 178.73,150 176,150 c -2.1675,0 -4.04625,1.23 -4.9875,3.02625 C 168.75875,153.27 167,155.17875 167,157.5 c 0,2.48625 2.01375,4.5 4.5,4.5 h 9.75 c 2.07,0 3.75,-1.68 3.75,-3.75 0,-1.98 -1.54125,-3.585 -3.48375,-3.72375 z M 181.25,160.5 h -9.75 c -1.6575,0 -3,-1.3425 -3,-3 0,-1.6575 1.3425,-3 3,-3 h 0.5325 c 0.49125,-1.72875 2.0775,-3 3.9675,-3 2.28,0 4.125,1.845 4.125,4.125 V 156 h 1.125 c 1.24125,0 2.25,1.00875 2.25,2.25 0,1.24125 -1.00875,2.25 -2.25,2.25 z"
      id="path3949" /><path
-     style="fill:none"
-     inkscape:connector-curvature="0"
-     d="m 230,148 h 18 v 18 h -18 z"
-     id="path3935" /><path
-     inkscape:connector-curvature="0"
-     d="m 246,152 h -5 l -2,-2 h -5 c -0.55,0 -1,0.45 -1,1 v 10 c 0,0.55 0.45,1 1,1 h 12 c 0.55,0 1,-0.45 1,-1 v -8 c 0,-0.55 -0.45,-1 -1,-1 z m -1,8 h -10 v -6 h 10 v 6 z"
-     id="path3937" /><path
      style="fill:#010101"
      inkscape:connector-curvature="0"
      d="m 278,150 h -10.5 c -0.8325,0 -1.5,0.675 -1.5,1.5 v 9 c 0,0.825 0.6675,1.5 1.5,1.5 H 278 c 0.825,0 1.5,-0.675 1.5,-1.5 v -9 c 0,-0.825 -0.6675,-1.5 -1.5,-1.5 z m 0,10.5 H 267.5 V 153 H 278 v 7.5 z"
@@ -859,17 +785,6 @@
      inkscape:connector-curvature="0"
      d="M 169,16.08946 V 19 h 2.91054 L 180.1944,10.71614 177.28385,7.8055997 169,16.08946 z m 13.76911,-7.9387003 c 0.30785,-0.30785 0.30785,-0.79294 0,-1.1007901 l -1.81908,-1.81909 c -0.30785,-0.3078399 -0.79295,-0.3078399 -1.10078,0 l -1.52058,1.52991 2.91054,2.9105401 1.5299,-1.52057 z"
      id="path4" /><g
-     style="fill:none;stroke:none"
-     id="Page-1-82"
-     sketch:type="MSPage"
-     transform="translate(264,100)"><g
-       style="fill:#000000"
-       id="Full"
-       sketch:type="MSLayerGroup"><path
-         inkscape:connector-curvature="0"
-         d="m 6.1674972,9.1763856 -2.2250867,2.2088114 0,-2.9960346 c 0,-0.26 -0.2112,-0.4677587 -0.4712052,-0.4677587 C 3.2112,7.9214037 3,8.1289899 3,8.3891624 l 0,4.1244826 c 0,0.119655 0.045158,0.239483 0.1375579,0.331035 0.0924,0.09172 0.2129368,0.136551 0.3336474,0.136551 l 4.1567842,0 c 0.2600052,0 0.4712052,-0.209482 0.4712052,-0.467758 0,-0.258276 -0.2110263,-0.467759 -0.4712052,-0.467759 l -3.0181106,0 5.1332369,-5.0975861 c 0.046878,-0.04601 0.081864,-0.099497 0.1049588,-0.1566711 l 2.2095154,-2.1933534 0,2.9962069 c 0,0.2582759 0.211026,0.4677587 0.471205,0.4677587 C 12.788974,8.062069 13,7.8525862 13,7.5943103 L 13,3.467931 C 13,3.3481035 12.954842,3.2282759 12.862442,3.1365517 12.770216,3.0448276 12.649505,3 12.528795,3 L 8.3720105,3 C 8.1118316,3 7.9008053,3.2096552 7.9008053,3.4681035 c 0,0.2581034 0.2110263,0.4677586 0.4712052,0.4677586 l 3.0179365,0 -5.1162154,5.0806896 c -0.047773,0.046933 -0.083184,0.101519 -0.1062344,0.1598339 z M 1,15 1,1 15,1 15,15 1,15 z M 1.6326531,0 C 0.73925744,0 0.00747187,0.82461191 5.6852594e-5,1.8357304 1.8975867e-5,1.8408953 0,14.14876 0,14.14876 0,15.166942 0.73469388,16 1.6326531,16 L 14.367347,16 C 15.265306,16 16,15.166942 16,14.14876 L 16,1.8512397 C 16,0.83305785 15.265306,0.0092562 14.367347,0.0092562 L 1.6326531,0 z"
-         sketch:type="MSShapeGroup"
-         id="path3590" /></g></g><g
      transform="translate(330,126)"
      style="fill:none;stroke:none"
      id="Page-1-3"
@@ -887,24 +802,6 @@
          d="M 6,14 3.5,14 C 2.5,14 2,13.5 2,12.5 l 0,-9 C 2,2.5 2.5,2 3.5,2 l 9,0 C 14,2 14,3.4678488 14,3.5 14,2 14,6 14,6 l -1,0 0,-3 -10,0 0,10 3,0 0,1 z m 8.999992,-5 -2.999984,1.99997 3,3 -1,1 -3,-3 L 8.9999924,15 l -2,-7.9999695 L 14.999992,9 l 0,0 z"
          sketch:type="MSShapeGroup"
          id="path3750" /></g></g><g
-     transform="translate(297,101)"
-     style="fill:none;stroke:none"
-     id="Page-1-9"
-     sketch:type="MSPage"><g
-       id="Responsive"
-       sketch:type="MSLayerGroup"
-       transform="translate(-1,-1)"><path
-         style="opacity:0.5"
-         inkscape:connector-curvature="0"
-         d="M 0,0 16,0 16,16 0,16 0,0 z"
-         id="bounds"
-         sketch:type="MSShapeGroup" /><path
-         style="fill:#000000"
-         inkscape:connector-curvature="0"
-         d="M 4.3095238,0 C 3.5892857,0 3,0.573 3,1.273 L 3,14.727 C 3,15.427 3.5892857,16 4.3095238,16 l 7.3809522,0 C 12.410714,16 13,15.427 13,14.727 L 13,1.273 C 13,0.573 12.410714,0.0063636 11.690476,0 z M 12,15 4,15 4,1 12,1 z m 2,-11 1,0 0,8 -1,0 z M 1,4 2,4 2,12 1,12 z"
-         id="responsive"
-         sketch:type="MSShapeGroup"
-         sodipodi:nodetypes="ssssssscsccccccccccccccc" /></g></g><g
      style="fill:none;stroke:none"
      id="Page-1-97"
      sketch:type="MSPage"
@@ -928,10 +825,7 @@
          inkscape:connector-curvature="0"
          d="m 8,13 c 2.761424,0 5,-2.238576 5,-5 C 13,5.2385763 10.761424,3 8,3 5.2385763,3 3,5.2385763 3,8 c 0,2.761424 2.2385763,5 5,5 z M 8,11 8,9 5,9 5,7 8,7 8,5 11,8 8,11 z"
          id="forward-right"
-         sketch:type="MSShapeGroup" /></g></g><path
-     inkscape:connector-curvature="0"
-     d="m 47.558737,139.53673 c 0.881189,0 1.594914,-0.65825 1.594914,-1.47095 h -3.189829 c 0,0.8127 0.713724,1.47095 1.594915,1.47095 z m 5.183471,-4.41282 v -4.04509 c 0,-2.26158 -1.702572,-4.14806 -3.987286,-4.64817 v -0.50012 c 0,-0.61044 -0.534296,-1.10321 -1.196185,-1.10321 -0.66189,0 -1.196186,0.49277 -1.196186,1.10321 v 0.50012 c -2.284715,0.50011 -3.987286,2.38659 -3.987286,4.64817 v 4.04509 l -1.594914,1.47093 v 0.73547 h 13.55677 v -0.73547 l -1.594913,-1.47093 z"
-     id="path4-4" /><g
+         sketch:type="MSShapeGroup" /></g></g><g
      transform="translate(235.08128,30.81372)"
      style="fill:none;stroke:none"
      id="Page-1-90"><g
@@ -992,21 +886,7 @@
            id="Combined-Shape-Copy-7"
            d="M 9,1 3.9953976,1 C 3.4556644,1 3,1.4507801 3,2.0068455 L 3,13.993154 C 3,14.550051 3.4456547,15 3.9953976,15 l 8.0092044,0 C 12.544336,15 13,14.54922 13,13.993154 L 13,5 9,1 9,1 z m 3,4 -3,0 0,-3 3,3 0,0 z M 6,7 11,9.5 6,12 6,7 6,7 z"
            inkscape:connector-curvature="0"
-           style="fill:#000000" /></g></g></g><rect
-     style="fill:none;stroke:none"
-     id="rect2992"
-     width="10"
-     height="10"
-     x="192"
-     y="96" /><g
-     style="fill:none;stroke:none"
-     id="Page-1-35"
-     transform="translate(192,96)"><g
-       style="fill:#000000"
-       id="from_file_icon"><path
-         inkscape:connector-curvature="0"
-         d="M 5.5,0 2.5029293,0 C 1.9378814,0 1.5,0.44565467 1.5,0.99539757 l 0,8.00920483 C 1.5,9.5443356 1.9490268,10 2.5029293,10 l 4.9941414,0 C 8.0621187,10 8.5,9.5543453 8.5,9.0046024 L 8.5,3 l -3,-3 0,0 z m 2,3 -2,0 0,-2 2,2 0,0 z"
-         id="Combined-Shape-Copy-2" /></g></g><g
+           style="fill:#000000" /></g></g></g><g
      style="fill:#000000;fill-rule:evenodd"
      id="g3545"
      transform="matrix(0.87152778,0,0,0.87152778,295.07107,147.56791)"><path
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs.png b/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs.png
index 1eafcac..1a9a628 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs.png
+++ b/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs.png
Binary files differ
diff --git a/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs_2x.png b/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs_2x.png
index afa1c011..8e7c1f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs_2x.png
+++ b/third_party/WebKit/Source/devtools/front_end/Images/toolbarButtonGlyphs_2x.png
Binary files differ
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
index 6474809..5b28d04 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/resources/ResourcesPanel.js
@@ -53,27 +53,39 @@
     this._applicationTreeElement.appendChild(clearStorageTreeElement);
 
     var storageTreeElement = this._addSidebarSection(Common.UIString('Storage'));
-    this.localStorageListTreeElement = new Resources.StorageCategoryTreeElement(
-        this, Common.UIString('Local Storage'), 'LocalStorage', ['table-tree-item', 'resource-tree-item']);
+    this.localStorageListTreeElement =
+        new Resources.StorageCategoryTreeElement(this, Common.UIString('Local Storage'), 'LocalStorage');
+    var localStorageIcon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.localStorageListTreeElement.setLeadingIcons([localStorageIcon]);
+
     storageTreeElement.appendChild(this.localStorageListTreeElement);
-    this.sessionStorageListTreeElement = new Resources.StorageCategoryTreeElement(
-        this, Common.UIString('Session Storage'), 'SessionStorage', ['table-tree-item', 'resource-tree-item']);
+    this.sessionStorageListTreeElement =
+        new Resources.StorageCategoryTreeElement(this, Common.UIString('Session Storage'), 'SessionStorage');
+    var sessionStorageIcon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.sessionStorageListTreeElement.setLeadingIcons([sessionStorageIcon]);
+
     storageTreeElement.appendChild(this.sessionStorageListTreeElement);
     this.indexedDBListTreeElement = new Resources.IndexedDBTreeElement(this);
     storageTreeElement.appendChild(this.indexedDBListTreeElement);
-    this.databasesListTreeElement = new Resources.StorageCategoryTreeElement(
-        this, Common.UIString('Web SQL'), 'Databases', ['database-tree-item', 'resource-tree-item']);
+    this.databasesListTreeElement =
+        new Resources.StorageCategoryTreeElement(this, Common.UIString('Web SQL'), 'Databases');
+    var databaseIcon = UI.Icon.create('mediumicon-database', 'resource-tree-item');
+    this.databasesListTreeElement.setLeadingIcons([databaseIcon]);
+
     storageTreeElement.appendChild(this.databasesListTreeElement);
-    this.cookieListTreeElement = new Resources.StorageCategoryTreeElement(
-        this, Common.UIString('Cookies'), 'Cookies', ['cookie-tree-item', 'resource-tree-item']);
+    this.cookieListTreeElement = new Resources.StorageCategoryTreeElement(this, Common.UIString('Cookies'), 'Cookies');
+    var cookieIcon = UI.Icon.create('mediumicon-cookie', 'resource-tree-item');
+    this.cookieListTreeElement.setLeadingIcons([cookieIcon]);
     storageTreeElement.appendChild(this.cookieListTreeElement);
 
     var cacheTreeElement = this._addSidebarSection(Common.UIString('Cache'));
     this.cacheStorageListTreeElement = new Resources.ServiceWorkerCacheTreeElement(this);
     cacheTreeElement.appendChild(this.cacheStorageListTreeElement);
-    this.applicationCacheListTreeElement = new Resources.StorageCategoryTreeElement(
-        this, Common.UIString('Application Cache'), 'ApplicationCache',
-        ['appcache-tree-item', 'table-tree-item', 'resource-tree-item']);
+    this.applicationCacheListTreeElement =
+        new Resources.StorageCategoryTreeElement(this, Common.UIString('Application Cache'), 'ApplicationCache');
+    var applicationCacheIcon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.applicationCacheListTreeElement.setLeadingIcons([applicationCacheIcon]);
+
     cacheTreeElement.appendChild(this.applicationCacheListTreeElement);
 
     this.resourcesListTreeElement = this._addSidebarSection(Common.UIString('Frames'));
@@ -837,19 +849,11 @@
   /**
    * @param {!Resources.ResourcesPanel} storagePanel
    * @param {string} title
-   * @param {?Array.<string>=} iconClasses
-   * @param {boolean=} expandable
-   * @param {boolean=} noIcon
+   * @param {boolean} expandable
    */
-  constructor(storagePanel, title, iconClasses, expandable, noIcon) {
+  constructor(storagePanel, title, expandable) {
     super(title, expandable);
     this._storagePanel = storagePanel;
-    for (var i = 0; iconClasses && i < iconClasses.length; ++i)
-      this.listItemElement.classList.add(iconClasses[i]);
-
-    this._iconClasses = iconClasses;
-    if (!noIcon)
-      this.createIcon();
   }
 
   /**
@@ -874,11 +878,9 @@
    * @param {!Resources.ResourcesPanel} storagePanel
    * @param {string} categoryName
    * @param {string} settingsKey
-   * @param {?Array.<string>=} iconClasses
-   * @param {boolean=} noIcon
    */
-  constructor(storagePanel, categoryName, settingsKey, iconClasses, noIcon) {
-    super(storagePanel, categoryName, iconClasses, false, noIcon);
+  constructor(storagePanel, categoryName, settingsKey) {
+    super(storagePanel, categoryName, false);
     this._expandedSetting =
         Common.settings.createSetting('resources' + settingsKey + 'Expanded', settingsKey === 'Frames');
     this._categoryName = categoryName;
@@ -938,9 +940,13 @@
    * @param {!SDK.ResourceTreeFrame} frame
    */
   constructor(storagePanel, frame) {
-    super(storagePanel, '', ['navigator-tree-item', 'navigator-frame-tree-item']);
+    super(storagePanel, '', false);
     this._frame = frame;
     this.frameNavigated(frame);
+
+    var icon = UI.Icon.create('largeicon-navigator-frame', 'navigator-tree-item');
+    icon.classList.add('navigator-frame-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   frameNavigated(frame) {
@@ -991,7 +997,7 @@
     var categoryElement = resourceType === Common.resourceTypes.Document ? this : this._categoryElements[categoryName];
     if (!categoryElement) {
       categoryElement = new Resources.StorageCategoryTreeElement(
-          this._storagePanel, resource.resourceType().category().title, categoryName, null, true);
+          this._storagePanel, resource.resourceType().category().title, categoryName);
       this._categoryElements[resourceType.name()] = categoryElement;
       this._insertInPresentationOrder(this, categoryElement);
     }
@@ -1059,13 +1065,16 @@
    * @param {!SDK.Resource} resource
    */
   constructor(storagePanel, resource) {
-    super(storagePanel, resource.displayName, [
-      'navigator-tree-item', 'navigator-file-tree-item', 'navigator-' + resource.resourceType().name() + '-tree-item'
-    ]);
+    super(storagePanel, resource.displayName, false);
     /** @type {!SDK.Resource} */
     this._resource = resource;
     this.tooltip = resource.url;
     this._resource[Resources.FrameResourceTreeElement._symbol] = this;
+
+    var icon = UI.Icon.create('largeicon-navigator-file', 'navigator-tree-item');
+    icon.classList.add('navigator-file-tree-item');
+    icon.classList.add('navigator-' + resource.resourceType().name() + '-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1141,8 +1150,11 @@
    * @param {!Resources.Database} database
    */
   constructor(storagePanel, database) {
-    super(storagePanel, database.name, ['database-tree-item', 'resource-tree-item'], true);
+    super(storagePanel, database.name, true);
     this._database = database;
+
+    var icon = UI.Icon.create('mediumicon-database', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1187,9 +1199,11 @@
  */
 Resources.DatabaseTableTreeElement = class extends Resources.BaseStorageTreeElement {
   constructor(storagePanel, database, tableName) {
-    super(storagePanel, tableName, ['table-tree-item', 'resource-tree-item']);
+    super(storagePanel, tableName, false);
     this._database = database;
     this._tableName = tableName;
+    var icon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1215,7 +1229,9 @@
    * @param {!Resources.ResourcesPanel} storagePanel
    */
   constructor(storagePanel) {
-    super(storagePanel, Common.UIString('Cache Storage'), 'CacheStorage', ['database-tree-item', 'resource-tree-item']);
+    super(storagePanel, Common.UIString('Cache Storage'), 'CacheStorage');
+    var icon = UI.Icon.create('mediumicon-database', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   _initialize() {
@@ -1321,9 +1337,11 @@
    * @param {!SDK.ServiceWorkerCacheModel.Cache} cache
    */
   constructor(storagePanel, model, cache) {
-    super(storagePanel, cache.cacheName + ' - ' + cache.securityOrigin, ['table-tree-item', 'resource-tree-item']);
+    super(storagePanel, cache.cacheName + ' - ' + cache.securityOrigin, false);
     this._model = model;
     this._cache = cache;
+    var icon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1385,7 +1403,9 @@
    * @param {!Resources.ResourcesPanel} storagePanel
    */
   constructor(storagePanel) {
-    super(storagePanel, Common.UIString('Service Workers'), ['service-worker-tree-item', 'resource-tree-item'], false);
+    super(storagePanel, Common.UIString('Service Workers'), false);
+    var icon = UI.Icon.create('mediumicon-service-worker', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   /**
@@ -1416,7 +1436,9 @@
    * @param {!Resources.ResourcesPanel} storagePanel
    */
   constructor(storagePanel) {
-    super(storagePanel, Common.UIString('Manifest'), ['manifest-tree-item', 'resource-tree-item'], false, false);
+    super(storagePanel, Common.UIString('Manifest'), false);
+    var icon = UI.Icon.create('mediumicon-manifest', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   /**
@@ -1447,9 +1469,9 @@
    * @param {!Resources.ResourcesPanel} storagePanel
    */
   constructor(storagePanel) {
-    super(
-        storagePanel, Common.UIString('Clear storage'), ['clear-storage-tree-item', 'resource-tree-item'], false,
-        false);
+    super(storagePanel, Common.UIString('Clear storage'), false);
+    var icon = UI.Icon.create('mediumicon-clear-storage', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   /**
@@ -1480,7 +1502,9 @@
    * @param {!Resources.ResourcesPanel} storagePanel
    */
   constructor(storagePanel) {
-    super(storagePanel, Common.UIString('IndexedDB'), 'IndexedDB', ['database-tree-item', 'resource-tree-item']);
+    super(storagePanel, Common.UIString('IndexedDB'), 'IndexedDB');
+    var icon = UI.Icon.create('mediumicon-database', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   _initialize() {
@@ -1602,12 +1626,12 @@
    * @param {!Resources.IndexedDBModel.DatabaseId} databaseId
    */
   constructor(storagePanel, model, databaseId) {
-    super(
-        storagePanel, databaseId.name + ' - ' + databaseId.securityOrigin,
-        ['database-tree-item', 'resource-tree-item']);
+    super(storagePanel, databaseId.name + ' - ' + databaseId.securityOrigin, false);
     this._model = model;
     this._databaseId = databaseId;
     this._idbObjectStoreTreeElements = {};
+    var icon = UI.Icon.create('mediumicon-database', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1704,10 +1728,12 @@
    * @param {!Resources.IndexedDBModel.ObjectStore} objectStore
    */
   constructor(storagePanel, model, databaseId, objectStore) {
-    super(storagePanel, objectStore.name, ['table-tree-item', 'resource-tree-item']);
+    super(storagePanel, objectStore.name, false);
     this._model = model;
     this._databaseId = databaseId;
     this._idbIndexTreeElements = {};
+    var icon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1828,7 +1854,7 @@
    * @param {!Resources.IndexedDBModel.Index} index
    */
   constructor(storagePanel, model, databaseId, objectStore, index) {
-    super(storagePanel, index.name, ['index-tree-item', 'resource-tree-item']);
+    super(storagePanel, index.name, false);
     this._model = model;
     this._databaseId = databaseId;
     this._objectStore = objectStore;
@@ -1887,10 +1913,10 @@
  */
 Resources.DOMStorageTreeElement = class extends Resources.BaseStorageTreeElement {
   constructor(storagePanel, domStorage) {
-    super(
-        storagePanel, domStorage.securityOrigin ? domStorage.securityOrigin : Common.UIString('Local Files'),
-        ['table-tree-item', 'resource-tree-item']);
+    super(storagePanel, domStorage.securityOrigin ? domStorage.securityOrigin : Common.UIString('Local Files'), false);
     this._domStorage = domStorage;
+    var icon = UI.Icon.create('mediumicon-table', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1928,11 +1954,11 @@
  */
 Resources.CookieTreeElement = class extends Resources.BaseStorageTreeElement {
   constructor(storagePanel, frame, cookieDomain) {
-    super(
-        storagePanel, cookieDomain ? cookieDomain : Common.UIString('Local Files'),
-        ['cookie-tree-item', 'resource-tree-item']);
+    super(storagePanel, cookieDomain ? cookieDomain : Common.UIString('Local Files'), false);
     this._frame = frame;
     this._cookieDomain = cookieDomain;
+    var icon = UI.Icon.create('mediumicon-cookie', 'resource-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
@@ -1980,7 +2006,7 @@
 Resources.ApplicationCacheManifestTreeElement = class extends Resources.BaseStorageTreeElement {
   constructor(storagePanel, manifestURL) {
     var title = new Common.ParsedURL(manifestURL).displayName;
-    super(storagePanel, title, ['application-cache-storage-tree-item']);
+    super(storagePanel, title, false);
     this.tooltip = manifestURL;
     this._manifestURL = manifestURL;
   }
@@ -2014,10 +2040,14 @@
    * @param {string} manifestURL
    */
   constructor(storagePanel, frameId, manifestURL) {
-    super(storagePanel, '', ['navigator-tree-item', 'navigator-folder-tree-item']);
+    super(storagePanel, '', false);
     this._frameId = frameId;
     this._manifestURL = manifestURL;
     this._refreshTitles();
+
+    var icon = UI.Icon.create('largeicon-navigator-folder', 'navigator-tree-item');
+    icon.classList.add('navigator-folder-tree-item');
+    this.setLeadingIcons([icon]);
   }
 
   get itemURL() {
diff --git a/third_party/WebKit/Source/devtools/front_end/resources/resourcesSidebar.css b/third_party/WebKit/Source/devtools/front_end/resources/resourcesSidebar.css
index b05dff4..ccebe240 100644
--- a/third_party/WebKit/Source/devtools/front_end/resources/resourcesSidebar.css
+++ b/third_party/WebKit/Source/devtools/front_end/resources/resourcesSidebar.css
@@ -13,12 +13,6 @@
     padding-bottom: 10px;
 }
 
-.icon {
-    width: 16px;
-    height: 16px;
-    margin-right: 4px;
-}
-
 .tree-outline li {
     min-height: 20px;
 }
@@ -32,107 +26,35 @@
     display: none;
 }
 
-.navigator-tree-item .icon {
-    -webkit-mask-image: url(Images/toolbarButtonGlyphs.png);
-    -webkit-mask-size: 352px 168px;
-    width: 32px;
-    height: 20px;
-    -webkit-mask-position: -224px -72px;
-    position: relative;
-    top: -2px;
-    margin-right: -3px;
-    margin-left: -9px;
+.navigator-tree-item {
+    margin: -3px -7px -3px -7px;
 }
 
-@media (-webkit-min-device-pixel-ratio: 1.1) {
-.navigator-tree-item .icon {
-    -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png);
-}
-} /* media */
-
-.navigator-file-tree-item .icon {
-    -webkit-mask-position: -224px -72px;
+.navigator-file-tree-item {
     background: linear-gradient(45deg, hsl(0, 0%, 50%), hsl(0, 0%, 70%));
 }
 
-:focus .navigator-file-tree-item.selected .icon,
-:focus .navigator-folder-tree-item.selected .icon,
-:focus .navigator-frame-tree-item.selected .icon {
-    background: white !important;
-}
-
-.navigator-folder-tree-item .icon {
-    -webkit-mask-position: -64px -120px;
+.navigator-folder-tree-item {
     background: linear-gradient(45deg, hsl(210, 82%, 65%), hsl(210, 82%, 80%));
 }
 
-.navigator-domain-tree-item .icon  {
-    -webkit-mask-position: -160px -144px;
-}
-
-.navigator-frame-tree-item .icon {
-    -webkit-mask-position: -256px -144px;
+.navigator-frame-tree-item {
     background-color: #5a5a5a;
 }
 
-.navigator-script-tree-item .icon {
+.navigator-script-tree-item {
     background: linear-gradient(45deg, hsl(48, 70%, 50%), hsl(48, 70%, 70%));
 }
 
-.navigator-stylesheet-tree-item .icon {
+.navigator-stylesheet-tree-item {
     background: linear-gradient(45deg, hsl(256, 50%, 50%), hsl(256, 50%, 70%));
 }
 
-.navigator-image-tree-item .icon,
-.navigator-font-tree-item .icon {
+.navigator-image-tree-item,
+.navigator-font-tree-item {
     background: linear-gradient(45deg, hsl(109, 33%, 50%), hsl(109, 33%, 70%));
 }
 
-.resource-tree-item .icon {
-    -webkit-mask: url(Images/resourceGlyphs.png) no-repeat 0 0;
-    -webkit-mask-size: 140px 20px;
+.resource-tree-item {
     background: rgba(90, 90, 90, .7);
 }
-
-@media (-webkit-min-device-pixel-ratio: 1.1) {
-.resource-tree-item .icon {
-    -webkit-mask-image: url(Images/resourceGlyphs_2x.png);
-}
-} /* media */
-
-:focus .resource-tree-item.selected .icon {
-    background: white !important;
-}
-
-.database-tree-item .icon {
-    -webkit-mask-position: -60px 0;
-}
-
-.table-tree-item .icon {
-    -webkit-mask-position: -80px 0;
-}
-
-:focus .service-workers-tree-item.selected .icon {
-    -webkit-filter: invert();
-}
-
-.-theme-with-dark-background .service-workers-tree-item .icon,
-{
-    -webkit-filter: invert(70%);
-}
-
-.cookie-tree-item .icon {
-    -webkit-mask-position: -120px 0;
-}
-
-.manifest-tree-item .icon {
-    -webkit-mask-position: 0 0;
-}
-
-.service-worker-tree-item .icon {
-    -webkit-mask-position: -20px 0;
-}
-
-.clear-storage-tree-item .icon {
-    -webkit-mask-position: -40px 0;
-}
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Icon.js b/third_party/WebKit/Source/devtools/front_end/ui/Icon.js
index fdf9579..69b8e95 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Icon.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Icon.js
@@ -223,4 +223,11 @@
   'largeicon-navigator-snippet': {x: -224, y: -96, width: 32, height: 24, spritesheet: 'largeicons', isMask: true},
   'largeicon-edit': {x: -160, y: -0, width: 28, height: 24, spritesheet: 'largeicons'},
   'largeicon-chevron': {x: -68, y: -143, width: 24, height: 26, spritesheet: 'largeicons', isMask: true},
+
+  'mediumicon-manifest': {x: 0, y: -0, width: 16, height: 16, spritesheet: 'resourceicons', isMask: true},
+  'mediumicon-service-worker': {x: -20, y: -0, width: 16, height: 16, spritesheet: 'resourceicons', isMask: true},
+  'mediumicon-clear-storage': {x: -40, y: -0, width: 16, height: 16, spritesheet: 'resourceicons', isMask: true},
+  'mediumicon-database': {x: -60, y: -0, width: 16, height: 16, spritesheet: 'resourceicons', isMask: true},
+  'mediumicon-table': {x: -80, y: -0, width: 16, height: 16, spritesheet: 'resourceicons', isMask: true},
+  'mediumicon-cookie': {x: -120, y: -0, width: 16, height: 16, spritesheet: 'resourceicons', isMask: true},
 };
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css b/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css
index b7b1dc6e..d475f15c 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css
+++ b/third_party/WebKit/Source/devtools/front_end/ui/inspectorCommon.css
@@ -351,6 +351,16 @@
     -webkit-mask-size: 352px 168px;
 }
 
+.spritesheet-resourceicons:not(.icon-mask) {
+    background-image: -webkit-image-set(url(Images/resourceGlyphs.png) 1x, url(Images/resourceGlyphs_2x.png) 2x);
+    background-size: 140px 20px;
+}
+
+.spritesheet-resourceicons.icon-mask {
+    -webkit-mask-image: -webkit-image-set(url(Images/resourceGlyphs.png) 1x, url(Images/resourceGlyphs_2x.png) 2x);
+    -webkit-mask-size: 140px 20px;
+}
+
 .force-white-icons [is=ui-icon].spritesheet-smallicons, [is=ui-icon].force-white-icons.spritesheet-smallicons {
     -webkit-mask-image: -webkit-image-set(url(Images/smallIcons.png) 1x, url(Images/smallIcons_2x.png) 2x);
     -webkit-mask-size: 190px 30px;
@@ -368,3 +378,12 @@
     background: unset;
     background-color: white;
 }
+
+.force-white-icons [is=ui-icon].spritesheet-resourceicons, [is=ui-icon].force-white-icons.spritesheet-resourceicons {
+    -webkit-mask-image: -webkit-image-set(url(Images/resourceGlyphs.png) 1x, url(Images/resourceGlyphs_2x.png) 2x);
+    -webkit-mask-size: 140px 20px;
+    background-image: unset;
+    background-size: unset;
+    background: unset;
+    background-color: white;
+}
\ No newline at end of file
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
index b32588b..825e66b 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/treeoutline.js
@@ -611,8 +611,6 @@
     }
 
     this._listItemNode.removeChildren();
-    if (this._iconElement)
-      this._listItemNode.appendChild(this._iconElement);
     if (this._leadingIconsElement)
       this._listItemNode.appendChild(this._leadingIconsElement);
     this._listItemNode.appendChild(this._titleElement);
@@ -640,14 +638,6 @@
     this.treeOutline._shadowRoot.getSelection().setBaseAndExtent(this._titleElement, 0, this._titleElement, 1);
   }
 
-  createIcon() {
-    if (!this._iconElement) {
-      this._iconElement = createElementWithClass('div', 'icon');
-      this._listItemNode.insertBefore(this._iconElement, this._listItemNode.firstChild);
-      this._ensureSelection();
-    }
-  }
-
   /**
    * @param {!Array<!UI.Icon>} icons
    */
diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/SearchConfig.js b/third_party/WebKit/Source/devtools/front_end/workspace/SearchConfig.js
index 64e4912a..a85ef7a 100644
--- a/third_party/WebKit/Source/devtools/front_end/workspace/SearchConfig.js
+++ b/third_party/WebKit/Source/devtools/front_end/workspace/SearchConfig.js
@@ -58,20 +58,20 @@
   }
 
   _parse() {
-    var filePattern =
-        '-?f(ile)?:(([^\\\\ ]|\\\\.)+)';  // After file: prefix: any symbol except space and backslash or any symbol escaped with a backslash.
-    var quotedPattern =
-        '"(([^\\\\"]|\\\\.)+)"';  // Inside double quotes: any symbol except double quote and backslash or any symbol escaped with a backslash.
-
+    // Inside double quotes: any symbol except double quote and backslash or any symbol escaped with a backslash.
+    var quotedPattern = /"([^\\"]|\\.)+"/;
     // A word is a sequence of any symbols except space and backslash or any symbols escaped with a backslash, that does not start with file:.
-    var unquotedWordPattern = '(\\s*(?!-?f(ile)?:)[^\\\\ ]|\\\\.)+';
-    var unquotedPattern =
-        unquotedWordPattern + '( +' + unquotedWordPattern + ')*';  // A word or several words separated by space(s).
+    var unquotedWordPattern = /(\s*(?!-?f(ile)?:)[^\\ ]|\\.)+/;
+    var unquotedPattern = unquotedWordPattern.source + '(\\s+' + unquotedWordPattern.source + ')*';
 
-    var pattern = '(' + filePattern + ')|(' + quotedPattern + ')|(' + unquotedPattern + ')';
+
+    var pattern = [
+      '(\\s*' + Workspace.SearchConfig.FilePatternRegex.source + '\\s*)',
+      '(' + quotedPattern.source + ')',
+      '(' + unquotedPattern + ')',
+    ].join('|');
     var regexp = new RegExp(pattern, 'g');
     var queryParts = this._query.match(regexp) || [];
-
     /**
      * @type {!Array.<!Workspace.SearchConfig.QueryTerm>}
      */
@@ -145,11 +145,11 @@
    * @return {?Workspace.SearchConfig.QueryTerm}
    */
   _parseFileQuery(query) {
-    var match = query.match(/^(-)?f(ile)?:/);
+    var match = query.match(Workspace.SearchConfig.FilePatternRegex);
     if (!match)
       return null;
     var isNegative = !!match[1];
-    query = query.substr(match[0].length);
+    query = match[3];
     var result = '';
     for (var i = 0; i < query.length; ++i) {
       var char = query[i];
@@ -170,6 +170,9 @@
   }
 };
 
+// After file: prefix: any symbol except space and backslash or any symbol escaped with a backslash.
+Workspace.SearchConfig.FilePatternRegex = /(-)?f(ile)?:((?:[^\\ ]|\\.)+)/;
+
 /** @typedef {!{regex: !RegExp, isNegative: boolean}} */
 Workspace.SearchConfig.RegexQuery;
 
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
index b6c9329..a59b198 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/directory_owners_extractor.py
@@ -64,7 +64,6 @@
             A dict mapping (owner) email addresses to (owned) directories.
         """
         tests = [self.finder.layout_test_name(path) for path in changed_files]
-        print tests
         tests = [t for t in tests if t is not None]
         email_map = {}
         for directory, owners in self.owner_map.iteritems():
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
index 46d271a..cd5c166 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/test_importer.py
@@ -75,7 +75,7 @@
         _log.info('Local path: %s', temp_repo_path)
         self.run(['git', 'clone', repo_url, temp_repo_path])
 
-        if options.target == 'wpt':
+        if options.target == 'wpt' and not options.ignore_exportable_commits:
             commits = self.exportable_but_not_exported_commits(temp_repo_path)
             if commits:
                 _log.error('There were exportable but not-yet-exported commits:')
@@ -122,6 +122,8 @@
                             help='uploads CL and initiates commit queue.')
         parser.add_argument('--auth-refresh-token-json',
                             help='Rietveld auth refresh JSON token.')
+        parser.add_argument('--ignore-exportable-commits', action='store_true',
+                            help='Continue even if there are exportable commits that may be overwritten.')
         return parser.parse_args(argv)
 
     def checkout_is_okay(self, allow_local_commits):