diff --git a/DEPS b/DEPS
index 69417dd..54b3ee98 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': 'bd228187f74b5073206cdee21415adc9c08588ab',
+  'v8_revision': 'ad5116b06454d0cf88d7f4f362833a23b84e26b7',
   # 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/base/json/json_writer_unittest.cc b/base/json/json_writer_unittest.cc
index de4ab61..1b57e06 100644
--- a/base/json/json_writer_unittest.cc
+++ b/base/json/json_writer_unittest.cc
@@ -111,29 +111,29 @@
 
   // Binary values should return errors unless suppressed via the
   // OPTIONS_OMIT_BINARY_VALUES flag.
-  std::unique_ptr<Value> root(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  std::unique_ptr<Value> root(Value::CreateWithCopiedBuffer("asdf", 4));
   EXPECT_FALSE(JSONWriter::Write(*root, &output_js));
   EXPECT_TRUE(JSONWriter::WriteWithOptions(
       *root, JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &output_js));
   EXPECT_TRUE(output_js.empty());
 
   ListValue binary_list;
-  binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  binary_list.Append(Value::CreateWithCopiedBuffer("asdf", 4));
   binary_list.Append(MakeUnique<Value>(5));
-  binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  binary_list.Append(Value::CreateWithCopiedBuffer("asdf", 4));
   binary_list.Append(MakeUnique<Value>(2));
-  binary_list.Append(BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  binary_list.Append(Value::CreateWithCopiedBuffer("asdf", 4));
   EXPECT_FALSE(JSONWriter::Write(binary_list, &output_js));
   EXPECT_TRUE(JSONWriter::WriteWithOptions(
       binary_list, JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &output_js));
   EXPECT_EQ("[5,2]", output_js);
 
   DictionaryValue binary_dict;
-  binary_dict.Set("a", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  binary_dict.Set("a", Value::CreateWithCopiedBuffer("asdf", 4));
   binary_dict.SetInteger("b", 5);
-  binary_dict.Set("c", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  binary_dict.Set("c", Value::CreateWithCopiedBuffer("asdf", 4));
   binary_dict.SetInteger("d", 2);
-  binary_dict.Set("e", BinaryValue::CreateWithCopiedBuffer("asdf", 4));
+  binary_dict.Set("e", Value::CreateWithCopiedBuffer("asdf", 4));
   EXPECT_FALSE(JSONWriter::Write(binary_dict, &output_js));
   EXPECT_TRUE(JSONWriter::WriteWithOptions(
       binary_dict, JSONWriter::OPTIONS_OMIT_BINARY_VALUES, &output_js));
diff --git a/base/trace_event/trace_event_memory_overhead.cc b/base/trace_event/trace_event_memory_overhead.cc
index 8d56e1d8..ffc4c08 100644
--- a/base/trace_event/trace_event_memory_overhead.cc
+++ b/base/trace_event/trace_event_memory_overhead.cc
@@ -84,9 +84,9 @@
     } break;
 
     case Value::Type::BINARY: {
-      const BinaryValue* binary_value = nullptr;
+      const Value* binary_value = nullptr;
       value.GetAsBinary(&binary_value);
-      Add("BinaryValue", sizeof(BinaryValue) + binary_value->GetSize());
+      Add("BinaryValue", sizeof(Value) + binary_value->GetSize());
     } break;
 
     case Value::Type::DICTIONARY: {
diff --git a/base/values.cc b/base/values.cc
index 23d2b38..ca12edc 100644
--- a/base/values.cc
+++ b/base/values.cc
@@ -76,10 +76,9 @@
 }  // namespace
 
 // static
-std::unique_ptr<BinaryValue> BinaryValue::CreateWithCopiedBuffer(
-    const char* buffer,
-    size_t size) {
-  return MakeUnique<BinaryValue>(std::vector<char>(buffer, buffer + size));
+std::unique_ptr<Value> Value::CreateWithCopiedBuffer(const char* buffer,
+                                                     size_t size) {
+  return MakeUnique<Value>(std::vector<char>(buffer, buffer + size));
 }
 
 Value::Value(const Value& that) {
@@ -298,7 +297,7 @@
   return is_string();
 }
 
-bool Value::GetAsBinary(const BinaryValue** out_value) const {
+bool Value::GetAsBinary(const Value** out_value) const {
   if (out_value && is_blob()) {
     *out_value = this;
     return true;
@@ -795,7 +794,7 @@
 }
 
 bool DictionaryValue::GetBinary(StringPiece path,
-                                const BinaryValue** out_value) const {
+                                const Value** out_value) const {
   const Value* value;
   bool result = Get(path, &value);
   if (!result || !value->IsType(Type::BINARY))
@@ -807,10 +806,9 @@
   return true;
 }
 
-bool DictionaryValue::GetBinary(StringPiece path, BinaryValue** out_value) {
+bool DictionaryValue::GetBinary(StringPiece path, Value** out_value) {
   return static_cast<const DictionaryValue&>(*this).GetBinary(
-      path,
-      const_cast<const BinaryValue**>(out_value));
+      path, const_cast<const Value**>(out_value));
 }
 
 bool DictionaryValue::GetDictionary(StringPiece path,
@@ -1156,7 +1154,7 @@
   return value->GetAsString(out_value);
 }
 
-bool ListValue::GetBinary(size_t index, const BinaryValue** out_value) const {
+bool ListValue::GetBinary(size_t index, const Value** out_value) const {
   const Value* value;
   bool result = Get(index, &value);
   if (!result || !value->IsType(Type::BINARY))
@@ -1168,10 +1166,9 @@
   return true;
 }
 
-bool ListValue::GetBinary(size_t index, BinaryValue** out_value) {
+bool ListValue::GetBinary(size_t index, Value** out_value) {
   return static_cast<const ListValue&>(*this).GetBinary(
-      index,
-      const_cast<const BinaryValue**>(out_value));
+      index, const_cast<const Value**>(out_value));
 }
 
 bool ListValue::GetDictionary(size_t index,
diff --git a/base/values.h b/base/values.h
index 9509c95..ace8b436 100644
--- a/base/values.h
+++ b/base/values.h
@@ -40,7 +40,6 @@
 class DictionaryValue;
 class ListValue;
 class Value;
-using BinaryValue = Value;
 
 // The Value class is the base class for Values. A Value can be instantiated
 // via the Create*Value() factory methods, or by directly creating instances of
@@ -69,8 +68,8 @@
   // buffer that's passed in.
   // DEPRECATED, use MakeUnique<Value>(const std::vector<char>&) instead.
   // TODO(crbug.com/646113): Delete this and migrate callsites.
-  static std::unique_ptr<BinaryValue> CreateWithCopiedBuffer(const char* buffer,
-                                                             size_t size);
+  static std::unique_ptr<Value> CreateWithCopiedBuffer(const char* buffer,
+                                                       size_t size);
 
   Value(const Value& that);
   Value(Value&& that) noexcept;
@@ -145,7 +144,7 @@
   bool GetAsString(string16* out_value) const;
   bool GetAsString(const Value** out_value) const;
   bool GetAsString(StringPiece* out_value) const;
-  bool GetAsBinary(const BinaryValue** out_value) const;
+  bool GetAsBinary(const Value** out_value) const;
   // ListValue::From is the equivalent for std::unique_ptr conversions.
   bool GetAsList(ListValue** out_value);
   bool GetAsList(const ListValue** out_value) const;
@@ -289,8 +288,8 @@
   bool GetString(StringPiece path, std::string* out_value) const;
   bool GetString(StringPiece path, string16* out_value) const;
   bool GetStringASCII(StringPiece path, std::string* out_value) const;
-  bool GetBinary(StringPiece path, const BinaryValue** out_value) const;
-  bool GetBinary(StringPiece path, BinaryValue** out_value);
+  bool GetBinary(StringPiece path, const Value** out_value) const;
+  bool GetBinary(StringPiece path, Value** out_value);
   bool GetDictionary(StringPiece path,
                      const DictionaryValue** out_value) const;
   bool GetDictionary(StringPiece path, DictionaryValue** out_value);
@@ -421,8 +420,8 @@
   bool GetDouble(size_t index, double* out_value) const;
   bool GetString(size_t index, std::string* out_value) const;
   bool GetString(size_t index, string16* out_value) const;
-  bool GetBinary(size_t index, const BinaryValue** out_value) const;
-  bool GetBinary(size_t index, BinaryValue** out_value);
+  bool GetBinary(size_t index, const Value** out_value) const;
+  bool GetBinary(size_t index, Value** out_value);
   bool GetDictionary(size_t index, const DictionaryValue** out_value) const;
   bool GetDictionary(size_t index, DictionaryValue** out_value);
   bool GetList(size_t index, const ListValue** out_value) const;
diff --git a/base/values_unittest.cc b/base/values_unittest.cc
index 2c7ffd6..077f54c 100644
--- a/base/values_unittest.cc
+++ b/base/values_unittest.cc
@@ -100,7 +100,7 @@
 }
 
 TEST(ValuesTest, ConstructBinary) {
-  BinaryValue value(std::vector<char>({0xF, 0x0, 0x0, 0xB, 0xA, 0x2}));
+  Value value(std::vector<char>({0xF, 0x0, 0x0, 0xB, 0xA, 0x2}));
   EXPECT_EQ(Value::Type::BINARY, value.type());
   EXPECT_EQ(std::vector<char>({0xF, 0x0, 0x0, 0xB, 0xA, 0x2}), value.GetBlob());
 }
@@ -180,8 +180,8 @@
 }
 
 TEST(ValuesTest, CopyBinary) {
-  BinaryValue value(std::vector<char>({0xF, 0x0, 0x0, 0xB, 0xA, 0x2}));
-  BinaryValue copied_value(value);
+  Value value(std::vector<char>({0xF, 0x0, 0x0, 0xB, 0xA, 0x2}));
+  Value copied_value(value);
   EXPECT_EQ(value.type(), copied_value.type());
   EXPECT_EQ(value.GetBlob(), copied_value.GetBlob());
 
@@ -300,14 +300,14 @@
 
 TEST(ValuesTest, MoveBinary) {
   const std::vector<char> buffer = {0xF, 0x0, 0x0, 0xB, 0xA, 0x2};
-  BinaryValue value(buffer);
-  BinaryValue moved_value(std::move(value));
+  Value value(buffer);
+  Value moved_value(std::move(value));
   EXPECT_EQ(Value::Type::BINARY, moved_value.type());
   EXPECT_EQ(buffer, moved_value.GetBlob());
 
   Value blank;
 
-  blank = BinaryValue(buffer);
+  blank = Value(buffer);
   EXPECT_EQ(Value::Type::BINARY, blank.type());
   EXPECT_EQ(buffer, blank.GetBlob());
 }
@@ -451,7 +451,7 @@
   // Test the common case of a non-empty buffer
   std::vector<char> buffer(15);
   char* original_buffer = buffer.data();
-  binary.reset(new BinaryValue(std::move(buffer)));
+  binary.reset(new Value(std::move(buffer)));
   ASSERT_TRUE(binary.get());
   ASSERT_TRUE(binary->GetBuffer());
   ASSERT_EQ(original_buffer, binary->GetBuffer());
@@ -459,7 +459,7 @@
 
   char stack_buffer[42];
   memset(stack_buffer, '!', 42);
-  binary = BinaryValue::CreateWithCopiedBuffer(stack_buffer, 42);
+  binary = Value::CreateWithCopiedBuffer(stack_buffer, 42);
   ASSERT_TRUE(binary.get());
   ASSERT_TRUE(binary->GetBuffer());
   ASSERT_NE(stack_buffer, binary->GetBuffer());
@@ -468,7 +468,7 @@
 
   // Test overloaded GetAsBinary.
   Value* narrow_value = binary.get();
-  const BinaryValue* narrow_binary = NULL;
+  const Value* narrow_binary = NULL;
   ASSERT_TRUE(narrow_value->GetAsBinary(&narrow_binary));
   EXPECT_EQ(binary.get(), narrow_binary);
 }
@@ -674,9 +674,8 @@
   original_dict.Set("string16", std::move(scoped_string16));
 
   std::vector<char> original_buffer(42, '!');
-  std::unique_ptr<BinaryValue> scoped_binary(
-      new BinaryValue(std::move(original_buffer)));
-  BinaryValue* original_binary = scoped_binary.get();
+  std::unique_ptr<Value> scoped_binary(new Value(std::move(original_buffer)));
+  Value* original_binary = scoped_binary.get();
   original_dict.Set("binary", std::move(scoped_binary));
 
   std::unique_ptr<ListValue> scoped_list(new ListValue());
@@ -1008,8 +1007,7 @@
   original_dict.Set("string16", std::move(scoped_string16));
 
   std::vector<char> original_buffer(42, '!');
-  std::unique_ptr<BinaryValue> scoped_binary(
-      new BinaryValue(std::move(original_buffer)));
+  std::unique_ptr<Value> scoped_binary(new Value(std::move(original_buffer)));
   Value* original_binary = scoped_binary.get();
   original_dict.Set("binary", std::move(scoped_binary));
 
@@ -1244,7 +1242,7 @@
   Value int_value(1234);
   Value double_value(12.34567);
   Value string_value("foo");
-  BinaryValue binary_value(Value::Type::BINARY);
+  Value binary_value(Value::Type::BINARY);
   DictionaryValue dict_value;
   ListValue list_value;
 
diff --git a/chrome/browser/chromeos/extensions/wallpaper_api.cc b/chrome/browser/chromeos/extensions/wallpaper_api.cc
index 06b598a..63078294c 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_api.cc
@@ -14,6 +14,7 @@
 #include "base/memory/ref_counted_memory.h"
 #include "base/strings/stringprintf.h"
 #include "base/threading/worker_pool.h"
+#include "base/values.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h"
 #include "chrome/browser/chromeos/file_manager/app_id.h"
@@ -34,7 +35,7 @@
 #include "net/url_request/url_fetcher_delegate.h"
 #include "url/gurl.h"
 
-using base::BinaryValue;
+using base::Value;
 using content::BrowserThread;
 
 typedef base::Callback<void(bool success, const std::string&)> FetchCallback;
@@ -227,14 +228,12 @@
 void WallpaperSetWallpaperFunction::ThumbnailGenerated(
     base::RefCountedBytes* original_data,
     base::RefCountedBytes* thumbnail_data) {
-  std::unique_ptr<BinaryValue> original_result =
-      BinaryValue::CreateWithCopiedBuffer(
-          reinterpret_cast<const char*>(original_data->front()),
-          original_data->size());
-  std::unique_ptr<BinaryValue> thumbnail_result =
-      BinaryValue::CreateWithCopiedBuffer(
-          reinterpret_cast<const char*>(thumbnail_data->front()),
-          thumbnail_data->size());
+  std::unique_ptr<Value> original_result = Value::CreateWithCopiedBuffer(
+      reinterpret_cast<const char*>(original_data->front()),
+      original_data->size());
+  std::unique_ptr<Value> thumbnail_result = Value::CreateWithCopiedBuffer(
+      reinterpret_cast<const char*>(thumbnail_data->front()),
+      thumbnail_data->size());
 
   if (params_->details.thumbnail) {
     SetResult(thumbnail_result->CreateDeepCopy());
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index 0dc4027..bc9e19ff 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -29,6 +29,7 @@
 #include "base/strings/stringprintf.h"
 #include "base/threading/sequenced_worker_pool.h"
 #include "base/threading/worker_pool.h"
+#include "base/values.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h"
 #include "chrome/browser/chromeos/profiles/profile_helper.h"
@@ -52,7 +53,7 @@
 #include "ui/strings/grit/app_locale_settings.h"
 #include "url/gurl.h"
 
-using base::BinaryValue;
+using base::Value;
 using content::BrowserThread;
 
 namespace wallpaper_base = extensions::api::wallpaper;
@@ -698,7 +699,7 @@
 
 void WallpaperPrivateSetCustomWallpaperFunction::ThumbnailGenerated(
     base::RefCountedBytes* data) {
-  SetResult(BinaryValue::CreateWithCopiedBuffer(
+  SetResult(Value::CreateWithCopiedBuffer(
       reinterpret_cast<const char*>(data->front()), data->size()));
   SendResponse(true);
 }
@@ -823,7 +824,7 @@
 
 void WallpaperPrivateGetThumbnailFunction::FileLoaded(
     const std::string& data) {
-  SetResult(BinaryValue::CreateWithCopiedBuffer(data.c_str(), data.size()));
+  SetResult(Value::CreateWithCopiedBuffer(data.c_str(), data.size()));
   SendResponse(true);
 }
 
diff --git a/chrome/browser/chromeos/file_system_provider/operations/read_file_unittest.cc b/chrome/browser/chromeos/file_system_provider/operations/read_file_unittest.cc
index 32bfabc..ef512f2f 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/read_file_unittest.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/read_file_unittest.cc
@@ -178,7 +178,7 @@
   value_as_list.Set(0, base::MakeUnique<base::Value>(kFileSystemId));
   value_as_list.Set(1, base::MakeUnique<base::Value>(kRequestId));
   value_as_list.Set(
-      2, base::BinaryValue::CreateWithCopiedBuffer(data.c_str(), data.size()));
+      2, base::Value::CreateWithCopiedBuffer(data.c_str(), data.size()));
   value_as_list.Set(3, base::MakeUnique<base::Value>(has_more));
   value_as_list.Set(4, base::MakeUnique<base::Value>(execution_time));
 
diff --git a/chrome/browser/chromeos/file_system_provider/operations/write_file.cc b/chrome/browser/chromeos/file_system_provider/operations/write_file.cc
index 528ca4b..118155d 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/write_file.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/write_file.cc
@@ -50,8 +50,7 @@
   DCHECK(buffer_.get());
   std::unique_ptr<base::DictionaryValue> options_as_value = options.ToValue();
   options_as_value->Set(
-      "data",
-      base::BinaryValue::CreateWithCopiedBuffer(buffer_->data(), length_));
+      "data", base::Value::CreateWithCopiedBuffer(buffer_->data(), length_));
 
   std::unique_ptr<base::ListValue> event_args(new base::ListValue);
   event_args->Append(std::move(options_as_value));
diff --git a/chrome/browser/chromeos/login/enrollment/OWNERS b/chrome/browser/chromeos/login/enrollment/OWNERS
index c2cc133..f4610a1 100644
--- a/chrome/browser/chromeos/login/enrollment/OWNERS
+++ b/chrome/browser/chromeos/login/enrollment/OWNERS
@@ -1,4 +1,4 @@
 per-file auto_enrollment_controller.*=atwilson@chromium.org
 per-file auto_enrollment_controller.*=bartfab@chromium.org
-per-file auto_enrollment_controller.*=cschuet@chromium.org
+per-file auto_enrollment_controller.*=emaxx@chromium.org
 per-file auto_enrollment_controller.*=tnagel@chromium.org
diff --git a/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc b/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
index 7b602e2..35308a7 100644
--- a/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
+++ b/chrome/browser/chromeos/login/enterprise_enrollment_browsertest.cc
@@ -16,6 +16,7 @@
 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
 #include "chromeos/dbus/dbus_thread_manager.h"
 #include "chromeos/dbus/upstart_client.h"
+#include "content/public/test/browser_test_utils.h"
 #include "content/public/test/test_utils.h"
 
 using testing::_;
@@ -155,6 +156,34 @@
     });
   }
 
+  void SetupActiveDirectoryJSNotifications() {
+    js_checker().Evaluate(
+        "var testShowStep = login.OAuthEnrollmentScreen.showStep;"
+        "login.OAuthEnrollmentScreen.showStep = function(step) {"
+        "  testShowStep(step);"
+        "  if (step == 'working') {"
+        "    window.domAutomationController.setAutomationId(0);"
+        "    window.domAutomationController.send('ShowSpinnerScreen');"
+        "  }"
+        "}");
+    js_checker().Evaluate(
+        "var testInvalidateAd = login.OAuthEnrollmentScreen.invalidateAd;"
+        "login.OAuthEnrollmentScreen.invalidateAd = function(machineName, "
+        "user, errorState) {"
+        "  testInvalidateAd(machineName, user, errorState);"
+        "  window.domAutomationController.setAutomationId(0);"
+        "  window.domAutomationController.send('ShowJoinDomainError');"
+        "}");
+  }
+
+  void WaitForMessage(content::DOMMessageQueue* message_queue,
+                      const std::string& expected_message) {
+    std::string message;
+    do {
+      ASSERT_TRUE(message_queue->WaitForMessage(&message));
+    } while (message != expected_message);
+  }
+
   // Fills out the UI with device attribute information and submits it.
   void SubmitAttributePromptUpdate() {
     // Fill out the attribute prompt info and submit it.
@@ -297,7 +326,10 @@
       ->GetUpstartClient()
       ->StartAuthPolicyService();
 
+  content::DOMMessageQueue message_queue;
+  SetupActiveDirectoryJSNotifications();
   SubmitActiveDirectoryCredentials("machine_name", kAdTestUser, "password");
+  WaitForMessage(&message_queue, "\"ShowSpinnerScreen\"");
   EXPECT_FALSE(IsStepDisplayed("ad-join"));
 
   CompleteEnrollment();
@@ -323,9 +355,11 @@
       ->GetUpstartClient()
       ->StartAuthPolicyService();
 
+  content::DOMMessageQueue message_queue;
   // Checking error in case of empty password. Whether password is not empty
   // being checked in the UI. Machine name length is checked after that in the
   // authpolicyd.
+  SetupActiveDirectoryJSNotifications();
   SubmitActiveDirectoryCredentials("too_long_machine_name", kAdTestUser, "");
   EXPECT_TRUE(IsStepDisplayed("ad-join"));
   js_checker().ExpectFalse(std::string(kAdMachineNameInput) + ".isInvalid");
@@ -335,6 +369,7 @@
   // Checking error in case of too long machine name.
   SubmitActiveDirectoryCredentials("too_long_machine_name", kAdTestUser,
                                    "password");
+  WaitForMessage(&message_queue, "\"ShowJoinDomainError\"");
   EXPECT_TRUE(IsStepDisplayed("ad-join"));
   js_checker().ExpectTrue(std::string(kAdMachineNameInput) + ".isInvalid");
   js_checker().ExpectFalse(std::string(kAdUsernameInput) + ".isInvalid");
@@ -342,6 +377,7 @@
 
   // Checking error in case of bad username (without realm).
   SubmitActiveDirectoryCredentials("machine_name", "test_user", "password");
+  WaitForMessage(&message_queue, "\"ShowJoinDomainError\"");
   EXPECT_TRUE(IsStepDisplayed("ad-join"));
   js_checker().ExpectFalse(std::string(kAdMachineNameInput) + ".isInvalid");
   js_checker().ExpectTrue(std::string(kAdUsernameInput) + ".isInvalid");
diff --git a/chrome/browser/chromeos/login/helper.cc b/chrome/browser/chromeos/login/helper.cc
index 18baedf2..0020fc0 100644
--- a/chrome/browser/chromeos/login/helper.cc
+++ b/chrome/browser/chromeos/login/helper.cc
@@ -86,23 +86,6 @@
                         : nullptr;
 }
 
-base::ScopedFD GetDataReadPipe(const std::string& data) {
-  int pipe_fds[2];
-  if (!base::CreateLocalNonBlockingPipe(pipe_fds)) {
-    DLOG(ERROR) << "Failed to create pipe";
-    return base::ScopedFD();
-  }
-  base::ScopedFD pipe_read_end(pipe_fds[0]);
-  base::ScopedFD pipe_write_end(pipe_fds[1]);
-
-  if (!base::WriteFileDescriptor(pipe_write_end.get(), data.c_str(),
-                                 data.size())) {
-    DLOG(ERROR) << "Failed to write to pipe";
-    return base::ScopedFD();
-  }
-  return pipe_read_end;
-}
-
 }  // namespace
 
 gfx::Rect CalculateScreenBounds(const gfx::Size& size) {
@@ -262,14 +245,6 @@
   return signin_partition->GetURLRequestContext();
 }
 
-void GetPipeReadEnd(const std::string& data,
-                    const OnPipeReadyCallback& callback) {
-  base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, base::TaskTraits().MayBlock().WithPriority(
-                     base::TaskPriority::BACKGROUND),
-      base::Bind(&GetDataReadPipe, data), callback);
-}
-
 }  // namespace login
 
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/login/helper.h b/chrome/browser/chromeos/login/helper.h
index cd27dc77..f3ebd2fa 100644
--- a/chrome/browser/chromeos/login/helper.h
+++ b/chrome/browser/chromeos/login/helper.h
@@ -108,12 +108,6 @@
 // flow, the context of the sign-in webview storage partition is returned.
 net::URLRequestContextGetter* GetSigninContext();
 
-using OnPipeReadyCallback = base::Callback<void(base::ScopedFD fd)>;
-// Returns file descriptor of a pipe, open for reading. Pipe keeps the passed
-// data.
-void GetPipeReadEnd(const std::string& data,
-                    const OnPipeReadyCallback& callback);
-
 }  // namespace login
 
 }  // namespace chromeos
diff --git a/chrome/browser/chromeos/login/login_browsertest.cc b/chrome/browser/chromeos/login/login_browsertest.cc
index 497fdbb..feef0793 100644
--- a/chrome/browser/chromeos/login/login_browsertest.cc
+++ b/chrome/browser/chromeos/login/login_browsertest.cc
@@ -285,6 +285,24 @@
     js_checker().Evaluate(JSElement(kAdButton) + ".fire('tap')");
   }
 
+  void SetupActiveDirectoryJSNotifications() {
+    js_checker().Evaluate(
+        "var testInvalidateAd = login.GaiaSigninScreen.invalidateAd;"
+        "login.GaiaSigninScreen.invalidateAd = function(user, errorState) {"
+        "  testInvalidateAd(user, errorState);"
+        "  window.domAutomationController.setAutomationId(0);"
+        "  window.domAutomationController.send('ShowAuthError');"
+        "}");
+  }
+
+  void WaitForMessage(content::DOMMessageQueue* message_queue,
+                      const std::string& expected_message) {
+    std::string message;
+    do {
+      ASSERT_TRUE(message_queue->WaitForMessage(&message));
+    } while (message != expected_message);
+  }
+
  protected:
   // Returns string representing element with id=|element_id| inside Active
   // Directory login element.
@@ -434,9 +452,12 @@
 
 // Test different UI errors for Active Directory login.
 IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, LoginErrors) {
+  SetupActiveDirectoryJSNotifications();
   TestLoginVisible();
   TestDomainVisible();
 
+  content::DOMMessageQueue message_queue;
+
   SubmitActiveDirectoryCredentials("", "");
   TestUserError();
   TestDomainVisible();
@@ -445,14 +466,21 @@
   TestPasswordError();
   TestDomainVisible();
 
-  fake_auth_policy_client_->set_auth_error(authpolicy::ERROR_BAD_USER_NAME);
   SubmitActiveDirectoryCredentials(std::string(kTestActiveDirectoryUser) + "@",
                                    kPassword);
   TestUserError();
   TestDomainHidden();
 
+  fake_auth_policy_client_->set_auth_error(authpolicy::ERROR_BAD_USER_NAME);
+  SubmitActiveDirectoryCredentials(
+      std::string(kTestActiveDirectoryUser) + "@" + kTestRealm, kPassword);
+  WaitForMessage(&message_queue, "\"ShowAuthError\"");
+  TestUserError();
+  TestDomainVisible();
+
   fake_auth_policy_client_->set_auth_error(authpolicy::ERROR_BAD_PASSWORD);
   SubmitActiveDirectoryCredentials(kTestActiveDirectoryUser, kPassword);
+  WaitForMessage(&message_queue, "\"ShowAuthError\"");
   TestPasswordError();
   TestDomainVisible();
 }
diff --git a/chrome/browser/chromeos/net/OWNERS b/chrome/browser/chromeos/net/OWNERS
index 68ad765e..3378b40 100644
--- a/chrome/browser/chromeos/net/OWNERS
+++ b/chrome/browser/chromeos/net/OWNERS
@@ -3,5 +3,5 @@
 per-file client_cert*=mattm@chromium.org
 per-file client_cert*=rsleevi@chromium.org
 per-file client_cert*=davidben@chromium.org
-per-file onc_utils*=cschuet@chromium.org
-per-file proxy_config_handler*=cschuet@chromium.org
+per-file onc_utils*=emaxx@chromium.org
+per-file proxy_config_handler*=emaxx@chromium.org
diff --git a/chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc b/chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc
index bd24b95..866e14da 100644
--- a/chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc
+++ b/chrome/browser/extensions/api/certificate_provider/certificate_provider_apitest.cc
@@ -72,7 +72,7 @@
 void StoreDigest(std::vector<uint8_t>* digest,
                  const base::Closure& callback,
                  const base::Value* value) {
-  const base::BinaryValue* binary = nullptr;
+  const base::Value* binary = nullptr;
   const bool is_binary = value->GetAsBinary(&binary);
   EXPECT_TRUE(is_binary) << "Unexpected value in StoreDigest";
   if (is_binary) {
diff --git a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
index 6d0d2f3..232618e 100644
--- a/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
+++ b/chrome/browser/extensions/api/easy_unlock_private/easy_unlock_private_api_chromeos_unittest.cc
@@ -98,12 +98,10 @@
   DISALLOW_COPY_AND_ASSIGN(TestableGetPermitAccessFunction);
 };
 
-// Converts a string to a base::BinaryValue value whose buffer contains the
+// Converts a string to a base::Value value whose buffer contains the
 // string data without the trailing '\0'.
-std::unique_ptr<base::BinaryValue> StringToBinaryValue(
-    const std::string& value) {
-  return base::BinaryValue::CreateWithCopiedBuffer(value.data(),
-                                                   value.length());
+std::unique_ptr<base::Value> StringToBinaryValue(const std::string& value) {
+  return base::Value::CreateWithCopiedBuffer(value.data(), value.length());
 }
 
 // Copies |private_key_source| and |public_key_source| to |private_key_target|
@@ -164,7 +162,7 @@
       return "";
     }
 
-    const base::BinaryValue* result_binary_value;
+    const base::Value* result_binary_value;
     if (!result_list->GetBinary(0, &result_binary_value) ||
         !result_binary_value) {
       LOG(ERROR) << "Result not a binary value.";
@@ -193,11 +191,11 @@
   ASSERT_TRUE(result_list);
   ASSERT_EQ(2u, result_list->GetSize());
 
-  const base::BinaryValue* public_key;
+  const base::Value* public_key;
   ASSERT_TRUE(result_list->GetBinary(0, &public_key));
   ASSERT_TRUE(public_key);
 
-  const base::BinaryValue* private_key;
+  const base::Value* private_key;
   ASSERT_TRUE(result_list->GetBinary(1, &private_key));
   ASSERT_TRUE(private_key);
 
diff --git a/chrome/browser/extensions/api/enterprise_device_attributes/OWNERS b/chrome/browser/extensions/api/enterprise_device_attributes/OWNERS
index 7e61e8ee..eca9776 100644
--- a/chrome/browser/extensions/api/enterprise_device_attributes/OWNERS
+++ b/chrome/browser/extensions/api/enterprise_device_attributes/OWNERS
@@ -1,2 +1,2 @@
-cschuet@chromium.org
+emaxx@chromium.org
 pbond@chromium.org
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
index fe46036..c8f65ab9 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api.cc
@@ -119,7 +119,7 @@
        ++it) {
     std::string der_encoding;
     net::X509Certificate::GetDEREncoded((*it)->os_cert_handle(), &der_encoding);
-    client_certs->Append(base::BinaryValue::CreateWithCopiedBuffer(
+    client_certs->Append(base::Value::CreateWithCopiedBuffer(
         der_encoding.data(), der_encoding.size()));
   }
 
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
index f86140ac..e48d908 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
@@ -263,7 +263,7 @@
 
   std::unique_ptr<base::ListValue> CreateArgs() {
     std::unique_ptr<base::ListValue> args(new base::ListValue);
-    args->Append(base::BinaryValue::CreateWithCopiedBuffer("challenge", 9));
+    args->Append(base::Value::CreateWithCopiedBuffer("challenge", 9));
     return args;
   }
 
@@ -349,7 +349,7 @@
   std::unique_ptr<base::Value> value(
       RunFunctionAndReturnSingleResult(func_.get(), CreateArgs(), browser()));
 
-  const base::BinaryValue* response;
+  const base::Value* response;
   ASSERT_TRUE(value->GetAsBinary(&response));
   EXPECT_EQ("response",
             std::string(response->GetBuffer(), response->GetSize()));
@@ -407,7 +407,7 @@
 
   std::unique_ptr<base::ListValue> CreateArgsInternal(bool register_key) {
     std::unique_ptr<base::ListValue> args(new base::ListValue);
-    args->Append(base::BinaryValue::CreateWithCopiedBuffer("challenge", 9));
+    args->Append(base::Value::CreateWithCopiedBuffer("challenge", 9));
     args->AppendBoolean(register_key);
     return args;
   }
@@ -524,7 +524,7 @@
   std::unique_ptr<base::Value> value(
       RunFunctionAndReturnSingleResult(func_.get(), CreateArgs(), browser()));
 
-  const base::BinaryValue* response;
+  const base::Value* response;
   ASSERT_TRUE(value->GetAsBinary(&response));
   EXPECT_EQ("response",
             std::string(response->GetBuffer(), response->GetSize()));
diff --git a/chrome/browser/extensions/api/idltest/idltest_api.cc b/chrome/browser/extensions/api/idltest/idltest_api.cc
index 1864fd8..da7ba52e 100644
--- a/chrome/browser/extensions/api/idltest/idltest_api.cc
+++ b/chrome/browser/extensions/api/idltest/idltest_api.cc
@@ -10,12 +10,12 @@
 
 #include "base/values.h"
 
-using base::BinaryValue;
+using base::Value;
 
 namespace {
 
 std::unique_ptr<base::ListValue> CopyBinaryValueToIntegerList(
-    const BinaryValue* input) {
+    const Value* input) {
   std::unique_ptr<base::ListValue> output(new base::ListValue());
   const char* input_buffer = input->GetBuffer();
   for (size_t i = 0; i < input->GetSize(); i++) {
@@ -27,19 +27,19 @@
 }  // namespace
 
 ExtensionFunction::ResponseAction IdltestSendArrayBufferFunction::Run() {
-  BinaryValue* input = NULL;
+  Value* input = NULL;
   EXTENSION_FUNCTION_VALIDATE(args_ != NULL && args_->GetBinary(0, &input));
   return RespondNow(OneArgument(CopyBinaryValueToIntegerList(input)));
 }
 
 ExtensionFunction::ResponseAction IdltestSendArrayBufferViewFunction::Run() {
-  BinaryValue* input = NULL;
+  Value* input = NULL;
   EXTENSION_FUNCTION_VALIDATE(args_ != NULL && args_->GetBinary(0, &input));
   return RespondNow(OneArgument(CopyBinaryValueToIntegerList(input)));
 }
 
 ExtensionFunction::ResponseAction IdltestGetArrayBufferFunction::Run() {
   std::string hello = "hello world";
-  return RespondNow(OneArgument(
-      BinaryValue::CreateWithCopiedBuffer(hello.c_str(), hello.size())));
+  return RespondNow(
+      OneArgument(Value::CreateWithCopiedBuffer(hello.c_str(), hello.size())));
 }
diff --git a/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc b/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc
index 00c1c9e..1c05df7 100644
--- a/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc
+++ b/chrome/browser/extensions/api/networking_private/networking_private_chromeos_apitest.cc
@@ -681,7 +681,9 @@
 }
 
 // TODO(stevenjb): Find a better way to set this up on Chrome OS.
-IN_PROC_BROWSER_TEST_F(NetworkingPrivateChromeOSApiTest, GetManagedProperties) {
+// TODO(stevenjb): https://crbug.com/710241
+IN_PROC_BROWSER_TEST_F(NetworkingPrivateChromeOSApiTest,
+                       DISABLED_GetManagedProperties) {
   const std::string uidata_blob =
       "{ \"user_settings\": {"
       "      \"WiFi\": {"
diff --git a/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc b/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
index cd818aef..cada03f 100644
--- a/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
+++ b/chrome/browser/extensions/api/platform_keys/platform_keys_api.cc
@@ -65,7 +65,7 @@
   const unsigned char defaultPublicExponent[] = {0x01, 0x00, 0x01};
   algorithm->SetWithoutPathExpansion(
       "publicExponent",
-      base::BinaryValue::CreateWithCopiedBuffer(
+      base::Value::CreateWithCopiedBuffer(
           reinterpret_cast<const char*>(defaultPublicExponent),
           arraysize(defaultPublicExponent)));
 }
diff --git a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
index ba11fc85..f40e178 100644
--- a/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
+++ b/chrome/browser/extensions/api/web_request/web_request_api_unittest.cc
@@ -27,6 +27,7 @@
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/time/time.h"
+#include "base/values.h"
 #include "chrome/browser/content_settings/cookie_settings_factory.h"
 #include "chrome/browser/extensions/event_router_forwarder.h"
 #include "chrome/browser/net/chrome_extensions_network_delegate.h"
@@ -66,7 +67,6 @@
 namespace keys = extension_web_request_api_constants;
 namespace web_request = extensions::api::web_request;
 
-using base::BinaryValue;
 using base::DictionaryValue;
 using base::ListValue;
 using base::Time;
@@ -610,15 +610,13 @@
   base::ListValue raw;
   extensions::subtle::AppendKeyValuePair(
       keys::kRequestBodyRawBytesKey,
-      BinaryValue::CreateWithCopiedBuffer(kPlainBlock1, kPlainBlock1Length),
-      &raw);
+      Value::CreateWithCopiedBuffer(kPlainBlock1, kPlainBlock1Length), &raw);
   extensions::subtle::AppendKeyValuePair(
       keys::kRequestBodyRawFileKey,
       base::MakeUnique<base::Value>(std::string()), &raw);
   extensions::subtle::AppendKeyValuePair(
       keys::kRequestBodyRawBytesKey,
-      BinaryValue::CreateWithCopiedBuffer(kPlainBlock2, kPlainBlock2Length),
-      &raw);
+      Value::CreateWithCopiedBuffer(kPlainBlock2, kPlainBlock2Length), &raw);
   // Summary.
   const base::Value* const kExpected[] = {
     form_data.get(),
diff --git a/chrome/browser/extensions/extension_action.cc b/chrome/browser/extensions/extension_action.cc
index 1f884a01..00345b4 100644
--- a/chrome/browser/extensions/extension_action.cc
+++ b/chrome/browser/extensions/extension_action.cc
@@ -10,6 +10,7 @@
 #include "base/base64.h"
 #include "base/logging.h"
 #include "base/strings/string_number_conversions.h"
+#include "base/values.h"
 #include "chrome/grit/theme_resources.h"
 #include "extensions/browser/extension_icon_image.h"
 #include "extensions/browser/extension_icon_placeholder.h"
@@ -125,7 +126,7 @@
     gfx::ImageSkia* icon) {
   for (base::DictionaryValue::Iterator iter(dict); !iter.IsAtEnd();
        iter.Advance()) {
-    const base::BinaryValue* image_data;
+    const base::Value* image_data;
     std::string binary_string64;
     IPC::Message pickle;
     if (iter.value().GetAsBinary(&image_data)) {
diff --git a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.css b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.css
index 1f8165af..09c9bdb9 100644
--- a/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.css
+++ b/chrome/browser/resources/chromeos/login/oobe_welcome_dialog.css
@@ -13,9 +13,12 @@
 #title {
   color: rgba(0, 0, 0, 0.87);
   font-family: Roboto, sans-serif;
-  font-size: 38px;
+  font-size: 32px;
   font-weight: 300; /* roboto-light */
-  margin: 120px 0 30px 0;
+  height: 80px;
+  line-height: 40px;
+  margin: 120px 80px 30px 80px;
+  text-align: center;
 }
 
 #welcomeIllustration {
diff --git a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
index aa75f7d..a60f897 100644
--- a/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
+++ b/chrome/browser/resources/chromeos/login/screen_gaia_signin.js
@@ -1044,6 +1044,9 @@
       if (!this.navigation_.refreshVisible && !this.navigation_.closeVisible)
         return;
 
+      if (this.screenMode_ == ScreenMode.AD_AUTH)
+        chrome.send('cancelAdAuthentication');
+
       if (this.closable)
         Oobe.showUserPods();
       else
diff --git a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
index c40e51a..5de1d8d8 100644
--- a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc
@@ -12,12 +12,12 @@
 #include "base/files/file_util.h"
 #include "base/logging.h"
 #include "base/macros.h"
+#include "base/memory/ptr_util.h"
 #include "base/values.h"
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/browser_process_platform_part.h"
 #include "chrome/browser/chromeos/login/error_screens_histogram_helper.h"
 #include "chrome/browser/chromeos/login/help_app_launcher.h"
-#include "chrome/browser/chromeos/login/helper.h"
 #include "chrome/browser/chromeos/login/oobe_screen.h"
 #include "chrome/browser/chromeos/login/screens/network_error.h"
 #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
@@ -25,8 +25,7 @@
 #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
 #include "chrome/browser/chromeos/policy/policy_oauth2_token_fetcher.h"
 #include "chrome/grit/generated_resources.h"
-#include "chromeos/dbus/auth_policy_client.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/login/auth/authpolicy_login_helper.h"
 #include "chromeos/network/network_state.h"
 #include "chromeos/network/network_state_handler.h"
 #include "components/login/localized_values_builder.h"
@@ -180,6 +179,8 @@
 
 void EnrollmentScreenHandler::ShowAdJoin() {
   observe_network_failure_ = false;
+  if (!authpolicy_login_helper_)
+    authpolicy_login_helper_ = base::MakeUnique<AuthPolicyLoginHelper>();
   ShowStep(kEnrollmentStepAdJoin);
 }
 
@@ -515,12 +516,15 @@
 void EnrollmentScreenHandler::HandleClose(const std::string& reason) {
   DCHECK(controller_);
 
-  if (reason == "cancel")
+  if (reason == "cancel") {
+    if (authpolicy_login_helper_)
+      authpolicy_login_helper_->CancelRequestsAndRestart();
     controller_->OnCancel();
-  else if (reason == "done")
+  } else if (reason == "done") {
     controller_->OnConfirmationClosed();
-  else
+  } else {
     NOTREACHED();
+  }
 }
 
 void EnrollmentScreenHandler::HandleCompleteLogin(
@@ -537,31 +541,11 @@
     const std::string& password) {
   observe_network_failure_ = false;
   DCHECK(controller_);
-  login::GetPipeReadEnd(
-      password,
-      base::Bind(&EnrollmentScreenHandler::OnPasswordPipeReady,
-                 weak_ptr_factory_.GetWeakPtr(), machine_name, user_name));
-}
-
-void EnrollmentScreenHandler::OnPasswordPipeReady(
-    const std::string& machine_name,
-    const std::string& user_name,
-    base::ScopedFD password_fd) {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  if (!password_fd.is_valid()) {
-    DLOG(ERROR) << "Got invalid password_fd";
-    return;
-  }
-  chromeos::AuthPolicyClient* client =
-      chromeos::DBusThreadManager::Get()->GetAuthPolicyClient();
-
-  client->JoinAdDomain(machine_name,
-                       user_name,
-                       password_fd.get(),
-                       base::Bind(&EnrollmentScreenHandler::HandleAdDomainJoin,
-                                  weak_ptr_factory_.GetWeakPtr(),
-                                  machine_name,
-                                  user_name));
+  DCHECK(authpolicy_login_helper_);
+  authpolicy_login_helper_->JoinAdDomain(
+      machine_name, user_name, password,
+      base::BindOnce(&EnrollmentScreenHandler::HandleAdDomainJoin,
+                     weak_ptr_factory_.GetWeakPtr(), machine_name, user_name));
 }
 
 void EnrollmentScreenHandler::HandleAdDomainJoin(
diff --git a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h
index baeee53..c263fa2 100644
--- a/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.h
@@ -20,6 +20,7 @@
 
 namespace chromeos {
 
+class AuthPolicyLoginHelper;
 class ErrorScreensHistogramHelper;
 class HelpAppLauncher;
 
@@ -154,6 +155,10 @@
   // Help application used for help dialogs.
   scoped_refptr<HelpAppLauncher> help_app_;
 
+  // Helper to call AuthPolicyClient and cancel calls if needed. Used to join
+  // Active Directory domain.
+  std::unique_ptr<AuthPolicyLoginHelper> authpolicy_login_helper_;
+
   base::WeakPtrFactory<EnrollmentScreenHandler> weak_ptr_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(EnrollmentScreenHandler);
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 4783fa1..f7a7ddd 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -18,7 +18,6 @@
 #include "chrome/browser/browser_shutdown.h"
 #include "chrome/browser/chromeos/input_method/input_method_util.h"
 #include "chrome/browser/chromeos/language_preferences.h"
-#include "chrome/browser/chromeos/login/helper.h"
 #include "chrome/browser/chromeos/login/screens/network_error.h"
 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h"
@@ -35,8 +34,7 @@
 #include "chrome/common/pref_names.h"
 #include "chrome/grit/generated_resources.h"
 #include "chromeos/chromeos_switches.h"
-#include "chromeos/dbus/auth_policy_client.h"
-#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/login/auth/authpolicy_login_helper.h"
 #include "chromeos/login/auth/user_context.h"
 #include "chromeos/settings/cros_settings_names.h"
 #include "chromeos/system/devicetype.h"
@@ -294,6 +292,10 @@
   GaiaScreenMode screen_mode = GetGaiaScreenMode(context.email,
                                                  context.use_offline);
   params.SetInteger("screenMode", screen_mode);
+
+  if (screen_mode == GAIA_SCREEN_MODE_AD && !authpolicy_login_helper_)
+    authpolicy_login_helper_ = base::MakeUnique<AuthPolicyLoginHelper>();
+
   if (screen_mode != GAIA_SCREEN_MODE_OFFLINE) {
     const std::string app_locale = g_browser_process->GetApplicationLocale();
     if (!app_locale.empty())
@@ -449,6 +451,8 @@
               &GaiaScreenHandler::HandleCompleteAdAuthentication);
   AddCallback("completeAdPasswordChange",
               &GaiaScreenHandler::HandleCompleteAdPasswordChange);
+  AddCallback("cancelAdAuthentication",
+              &GaiaScreenHandler::HandleCancelActiveDirectoryAuth);
 }
 
 void GaiaScreenHandler::OnPortalDetectionCompleted(
@@ -592,11 +596,11 @@
     const std::string& password) {
   Delegate()->SetDisplayEmail(username);
   set_populated_email(username);
-
-  login::GetPipeReadEnd(
-      password,
-      base::Bind(&GaiaScreenHandler::OnPasswordPipeReady,
-                 weak_factory_.GetWeakPtr(), username, Key(password)));
+  DCHECK(authpolicy_login_helper_);
+  authpolicy_login_helper_->AuthenticateUser(
+      username, password,
+      base::BindOnce(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(),
+                     username, Key(password)));
 }
 
 void GaiaScreenHandler::HandleCompleteAdPasswordChange(
@@ -606,26 +610,16 @@
   Delegate()->SetDisplayEmail(username);
   set_populated_email(username);
 
-  login::GetPipeReadEnd(
-      old_password + "\n" + new_password + "\n" + new_password,
-      base::Bind(&GaiaScreenHandler::OnPasswordPipeReady,
-                 weak_factory_.GetWeakPtr(), username, Key(new_password)));
+  DCHECK(authpolicy_login_helper_);
+  authpolicy_login_helper_->AuthenticateUser(
+      username, old_password + "\n" + new_password + "\n" + new_password,
+      base::Bind(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(),
+                 username, Key(new_password)));
 }
 
-void GaiaScreenHandler::OnPasswordPipeReady(const std::string& username,
-                                            const Key& key,
-                                            base::ScopedFD password_fd) {
-  DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
-  if (!password_fd.is_valid()) {
-    DLOG(ERROR) << "Got invalid password_fd";
-    return;
-  }
-  chromeos::AuthPolicyClient* client =
-      chromeos::DBusThreadManager::Get()->GetAuthPolicyClient();
-  client->AuthenticateUser(
-      username, password_fd.get(),
-      base::Bind(&GaiaScreenHandler::DoAdAuth, weak_factory_.GetWeakPtr(),
-                 username, key));
+void GaiaScreenHandler::HandleCancelActiveDirectoryAuth() {
+  DCHECK(authpolicy_login_helper_);
+  authpolicy_login_helper_->CancelRequestsAndRestart();
 }
 
 void GaiaScreenHandler::HandleCompleteAuthentication(
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
index 3fa5c55..be1a92f 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
@@ -26,6 +26,7 @@
 
 namespace chromeos {
 
+class AuthPolicyLoginHelper;
 class Key;
 class SigninScreenHandler;
 class SigninScreenHandlerDelegate;
@@ -109,6 +110,8 @@
                                       const std::string& old_password,
                                       const std::string& new_password);
 
+  void HandleCancelActiveDirectoryAuth();
+
   void HandleUsingSAMLAPI();
   void HandleScrapedPasswordCount(int password_count);
   void HandleScrapedPasswordVerificationFailed();
@@ -275,6 +278,10 @@
   // True if the authentication extension is still loading.
   bool auth_extension_being_loaded_ = false;
 
+  // Helper to call AuthPolicyClient and cancel calls if needed. Used to
+  // authenticate users against Active Directory server.
+  std::unique_ptr<AuthPolicyLoginHelper> authpolicy_login_helper_;
+
   base::WeakPtrFactory<GaiaScreenHandler> weak_factory_;
 
   DISALLOW_COPY_AND_ASSIGN(GaiaScreenHandler);
diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
index 3b2d3724..415d4dc 100644
--- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
+++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.h
@@ -64,7 +64,9 @@
   // Holds the HTML to display in the constrained dialog.
   std::unique_ptr<content::WebContents> web_contents_holder_;
 
-  // Pointer to |web_contents_| that remains valid until it is destroyed.
+  // Pointer to the WebContents in |web_contents_holder_| for the lifetime of
+  // that object, even if ReleaseWebContents() gets called. If the WebContents
+  // gets destroyed, |web_contents_| will be set to a nullptr.
   content::WebContents* web_contents_;
 
   // Was the dialog closed from WebUI (in which case |web_dialog_delegate_|'s
diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.cc b/chrome/renderer/extensions/cast_streaming_native_handler.cc
index 160d083..11bc9b7 100644
--- a/chrome/renderer/extensions/cast_streaming_native_handler.cc
+++ b/chrome/renderer/extensions/cast_streaming_native_handler.cc
@@ -23,6 +23,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/sys_info.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "base/values.h"
 #include "chrome/common/extensions/api/cast_streaming_receiver_session.h"
 #include "chrome/common/extensions/api/cast_streaming_rtp_stream.h"
 #include "chrome/common/extensions/api/cast_streaming_udp_transport.h"
@@ -695,7 +696,7 @@
 
 void CastStreamingNativeHandler::CallGetRawEventsCallback(
     int transport_id,
-    std::unique_ptr<base::BinaryValue> raw_events) {
+    std::unique_ptr<base::Value> raw_events) {
   v8::Isolate* isolate = context()->isolate();
   v8::HandleScope handle_scope(isolate);
   v8::Context::Scope context_scope(context()->v8_context());
diff --git a/chrome/renderer/extensions/cast_streaming_native_handler.h b/chrome/renderer/extensions/cast_streaming_native_handler.h
index f5fdb9d..4474588 100644
--- a/chrome/renderer/extensions/cast_streaming_native_handler.h
+++ b/chrome/renderer/extensions/cast_streaming_native_handler.h
@@ -19,7 +19,6 @@
 namespace base {
 class DictionaryValue;
 class Value;
-using BinaryValue = Value;
 }
 
 namespace net {
@@ -106,7 +105,7 @@
       const std::string& error_message);
 
   void CallGetRawEventsCallback(int transport_id,
-                                std::unique_ptr<base::BinaryValue> raw_events);
+                                std::unique_ptr<base::Value> raw_events);
   void CallGetStatsCallback(int transport_id,
                             std::unique_ptr<base::DictionaryValue> stats);
 
diff --git a/chrome/renderer/extensions/platform_keys_natives.cc b/chrome/renderer/extensions/platform_keys_natives.cc
index c8babf46..1009974c 100644
--- a/chrome/renderer/extensions/platform_keys_natives.cc
+++ b/chrome/renderer/extensions/platform_keys_natives.cc
@@ -61,7 +61,7 @@
         rsaHashedKeyGen->PublicExponent();
     dict->SetWithoutPathExpansion(
         "publicExponent",
-        base::BinaryValue::CreateWithCopiedBuffer(
+        base::Value::CreateWithCopiedBuffer(
             reinterpret_cast<const char*>(public_exponent.Data()),
             public_exponent.size()));
 
diff --git a/chrome/renderer/media/cast_rtp_stream.cc b/chrome/renderer/media/cast_rtp_stream.cc
index d546e9d..6e33f9e 100644
--- a/chrome/renderer/media/cast_rtp_stream.cc
+++ b/chrome/renderer/media/cast_rtp_stream.cc
@@ -21,6 +21,7 @@
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/timer/timer.h"
 #include "base/trace_event/trace_event.h"
+#include "base/values.h"
 #include "chrome/common/chrome_switches.h"
 #include "chrome/renderer/media/cast_session.h"
 #include "chrome/renderer/media/cast_udp_transport.h"
@@ -561,7 +562,7 @@
 }
 
 void CastRtpStream::GetRawEvents(
-    const base::Callback<void(std::unique_ptr<base::BinaryValue>)>& callback,
+    const base::Callback<void(std::unique_ptr<base::Value>)>& callback,
     const std::string& extra_data) {
   DVLOG(1) << "CastRtpStream::GetRawEvents = "
            << (is_audio_ ? "audio" : "video");
diff --git a/chrome/renderer/media/cast_rtp_stream.h b/chrome/renderer/media/cast_rtp_stream.h
index d867c73..da6dc20 100644
--- a/chrome/renderer/media/cast_rtp_stream.h
+++ b/chrome/renderer/media/cast_rtp_stream.h
@@ -20,7 +20,6 @@
 namespace base {
 class DictionaryValue;
 class Value;
-using BinaryValue = Value;
 }
 
 class CastAudioSink;
@@ -69,7 +68,7 @@
   // Get serialized raw events for this stream with |extra_data| attached,
   // and invokes |callback| with the result.
   void GetRawEvents(
-      const base::Callback<void(std::unique_ptr<base::BinaryValue>)>& callback,
+      const base::Callback<void(std::unique_ptr<base::Value>)>& callback,
       const std::string& extra_data);
 
   // Get stats in DictionaryValue format and invokves |callback| with
diff --git a/chrome/renderer/media/cast_session.h b/chrome/renderer/media/cast_session.h
index 132af169..372ab8b 100644
--- a/chrome/renderer/media/cast_session.h
+++ b/chrome/renderer/media/cast_session.h
@@ -18,7 +18,6 @@
 class DictionaryValue;
 class SingleThreadTaskRunner;
 class Value;
-using BinaryValue = Value;
 }  // namespace base
 
 namespace media {
@@ -40,8 +39,7 @@
   using VideoFrameInputAvailableCallback =
       base::Callback<void(const scoped_refptr<media::cast::VideoFrameInput>&)>;
   using SendPacketCallback = base::Callback<void(const std::vector<char>&)>;
-  using EventLogsCallback =
-      base::Callback<void(std::unique_ptr<base::BinaryValue>)>;
+  using EventLogsCallback = base::Callback<void(std::unique_ptr<base::Value>)>;
   using StatsCallback =
       base::Callback<void(std::unique_ptr<base::DictionaryValue>)>;
   using ErrorCallback = base::Callback<void(const std::string&)>;
diff --git a/chrome/renderer/media/cast_session_delegate.cc b/chrome/renderer/media/cast_session_delegate.cc
index 3b9f8eb..8e57843 100644
--- a/chrome/renderer/media/cast_session_delegate.cc
+++ b/chrome/renderer/media/cast_session_delegate.cc
@@ -15,6 +15,7 @@
 #include "base/single_thread_task_runner.h"
 #include "base/strings/stringprintf.h"
 #include "base/threading/thread_task_runner_handle.h"
+#include "base/values.h"
 #include "build/build_config.h"
 #include "chrome/renderer/media/cast_threads.h"
 #include "chrome/renderer/media/cast_transport_ipc.h"
@@ -252,7 +253,7 @@
 
   DVLOG(2) << "Serialized log length: " << output_bytes;
 
-  auto blob = base::MakeUnique<base::BinaryValue>(std::vector<char>(
+  auto blob = base::MakeUnique<base::Value>(std::vector<char>(
       serialized_log.get(), serialized_log.get() + output_bytes));
   callback.Run(std::move(blob));
 }
diff --git a/chrome/renderer/media/cast_session_delegate.h b/chrome/renderer/media/cast_session_delegate.h
index 56c4b6e..3dc2f2a 100644
--- a/chrome/renderer/media/cast_session_delegate.h
+++ b/chrome/renderer/media/cast_session_delegate.h
@@ -23,7 +23,6 @@
 class DictionaryValue;
 class SingleThreadTaskRunner;
 class Value;
-using BinaryValue = Value;
 }  // namespace base
 
 namespace media {
@@ -83,8 +82,7 @@
       media::cast::AudioFrameInput>&)> AudioFrameInputAvailableCallback;
   typedef base::Callback<void(const scoped_refptr<
       media::cast::VideoFrameInput>&)> VideoFrameInputAvailableCallback;
-  typedef base::Callback<void(std::unique_ptr<base::BinaryValue>)>
-      EventLogsCallback;
+  typedef base::Callback<void(std::unique_ptr<base::Value>)> EventLogsCallback;
   typedef base::Callback<void(std::unique_ptr<base::DictionaryValue>)>
       StatsCallback;
 
diff --git a/chrome/test/data/extensions/api_test/enterprise_device_attributes/OWNERS b/chrome/test/data/extensions/api_test/enterprise_device_attributes/OWNERS
index 7e61e8ee..eca9776 100644
--- a/chrome/test/data/extensions/api_test/enterprise_device_attributes/OWNERS
+++ b/chrome/test/data/extensions/api_test/enterprise_device_attributes/OWNERS
@@ -1,2 +1,2 @@
-cschuet@chromium.org
+emaxx@chromium.org
 pbond@chromium.org
diff --git a/chrome/test/data/extensions/api_test/networking_config/OWNERS b/chrome/test/data/extensions/api_test/networking_config/OWNERS
index 17c27e6..607dc3e 100644
--- a/chrome/test/data/extensions/api_test/networking_config/OWNERS
+++ b/chrome/test/data/extensions/api_test/networking_config/OWNERS
@@ -1,2 +1,2 @@
-cschuet@chromium.org
 stevenjb@chromium.org
+emaxx@chromium.org
diff --git a/chrome/test/data/webui/md_bookmarks/reducers_test.js b/chrome/test/data/webui/md_bookmarks/reducers_test.js
index 6d85e3a7..fe66d9b3 100644
--- a/chrome/test/data/webui/md_bookmarks/reducers_test.js
+++ b/chrome/test/data/webui/md_bookmarks/reducers_test.js
@@ -3,7 +3,7 @@
 // found in the LICENSE file.
 
 suite('selection state', function() {
-  var state;
+  var selection;
   var action;
 
   function select(items, anchor, add) {
@@ -16,7 +16,7 @@
   }
 
   setup(function() {
-    state = {
+    selection = {
       anchor: null,
       items: {},
     };
@@ -24,68 +24,68 @@
 
   test('can select an item', function() {
     action = select(['1'], '1', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
-    assertDeepEquals(['1'], normalizeSet(state.items));
-    assertEquals('1', state.anchor);
+    assertDeepEquals(['1'], normalizeSet(selection.items));
+    assertEquals('1', selection.anchor);
 
     // Replace current selection.
     action = select(['2'], '2', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals(['2'], normalizeSet(state.items));
-    assertEquals('2', state.anchor);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals(['2'], normalizeSet(selection.items));
+    assertEquals('2', selection.anchor);
 
     // Add to current selection.
     action = select(['3'], '3', true);
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals(['2', '3'], normalizeSet(state.items));
-    assertEquals('3', state.anchor);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals(['2', '3'], normalizeSet(selection.items));
+    assertEquals('3', selection.anchor);
   });
 
   test('can select multiple items', function() {
     action = select(['1', '2', '3'], '3', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals(['1', '2', '3'], normalizeSet(state.items));
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals(['1', '2', '3'], normalizeSet(selection.items));
 
     action = select(['3', '4'], '4', true);
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals(['1', '2', '3', '4'], normalizeSet(state.items));
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals(['1', '2', '3', '4'], normalizeSet(selection.items));
   });
 
   test('is cleared when selected folder changes', function() {
     action = select(['1', '2', '3'], '3', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
     action = bookmarks.actions.selectFolder('2');
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals({}, state.items);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals({}, selection.items);
   });
 
   test('is cleared when search finished', function() {
     action = select(['1', '2', '3'], '3', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
     action = bookmarks.actions.setSearchResults(['2']);
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals({}, state.items);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals({}, selection.items);
   });
 
   test('is cleared when search cleared', function() {
     action = select(['1', '2', '3'], '3', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
     action = bookmarks.actions.clearSearch();
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals({}, state.items);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals({}, selection.items);
   });
 
   test('deselect items', function() {
     action = select(['1', '2', '3'], '3', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
     action = bookmarks.actions.deselectItems();
-    state = bookmarks.SelectionState.updateSelection(state, action);
-    assertDeepEquals({}, state.items);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
+    assertDeepEquals({}, selection.items);
   });
 
   test('deselects items when they are deleted', function() {
@@ -101,19 +101,19 @@
     ]));
 
     action = select(['2', '4', '5'], '4', false);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
     action = bookmarks.actions.removeBookmark('1', '0', 0, nodeList);
-    state = bookmarks.SelectionState.updateSelection(state, action);
+    selection = bookmarks.SelectionState.updateSelection(selection, action);
 
-    assertDeepEquals(['5'], normalizeSet(state.items));
-    assertEquals(null, state.anchor);
+    assertDeepEquals(['5'], normalizeSet(selection.items));
+    assertEquals(null, selection.anchor);
   });
 });
 
 suite('closed folder state', function() {
   var nodes;
-  var state;
+  var closedFolders;
   var action;
 
   setup(function() {
@@ -125,54 +125,54 @@
               createItem('3'),
             ]),
         createFolder('4', []));
-    state = new Set();
+    closedFolders = new Set();
   });
 
   test('toggle folder open state', function() {
     action = bookmarks.actions.changeFolderOpen('2', false);
-    state =
-        bookmarks.ClosedFolderState.updateClosedFolders(state, action, nodes);
-    assertFalse(state.has('1'));
-    assertTrue(state.has('2'));
+    closedFolders = bookmarks.ClosedFolderState.updateClosedFolders(
+        closedFolders, action, nodes);
+    assertFalse(closedFolders.has('1'));
+    assertTrue(closedFolders.has('2'));
   });
 
   test('select folder with closed parent', function() {
     // Close '1'
     action = bookmarks.actions.changeFolderOpen('1', false);
-    state =
-        bookmarks.ClosedFolderState.updateClosedFolders(state, action, nodes);
-    assertTrue(state.has('1'));
-    assertFalse(state.has('2'));
+    closedFolders = bookmarks.ClosedFolderState.updateClosedFolders(
+        closedFolders, action, nodes);
+    assertTrue(closedFolders.has('1'));
+    assertFalse(closedFolders.has('2'));
 
     // Should re-open when '2' is selected.
     action = bookmarks.actions.selectFolder('2');
-    state =
-        bookmarks.ClosedFolderState.updateClosedFolders(state, action, nodes);
-    assertFalse(state.has('1'));
+    closedFolders = bookmarks.ClosedFolderState.updateClosedFolders(
+        closedFolders, action, nodes);
+    assertFalse(closedFolders.has('1'));
   });
 
   test('move nodes in a closed folder', function() {
     // Moving bookmark items should not open folders.
-    state = new Set(['1']);
+    closedFolders = new Set(['1']);
     action = bookmarks.actions.moveBookmark('3', '1', 1, '1', 0);
-    state =
-        bookmarks.ClosedFolderState.updateClosedFolders(state, action, nodes);
+    closedFolders = bookmarks.ClosedFolderState.updateClosedFolders(
+        closedFolders, action, nodes);
 
-    assertTrue(state.has('1'));
+    assertTrue(closedFolders.has('1'));
 
     // Moving folders should open their parents.
-    state = new Set(['1', '2']);
+    closedFolders = new Set(['1', '2']);
     action = bookmarks.actions.moveBookmark('4', '2', 0, '0', 1);
-    state =
-        bookmarks.ClosedFolderState.updateClosedFolders(state, action, nodes);
-    assertFalse(state.has('1'));
-    assertFalse(state.has('2'));
+    closedFolders = bookmarks.ClosedFolderState.updateClosedFolders(
+        closedFolders, action, nodes);
+    assertFalse(closedFolders.has('1'));
+    assertFalse(closedFolders.has('2'));
   });
 });
 
 suite('selected folder', function() {
   var nodes;
-  var state;
+  var selectedFolder;
   var action;
 
   setup(function() {
@@ -185,58 +185,58 @@
           ]),
     ]));
 
-    state = '1';
+    selectedFolder = '1';
   });
 
   test('updates from selectFolder action', function() {
     action = bookmarks.actions.selectFolder('2');
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
-    assertEquals('2', state);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
+    assertEquals('2', selectedFolder);
   });
 
   test('updates when parent of selected folder is closed', function() {
     action = bookmarks.actions.selectFolder('2');
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
 
     action = bookmarks.actions.changeFolderOpen('1', false);
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
-    assertEquals('1', state);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
+    assertEquals('1', selectedFolder);
   });
 
   test('selects ancestor when selected folder is deleted', function() {
     action = bookmarks.actions.selectFolder('3');
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
 
     // Delete the selected folder:
     action = bookmarks.actions.removeBookmark('3', '2', 0, nodes);
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
 
-    assertEquals('2', state);
+    assertEquals('2', selectedFolder);
 
     action = bookmarks.actions.selectFolder('4');
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
 
     // Delete an ancestor of the selected folder:
     action = bookmarks.actions.removeBookmark('2', '1', 0, nodes);
-    state = bookmarks.SelectedFolderState.updateSelectedFolder(
-        state, action, nodes);
+    selectedFolder = bookmarks.SelectedFolderState.updateSelectedFolder(
+        selectedFolder, action, nodes);
 
-    assertEquals('1', state);
+    assertEquals('1', selectedFolder);
   });
 });
 
 suite('node state', function() {
-  var state;
+  var nodes;
   var action;
 
   setup(function() {
-    state = testTree(
+    nodes = testTree(
         createFolder(
             '1',
             [
@@ -249,29 +249,29 @@
 
   test('updates when a node is edited', function() {
     action = bookmarks.actions.editBookmark('2', {title: 'b'});
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertEquals('b', state['2'].title);
-    assertEquals('a.com', state['2'].url);
+    assertEquals('b', nodes['2'].title);
+    assertEquals('a.com', nodes['2'].url);
 
     action = bookmarks.actions.editBookmark('2', {title: 'c', url: 'c.com'});
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertEquals('c', state['2'].title);
-    assertEquals('c.com', state['2'].url);
+    assertEquals('c', nodes['2'].title);
+    assertEquals('c.com', nodes['2'].url);
 
     action = bookmarks.actions.editBookmark('4', {title: 'folder'});
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertEquals('folder', state['4'].title);
-    assertEquals(undefined, state['4'].url);
+    assertEquals('folder', nodes['4'].title);
+    assertEquals(undefined, nodes['4'].url);
 
     // Cannot edit URL of a folder:
     action = bookmarks.actions.editBookmark('4', {url: 'folder.com'});
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertEquals('folder', state['4'].title);
-    assertEquals(undefined, state['4'].url);
+    assertEquals('folder', nodes['4'].title);
+    assertEquals(undefined, nodes['4'].url);
   });
 
   test('updates when a node is created', function() {
@@ -282,11 +282,11 @@
       index: 2,
     };
     action = bookmarks.actions.createBookmark(folder.id, folder);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertEquals('1', state['6'].parentId);
-    assertDeepEquals([], state['6'].children);
-    assertDeepEquals(['2', '3', '6', '4'], state['1'].children);
+    assertEquals('1', nodes['6'].parentId);
+    assertDeepEquals([], nodes['6'].children);
+    assertDeepEquals(['2', '3', '6', '4'], nodes['1'].children);
 
     // Add a new item to that folder.
     var item = {
@@ -297,56 +297,56 @@
     };
 
     action = bookmarks.actions.createBookmark(item.id, item);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertEquals('6', state['7'].parentId);
-    assertEquals(undefined, state['7'].children);
-    assertDeepEquals(['7'], state['6'].children);
+    assertEquals('6', nodes['7'].parentId);
+    assertEquals(undefined, nodes['7'].children);
+    assertDeepEquals(['7'], nodes['6'].children);
   });
 
   test('updates when a node is deleted', function() {
-    action = bookmarks.actions.removeBookmark('3', '1', 1, state);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    action = bookmarks.actions.removeBookmark('3', '1', 1, nodes);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertDeepEquals(['2', '4'], state['1'].children);
+    assertDeepEquals(['2', '4'], nodes['1'].children);
 
-    assertDeepEquals(['2', '4'], state['1'].children);
-    assertEquals(undefined, state['3']);
+    assertDeepEquals(['2', '4'], nodes['1'].children);
+    assertEquals(undefined, nodes['3']);
   });
 
   test('removes all children of deleted nodes', function() {
-    action = bookmarks.actions.removeBookmark('1', '0', 0, state);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    action = bookmarks.actions.removeBookmark('1', '0', 0, nodes);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertDeepEquals(['0', '5'], Object.keys(state).sort());
+    assertDeepEquals(['0', '5'], Object.keys(nodes).sort());
   });
 
   test('updates when a node is moved', function() {
     // Move within the same folder backwards.
     action = bookmarks.actions.moveBookmark('3', '1', 0, '1', 1);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertDeepEquals(['3', '2', '4'], state['1'].children);
+    assertDeepEquals(['3', '2', '4'], nodes['1'].children);
 
     // Move within the same folder forwards.
     action = bookmarks.actions.moveBookmark('3', '1', 2, '1', 0);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertDeepEquals(['2', '4', '3'], state['1'].children);
+    assertDeepEquals(['2', '4', '3'], nodes['1'].children);
 
     // Move between different folders.
     action = bookmarks.actions.moveBookmark('4', '5', 0, '1', 1);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertDeepEquals(['2', '3'], state['1'].children);
-    assertDeepEquals(['4'], state['5'].children);
+    assertDeepEquals(['2', '3'], nodes['1'].children);
+    assertDeepEquals(['4'], nodes['5'].children);
   });
 
   test('updates when children of a node are reordered', function() {
     action = bookmarks.actions.reorderChildren('1', ['4', '2', '3']);
-    state = bookmarks.NodeState.updateNodes(state, action);
+    nodes = bookmarks.NodeState.updateNodes(nodes, action);
 
-    assertDeepEquals(['4', '2', '3'], state['1'].children);
+    assertDeepEquals(['4', '2', '3'], nodes['1'].children);
   });
 });
 
@@ -354,7 +354,7 @@
   var state;
 
   setup(function() {
-    // Search touches a few different things, so we test using the entire state:
+    // Search touches a few different things, so we test using the entire state.
     state = bookmarks.util.createEmptyState();
     state.nodes = testTree(createFolder('1', [
       createFolder(
diff --git a/chromecast/base/serializers_unittest.cc b/chromecast/base/serializers_unittest.cc
index 8dc9b07..5e3d751 100644
--- a/chromecast/base/serializers_unittest.cc
+++ b/chromecast/base/serializers_unittest.cc
@@ -55,7 +55,7 @@
 }
 
 TEST(SerializeToJson, BadValue) {
-  base::BinaryValue value(std::vector<char>(12));
+  base::Value value(std::vector<char>(12));
   std::unique_ptr<std::string> str = SerializeToJson(value);
   EXPECT_EQ(nullptr, str.get());
 }
@@ -118,7 +118,7 @@
 TEST(SerializeJsonToFile, BadValue) {
   ScopedTempFile temp;
 
-  base::BinaryValue value(std::vector<char>(12));
+  base::Value value(std::vector<char>(12));
   ASSERT_FALSE(SerializeJsonToFile(temp.path(), value));
   std::string str(temp.Read());
   EXPECT_TRUE(str.empty());
diff --git a/chromeos/BUILD.gn b/chromeos/BUILD.gn
index 762a43ac..1478524 100644
--- a/chromeos/BUILD.gn
+++ b/chromeos/BUILD.gn
@@ -278,6 +278,8 @@
     "login/auth/auth_status_consumer.h",
     "login/auth/authenticator.cc",
     "login/auth/authenticator.h",
+    "login/auth/authpolicy_login_helper.cc",
+    "login/auth/authpolicy_login_helper.h",
     "login/auth/cryptohome_authenticator.cc",
     "login/auth/cryptohome_authenticator.h",
     "login/auth/extended_authenticator.cc",
diff --git a/chromeos/dbus/auth_policy_client.cc b/chromeos/dbus/auth_policy_client.cc
index a4f58c5..9b35979 100644
--- a/chromeos/dbus/auth_policy_client.cc
+++ b/chromeos/dbus/auth_policy_client.cc
@@ -4,6 +4,7 @@
 #include "chromeos/dbus/auth_policy_client.h"
 
 #include "base/bind.h"
+#include "base/bind_helpers.h"
 #include "base/memory/weak_ptr.h"
 #include "components/signin/core/account_id/account_id.h"
 #include "dbus/bus.h"
@@ -42,42 +43,44 @@
   void JoinAdDomain(const std::string& machine_name,
                     const std::string& user_principal_name,
                     int password_fd,
-                    const JoinCallback& callback) override {
+                    JoinCallback callback) override {
     dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
                                  authpolicy::kAuthPolicyJoinADDomain);
     dbus::MessageWriter writer(&method_call);
     writer.AppendString(machine_name);
     writer.AppendString(user_principal_name);
     writer.AppendFileDescriptor(password_fd);
-    proxy_->CallMethod(&method_call, kSlowDbusTimeoutMilliseconds,
-                       base::Bind(&AuthPolicyClientImpl::HandleJoinCallback,
-                                  weak_ptr_factory_.GetWeakPtr(), callback));
+    proxy_->CallMethod(
+        &method_call, kSlowDbusTimeoutMilliseconds,
+        base::Bind(&AuthPolicyClientImpl::HandleJoinCallback,
+                   weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
   }
 
   void AuthenticateUser(const std::string& user_principal_name,
                         int password_fd,
-                        const AuthCallback& callback) override {
+                        AuthCallback callback) override {
     dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
                                  authpolicy::kAuthPolicyAuthenticateUser);
     dbus::MessageWriter writer(&method_call);
     writer.AppendString(user_principal_name);
     writer.AppendFileDescriptor(password_fd);
-    proxy_->CallMethod(&method_call, kSlowDbusTimeoutMilliseconds,
-                       base::Bind(&AuthPolicyClientImpl::HandleAuthCallback,
-                                  weak_ptr_factory_.GetWeakPtr(), callback));
+    proxy_->CallMethod(
+        &method_call, kSlowDbusTimeoutMilliseconds,
+        base::Bind(&AuthPolicyClientImpl::HandleAuthCallback,
+                   weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
   }
 
-  void RefreshDevicePolicy(const RefreshPolicyCallback& callback) override {
+  void RefreshDevicePolicy(RefreshPolicyCallback callback) override {
     dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
                                  authpolicy::kAuthPolicyRefreshDevicePolicy);
     proxy_->CallMethod(
         &method_call, kSlowDbusTimeoutMilliseconds,
         base::Bind(&AuthPolicyClientImpl::HandleRefreshPolicyCallback,
-                   weak_ptr_factory_.GetWeakPtr(), callback));
+                   weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
   }
 
   void RefreshUserPolicy(const AccountId& account_id,
-                         const RefreshPolicyCallback& callback) override {
+                         RefreshPolicyCallback callback) override {
     DCHECK(account_id.GetAccountType() == AccountType::ACTIVE_DIRECTORY);
     dbus::MethodCall method_call(authpolicy::kAuthPolicyInterface,
                                  authpolicy::kAuthPolicyRefreshUserPolicy);
@@ -86,7 +89,7 @@
     proxy_->CallMethod(
         &method_call, kSlowDbusTimeoutMilliseconds,
         base::Bind(&AuthPolicyClientImpl::HandleRefreshPolicyCallback,
-                   weak_ptr_factory_.GetWeakPtr(), callback));
+                   weak_ptr_factory_.GetWeakPtr(), base::Passed(&callback)));
   }
 
  protected:
@@ -98,45 +101,45 @@
   }
 
  private:
-  void HandleRefreshPolicyCallback(const RefreshPolicyCallback& callback,
+  void HandleRefreshPolicyCallback(RefreshPolicyCallback callback,
                                    dbus::Response* response) {
     if (!response) {
       DLOG(ERROR) << "RefreshDevicePolicy: failed to call to authpolicy";
-      callback.Run(false);
+      std::move(callback).Run(false);
       return;
     }
     dbus::MessageReader reader(response);
-    callback.Run(GetErrorFromReader(&reader) == authpolicy::ERROR_NONE);
+    std::move(callback).Run(GetErrorFromReader(&reader) ==
+                            authpolicy::ERROR_NONE);
   }
 
-  void HandleJoinCallback(const JoinCallback& callback,
-                          dbus::Response* response) {
+  void HandleJoinCallback(JoinCallback callback, dbus::Response* response) {
     if (!response) {
       DLOG(ERROR) << "Join: Couldn't call to authpolicy";
-      callback.Run(authpolicy::ERROR_DBUS_FAILURE);
+      std::move(callback).Run(authpolicy::ERROR_DBUS_FAILURE);
       return;
     }
 
     dbus::MessageReader reader(response);
-    callback.Run(GetErrorFromReader(&reader));
+    std::move(callback).Run(GetErrorFromReader(&reader));
   }
 
-  void HandleAuthCallback(const AuthCallback& callback,
-                          dbus::Response* response) {
+  void HandleAuthCallback(AuthCallback callback, dbus::Response* response) {
     authpolicy::ActiveDirectoryAccountData account_data;
     if (!response) {
       DLOG(ERROR) << "Auth: Failed to  call to authpolicy";
-      callback.Run(authpolicy::ERROR_DBUS_FAILURE, account_data);
+      std::move(callback).Run(authpolicy::ERROR_DBUS_FAILURE, account_data);
       return;
     }
     dbus::MessageReader reader(response);
     const authpolicy::ErrorType error(GetErrorFromReader(&reader));
     if (!reader.PopArrayOfBytesAsProto(&account_data)) {
       DLOG(ERROR) << "Failed to parse protobuf.";
-      callback.Run(authpolicy::ErrorType::ERROR_DBUS_FAILURE, account_data);
+      std::move(callback).Run(authpolicy::ErrorType::ERROR_DBUS_FAILURE,
+                              account_data);
       return;
     }
-    callback.Run(error, account_data);
+    std::move(callback).Run(error, account_data);
   }
 
   dbus::Bus* bus_ = nullptr;
diff --git a/chromeos/dbus/auth_policy_client.h b/chromeos/dbus/auth_policy_client.h
index 99c9b81..4eb76e2 100644
--- a/chromeos/dbus/auth_policy_client.h
+++ b/chromeos/dbus/auth_policy_client.h
@@ -24,11 +24,11 @@
  public:
   // |user_id| is a unique id for the users. Using objectGUID from Active
   // Directory server.
-  using AuthCallback = base::Callback<void(
+  using AuthCallback = base::OnceCallback<void(
       authpolicy::ErrorType error,
       const authpolicy::ActiveDirectoryAccountData& account_data)>;
-  using JoinCallback = base::Callback<void(authpolicy::ErrorType error)>;
-  using RefreshPolicyCallback = base::Callback<void(bool success)>;
+  using JoinCallback = base::OnceCallback<void(authpolicy::ErrorType error)>;
+  using RefreshPolicyCallback = base::OnceCallback<void(bool success)>;
 
   ~AuthPolicyClient() override;
 
@@ -46,7 +46,7 @@
   virtual void JoinAdDomain(const std::string& machine_name,
                             const std::string& user_principal_name,
                             int password_fd,
-                            const JoinCallback& callback) = 0;
+                            JoinCallback callback) = 0;
 
   // Calls AuthenticateUser. It runs "kinit <user_principal_name> .. " which
   // does kerberos authentication against Active Directory server.
@@ -54,17 +54,17 @@
   // |callback| is called after getting (or failing to get) D-BUS response.
   virtual void AuthenticateUser(const std::string& user_principal_name,
                                 int password_fd,
-                                const AuthCallback& callback) = 0;
+                                AuthCallback callback) = 0;
 
   // Calls RefreshDevicePolicy - handle policy for the device.
   // Fetch GPO files from Active directory server, parse it, encode it into
   // protobuf and send to SessionManager. Callback is called after that.
-  virtual void RefreshDevicePolicy(const RefreshPolicyCallback& callback) = 0;
+  virtual void RefreshDevicePolicy(RefreshPolicyCallback callback) = 0;
 
   // Calls RefreshUserPolicy - handle policy for the user specified by
   // |account_id|. Similar to RefreshDevicePolicy.
   virtual void RefreshUserPolicy(const AccountId& account_id,
-                                 const RefreshPolicyCallback& callback) = 0;
+                                 RefreshPolicyCallback callback) = 0;
 
  protected:
   // Create() should be used instead.
diff --git a/chromeos/dbus/fake_auth_policy_client.cc b/chromeos/dbus/fake_auth_policy_client.cc
index 0231e29..a7c0fe0 100644
--- a/chromeos/dbus/fake_auth_policy_client.cc
+++ b/chromeos/dbus/fake_auth_policy_client.cc
@@ -13,6 +13,7 @@
 #include "base/strings/string_split.h"
 #include "base/task_scheduler/post_task.h"
 #include "base/threading/platform_thread.h"
+#include "base/threading/thread_task_runner_handle.h"
 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h"
 #include "chromeos/chromeos_paths.h"
 #include "chromeos/cryptohome/cryptohome_parameters.h"
@@ -29,8 +30,8 @@
 const size_t kMaxMachineNameLength = 15;
 const char kInvalidMachineNameCharacters[] = "\\/:*?\"<>|";
 
-// Delay policy fetch to be more realistic.
-constexpr int kPolicyFetchDelaySeconds = 5;
+// Delay operations to be more realistic.
+constexpr int kOperationDelaySeconds = 3;
 
 // Drop stub policy file of |policy_type| at |policy_path| containing
 // |serialized_payload|.
@@ -38,7 +39,7 @@
                      const std::string& serialized_payload,
                      const std::string& policy_type) {
   base::PlatformThread::Sleep(
-      base::TimeDelta::FromSeconds(kPolicyFetchDelaySeconds));
+      base::TimeDelta::FromSeconds(kOperationDelaySeconds));
 
   em::PolicyData data;
   data.set_policy_value(serialized_payload);
@@ -62,6 +63,12 @@
   return bytes_written == static_cast<int>(serialized_response.size());
 }
 
+void PostDelayedClosure(base::OnceClosure closure) {
+  base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
+      FROM_HERE, std::move(closure),
+      base::TimeDelta::FromSeconds(kOperationDelaySeconds));
+}
+
 }  // namespace
 
 namespace chromeos {
@@ -75,59 +82,53 @@
 void FakeAuthPolicyClient::JoinAdDomain(const std::string& machine_name,
                                         const std::string& user_principal_name,
                                         int password_fd,
-                                        const JoinCallback& callback) {
+                                        JoinCallback callback) {
+  authpolicy::ErrorType error = authpolicy::ERROR_NONE;
   if (!started_) {
     LOG(ERROR) << "authpolicyd not started";
-    callback.Run(authpolicy::ERROR_DBUS_FAILURE);
-    return;
+    error = authpolicy::ERROR_DBUS_FAILURE;
+  } else if (machine_name.size() > kMaxMachineNameLength) {
+    error = authpolicy::ERROR_MACHINE_NAME_TOO_LONG;
+  } else if (machine_name.empty() ||
+             machine_name.find_first_of(kInvalidMachineNameCharacters) !=
+                 std::string::npos) {
+    error = authpolicy::ERROR_BAD_MACHINE_NAME;
+  } else {
+    std::vector<std::string> parts = base::SplitString(
+        user_principal_name, "@", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
+    if (parts.size() != 2 || parts[0].empty() || parts[1].empty()) {
+      error = authpolicy::ERROR_PARSE_UPN_FAILED;
+    }
   }
-  if (machine_name.size() > kMaxMachineNameLength) {
-    callback.Run(authpolicy::ERROR_MACHINE_NAME_TOO_LONG);
-    return;
-  }
-
-  if (machine_name.empty() ||
-      machine_name.find_first_of(kInvalidMachineNameCharacters) !=
-          std::string::npos) {
-    callback.Run(authpolicy::ERROR_BAD_MACHINE_NAME);
-    return;
-  }
-
-  std::vector<std::string> parts = base::SplitString(
-      user_principal_name, "@", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
-  if (parts.size() != 2 || parts[0].empty() || parts[1].empty()) {
-    callback.Run(authpolicy::ERROR_PARSE_UPN_FAILED);
-    return;
-  }
-
-  callback.Run(authpolicy::ERROR_NONE);
+  PostDelayedClosure(base::BindOnce(std::move(callback), error));
 }
 
 void FakeAuthPolicyClient::AuthenticateUser(
     const std::string& user_principal_name,
     int password_fd,
-    const AuthCallback& callback) {
+    AuthCallback callback) {
+  authpolicy::ErrorType error = authpolicy::ERROR_NONE;
   authpolicy::ActiveDirectoryAccountData account_data;
   if (!started_) {
     LOG(ERROR) << "authpolicyd not started";
-    callback.Run(authpolicy::ERROR_DBUS_FAILURE, account_data);
-    return;
+    error = authpolicy::ERROR_DBUS_FAILURE;
+  } else {
+    if (auth_error_ == authpolicy::ERROR_NONE)
+      account_data.set_account_id(base::MD5String(user_principal_name));
+    error = auth_error_;
   }
-  if (auth_error_ == authpolicy::ERROR_NONE)
-    account_data.set_account_id(base::MD5String(user_principal_name));
-  callback.Run(auth_error_, account_data);
+  PostDelayedClosure(base::BindOnce(std::move(callback), error, account_data));
 }
 
-void FakeAuthPolicyClient::RefreshDevicePolicy(
-    const RefreshPolicyCallback& callback) {
+void FakeAuthPolicyClient::RefreshDevicePolicy(RefreshPolicyCallback callback) {
   if (!started_) {
     LOG(ERROR) << "authpolicyd not started";
-    callback.Run(false);
+    std::move(callback).Run(false);
     return;
   }
   base::FilePath policy_path;
   if (!PathService::Get(chromeos::FILE_OWNER_KEY, &policy_path)) {
-    callback.Run(false);
+    std::move(callback).Run(false);
     return;
   }
   policy_path = policy_path.DirName().AppendASCII("stub_device_policy");
@@ -138,26 +139,27 @@
 
   // Drop file for SessionManagerClientStubImpl to read.
   base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, base::TaskTraits()
-                     .WithShutdownBehavior(
-                         base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
-                     .WithPriority(base::TaskPriority::BACKGROUND)
-                     .MayBlock(),
-      Bind(&WritePolicyFile, policy_path, payload, "google/chromeos/device"),
-      callback);
+      FROM_HERE,
+      base::TaskTraits()
+          .WithShutdownBehavior(
+              base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+          .WithPriority(base::TaskPriority::BACKGROUND)
+          .MayBlock(),
+      base::BindOnce(&WritePolicyFile, policy_path, payload,
+                     "google/chromeos/device"),
+      std::move(callback));
 }
 
-void FakeAuthPolicyClient::RefreshUserPolicy(
-    const AccountId& account_id,
-    const RefreshPolicyCallback& callback) {
+void FakeAuthPolicyClient::RefreshUserPolicy(const AccountId& account_id,
+                                             RefreshPolicyCallback callback) {
   if (!started_) {
     LOG(ERROR) << "authpolicyd not started";
-    callback.Run(false);
+    std::move(callback).Run(false);
     return;
   }
   base::FilePath policy_path;
   if (!PathService::Get(chromeos::DIR_USER_POLICY_KEYS, &policy_path)) {
-    callback.Run(false);
+    std::move(callback).Run(false);
     return;
   }
   const cryptohome::Identification cryptohome_identification(account_id);
@@ -173,14 +175,15 @@
 
   // Drop file for SessionManagerClientStubImpl to read.
   base::PostTaskWithTraitsAndReplyWithResult(
-      FROM_HERE, base::TaskTraits()
-                     .WithShutdownBehavior(
-                         base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
-                     .WithPriority(base::TaskPriority::BACKGROUND)
-                     .MayBlock(),
-      base::Bind(&WritePolicyFile, policy_path, payload,
-                 "google/chromeos/user"),
-      callback);
+      FROM_HERE,
+      base::TaskTraits()
+          .WithShutdownBehavior(
+              base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
+          .WithPriority(base::TaskPriority::BACKGROUND)
+          .MayBlock(),
+      base::BindOnce(&WritePolicyFile, policy_path, payload,
+                     "google/chromeos/user"),
+      std::move(callback));
 }
 
 }  // namespace chromeos
diff --git a/chromeos/dbus/fake_auth_policy_client.h b/chromeos/dbus/fake_auth_policy_client.h
index d9cd1f16..6f445c5 100644
--- a/chromeos/dbus/fake_auth_policy_client.h
+++ b/chromeos/dbus/fake_auth_policy_client.h
@@ -26,19 +26,21 @@
   void JoinAdDomain(const std::string& machine_name,
                     const std::string& user_principal_name,
                     int password_fd,
-                    const JoinCallback& callback) override;
+                    JoinCallback callback) override;
   void AuthenticateUser(const std::string& user_principal_name,
                         int password_fd,
-                        const AuthCallback& callback) override;
-  void RefreshDevicePolicy(const RefreshPolicyCallback& calllback) override;
+                        AuthCallback callback) override;
+  void RefreshDevicePolicy(RefreshPolicyCallback calllback) override;
   void RefreshUserPolicy(const AccountId& account_id,
-                         const RefreshPolicyCallback& callback) override;
+                         RefreshPolicyCallback callback) override;
 
   // Mark service as started. It's getting started by the
   // UpstartClient::StartAuthPolicyService on the Active Directory managed
   // devices.
   void set_started(bool started) { started_ = started; }
 
+  bool started() const { return started_; }
+
   void set_auth_error(authpolicy::ErrorType auth_error) {
     auth_error_ = auth_error;
   }
diff --git a/chromeos/dbus/fake_auth_policy_client_unittest.cc b/chromeos/dbus/fake_auth_policy_client_unittest.cc
index e220238..6342559 100644
--- a/chromeos/dbus/fake_auth_policy_client_unittest.cc
+++ b/chromeos/dbus/fake_auth_policy_client_unittest.cc
@@ -5,6 +5,8 @@
 #include "chromeos/dbus/fake_auth_policy_client.h"
 
 #include "base/bind.h"
+#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
 #include "components/signin/core/account_id/account_id.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
@@ -16,84 +18,109 @@
 
 }  // namespace
 
+class FakeAuthPolicyClientTest : public ::testing::Test {
+ public:
+  FakeAuthPolicyClientTest(){};
+
+ protected:
+  FakeAuthPolicyClient* authpolicy_client() { return &client_; }
+
+ private:
+  FakeAuthPolicyClient client_;
+  base::MessageLoop loop_;
+
+  DISALLOW_COPY_AND_ASSIGN(FakeAuthPolicyClientTest);
+};
+
 // Tests parsing machine name.
-TEST(FakeAuthPolicyClientTest, JoinAdDomain_ParseMachineName) {
-  FakeAuthPolicyClient client;
-  client.set_started(true);
-  client.JoinAdDomain("correct_length1", kCorrectUserName, /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_NONE, error);
-                      }));
-  client.JoinAdDomain("", kCorrectUserName, /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_BAD_MACHINE_NAME, error);
-                      }));
-  client.JoinAdDomain(
+TEST_F(FakeAuthPolicyClientTest, JoinAdDomain_ParseMachineName) {
+  authpolicy_client()->set_started(true);
+  authpolicy_client()->JoinAdDomain("correct_length1", kCorrectUserName,
+                                    /* password_fd */ -1,
+                                    base::Bind([](authpolicy::ErrorType error) {
+                                      EXPECT_EQ(authpolicy::ERROR_NONE, error);
+                                    }));
+  authpolicy_client()->JoinAdDomain(
+      "", kCorrectUserName, /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_BAD_MACHINE_NAME, error);
+      }));
+  authpolicy_client()->JoinAdDomain(
       "too_long_machine_name", kCorrectUserName, /* password_fd */ -1,
       base::Bind([](authpolicy::ErrorType error) {
         EXPECT_EQ(authpolicy::ERROR_MACHINE_NAME_TOO_LONG, error);
       }));
-  client.JoinAdDomain("invalid:name", kCorrectUserName, /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_BAD_MACHINE_NAME, error);
-                      }));
-  client.JoinAdDomain(">nvalidname", kCorrectUserName, /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_BAD_MACHINE_NAME, error);
-                      }));
+  authpolicy_client()->JoinAdDomain(
+      "invalid:name", kCorrectUserName, /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_BAD_MACHINE_NAME, error);
+      }));
+  authpolicy_client()->JoinAdDomain(
+      ">nvalidname", kCorrectUserName, /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_BAD_MACHINE_NAME, error);
+      }));
+
+  base::RunLoop().RunUntilIdle();
 }
 
 // Tests parsing user name.
-TEST(FakeAuthPolicyClientTest, JoinAdDomain_ParseUPN) {
-  FakeAuthPolicyClient client;
-  client.set_started(true);
-  client.JoinAdDomain(kCorrectMachineName, "user@realm.com",
-                      /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_NONE, error);
-                      }));
-  client.JoinAdDomain(kCorrectMachineName, "user", /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
-                      }));
-  client.JoinAdDomain(kCorrectMachineName, "", /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
-                      }));
-  client.JoinAdDomain(kCorrectMachineName, "user@", /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
-                      }));
-  client.JoinAdDomain(kCorrectMachineName, "@realm", /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
-                      }));
-  client.JoinAdDomain(kCorrectMachineName, "user@realm@com",
-                      /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
-                      }));
+TEST_F(FakeAuthPolicyClientTest, JoinAdDomain_ParseUPN) {
+  authpolicy_client()->set_started(true);
+  authpolicy_client()->JoinAdDomain(kCorrectMachineName, "user@realm.com",
+                                    /* password_fd */ -1,
+                                    base::Bind([](authpolicy::ErrorType error) {
+                                      EXPECT_EQ(authpolicy::ERROR_NONE, error);
+                                    }));
+  authpolicy_client()->JoinAdDomain(
+      kCorrectMachineName, "user", /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
+      }));
+  authpolicy_client()->JoinAdDomain(
+      kCorrectMachineName, "", /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
+      }));
+  authpolicy_client()->JoinAdDomain(
+      kCorrectMachineName, "user@", /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
+      }));
+  authpolicy_client()->JoinAdDomain(
+      kCorrectMachineName, "@realm", /* password_fd */ -1,
+      base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
+      }));
+  authpolicy_client()->JoinAdDomain(
+      kCorrectMachineName, "user@realm@com",
+      /* password_fd */ -1, base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_PARSE_UPN_FAILED, error);
+      }));
+
+  base::RunLoop().RunUntilIdle();
 }
 
 // Tests calls to not started authpolicyd fails.
-TEST(FakeAuthPolicyClientTest, NotStartedAuthPolicyService) {
-  FakeAuthPolicyClient client;
-  client.JoinAdDomain(kCorrectMachineName, kCorrectUserName,
-                      /* password_fd */ -1,
-                      base::Bind([](authpolicy::ErrorType error) {
-                        EXPECT_EQ(authpolicy::ERROR_DBUS_FAILURE, error);
-                      }));
-  client.AuthenticateUser(
+TEST_F(FakeAuthPolicyClientTest, NotStartedAuthPolicyService) {
+  authpolicy_client()->JoinAdDomain(
+      kCorrectMachineName, kCorrectUserName,
+      /* password_fd */ -1, base::Bind([](authpolicy::ErrorType error) {
+        EXPECT_EQ(authpolicy::ERROR_DBUS_FAILURE, error);
+      }));
+  authpolicy_client()->AuthenticateUser(
       kCorrectUserName, /* password_fd */ -1,
       base::Bind([](authpolicy::ErrorType error,
                     const authpolicy::ActiveDirectoryAccountData&) {
         EXPECT_EQ(authpolicy::ERROR_DBUS_FAILURE, error);
       }));
-  client.RefreshDevicePolicy(
+  authpolicy_client()->RefreshDevicePolicy(
       base::Bind([](bool success) { EXPECT_FALSE(success); }));
-  client.RefreshUserPolicy(
+  authpolicy_client()->RefreshUserPolicy(
       AccountId::FromUserEmail(kCorrectUserName),
       base::Bind([](bool success) { EXPECT_FALSE(success); }));
+
+  base::RunLoop().RunUntilIdle();
 }
 
 }  // namespace chromeos
diff --git a/chromeos/dbus/fake_upstart_client.cc b/chromeos/dbus/fake_upstart_client.cc
index 2980912..7f803c8 100644
--- a/chromeos/dbus/fake_upstart_client.cc
+++ b/chromeos/dbus/fake_upstart_client.cc
@@ -21,4 +21,12 @@
       ->set_started(true);
 }
 
+void FakeUpstartClient::RestartAuthPolicyService() {
+  FakeAuthPolicyClient* authpolicy_client = static_cast<FakeAuthPolicyClient*>(
+      DBusThreadManager::Get()->GetAuthPolicyClient());
+  DLOG_IF(WARNING, !authpolicy_client->started())
+      << "Trying to restart authpolicyd which is not started";
+  authpolicy_client->set_started(true);
+}
+
 }  // namespace chromeos
diff --git a/chromeos/dbus/fake_upstart_client.h b/chromeos/dbus/fake_upstart_client.h
index 4b6c2e5..c5dc139 100644
--- a/chromeos/dbus/fake_upstart_client.h
+++ b/chromeos/dbus/fake_upstart_client.h
@@ -21,6 +21,7 @@
 
   // UpstartClient overrides.
   void StartAuthPolicyService() override;
+  void RestartAuthPolicyService() override;
 
  private:
   DISALLOW_COPY_AND_ASSIGN(FakeUpstartClient);
diff --git a/chromeos/dbus/upstart_client.cc b/chromeos/dbus/upstart_client.cc
index 7e08d26..2f4d615 100644
--- a/chromeos/dbus/upstart_client.cc
+++ b/chromeos/dbus/upstart_client.cc
@@ -17,6 +17,7 @@
 const char kUpstartServiceName[] = "com.ubuntu.Upstart";
 const char kUpstartJobInterface[] = "com.ubuntu.Upstart0_6.Job";
 const char kUpstartStartMethod[] = "Start";
+const char kUpstartRestartMethod[] = "Restart";
 
 const char kUpstartAuthPolicyPath[] = "/com/ubuntu/Upstart/jobs/authpolicyd";
 
@@ -28,27 +29,41 @@
 
   // UpstartClient override.
   void StartAuthPolicyService() override {
-    dbus::ObjectPath objectPath(kUpstartAuthPolicyPath);
-    dbus::ObjectProxy* proxy =
-        bus_->GetObjectProxy(kUpstartServiceName, objectPath);
     dbus::MethodCall method_call(kUpstartJobInterface, kUpstartStartMethod);
     dbus::MessageWriter writer(&method_call);
     writer.AppendArrayOfStrings(std::vector<std::string>());
     writer.AppendBool(true);  // Wait for response.
-    proxy->CallMethod(&method_call, dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
-                      base::Bind(&UpstartClientImpl::HandleStartResponse,
-                                 weak_ptr_factory_.GetWeakPtr()));
+    auth_proxy_->CallMethod(&method_call,
+                            dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+                            base::Bind(&UpstartClientImpl::HandleAuthResponse,
+                                       weak_ptr_factory_.GetWeakPtr()));
+  }
+
+  void RestartAuthPolicyService() override {
+    dbus::MethodCall method_call(kUpstartJobInterface, kUpstartRestartMethod);
+    dbus::MessageWriter writer(&method_call);
+    writer.AppendArrayOfStrings(std::vector<std::string>());
+    writer.AppendBool(true);  // Wait for response.
+    auth_proxy_->CallMethod(&method_call,
+                            dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+                            base::Bind(&UpstartClientImpl::HandleAuthResponse,
+                                       weak_ptr_factory_.GetWeakPtr()));
   }
 
  protected:
-  void Init(dbus::Bus* bus) override { bus_ = bus; }
+  void Init(dbus::Bus* bus) override {
+    bus_ = bus;
+    auth_proxy_ = bus_->GetObjectProxy(
+        kUpstartServiceName, dbus::ObjectPath(kUpstartAuthPolicyPath));
+  }
 
  private:
-  void HandleStartResponse(dbus::Response* response) {
+  void HandleAuthResponse(dbus::Response* response) {
     LOG_IF(ERROR, !response) << "Failed to signal Upstart, response is null";
   }
 
   dbus::Bus* bus_ = nullptr;
+  dbus::ObjectProxy* auth_proxy_ = nullptr;
 
   // Note: This should remain the last member so it'll be destroyed and
   // invalidate its weak pointers before any other members are destroyed.
diff --git a/chromeos/dbus/upstart_client.h b/chromeos/dbus/upstart_client.h
index 46c65d7..3aff513 100644
--- a/chromeos/dbus/upstart_client.h
+++ b/chromeos/dbus/upstart_client.h
@@ -24,6 +24,9 @@
   // Starts authpolicyd.
   virtual void StartAuthPolicyService() = 0;
 
+  // Restarts authpolicyd.
+  virtual void RestartAuthPolicyService() = 0;
+
  protected:
   // Create() should be used instead.
   UpstartClient();
diff --git a/chromeos/login/auth/authpolicy_login_helper.cc b/chromeos/login/auth/authpolicy_login_helper.cc
new file mode 100644
index 0000000..263cb96
--- /dev/null
+++ b/chromeos/login/auth/authpolicy_login_helper.cc
@@ -0,0 +1,79 @@
+// 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 "chromeos/login/auth/authpolicy_login_helper.h"
+
+#include "base/files/file_util.h"
+#include "base/task_scheduler/post_task.h"
+#include "chromeos/dbus/auth_policy_client.h"
+#include "chromeos/dbus/dbus_thread_manager.h"
+#include "chromeos/dbus/upstart_client.h"
+
+namespace chromeos {
+namespace {
+
+base::ScopedFD GetDataReadPipe(const std::string& data) {
+  int pipe_fds[2];
+  if (!base::CreateLocalNonBlockingPipe(pipe_fds)) {
+    DLOG(ERROR) << "Failed to create pipe";
+    return base::ScopedFD();
+  }
+  base::ScopedFD pipe_read_end(pipe_fds[0]);
+  base::ScopedFD pipe_write_end(pipe_fds[1]);
+
+  if (!base::WriteFileDescriptor(pipe_write_end.get(), data.c_str(),
+                                 data.size())) {
+    DLOG(ERROR) << "Failed to write to pipe";
+    return base::ScopedFD();
+  }
+  return pipe_read_end;
+}
+
+}  // namespace
+
+AuthPolicyLoginHelper::AuthPolicyLoginHelper() : weak_factory_(this) {}
+
+void AuthPolicyLoginHelper::JoinAdDomain(const std::string& machine_name,
+                                         const std::string& username,
+                                         const std::string& password,
+                                         JoinCallback callback) {
+  DCHECK(!weak_factory_.HasWeakPtrs()) << "Another operation is in progress";
+  chromeos::DBusThreadManager::Get()->GetAuthPolicyClient()->JoinAdDomain(
+      machine_name, username, GetDataReadPipe(password).get(),
+      base::BindOnce(&AuthPolicyLoginHelper::OnJoinCallback,
+                     weak_factory_.GetWeakPtr(), base::Passed(&callback)));
+}
+
+void AuthPolicyLoginHelper::AuthenticateUser(const std::string& username,
+                                             const std::string& password,
+                                             AuthCallback callback) {
+  DCHECK(!weak_factory_.HasWeakPtrs()) << "Another operation is in progress";
+  chromeos::DBusThreadManager::Get()->GetAuthPolicyClient()->AuthenticateUser(
+      username, GetDataReadPipe(password).get(),
+      base::BindOnce(&AuthPolicyLoginHelper::OnAuthCallback,
+                     weak_factory_.GetWeakPtr(), base::Passed(&callback)));
+}
+
+void AuthPolicyLoginHelper::CancelRequestsAndRestart() {
+  weak_factory_.InvalidateWeakPtrs();
+  chromeos::DBusThreadManager::Get()
+      ->GetUpstartClient()
+      ->RestartAuthPolicyService();
+}
+
+void AuthPolicyLoginHelper::OnJoinCallback(JoinCallback callback,
+                                           authpolicy::ErrorType error) {
+  std::move(callback).Run(error);
+}
+
+void AuthPolicyLoginHelper::OnAuthCallback(
+    AuthCallback callback,
+    authpolicy::ErrorType error,
+    const authpolicy::ActiveDirectoryAccountData& account_data) {
+  std::move(callback).Run(error, account_data);
+}
+
+AuthPolicyLoginHelper::~AuthPolicyLoginHelper() {}
+
+}  // namespace chromeos
diff --git a/chromeos/login/auth/authpolicy_login_helper.h b/chromeos/login/auth/authpolicy_login_helper.h
new file mode 100644
index 0000000..1472c664
--- /dev/null
+++ b/chromeos/login/auth/authpolicy_login_helper.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 CHROMEOS_LOGIN_AUTH_AUTHPOLICY_LOGIN_HELPER_H_
+#define CHROMEOS_LOGIN_AUTH_AUTHPOLICY_LOGIN_HELPER_H_
+
+#include <string>
+
+#include "base/callback.h"
+#include "base/files/scoped_file.h"
+#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
+#include "chromeos/dbus/auth_policy_client.h"
+
+namespace chromeos {
+
+// Helper class to use AuthPolicyClient. For Active Directory domain join and
+// authenticate users this class should be used instead of AuthPolicyClient.
+// Allows canceling all pending calls and restarting AuthPolicy service. Used
+// for enrollment and login UI to proper cancel the flows.
+class CHROMEOS_EXPORT AuthPolicyLoginHelper {
+ public:
+  using AuthCallback = AuthPolicyClient::AuthCallback;
+  using JoinCallback = AuthPolicyClient::JoinCallback;
+
+  AuthPolicyLoginHelper();
+  ~AuthPolicyLoginHelper();
+
+  // See AuthPolicyClient::JoinAdDomain.
+  void JoinAdDomain(const std::string& machine_name,
+                    const std::string& username,
+                    const std::string& password,
+                    JoinCallback callback);
+
+  // See AuthPolicyClient::AuthenticateUser.
+  void AuthenticateUser(const std::string& username,
+                        const std::string& password,
+                        AuthCallback callback);
+
+  // Cancel pending requests and restarts AuthPolicy service.
+  void CancelRequestsAndRestart();
+
+ private:
+  // Called from AuthPolicyClient::JoinAdDomain.
+  void OnJoinCallback(JoinCallback callback, authpolicy::ErrorType error);
+
+  // Called from AuthPolicyClient::AuthenticateUser.
+  void OnAuthCallback(
+      AuthCallback callback,
+      authpolicy::ErrorType error,
+      const authpolicy::ActiveDirectoryAccountData& account_data);
+
+  base::WeakPtrFactory<AuthPolicyLoginHelper> weak_factory_;
+  DISALLOW_COPY_AND_ASSIGN(AuthPolicyLoginHelper);
+};
+
+}  // namespace chromeos
+
+#endif  // CHROMEOS_LOGIN_AUTH_AUTHPOLICY_LOGIN_HELPER_H_
diff --git a/chromeos/network/OWNERS b/chromeos/network/OWNERS
index c1a3ed3..6fa9f0e2 100644
--- a/chromeos/network/OWNERS
+++ b/chromeos/network/OWNERS
@@ -1,5 +1,4 @@
 set noparent
 
 armansito@chromium.org
-cschuet@chromium.org
 stevenjb@chromium.org
diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc
index abdf830..06c197c 100644
--- a/chromeos/network/managed_network_configuration_handler_unittest.cc
+++ b/chromeos/network/managed_network_configuration_handler_unittest.cc
@@ -549,7 +549,9 @@
   EXPECT_EQ(1, policy_observer_.GetPoliciesAppliedCountAndReset());
 }
 
-TEST_F(ManagedNetworkConfigurationHandlerTest, PolicyApplicationRunning) {
+// TODO(stevenjb): https://crbug.com/710241
+TEST_F(ManagedNetworkConfigurationHandlerTest,
+       DISABLED_PolicyApplicationRunning) {
   InitializeStandardProfiles();
   EXPECT_CALL(*mock_profile_client_, GetProperties(_, _, _)).Times(AnyNumber());
   EXPECT_CALL(*mock_manager_client_, ConfigureServiceForProfile(_, _, _, _))
@@ -580,7 +582,9 @@
   EXPECT_FALSE(managed_handler()->IsAnyPolicyApplicationRunning());
 }
 
-TEST_F(ManagedNetworkConfigurationHandlerTest, UpdatePolicyAfterFinished) {
+// TODO(stevenjb): https://crbug.com/710241
+TEST_F(ManagedNetworkConfigurationHandlerTest,
+       DISABLED_UpdatePolicyAfterFinished) {
   InitializeStandardProfiles();
   EXPECT_CALL(*mock_profile_client_, GetProperties(_, _, _));
   EXPECT_CALL(*mock_manager_client_, ConfigureServiceForProfile(_, _, _, _));
@@ -686,7 +690,9 @@
   base::RunLoop().RunUntilIdle();
 }
 
-TEST_F(ManagedNetworkConfigurationHandlerTest, SetPolicyUpdateManagedNewGUID) {
+// TODO(stevenjb): https://crbug.com/710241
+TEST_F(ManagedNetworkConfigurationHandlerTest,
+       DISABLED_SetPolicyUpdateManagedNewGUID) {
   InitializeStandardProfiles();
   SetUpEntry("policy/shill_managed_wifi1.json",
              kUser1ProfilePath,
@@ -747,7 +753,9 @@
   VerifyAndClearExpectations();
 }
 
-TEST_F(ManagedNetworkConfigurationHandlerTest, SetPolicyReapplyToManaged) {
+// TODO(stevenjb): https://crbug.com/710241
+TEST_F(ManagedNetworkConfigurationHandlerTest,
+       DISABLED_SetPolicyReapplyToManaged) {
   InitializeStandardProfiles();
   SetUpEntry("policy/shill_policy_on_unmanaged_wifi1.json",
              kUser1ProfilePath,
diff --git a/chromeos/tools/onc_validator/OWNERS b/chromeos/tools/onc_validator/OWNERS
index 17c27e6..607dc3e 100644
--- a/chromeos/tools/onc_validator/OWNERS
+++ b/chromeos/tools/onc_validator/OWNERS
@@ -1,2 +1,2 @@
-cschuet@chromium.org
 stevenjb@chromium.org
+emaxx@chromium.org
diff --git a/components/onc/OWNERS b/components/onc/OWNERS
index 71fd0d2..ae9ccd5 100644
--- a/components/onc/OWNERS
+++ b/components/onc/OWNERS
@@ -1,5 +1,4 @@
 armansito@chromium.org
-cschuet@chromium.org
 gauravsh@chromium.org
 gspencer@chromium.org
 stevenjb@chromium.org
diff --git a/components/open_from_clipboard/BUILD.gn b/components/open_from_clipboard/BUILD.gn
index 1820cd3..89148c9 100644
--- a/components/open_from_clipboard/BUILD.gn
+++ b/components/open_from_clipboard/BUILD.gn
@@ -18,12 +18,30 @@
   }
 
   deps = [
+    ":open_from_clipboard_impl",
     "//base",
+    "//net",
     "//ui/base:base",
     "//url",
   ]
 }
 
+# Helper classes used by "open_from_clipboard" target. These classes must have
+# no dependencies on "//base:i18n".
+source_set("open_from_clipboard_impl") {
+  sources = [
+    "clipboard_recent_content_impl_ios.h",
+    "clipboard_recent_content_impl_ios.mm",
+  ]
+  deps = [
+    "//base",
+  ]
+  assert_no_deps = [ "//base:i18n" ]
+  if (is_ios) {
+    configs += [ "//build/config/compiler:enable_arc" ]
+  }
+}
+
 static_library("test_support") {
   testonly = true
   sources = [
@@ -50,6 +68,7 @@
 
   deps = [
     ":open_from_clipboard",
+    ":open_from_clipboard_impl",
     "//base",
     "//testing/gtest",
     "//ui/base:test_support",
diff --git a/components/open_from_clipboard/DEPS b/components/open_from_clipboard/DEPS
index 8b7fb45..6c33f8c4 100644
--- a/components/open_from_clipboard/DEPS
+++ b/components/open_from_clipboard/DEPS
@@ -1,4 +1,5 @@
 include_rules = [
+  "+net",
   "+ui/base/clipboard",
   "+ui/base/test",
 ]
diff --git a/components/open_from_clipboard/clipboard_recent_content_impl_ios.h b/components/open_from_clipboard/clipboard_recent_content_impl_ios.h
new file mode 100644
index 0000000..e3b3891
--- /dev/null
+++ b/components/open_from_clipboard/clipboard_recent_content_impl_ios.h
@@ -0,0 +1,55 @@
+// 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 COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IMPL_IOS_H_
+#define COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IMPL_IOS_H_
+
+#import <Foundation/Foundation.h>
+
+// A protocol implemented by delegates to handle clipboard changes.
+@protocol ClipboardRecentContentDelegate<NSObject>
+
+- (void)onClipboardChanged;
+
+@end
+
+// Helper class returning a URL if the content of the clipboard can be turned
+// into a URL, and if it estimates that the content of the clipboard is not too
+// old.
+@interface ClipboardRecentContentImplIOS : NSObject
+
+// |delegate| is used for metrics logging and can be nil. |authorizedSchemes|
+// should contain all schemes considered valid. |groupUserDefaults| is the
+// NSUserDefaults used to store information on pasteboard entry expiration. This
+// information will be shared with other applications in the application group.
+- (instancetype)initWithAuthorizedSchemes:(NSSet<NSString*>*)authorizedSchemes
+                             userDefaults:(NSUserDefaults*)groupUserDefaults
+                                 delegate:(id<ClipboardRecentContentDelegate>)
+                                              delegate
+    NS_DESIGNATED_INITIALIZER;
+
+- (instancetype)init NS_UNAVAILABLE;
+
+// Returns the copied URL if the clipboard contains a recent URL that has not
+// been supressed. Otherwise, returns nil.
+- (NSURL*)recentURLFromClipboard;
+
+// Returns how old the content of the clipboard is.
+- (NSTimeInterval)clipboardContentAge;
+
+// Prevents GetRecentURLFromClipboard from returning anything until the
+// clipboard's content changes.
+- (void)suppressClipboardContent;
+
+// Methods below are exposed for testing purposes.
+
+// Estimation of the date when the pasteboard changed.
+@property(nonatomic, strong) NSDate* lastPasteboardChangeDate;
+
+// Saves information to the user defaults about the latest pasteboard entry.
+- (void)saveToUserDefaults;
+
+@end
+
+#endif  // COMPONENTS_OPEN_FROM_CLIPBOARD_CLIPBOARD_RECENT_CONTENT_IMPL_IOS_H_
diff --git a/components/open_from_clipboard/clipboard_recent_content_impl_ios.mm b/components/open_from_clipboard/clipboard_recent_content_impl_ios.mm
new file mode 100644
index 0000000..669965ce
--- /dev/null
+++ b/components/open_from_clipboard/clipboard_recent_content_impl_ios.mm
@@ -0,0 +1,217 @@
+// 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.
+
+#import "components/open_from_clipboard/clipboard_recent_content_impl_ios.h"
+
+#import <CommonCrypto/CommonDigest.h>
+#import <UIKit/UIKit.h>
+
+#import "base/mac/foundation_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/sys_info.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace {
+// Key used to store the pasteboard's current change count. If when resuming
+// chrome the pasteboard's change count is different from the stored one, then
+// it means that the pasteboard's content has changed.
+NSString* const kPasteboardChangeCountKey = @"PasteboardChangeCount";
+// Key used to store the last date at which it was detected that the pasteboard
+// changed. It is used to evaluate the age of the pasteboard's content.
+NSString* const kPasteboardChangeDateKey = @"PasteboardChangeDate";
+// Key used to store the hash of the content of the pasteboard. Whenever the
+// hash changed, the pasteboard content is considered to have changed.
+NSString* const kPasteboardEntryMD5Key = @"PasteboardEntryMD5";
+// Maximum age of clipboard in seconds.
+NSTimeInterval const kMaximumAgeOfClipboard = 3 * 60 * 60;
+
+// Compute a hash consisting of the first 4 bytes of the MD5 hash of |string|.
+// This value is used to detect pasteboard content change. Keeping only 4 bytes
+// is a privacy requirement to introduce collision and allow deniability of
+// having copied a given string.
+NSData* WeakMD5FromNSString(NSString* string) {
+  unsigned char hash[CC_MD5_DIGEST_LENGTH];
+  const std::string clipboard = base::SysNSStringToUTF8(string);
+  const char* c_string = clipboard.c_str();
+  CC_MD5(c_string, strlen(c_string), hash);
+  NSData* data = [NSData dataWithBytes:hash length:4];
+  return data;
+}
+
+}  // namespace
+
+@interface ClipboardRecentContentImplIOS ()
+
+// The user defaults from the app group used to optimize the pasteboard change
+// detection.
+@property(nonatomic, strong) NSUserDefaults* sharedUserDefaults;
+// The pasteboard's change count. Increases everytime the pasteboard changes.
+@property(nonatomic) NSInteger lastPasteboardChangeCount;
+// MD5 hash of the last registered pasteboard entry.
+@property(nonatomic, strong) NSData* lastPasteboardEntryMD5;
+// Contains the authorized schemes for URLs.
+@property(nonatomic, readonly) NSSet* authorizedSchemes;
+// Delegate for metrics.
+@property(nonatomic, strong) id<ClipboardRecentContentDelegate> delegate;
+
+// If the content of the pasteboard has changed, updates the change count,
+// change date, and md5 of the latest pasteboard entry if necessary.
+- (void)updateIfNeeded;
+
+// Returns whether the pasteboard changed since the last time a pasteboard
+// change was detected.
+- (BOOL)hasPasteboardChanged;
+
+// Loads information from the user defaults about the latest pasteboard entry.
+- (void)loadFromUserDefaults;
+
+// Returns the URL contained in the clipboard (if any).
+- (NSURL*)URLFromPasteboard;
+
+// Returns the uptime.
+- (NSTimeInterval)uptime;
+
+@end
+
+@implementation ClipboardRecentContentImplIOS
+
+@synthesize lastPasteboardChangeCount = _lastPasteboardChangeCount;
+@synthesize lastPasteboardChangeDate = _lastPasteboardChangeDate;
+@synthesize lastPasteboardEntryMD5 = _lastPasteboardEntryMD5;
+@synthesize sharedUserDefaults = _sharedUserDefaults;
+@synthesize authorizedSchemes = _authorizedSchemes;
+@synthesize delegate = _delegate;
+
+- (instancetype)initWithAuthorizedSchemes:(NSSet<NSString*>*)authorizedSchemes
+                             userDefaults:(NSUserDefaults*)groupUserDefaults
+                                 delegate:(id<ClipboardRecentContentDelegate>)
+                                              delegate {
+  self = [super init];
+  if (self) {
+    _delegate = delegate;
+    _authorizedSchemes = authorizedSchemes;
+    _sharedUserDefaults = groupUserDefaults;
+
+    _lastPasteboardChangeCount = NSIntegerMax;
+    [self loadFromUserDefaults];
+    [self updateIfNeeded];
+
+    // Makes sure |last_pasteboard_change_count_| was properly initialized.
+    DCHECK_NE(_lastPasteboardChangeCount, NSIntegerMax);
+    [[NSNotificationCenter defaultCenter]
+        addObserver:self
+           selector:@selector(didBecomeActive:)
+               name:UIApplicationDidBecomeActiveNotification
+             object:nil];
+  }
+  return self;
+}
+
+- (void)dealloc {
+  [[NSNotificationCenter defaultCenter] removeObserver:self];
+}
+
+- (void)didBecomeActive:(NSNotification*)notification {
+  [self loadFromUserDefaults];
+  [self updateIfNeeded];
+}
+
+- (NSData*)getCurrentMD5 {
+  NSString* pasteboardString = [UIPasteboard generalPasteboard].string;
+  NSData* md5 = WeakMD5FromNSString(pasteboardString);
+
+  return md5;
+}
+
+- (BOOL)hasPasteboardChanged {
+  // If |MD5Changed|, we know for sure there has been at least one pasteboard
+  // copy since last time it was checked.
+  // If the pasteboard content is still the same but the device was not
+  // rebooted, the change count can be checked to see if it changed.
+  // Note: due to a mismatch between the actual behavior and documentation, and
+  // lack of consistency on different reboot scenarios, the change count cannot
+  // be checked after a reboot.
+  // See radar://21833556 for more information.
+  BOOL deviceRebooted = [self clipboardContentAge] >= [self uptime];
+  if (!deviceRebooted) {
+    NSInteger changeCount = [UIPasteboard generalPasteboard].changeCount;
+    bool changeCountChanged = changeCount != self.lastPasteboardChangeCount;
+    return changeCountChanged;
+  }
+
+  BOOL md5Changed =
+      ![[self getCurrentMD5] isEqualToData:self.lastPasteboardEntryMD5];
+  return md5Changed;
+}
+
+- (NSURL*)recentURLFromClipboard {
+  [self updateIfNeeded];
+  if ([self clipboardContentAge] > kMaximumAgeOfClipboard) {
+    return nil;
+  }
+  return [self URLFromPasteboard];
+}
+
+- (NSTimeInterval)clipboardContentAge {
+  return -[self.lastPasteboardChangeDate timeIntervalSinceNow];
+}
+
+- (void)suppressClipboardContent {
+  // User cleared the user data. The pasteboard entry must be removed from the
+  // omnibox list. Force entry expiration by setting copy date to 1970.
+  self.lastPasteboardChangeDate =
+      [[NSDate alloc] initWithTimeIntervalSince1970:0];
+  [self saveToUserDefaults];
+}
+
+- (void)updateIfNeeded {
+  if (![self hasPasteboardChanged]) {
+    return;
+  }
+
+  [self.delegate onClipboardChanged];
+
+  self.lastPasteboardChangeDate = [NSDate date];
+  self.lastPasteboardChangeCount = [UIPasteboard generalPasteboard].changeCount;
+  self.lastPasteboardEntryMD5 = [self getCurrentMD5];
+
+  [self saveToUserDefaults];
+}
+
+- (NSURL*)URLFromPasteboard {
+  NSString* clipboardString = [UIPasteboard generalPasteboard].string;
+
+  NSURL* url = [NSURL URLWithString:clipboardString];
+  if (![self.authorizedSchemes containsObject:url.scheme]) {
+    return nil;
+  }
+  return url;
+}
+
+- (void)loadFromUserDefaults {
+  self.lastPasteboardChangeCount =
+      [self.sharedUserDefaults integerForKey:kPasteboardChangeCountKey];
+  self.lastPasteboardChangeDate = base::mac::ObjCCastStrict<NSDate>(
+      [self.sharedUserDefaults objectForKey:kPasteboardChangeDateKey]);
+  self.lastPasteboardEntryMD5 = base::mac::ObjCCastStrict<NSData>(
+      [self.sharedUserDefaults objectForKey:kPasteboardEntryMD5Key]);
+}
+
+- (void)saveToUserDefaults {
+  [self.sharedUserDefaults setInteger:self.lastPasteboardChangeCount
+                               forKey:kPasteboardChangeCountKey];
+  [self.sharedUserDefaults setObject:self.lastPasteboardChangeDate
+                              forKey:kPasteboardChangeDateKey];
+  [self.sharedUserDefaults setObject:self.lastPasteboardEntryMD5
+                              forKey:kPasteboardEntryMD5Key];
+}
+
+- (NSTimeInterval)uptime {
+  return base::SysInfo::Uptime().InSecondsF();
+}
+
+@end
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.h b/components/open_from_clipboard/clipboard_recent_content_ios.h
index d4b7d7e..abbf5101 100644
--- a/components/open_from_clipboard/clipboard_recent_content_ios.h
+++ b/components/open_from_clipboard/clipboard_recent_content_ios.h
@@ -11,13 +11,16 @@
 #include "components/open_from_clipboard/clipboard_recent_content.h"
 #include "url/gurl.h"
 
+@class NSArray;
 @class NSDate;
 @class NSUserDefaults;
-@class ApplicationDidBecomeActiveNotificationListenerBridge;
+@class ClipboardRecentContentImplIOS;
 
-class ClipboardRecentContentIOSTest;
-
-// IOS implementation of ClipboardRecentContent
+// IOS implementation of ClipboardRecentContent.
+// A large part of the implementation is in clipboard_recent_content_impl_ios,
+// a GURL-free class that is used by some of the iOS extensions. Not using GURL
+// in extensions is preferable as GURL requires depending on ICU which makes the
+// extensions much larger.
 class ClipboardRecentContentIOS : public ClipboardRecentContent {
  public:
   // |application_scheme| is the URL scheme that can be used to open the
@@ -26,53 +29,22 @@
   // |group_user_defaults| is the NSUserDefaults used to store information on
   // pasteboard entry expiration. This information will be shared with other
   // application in the application group.
-  explicit ClipboardRecentContentIOS(const std::string& application_scheme,
-                                     NSUserDefaults* group_user_defaults);
+  ClipboardRecentContentIOS(const std::string& application_scheme,
+                            NSUserDefaults* group_user_defaults);
+
+  // Constructor that directly takes an |implementation|. For use in tests.
+  ClipboardRecentContentIOS(ClipboardRecentContentImplIOS* implementation);
+
   ~ClipboardRecentContentIOS() override;
 
-  // If the content of the pasteboard has changed, updates the change count,
-  // change date, and md5 of the latest pasteboard entry if necessary.
-  void UpdateIfNeeded();
-
-  // Returns whether the pasteboard changed since the last time a pasteboard
-  // change was detected.
-  bool HasPasteboardChanged() const;
-
-  // Loads information from the user defaults about the latest pasteboard entry.
-  void LoadFromUserDefaults();
-
   // ClipboardRecentContent implementation.
   bool GetRecentURLFromClipboard(GURL* url) override;
   base::TimeDelta GetClipboardContentAge() const override;
   void SuppressClipboardContent() override;
 
- protected:
-  // Returns the uptime. Override in tests to return custom value.
-  virtual base::TimeDelta Uptime() const;
-
  private:
-  friend class ClipboardRecentContentIOSTest;
-
-  // Saves information to the user defaults about the latest pasteboard entry.
-  void SaveToUserDefaults();
-
-  // Returns the URL contained in the clipboard (if any).
-  GURL URLFromPasteboard();
-
-  // Contains the URL scheme opening the app. May be empty.
-  std::string application_scheme_;
-  // The pasteboard's change count. Increases everytime the pasteboard changes.
-  NSInteger last_pasteboard_change_count_;
-  // Estimation of the date when the pasteboard changed.
-  base::scoped_nsobject<NSDate> last_pasteboard_change_date_;
-  // MD5 hash of the last registered pasteboard entry.
-  base::scoped_nsobject<NSData> last_pasteboard_entry_md5_;
-  // Bridge to receive notifications when the application becomes active.
-  base::scoped_nsobject<ApplicationDidBecomeActiveNotificationListenerBridge>
-      notification_bridge_;
-  // The user defaults from the app group used to optimize the pasteboard change
-  // detection.
-  base::scoped_nsobject<NSUserDefaults> shared_user_defaults_;
+  // The implementation instance.
+  base::scoped_nsobject<ClipboardRecentContentImplIOS> implementation_;
 
   DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContentIOS);
 };
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.mm b/components/open_from_clipboard/clipboard_recent_content_ios.mm
index 6d7d874..930a274 100644
--- a/components/open_from_clipboard/clipboard_recent_content_ios.mm
+++ b/components/open_from_clipboard/clipboard_recent_content_ios.mm
@@ -15,221 +15,78 @@
 #include "base/metrics/user_metrics.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/sys_info.h"
+#import "components/open_from_clipboard/clipboard_recent_content_impl_ios.h"
+#import "net/base/mac/url_conversions.h"
 #include "url/gurl.h"
-
-// Bridge that forwards UIApplicationDidBecomeActiveNotification notifications
-// to its delegate.
-@interface ApplicationDidBecomeActiveNotificationListenerBridge : NSObject
-
-// Initialize the ApplicationDidBecomeActiveNotificationListenerBridge with
-// |delegate| which must not be null.
-- (instancetype)initWithDelegate:(ClipboardRecentContentIOS*)delegate
-    NS_DESIGNATED_INITIALIZER;
-
-- (instancetype)init NS_UNAVAILABLE;
-
-@end
-
-@implementation ApplicationDidBecomeActiveNotificationListenerBridge {
-  ClipboardRecentContentIOS* _delegate;
-}
-
-- (instancetype)init {
-  NOTREACHED();
-  return nil;
-}
-
-- (instancetype)initWithDelegate:(ClipboardRecentContentIOS*)delegate {
-  DCHECK(delegate);
-  self = [super init];
-  if (self) {
-    _delegate = delegate;
-    [[NSNotificationCenter defaultCenter]
-        addObserver:self
-           selector:@selector(didBecomeActive:)
-               name:UIApplicationDidBecomeActiveNotification
-             object:nil];
-  }
-  return self;
-}
-
-- (void)dealloc {
-  [[NSNotificationCenter defaultCenter] removeObserver:self];
-  [super dealloc];
-}
-
-- (void)didBecomeActive:(NSNotification*)notification {
-  if (_delegate) {
-    _delegate->LoadFromUserDefaults();
-    _delegate->UpdateIfNeeded();
-  }
-}
-
-- (void)disconnect {
-  _delegate = nullptr;
-}
-
-@end
+#include "url/url_constants.h"
 
 namespace {
-// Key used to store the pasteboard's current change count. If when resuming
-// chrome the pasteboard's change count is different from the stored one, then
-// it means that the pasteboard's content has changed.
-NSString* kPasteboardChangeCountKey = @"PasteboardChangeCount";
-// Key used to store the last date at which it was detected that the pasteboard
-// changed. It is used to evaluate the age of the pasteboard's content.
-NSString* kPasteboardChangeDateKey = @"PasteboardChangeDate";
-// Key used to store the hash of the content of the pasteboard. Whenever the
-// hash changed, the pasteboard content is considered to have changed.
-NSString* kPasteboardEntryMD5Key = @"PasteboardEntryMD5";
 
-// Compute a hash consisting of the first 4 bytes of the MD5 hash of |string|.
-// This value is used to detect pasteboard content change. Keeping only 4 bytes
-// is a privacy requirement to introduce collision and allow deniability of
-// having copied a given string.
-NSData* WeakMD5FromNSString(NSString* string) {
-  unsigned char hash[CC_MD5_DIGEST_LENGTH];
-  const std::string clipboard = base::SysNSStringToUTF8(string);
-  const char* c_string = clipboard.c_str();
-  CC_MD5(c_string, strlen(c_string), hash);
-  NSData* data = [NSData dataWithBytes:hash length:4];
-  return data;
+// Schemes accepted by the ClipboardRecentContentIOS.
+const char* kAuthorizedSchemes[] = {
+    url::kHttpScheme, url::kHttpsScheme, url::kDataScheme, url::kAboutScheme,
+};
+
+// Get the list of authorized schemes.
+NSSet<NSString*>* getAuthorizedSchemeList(
+    const std::string& application_scheme) {
+  NSMutableSet<NSString*>* schemes = [NSMutableSet set];
+  for (size_t i = 0; i < arraysize(kAuthorizedSchemes); ++i) {
+    [schemes addObject:base::SysUTF8ToNSString(kAuthorizedSchemes[i])];
+  }
+  if (!application_scheme.empty()) {
+    [schemes addObject:base::SysUTF8ToNSString(application_scheme)];
+  }
+
+  return [schemes copy];
 }
 
 }  // namespace
 
+@interface ClipboardRecentContentDelegateImpl
+    : NSObject<ClipboardRecentContentDelegate>
+@end
+
+@implementation ClipboardRecentContentDelegateImpl
+
+- (void)onClipboardChanged {
+  base::RecordAction(base::UserMetricsAction("MobileOmniboxClipboardChanged"));
+}
+
+@end
+
+ClipboardRecentContentIOS::ClipboardRecentContentIOS(
+    const std::string& application_scheme,
+    NSUserDefaults* group_user_defaults)
+    : ClipboardRecentContentIOS([[ClipboardRecentContentImplIOS alloc]
+          initWithAuthorizedSchemes:getAuthorizedSchemeList(application_scheme)
+                       userDefaults:group_user_defaults
+                           delegate:[[ClipboardRecentContentDelegateImpl alloc]
+                                        init]]) {}
+
+ClipboardRecentContentIOS::ClipboardRecentContentIOS(
+    ClipboardRecentContentImplIOS* implementation) {
+  implementation_.reset(implementation);
+}
+
 bool ClipboardRecentContentIOS::GetRecentURLFromClipboard(GURL* url) {
   DCHECK(url);
-  UpdateIfNeeded();
-  if (GetClipboardContentAge() > kMaximumAgeOfClipboard) {
-    return false;
-  }
-
-  GURL url_from_pasteboard = URLFromPasteboard();
-  if (url_from_pasteboard.is_valid()) {
-    *url = url_from_pasteboard;
+  NSURL* url_from_pasteboard = [implementation_ recentURLFromClipboard];
+  GURL converted_url = net::GURLWithNSURL(url_from_pasteboard);
+  if (converted_url.is_valid()) {
+    *url = std::move(converted_url);
     return true;
   }
   return false;
 }
 
+ClipboardRecentContentIOS::~ClipboardRecentContentIOS() {}
+
 base::TimeDelta ClipboardRecentContentIOS::GetClipboardContentAge() const {
-  return base::TimeDelta::FromSeconds(static_cast<int64_t>(
-      -[last_pasteboard_change_date_ timeIntervalSinceNow]));
+  return base::TimeDelta::FromSeconds(
+      static_cast<int64_t>([implementation_ clipboardContentAge]));
 }
 
 void ClipboardRecentContentIOS::SuppressClipboardContent() {
-  // User cleared the user data. The pasteboard entry must be removed from the
-  // omnibox list. Force entry expiration by setting copy date to 1970.
-  last_pasteboard_change_date_.reset(
-      [[NSDate alloc] initWithTimeIntervalSince1970:0]);
-  SaveToUserDefaults();
-}
-
-void ClipboardRecentContentIOS::UpdateIfNeeded() {
-  if (!HasPasteboardChanged())
-    return;
-
-  base::RecordAction(base::UserMetricsAction("MobileClipboardChanged"));
-
-  GURL url_from_pasteboard = URLFromPasteboard();
-  last_pasteboard_change_date_.reset([[NSDate date] retain]);
-  last_pasteboard_change_count_ = [UIPasteboard generalPasteboard].changeCount;
-  NSString* pasteboard_string = [[UIPasteboard generalPasteboard] string];
-  if (!pasteboard_string) {
-    pasteboard_string = @"";
-  }
-  NSData* MD5 = WeakMD5FromNSString(pasteboard_string);
-  last_pasteboard_entry_md5_.reset([MD5 retain]);
-  SaveToUserDefaults();
-}
-
-ClipboardRecentContentIOS::ClipboardRecentContentIOS(
-    const std::string& application_scheme,
-    NSUserDefaults* group_user_defaults)
-    : application_scheme_(application_scheme),
-      shared_user_defaults_([group_user_defaults retain]) {
-  last_pasteboard_change_count_ = NSIntegerMax;
-  LoadFromUserDefaults();
-
-  UpdateIfNeeded();
-
-  // Makes sure |last_pasteboard_change_count_| was properly initialized.
-  DCHECK_NE(last_pasteboard_change_count_, NSIntegerMax);
-  notification_bridge_.reset(
-      [[ApplicationDidBecomeActiveNotificationListenerBridge alloc]
-          initWithDelegate:this]);
-}
-
-bool ClipboardRecentContentIOS::HasPasteboardChanged() const {
-  // If |MD5Changed|, we know for sure there has been at least one pasteboard
-  // copy since last time it was checked.
-  // If the pasteboard content is still the same but the device was not
-  // rebooted, the change count can be checked to see if it changed.
-  // Note: due to a mismatch between the actual behavior and documentation, and
-  // lack of consistency on different reboot scenarios, the change count cannot
-  // be checked after a reboot.
-  // See radar://21833556 for more information.
-  NSInteger change_count = [UIPasteboard generalPasteboard].changeCount;
-  bool change_count_changed = change_count != last_pasteboard_change_count_;
-
-  bool not_rebooted = Uptime() > GetClipboardContentAge();
-  if (not_rebooted)
-    return change_count_changed;
-
-  NSString* pasteboard_string = [[UIPasteboard generalPasteboard] string];
-  if (!pasteboard_string) {
-    pasteboard_string = @"";
-  }
-  NSData* md5 = WeakMD5FromNSString(pasteboard_string);
-  BOOL md5_changed = ![md5 isEqualToData:last_pasteboard_entry_md5_];
-
-  return md5_changed;
-}
-
-ClipboardRecentContentIOS::~ClipboardRecentContentIOS() {
-  [notification_bridge_ disconnect];
-}
-
-GURL ClipboardRecentContentIOS::URLFromPasteboard() {
-  NSString* clipboard_string = [[UIPasteboard generalPasteboard] string];
-  if (!clipboard_string) {
-    return GURL::EmptyGURL();
-  }
-  const std::string clipboard = base::SysNSStringToUTF8(clipboard_string);
-  GURL gurl = GURL(clipboard);
-  if (gurl.is_valid()) {
-    if (IsAppropriateSuggestion(gurl))
-      return gurl;
-    if (!application_scheme_.empty() &&
-        gurl.SchemeIs(application_scheme_.c_str())) {
-      return gurl;
-    }
-  }
-  return GURL::EmptyGURL();
-}
-
-void ClipboardRecentContentIOS::LoadFromUserDefaults() {
-  last_pasteboard_change_count_ =
-      [shared_user_defaults_ integerForKey:kPasteboardChangeCountKey];
-  last_pasteboard_change_date_.reset(
-      [[shared_user_defaults_ objectForKey:kPasteboardChangeDateKey] retain]);
-  last_pasteboard_entry_md5_.reset(
-      [[shared_user_defaults_ objectForKey:kPasteboardEntryMD5Key] retain]);
-
-  DCHECK(!last_pasteboard_change_date_ ||
-         [last_pasteboard_change_date_ isKindOfClass:[NSDate class]]);
-}
-
-void ClipboardRecentContentIOS::SaveToUserDefaults() {
-  [shared_user_defaults_ setInteger:last_pasteboard_change_count_
-                             forKey:kPasteboardChangeCountKey];
-  [shared_user_defaults_ setObject:last_pasteboard_change_date_
-                            forKey:kPasteboardChangeDateKey];
-  [shared_user_defaults_ setObject:last_pasteboard_entry_md5_
-                            forKey:kPasteboardEntryMD5Key];
-}
-
-base::TimeDelta ClipboardRecentContentIOS::Uptime() const {
-  return base::SysInfo::Uptime();
+  [implementation_ suppressClipboardContent];
 }
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios_unittest.mm b/components/open_from_clipboard/clipboard_recent_content_ios_unittest.mm
index 670a92354..341f0ba 100644
--- a/components/open_from_clipboard/clipboard_recent_content_ios_unittest.mm
+++ b/components/open_from_clipboard/clipboard_recent_content_ios_unittest.mm
@@ -9,6 +9,9 @@
 
 #include <memory>
 
+#include "base/memory/ptr_util.h"
+#include "base/strings/sys_string_conversions.h"
+#import "components/open_from_clipboard/clipboard_recent_content_impl_ios.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "testing/platform_test.h"
 
@@ -37,28 +40,55 @@
                setValue:[NSString stringWithUTF8String:data]
       forPasteboardType:@"public.plain-text"];
 }
-const char kUnrecognizedURL[] = "ftp://foo/";
-const char kRecognizedURL[] = "http://bar/";
-const char kRecognizedURL2[] = "http://bar/2";
+const char kUnrecognizedURL[] = "bad://foo/";
+const char kRecognizedURL[] = "good://bar/";
+const char kRecognizedURL2[] = "good://bar/2";
 const char kAppSpecificURL[] = "test://qux/";
 const char kAppSpecificScheme[] = "test";
+const char kRecognizedScheme[] = "good";
 NSTimeInterval kSevenHours = 60 * 60 * 7;
 }  // namespace
 
+@interface ClipboardRecentContentImplIOSWithFakeUptime
+    : ClipboardRecentContentImplIOS
+@property(nonatomic) NSTimeInterval fakeUptime;
+
+- (instancetype)initWithDelegate:(id<ClipboardRecentContentDelegate>)delegate
+               authorizedSchemes:(NSArray*)authorizedSchemes
+                    userDefaults:(NSUserDefaults*)groupUserDefaults
+                          uptime:(NSTimeInterval)uptime;
+
+@end
+
+@implementation ClipboardRecentContentImplIOSWithFakeUptime
+
+@synthesize fakeUptime = _fakeUptime;
+
+- (instancetype)initWithDelegate:(id<ClipboardRecentContentDelegate>)delegate
+               authorizedSchemes:(NSSet*)authorizedSchemes
+                    userDefaults:(NSUserDefaults*)groupUserDefaults
+                          uptime:(NSTimeInterval)uptime {
+  self = [super initWithAuthorizedSchemes:authorizedSchemes
+                             userDefaults:groupUserDefaults
+                                 delegate:delegate];
+  if (self) {
+    _fakeUptime = uptime;
+  }
+  return self;
+}
+
+- (NSTimeInterval)uptime {
+  return self.fakeUptime;
+}
+
+@end
+
 class ClipboardRecentContentIOSWithFakeUptime
     : public ClipboardRecentContentIOS {
  public:
-  ClipboardRecentContentIOSWithFakeUptime(const std::string& application_scheme,
-                                          NSUserDefaults* group_user_defaults)
-      : ClipboardRecentContentIOS(application_scheme, group_user_defaults) {}
-  // Sets the uptime.
-  void SetUptime(base::TimeDelta uptime) { uptime_ = uptime; }
-
- protected:
-  base::TimeDelta Uptime() const override { return uptime_; }
-
- private:
-  base::TimeDelta uptime_;
+  ClipboardRecentContentIOSWithFakeUptime(
+      ClipboardRecentContentImplIOS* implementation)
+      : ClipboardRecentContentIOS(implementation) {}
 };
 
 class ClipboardRecentContentIOSTest : public ::testing::Test {
@@ -76,23 +106,31 @@
 
   void ResetClipboardRecentContent(const std::string& application_scheme,
                                    base::TimeDelta time_delta) {
-    clipboard_content_.reset(new ClipboardRecentContentIOSWithFakeUptime(
-        application_scheme, [NSUserDefaults standardUserDefaults]));
-    clipboard_content_->SetUptime(time_delta);
+    clipboard_content_implementation_ =
+        [[ClipboardRecentContentImplIOSWithFakeUptime alloc]
+             initWithDelegate:nil
+            authorizedSchemes:@[
+              base::SysUTF8ToNSString(kRecognizedScheme),
+              base::SysUTF8ToNSString(application_scheme)
+            ]
+                 userDefaults:[NSUserDefaults standardUserDefaults]
+                       uptime:time_delta.InSecondsF()];
+
+    clipboard_content_ =
+        base::MakeUnique<ClipboardRecentContentIOSWithFakeUptime>(
+            clipboard_content_implementation_);
   }
 
-  void SetStoredPasteboardChangeDate(NSDate* changeDate) {
-    clipboard_content_->last_pasteboard_change_date_.reset([changeDate copy]);
-    clipboard_content_->SaveToUserDefaults();
-  }
-
-  void SetStoredPasteboardChangeCount(NSInteger newChangeCount) {
-    clipboard_content_->last_pasteboard_change_count_ = newChangeCount;
-    clipboard_content_->SaveToUserDefaults();
+  void SetStoredPasteboardChangeDate(NSDate* change_date) {
+    clipboard_content_implementation_.lastPasteboardChangeDate =
+        [change_date copy];
+    [clipboard_content_implementation_ saveToUserDefaults];
   }
 
  protected:
   std::unique_ptr<ClipboardRecentContentIOSWithFakeUptime> clipboard_content_;
+  ClipboardRecentContentImplIOSWithFakeUptime*
+      clipboard_content_implementation_;
 };
 
 TEST_F(ClipboardRecentContentIOSTest, SchemeFiltering) {
@@ -164,7 +202,7 @@
   // Check that the pasteboard content is still suppressed.
   EXPECT_FALSE(clipboard_content_->GetRecentURLFromClipboard(&gurl));
 
-  // Check that the even if the device is restarted, pasteboard content is
+  // Check that even if the device is restarted, pasteboard content is
   // still suppressed.
   SimulateDeviceRestart();
   EXPECT_FALSE(clipboard_content_->GetRecentURLFromClipboard(&gurl));
diff --git a/components/suggestions/suggestions_service_impl.cc b/components/suggestions/suggestions_service_impl.cc
index 1ad86d1..6e41445d 100644
--- a/components/suggestions/suggestions_service_impl.cc
+++ b/components/suggestions/suggestions_service_impl.cc
@@ -399,7 +399,7 @@
           setting:
             "Users can disable this feature by signing out of Chromium, or "
             "disabling Sync or History Sync in Chromium settings under "
-            "Advanced sync settings. The feature is enabled by default.""
+            "Advanced sync settings. The feature is enabled by default."
           chrome_policy {
             SyncDisabled {
               policy_options {mode: MANDATORY}
diff --git a/content/browser/android/date_time_chooser_android.cc b/content/browser/android/date_time_chooser_android.cc
index 28b6d03..34557199 100644
--- a/content/browser/android/date_time_chooser_android.cc
+++ b/content/browser/android/date_time_chooser_android.cc
@@ -92,9 +92,13 @@
     }
   }
 
-  j_date_time_chooser_.Reset(Java_DateTimeChooserAndroid_createDateTimeChooser(
-      env, native_window->GetJavaObject(), reinterpret_cast<intptr_t>(this),
-      dialog_type, dialog_value, min, max, step, suggestions_array));
+  if (native_window && !(native_window->GetJavaObject()).is_null()) {
+    j_date_time_chooser_.Reset(
+        Java_DateTimeChooserAndroid_createDateTimeChooser(
+            env, native_window->GetJavaObject(),
+            reinterpret_cast<intptr_t>(this), dialog_type, dialog_value, min,
+            max, step, suggestions_array));
+  }
   if (j_date_time_chooser_.is_null())
     ReplaceDateTime(env, j_date_time_chooser_, dialog_value);
 }
diff --git a/content/browser/renderer_host/pepper/pepper_socket_utils.cc b/content/browser/renderer_host/pepper/pepper_socket_utils.cc
index bf2a4c7fc..b749682 100644
--- a/content/browser/renderer_host/pepper/pepper_socket_utils.cc
+++ b/content/browser/renderer_host/pepper/pepper_socket_utils.cc
@@ -11,6 +11,7 @@
 #include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
 #include "base/strings/string_util.h"
+#include "base/values.h"
 #include "build/build_config.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/content_browser_client.h"
@@ -114,8 +115,8 @@
 
   const std::string& serial_number = cert.serial_number();
   fields->SetField(PP_X509CERTIFICATE_PRIVATE_SERIAL_NUMBER,
-                   base::BinaryValue::CreateWithCopiedBuffer(
-                       serial_number.data(), serial_number.length()));
+                   base::Value::CreateWithCopiedBuffer(serial_number.data(),
+                                                       serial_number.length()));
   fields->SetField(
       PP_X509CERTIFICATE_PRIVATE_VALIDITY_NOT_BEFORE,
       base::MakeUnique<base::Value>(cert.valid_start().ToDoubleT()));
@@ -126,7 +127,7 @@
   net::X509Certificate::GetDEREncoded(cert.os_cert_handle(), &der);
   fields->SetField(
       PP_X509CERTIFICATE_PRIVATE_RAW,
-      base::BinaryValue::CreateWithCopiedBuffer(der.data(), der.length()));
+      base::Value::CreateWithCopiedBuffer(der.data(), der.length()));
   return true;
 }
 
diff --git a/content/child/v8_value_converter_impl.cc b/content/child/v8_value_converter_impl.cc
index 1391adf..ad5f6dd 100644
--- a/content/child/v8_value_converter_impl.cc
+++ b/content/child/v8_value_converter_impl.cc
@@ -339,7 +339,7 @@
 v8::Local<v8::Value> V8ValueConverterImpl::ToArrayBuffer(
     v8::Isolate* isolate,
     v8::Local<v8::Object> creation_context,
-    const base::BinaryValue* value) const {
+    const base::Value* value) const {
   DCHECK(creation_context->CreationContext() == isolate->GetCurrentContext());
   v8::Local<v8::ArrayBuffer> buffer =
       v8::ArrayBuffer::New(isolate, value->GetSize());
@@ -502,14 +502,14 @@
 
   if (val->IsArrayBuffer()) {
     auto contents = val.As<v8::ArrayBuffer>()->GetContents();
-    return base::BinaryValue::CreateWithCopiedBuffer(
+    return base::Value::CreateWithCopiedBuffer(
         static_cast<const char*>(contents.Data()), contents.ByteLength());
   } else if (val->IsArrayBufferView()) {
     v8::Local<v8::ArrayBufferView> view = val.As<v8::ArrayBufferView>();
     size_t byte_length = view->ByteLength();
     std::vector<char> buffer(byte_length);
     view->CopyContents(buffer.data(), buffer.size());
-    return base::MakeUnique<base::BinaryValue>(std::move(buffer));
+    return base::MakeUnique<base::Value>(std::move(buffer));
   } else {
     NOTREACHED() << "Only ArrayBuffer and ArrayBufferView should get here.";
     return nullptr;
diff --git a/content/child/v8_value_converter_impl.h b/content/child/v8_value_converter_impl.h
index 1fbc9892..ce80a71 100644
--- a/content/child/v8_value_converter_impl.h
+++ b/content/child/v8_value_converter_impl.h
@@ -16,7 +16,6 @@
 class DictionaryValue;
 class ListValue;
 class Value;
-using BinaryValue = Value;
 }
 
 namespace content {
@@ -56,8 +55,8 @@
       v8::Local<v8::Object> creation_context,
       const base::DictionaryValue* dictionary) const;
   v8::Local<v8::Value> ToArrayBuffer(v8::Isolate* isolate,
-                                      v8::Local<v8::Object> creation_context,
-                                      const base::BinaryValue* value) const;
+                                     v8::Local<v8::Object> creation_context,
+                                     const base::Value* value) const;
 
   std::unique_ptr<base::Value> FromV8ValueImpl(FromV8ValueState* state,
                                                v8::Local<v8::Value> value,
diff --git a/content/child/v8_value_converter_impl_unittest.cc b/content/child/v8_value_converter_impl_unittest.cc
index 394af66..a04e8ac 100644
--- a/content/child/v8_value_converter_impl_unittest.cc
+++ b/content/child/v8_value_converter_impl_unittest.cc
@@ -1148,8 +1148,7 @@
       converter.FromV8Value(array_buffer, context));
   ASSERT_TRUE(binary_value);
   std::unique_ptr<base::Value> reference_binary_value(
-      base::BinaryValue::CreateWithCopiedBuffer(kExampleData,
-                                                sizeof(kExampleData)));
+      base::Value::CreateWithCopiedBuffer(kExampleData, sizeof(kExampleData)));
   EXPECT_TRUE(
       base::Value::Equals(reference_binary_value.get(), binary_value.get()));
 
@@ -1159,7 +1158,7 @@
       converter.FromV8Value(array_buffer_view, context));
   ASSERT_TRUE(binary_view_value);
   std::unique_ptr<base::Value> reference_binary_view_value(
-      base::BinaryValue::CreateWithCopiedBuffer(&kExampleData[1], 3));
+      base::Value::CreateWithCopiedBuffer(&kExampleData[1], 3));
   EXPECT_TRUE(base::Value::Equals(reference_binary_view_value.get(),
                                   binary_view_value.get()));
 
diff --git a/content/common/android/gin_java_bridge_value.cc b/content/common/android/gin_java_bridge_value.cc
index ed3fd7e..e745ce8 100644
--- a/content/common/android/gin_java_bridge_value.cc
+++ b/content/common/android/gin_java_bridge_value.cc
@@ -26,13 +26,13 @@
 }
 
 // static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateUndefinedValue() {
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateUndefinedValue() {
   GinJavaBridgeValue gin_value(TYPE_UNDEFINED);
   return gin_value.SerializeToBinaryValue();
 }
 
 // static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateNonFiniteValue(
     float in_value) {
   GinJavaBridgeValue gin_value(TYPE_NONFINITE);
   gin_value.pickle_.WriteFloat(in_value);
@@ -40,13 +40,13 @@
 }
 
 // static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateNonFiniteValue(
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateNonFiniteValue(
     double in_value) {
   return CreateNonFiniteValue(static_cast<float>(in_value));
 }
 
 // static
-std::unique_ptr<base::BinaryValue> GinJavaBridgeValue::CreateObjectIDValue(
+std::unique_ptr<base::Value> GinJavaBridgeValue::CreateObjectIDValue(
     int32_t in_value) {
   GinJavaBridgeValue gin_value(TYPE_OBJECT_ID);
   gin_value.pickle_.WriteInt(in_value);
@@ -111,14 +111,13 @@
   header->type = type;
 }
 
-GinJavaBridgeValue::GinJavaBridgeValue(const base::BinaryValue* value)
+GinJavaBridgeValue::GinJavaBridgeValue(const base::Value* value)
     : pickle_(value->GetBuffer(), value->GetSize()) {
   DCHECK(ContainsGinJavaBridgeValue(value));
 }
 
-std::unique_ptr<base::BinaryValue>
-GinJavaBridgeValue::SerializeToBinaryValue() {
-  return base::BinaryValue::CreateWithCopiedBuffer(
+std::unique_ptr<base::Value> GinJavaBridgeValue::SerializeToBinaryValue() {
+  return base::Value::CreateWithCopiedBuffer(
       reinterpret_cast<const char*>(pickle_.data()), pickle_.size());
 }
 
diff --git a/content/common/android/gin_java_bridge_value.h b/content/common/android/gin_java_bridge_value.h
index 1cd92d8..167123a9 100644
--- a/content/common/android/gin_java_bridge_value.h
+++ b/content/common/android/gin_java_bridge_value.h
@@ -16,7 +16,7 @@
 
 // In Java Bridge, we need to pass some kinds of values that can't
 // be put into base::Value. And since base::Value is not extensible,
-// we transfer these special values via base::BinaryValue.
+// we transfer these special values via base::Value.
 
 namespace content {
 
@@ -34,13 +34,12 @@
   };
 
   // Serialization
-  CONTENT_EXPORT static std::unique_ptr<base::BinaryValue>
-  CreateUndefinedValue();
-  CONTENT_EXPORT static std::unique_ptr<base::BinaryValue> CreateNonFiniteValue(
+  CONTENT_EXPORT static std::unique_ptr<base::Value> CreateUndefinedValue();
+  CONTENT_EXPORT static std::unique_ptr<base::Value> CreateNonFiniteValue(
       float in_value);
-  CONTENT_EXPORT static std::unique_ptr<base::BinaryValue> CreateNonFiniteValue(
+  CONTENT_EXPORT static std::unique_ptr<base::Value> CreateNonFiniteValue(
       double in_value);
-  CONTENT_EXPORT static std::unique_ptr<base::BinaryValue> CreateObjectIDValue(
+  CONTENT_EXPORT static std::unique_ptr<base::Value> CreateObjectIDValue(
       int32_t in_value);
 
   // De-serialization
@@ -57,8 +56,8 @@
 
  private:
   explicit GinJavaBridgeValue(Type type);
-  explicit GinJavaBridgeValue(const base::BinaryValue* value);
-  std::unique_ptr<base::BinaryValue> SerializeToBinaryValue();
+  explicit GinJavaBridgeValue(const base::Value* value);
+  std::unique_ptr<base::Value> SerializeToBinaryValue();
 
   base::Pickle pickle_;
 
diff --git a/content/common/android/gin_java_bridge_value_unittest.cc b/content/common/android/gin_java_bridge_value_unittest.cc
index 0dc27d24..bf5f613 100644
--- a/content/common/android/gin_java_bridge_value_unittest.cc
+++ b/content/common/android/gin_java_bridge_value_unittest.cc
@@ -20,7 +20,7 @@
   float native_float;
   int32_t native_object_id;
 
-  std::unique_ptr<base::BinaryValue> undefined(
+  std::unique_ptr<base::Value> undefined(
       GinJavaBridgeValue::CreateUndefinedValue());
   ASSERT_TRUE(undefined.get());
   EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(undefined.get()));
@@ -32,7 +32,7 @@
   EXPECT_FALSE(undefined_value->GetAsNonFinite(&native_float));
   EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id));
 
-  std::unique_ptr<base::BinaryValue> float_infinity(
+  std::unique_ptr<base::Value> float_infinity(
       GinJavaBridgeValue::CreateNonFiniteValue(
           std::numeric_limits<float>::infinity()));
   ASSERT_TRUE(float_infinity.get());
@@ -47,7 +47,7 @@
 
   EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id));
 
-  std::unique_ptr<base::BinaryValue> double_infinity(
+  std::unique_ptr<base::Value> double_infinity(
       GinJavaBridgeValue::CreateNonFiniteValue(
           std::numeric_limits<double>::infinity()));
   ASSERT_TRUE(double_infinity.get());
@@ -63,7 +63,7 @@
 
   EXPECT_FALSE(undefined_value->GetAsObjectID(&native_object_id));
 
-  std::unique_ptr<base::BinaryValue> object_id(
+  std::unique_ptr<base::Value> object_id(
       GinJavaBridgeValue::CreateObjectIDValue(42));
   ASSERT_TRUE(object_id.get());
   EXPECT_TRUE(GinJavaBridgeValue::ContainsGinJavaBridgeValue(object_id.get()));
@@ -83,9 +83,8 @@
       GinJavaBridgeValue::ContainsGinJavaBridgeValue(non_binary.get()));
 
   const char dummy_data[] = "\000\001\002\003\004\005\006\007\010\011\012\013";
-  std::unique_ptr<base::BinaryValue> broken_binary(
-      base::BinaryValue::CreateWithCopiedBuffer(dummy_data,
-                                                sizeof(dummy_data)));
+  std::unique_ptr<base::Value> broken_binary(
+      base::Value::CreateWithCopiedBuffer(dummy_data, sizeof(dummy_data)));
   EXPECT_FALSE(
       GinJavaBridgeValue::ContainsGinJavaBridgeValue(broken_binary.get()));
 }
diff --git a/content/common/content_security_policy/csp_context.cc b/content/common/content_security_policy/csp_context.cc
index 3d3c9a01..ab249dd3 100644
--- a/content/common/content_security_policy/csp_context.cc
+++ b/content/common/content_security_policy/csp_context.cc
@@ -52,14 +52,16 @@
   return has_self_ && CSPSource::Allow(self_source_, url, this);
 }
 
-bool CSPContext::ProtocolMatchesSelf(const GURL& url) {
+bool CSPContext::ProtocolIsSelf(const GURL& url) {
   if (!has_self_)
     return false;
-  if (self_scheme_ == url::kHttpScheme)
-    return url.SchemeIsHTTPOrHTTPS() || url.SchemeIsSuborigin();
   return url.SchemeIs(self_scheme_);
 }
 
+const std::string& CSPContext::GetSelfScheme() {
+  return self_scheme_;
+}
+
 bool CSPContext::SchemeShouldBypassCSP(const base::StringPiece& scheme) {
   return false;
 }
diff --git a/content/common/content_security_policy/csp_context.h b/content/common/content_security_policy/csp_context.h
index 45895e6..cc5f3b5 100644
--- a/content/common/content_security_policy/csp_context.h
+++ b/content/common/content_security_policy/csp_context.h
@@ -40,7 +40,8 @@
 
   void SetSelf(const url::Origin origin);
   bool AllowSelf(const GURL& url);
-  bool ProtocolMatchesSelf(const GURL& url);
+  bool ProtocolIsSelf(const GURL& url);
+  const std::string& GetSelfScheme();
 
   virtual void ReportContentSecurityPolicyViolation(
       const CSPViolationParams& violation_params);
diff --git a/content/common/content_security_policy/csp_source.cc b/content/common/content_security_policy/csp_source.cc
index 59657d1..7ebd7e75 100644
--- a/content/common/content_security_policy/csp_source.cc
+++ b/content/common/content_security_policy/csp_source.cc
@@ -24,16 +24,46 @@
   return url::DefaultPortForScheme(scheme.data(), scheme.size());
 }
 
-bool SourceAllowScheme(const CSPSource& source,
-                       const GURL& url,
-                       CSPContext* context) {
-  if (source.scheme.empty())
-    return context->ProtocolMatchesSelf(url);
-  if (source.scheme == url::kHttpScheme)
-    return url.SchemeIsHTTPOrHTTPS();
-  if (source.scheme == url::kWsScheme)
-    return url.SchemeIsWSOrWSS();
-  return url.SchemeIs(source.scheme);
+// NotMatching is the only negative member, the rest are different types of
+// matches. NotMatching should always be 0 to let if statements work nicely
+enum class PortMatchingResult {
+  NotMatching,
+  MatchingWildcard,
+  MatchingUpgrade,
+  MatchingExact
+};
+enum class SchemeMatchingResult { NotMatching, MatchingUpgrade, MatchingExact };
+
+SchemeMatchingResult SourceAllowScheme(const CSPSource& source,
+                                       const GURL& url,
+                                       CSPContext* context) {
+  const std::string& source_scheme =
+      source.scheme.empty() ? context->GetSelfScheme() : source.scheme;
+
+  if (source_scheme.empty()) {
+    if (context->ProtocolIsSelf(url))
+      return SchemeMatchingResult::MatchingExact;
+    return SchemeMatchingResult::NotMatching;
+  }
+
+  if (url.SchemeIs(source_scheme))
+    return SchemeMatchingResult::MatchingExact;
+
+  if ((source_scheme == url::kHttpScheme && url.SchemeIs(url::kHttpsScheme)) ||
+      (source_scheme == url::kHttpScheme &&
+       url.SchemeIs(url::kHttpsSuboriginScheme)) ||
+      (source_scheme == url::kWsScheme && url.SchemeIs(url::kWssScheme))) {
+    return SchemeMatchingResult::MatchingUpgrade;
+  }
+
+  if ((source_scheme == url::kHttpScheme &&
+       url.SchemeIs(url::kHttpSuboriginScheme)) ||
+      (source_scheme == url::kHttpsScheme &&
+       url.SchemeIs(url::kHttpsSuboriginScheme))) {
+    return SchemeMatchingResult::MatchingExact;
+  }
+
+  return SchemeMatchingResult::NotMatching;
 }
 
 bool SourceAllowHost(const CSPSource& source, const GURL& url) {
@@ -50,22 +80,33 @@
     return url.host() == source.host;
 }
 
-bool SourceAllowPort(const CSPSource& source, const GURL& url) {
+PortMatchingResult SourceAllowPort(const CSPSource& source, const GURL& url) {
   int url_port = url.EffectiveIntPort();
 
   if (source.is_port_wildcard)
-    return true;
+    return PortMatchingResult::MatchingWildcard;
 
-  if (source.port == url::PORT_UNSPECIFIED)
-    return DefaultPortForScheme(url.scheme()) == url_port;
+  if (source.port == url_port) {
+    if (source.port == url::PORT_UNSPECIFIED)
+      return PortMatchingResult::MatchingWildcard;
+    return PortMatchingResult::MatchingExact;
+  }
 
-  if (source.port == url_port)
-    return true;
+  if (source.port == url::PORT_UNSPECIFIED) {
+    if (DefaultPortForScheme(url.scheme()) == url_port) {
+      return PortMatchingResult::MatchingWildcard;
+    }
+    return PortMatchingResult::NotMatching;
+  }
 
-  if (source.port == 80 && url_port == 443)
-    return true;
+  int source_port = source.port;
+  if (source_port == url::PORT_UNSPECIFIED)
+    source_port = DefaultPortForScheme(source.scheme);
 
-  return false;
+  if (source_port == 80 && url_port == 443)
+    return PortMatchingResult::MatchingUpgrade;
+
+  return PortMatchingResult::NotMatching;
 }
 
 bool SourceAllowPath(const CSPSource& source,
@@ -93,6 +134,20 @@
   return source.path == url_path;
 }
 
+bool inline requiresUpgrade(const PortMatchingResult result) {
+  return result == PortMatchingResult::MatchingUpgrade;
+}
+bool inline requiresUpgrade(const SchemeMatchingResult result) {
+  return result == SchemeMatchingResult::MatchingUpgrade;
+}
+bool inline canUpgrade(const PortMatchingResult result) {
+  return result == PortMatchingResult::MatchingUpgrade ||
+         result == PortMatchingResult::MatchingWildcard;
+}
+bool inline canUpgrade(const SchemeMatchingResult result) {
+  return result == SchemeMatchingResult::MatchingUpgrade;
+}
+
 }  // namespace
 
 CSPSource::CSPSource()
@@ -129,10 +184,20 @@
                       CSPContext* context,
                       bool is_redirect) {
   if (source.IsSchemeOnly())
-    return SourceAllowScheme(source, url, context);
+    return SourceAllowScheme(source, url, context) !=
+           SchemeMatchingResult::NotMatching;
 
-  return SourceAllowScheme(source, url, context) &&
-         SourceAllowHost(source, url) && SourceAllowPort(source, url) &&
+  PortMatchingResult portResult = SourceAllowPort(source, url);
+  SchemeMatchingResult schemeResult = SourceAllowScheme(source, url, context);
+
+  if (requiresUpgrade(schemeResult) && !canUpgrade(portResult))
+    return false;
+  if (requiresUpgrade(portResult) && !canUpgrade(schemeResult))
+    return false;
+
+  return schemeResult != SchemeMatchingResult::NotMatching &&
+         SourceAllowHost(source, url) &&
+         portResult != PortMatchingResult::NotMatching &&
          SourceAllowPath(source, url, is_redirect);
 }
 
diff --git a/content/common/content_security_policy/csp_source_list.cc b/content/common/content_security_policy/csp_source_list.cc
index 9ce5d05..be6ba9c4 100644
--- a/content/common/content_security_policy/csp_source_list.cc
+++ b/content/common/content_security_policy/csp_source_list.cc
@@ -45,7 +45,7 @@
   if (source_list.allow_star) {
     if (url.SchemeIsHTTPOrHTTPS() || url.SchemeIsSuborigin() ||
         url.SchemeIsWSOrWSS() || url.SchemeIs("ftp") ||
-        context->ProtocolMatchesSelf(url))
+        context->ProtocolIsSelf(url))
       return true;
 
     return AllowFromSources(url, source_list.sources, context, is_redirect);
diff --git a/content/common/content_security_policy/csp_source_unittest.cc b/content/common/content_security_policy/csp_source_unittest.cc
index 1e8a2a4b8..50879f2 100644
--- a/content/common/content_security_policy/csp_source_unittest.cc
+++ b/content/common/content_security_policy/csp_source_unittest.cc
@@ -46,8 +46,8 @@
     CSPSource source("http", "", false, url::PORT_UNSPECIFIED, false, "");
     EXPECT_TRUE(Allow(source, GURL("http://a.com"), &context));
     EXPECT_TRUE(Allow(source, GURL("https://a.com"), &context));
-    // TODO(mkwst, arthursonzogni): It is weird to upgrade the scheme without
-    // the port. See http://crbug.com/692499
+    // This passes because the source is "scheme only" so the upgrade is
+    // allowed.
     EXPECT_TRUE(Allow(source, GURL("https://a.com:80"), &context));
     EXPECT_FALSE(Allow(source, GURL("ftp://a.com"), &context));
     EXPECT_FALSE(Allow(source, GURL("ws://a.com"), &context));
@@ -103,9 +103,8 @@
     EXPECT_FALSE(Allow(source, GURL("http://a.com"), &context));
     EXPECT_TRUE(Allow(source, GURL("https://a.com"), &context));
     EXPECT_FALSE(Allow(source, GURL("http-so://a.com"), &context));
-    // TODO(mkwst, arthursonzogni): Maybe it should return true.
-    // See http://crbug.com/692442:
-    EXPECT_FALSE(Allow(source, GURL("https-so://a.com"), &context));
+    // TODO(jochen): Maybe it should return false?
+    EXPECT_TRUE(Allow(source, GURL("https-so://a.com"), &context));
     EXPECT_FALSE(Allow(source, GURL("ftp://a.com"), &context));
 
     // Self's scheme is not in the http familly.
@@ -203,9 +202,9 @@
   {
     CSPSource source("", "a.com", false, 80, false, "");
     EXPECT_TRUE(Allow(source, GURL("https://a.com:443"), &context));
-    // TODO(mkwst, arthursonzogni): It is weird to upgrade the port without the
-    // sheme. See http://crbug.com/692499
-    EXPECT_TRUE(Allow(source, GURL("http://a.com:443"), &context));
+    // Should not allow scheme upgrades unless both port and scheme are
+    // upgraded.
+    EXPECT_FALSE(Allow(source, GURL("http://a.com:443"), &context));
   }
 
   // Host is * but port is specified
@@ -284,7 +283,7 @@
   CSPSource source("http", "a.com", false, 8000, false, "/bar/");
   EXPECT_TRUE(Allow(source, GURL("http://a.com:8000/"), &context, true));
   EXPECT_TRUE(Allow(source, GURL("http://a.com:8000/foo"), &context, true));
-  EXPECT_TRUE(Allow(source, GURL("https://a.com:8000/foo"), &context, true));
+  EXPECT_FALSE(Allow(source, GURL("https://a.com:8000/foo"), &context, true));
   EXPECT_FALSE(
       Allow(source, GURL("http://not-a.com:8000/foo"), &context, true));
   EXPECT_FALSE(Allow(source, GURL("http://a.com:9000/foo/"), &context, false));
@@ -325,4 +324,14 @@
   }
 }
 
+TEST(CSPSourceTest, UpgradeRequests) {
+  CSPContext context;
+  CSPSource source("http", "a.com", false, 80, false, "");
+  EXPECT_TRUE(Allow(source, GURL("http://a.com:80"), &context, true));
+  EXPECT_FALSE(Allow(source, GURL("https://a.com:80"), &context, true));
+  EXPECT_FALSE(Allow(source, GURL("http://a.com:443"), &context, true));
+  EXPECT_TRUE(Allow(source, GURL("https://a.com:443"), &context, true));
+  EXPECT_TRUE(Allow(source, GURL("https://a.com"), &context, true));
+}
+
 }  // namespace content
diff --git a/device/vr/BUILD.gn b/device/vr/BUILD.gn
index 53ad401..6445234b 100644
--- a/device/vr/BUILD.gn
+++ b/device/vr/BUILD.gn
@@ -13,7 +13,10 @@
 # Generate a buildflag header for compile-time checking of WebVR support.
 buildflag_header("features") {
   header = "features.h"
-  flags = [ "ENABLE_VR=$enable_vr" ]
+  flags = [
+    "ENABLE_VR=$enable_vr",
+    "ENABLE_OPENVR=$enable_openvr",
+  ]
 }
 
 component("vr") {
@@ -24,6 +27,7 @@
   ]
   defines = [ "DEVICE_VR_IMPLEMENTATION" ]
   deps = [
+    ":features",
     ":mojo_bindings",
   ]
 
@@ -77,6 +81,14 @@
       libs = [ "//third_party/gvr-android-sdk/libgvr_shim_static_${current_cpu}.a" ]
       configs += [ "//third_party/gvr-android-sdk:libgvr_config" ]
     }
+
+    if (enable_openvr) {
+      deps += [ "//third_party/openvr:openvr" ]
+      sources += [
+        "openvr/openvr_device.cc",
+        "openvr/openvr_device_provider.cc",
+      ]
+    }
   }
 }
 
diff --git a/device/vr/DEPS b/device/vr/DEPS
index c0b9fe7..c1e426f 100644
--- a/device/vr/DEPS
+++ b/device/vr/DEPS
@@ -4,5 +4,6 @@
   "+third_party/WebKit/public/platform/WebGamepads.h",
   "+third_party/WebKit/public/platform/modules/vr/vr_service.mojom.h",
   "+third_party/gvr-android-sdk/src",
+  "+third_party/openvr/src/headers/openvr.h",
   "+ui/gfx",
 ]
diff --git a/device/vr/features.gni b/device/vr/features.gni
index 1729b80..cc619fc 100644
--- a/device/vr/features.gni
+++ b/device/vr/features.gni
@@ -8,4 +8,5 @@
   # TODO(bshe): Enable for other architecture too. Currently we only support arm
   # and arm64.
   enable_vr = is_android && (current_cpu == "arm" || current_cpu == "arm64")
+  enable_openvr = false
 }
diff --git a/device/vr/openvr/openvr_device.cc b/device/vr/openvr/openvr_device.cc
new file mode 100644
index 0000000..88f7f4a
--- /dev/null
+++ b/device/vr/openvr/openvr_device.cc
@@ -0,0 +1,189 @@
+// Copyright (c) 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.
+
+#define _USE_MATH_DEFINES  // for M_PI
+#include "device/vr/openvr/openvr_device.h"
+#include <math.h>
+#include "third_party/openvr/src/headers/openvr.h"
+
+namespace {
+
+constexpr float kRadToDeg = static_cast<float>(180 / M_PI);
+constexpr float kDefaultIPD = 0.06f;  // Default average IPD
+
+device::mojom::VRFieldOfViewPtr openVRFovToWebVRFov(vr::IVRSystem* vr_system,
+                                                    vr::Hmd_Eye eye) {
+  device::mojom::VRFieldOfViewPtr out = device::mojom::VRFieldOfView::New();
+  float up_tan, down_tan, left_tan, right_tan;
+  vr_system->GetProjectionRaw(eye, &left_tan, &right_tan, &up_tan, &down_tan);
+  out->upDegrees = -(atanf(up_tan) * kRadToDeg);
+  out->downDegrees = atanf(down_tan) * kRadToDeg;
+  out->leftDegrees = -(atanf(left_tan) * kRadToDeg);
+  out->rightDegrees = atanf(right_tan) * kRadToDeg;
+  return out;
+}
+
+}  // namespace
+
+namespace device {
+
+OpenVRDevice::OpenVRDevice() {}
+OpenVRDevice::~OpenVRDevice() {}
+
+void OpenVRDevice::CreateVRDisplayInfo(
+    const base::Callback<void(mojom::VRDisplayInfoPtr)>& on_created) {
+  vr::EVRInitError init_error;
+  auto vr_system =
+      vr::VR_Init(&init_error, vr::EVRApplicationType::VRApplication_Scene);
+
+  if (init_error != vr::VRInitError_None) {
+    LOG(ERROR) << vr::VR_GetVRInitErrorAsEnglishDescription(init_error);
+    on_created.Run(nullptr);
+    return;
+  }
+
+  mojom::VRDisplayInfoPtr device = mojom::VRDisplayInfo::New();
+  device->index = id();
+  device->capabilities = mojom::VRDisplayCapabilities::New();
+  device->capabilities->hasPosition = true;
+  device->capabilities->hasExternalDisplay = true;
+  device->capabilities->canPresent = false;
+
+  device->leftEye = mojom::VREyeParameters::New();
+  device->rightEye = mojom::VREyeParameters::New();
+  mojom::VREyeParametersPtr& left_eye = device->leftEye;
+  mojom::VREyeParametersPtr& right_eye = device->rightEye;
+
+  left_eye->fieldOfView = openVRFovToWebVRFov(vr_system, vr::Eye_Left);
+  right_eye->fieldOfView = openVRFovToWebVRFov(vr_system, vr::Eye_Left);
+
+  vr::TrackedPropertyError error = vr::TrackedProp_Success;
+  float ipd = vr_system->GetFloatTrackedDeviceProperty(
+      vr::k_unTrackedDeviceIndex_Hmd, vr::Prop_UserIpdMeters_Float, &error);
+
+  if (error != vr::TrackedProp_Success)
+    ipd = kDefaultIPD;
+
+  left_eye->offset.resize(3);
+  left_eye->offset[0] = -ipd * 0.5;
+  left_eye->offset[1] = 0.0f;
+  left_eye->offset[2] = 0.0f;
+  right_eye->offset.resize(3);
+  right_eye->offset[0] = ipd * 0.5;
+  right_eye->offset[1] = 0.0;
+  right_eye->offset[2] = 0.0;
+
+  uint32_t width, height;
+  vr_system->GetRecommendedRenderTargetSize(&width, &height);
+  left_eye->renderWidth = width;
+  left_eye->renderHeight = height;
+  right_eye->renderWidth = left_eye->renderWidth;
+  right_eye->renderHeight = left_eye->renderHeight;
+
+  render_loop_ = std::make_unique<OpenVRRenderLoop>(vr_system);
+
+  on_created.Run(std::move(device));
+}
+
+void OpenVRDevice::RequestPresent(mojom::VRSubmitFrameClientPtr submit_client,
+                                  const base::Callback<void(bool)>& callback) {
+  callback.Run(false);
+  // We don't support presentation currently.
+}
+
+void OpenVRDevice::SetSecureOrigin(bool secure_origin) {
+  // We don't support presentation currently, so don't do anything.
+}
+
+void OpenVRDevice::ExitPresent() {
+  // We don't support presentation currently, so don't do anything.
+}
+
+void OpenVRDevice::SubmitFrame(int16_t frame_index,
+                               const gpu::MailboxHolder& mailbox) {
+  // We don't support presentation currently, so don't do anything.
+}
+
+void OpenVRDevice::UpdateLayerBounds(int16_t frame_index,
+                                     mojom::VRLayerBoundsPtr left_bounds,
+                                     mojom::VRLayerBoundsPtr right_bounds,
+                                     int16_t source_width,
+                                     int16_t source_height) {
+  // We don't support presentation currently, so don't do anything.
+}
+
+void OpenVRDevice::GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) {
+  render_loop_->Bind(std::move(request));
+}
+
+OpenVRDevice::OpenVRRenderLoop::OpenVRRenderLoop(vr::IVRSystem* vr_system)
+    : vr_system_(vr_system),
+      binding_(this),
+      base::SimpleThread("OpenVRRenderLoop") {}
+
+void OpenVRDevice::OpenVRRenderLoop::Bind(
+    mojom::VRVSyncProviderRequest request) {
+  binding_.Close();
+  binding_.Bind(std::move(request));
+}
+
+void OpenVRDevice::OpenVRRenderLoop::Run() {
+  // TODO (BillOrr): We will wait for VSyncs on this thread using WaitGetPoses
+  // when we support presentation.
+}
+
+device::mojom::VRPosePtr OpenVRDevice::OpenVRRenderLoop::getPose() {
+  device::mojom::VRPosePtr pose = device::mojom::VRPose::New();
+  pose->orientation.emplace(4);
+
+  pose->orientation.value()[0] = 0;
+  pose->orientation.value()[1] = 0;
+  pose->orientation.value()[2] = 0;
+  pose->orientation.value()[3] = 1;
+
+  pose->position.emplace(3);
+  pose->position.value()[0] = 0;
+  pose->position.value()[1] = 0;
+  pose->position.value()[2] = 0;
+
+  vr::TrackedDevicePose_t poses[vr::k_unMaxTrackedDeviceCount];
+
+  vr_system_->GetDeviceToAbsoluteTrackingPose(
+      vr::TrackingUniverseStanding, 0.0f, poses, vr::k_unMaxTrackedDeviceCount);
+  const auto& hmdPose = poses[vr::k_unTrackedDeviceIndex_Hmd];
+  if (hmdPose.bPoseIsValid && hmdPose.bDeviceIsConnected) {
+    const auto& transform = hmdPose.mDeviceToAbsoluteTracking;
+    const auto& m = transform.m;
+    float w = sqrt(1 + m[0][0] + m[1][1] + m[2][2]);
+    pose->orientation.value()[0] = (m[2][1] - m[1][2]) / (4 * w);
+    pose->orientation.value()[1] = (m[0][2] - m[2][0]) / (4 * w);
+    pose->orientation.value()[2] = (m[1][0] - m[0][1]) / (4 * w);
+    pose->orientation.value()[3] = w;
+
+    pose->position.value()[0] = m[0][3];
+    pose->position.value()[1] = m[1][3];
+    pose->position.value()[2] = m[2][3];
+  }
+
+  return std::move(pose);
+}
+
+void OpenVRDevice::OpenVRRenderLoop::GetVSync(
+    const mojom::VRVSyncProvider::GetVSyncCallback& callback) {
+  static int16_t next_frame = 0;
+  int16_t frame = next_frame++;
+
+  // TODO(BillOrr): Give real values when VSync loop is hooked up.  This is the
+  // presentation time for the frame. Just returning a default value for now
+  // since we don't have VSync hooked up.
+  base::TimeDelta time = base::TimeDelta::FromSecondsD(2.0);
+
+  device::mojom::VRPosePtr pose = getPose();
+  Sleep(11);  // TODO (billorr): Use real vsync timing instead of a sleep (this
+              // sleep just throttles vsyncs so we don't fill message queues).
+  callback.Run(std::move(pose), time, frame,
+               device::mojom::VRVSyncProvider::Status::SUCCESS);
+}
+
+}  // namespace device
\ No newline at end of file
diff --git a/device/vr/openvr/openvr_device.h b/device/vr/openvr/openvr_device.h
new file mode 100644
index 0000000..136f5667
--- /dev/null
+++ b/device/vr/openvr/openvr_device.h
@@ -0,0 +1,76 @@
+// 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 DEVICE_VR_OPENVR_DEVICE_H
+#define DEVICE_VR_OPENVR_DEVICE_H
+
+#include "base/macros.h"
+#include "base/threading/simple_thread.h"
+#include "device/vr/vr_device.h"
+#include "mojo/public/cpp/bindings/binding.h"
+
+namespace vr {
+class IVRSystem;
+}  // namespace vr
+
+namespace device {
+
+class OpenVRDevice : public VRDevice {
+ public:
+  OpenVRDevice();
+  ~OpenVRDevice() override;
+
+  // VRDevice
+  void CreateVRDisplayInfo(
+      const base::Callback<void(mojom::VRDisplayInfoPtr)>& on_created) override;
+
+  void RequestPresent(mojom::VRSubmitFrameClientPtr submit_client,
+                      const base::Callback<void(bool)>& callback) override;
+  void SetSecureOrigin(bool secure_origin) override;
+  void ExitPresent() override;
+
+  void SubmitFrame(int16_t frame_index,
+                   const gpu::MailboxHolder& mailbox) override;
+  void UpdateLayerBounds(int16_t frame_index,
+                         mojom::VRLayerBoundsPtr left_bounds,
+                         mojom::VRLayerBoundsPtr right_bounds,
+                         int16_t source_width,
+                         int16_t source_height) override;
+  void GetVRVSyncProvider(mojom::VRVSyncProviderRequest request) override;
+
+ private:
+  class OpenVRRenderLoop : public base::SimpleThread,
+                           device::mojom::VRVSyncProvider {
+   public:
+    OpenVRRenderLoop(vr::IVRSystem* vr);
+
+    void Bind(mojom::VRVSyncProviderRequest request);
+
+    mojom::VRPosePtr getPose();
+
+   private:
+    void Run() override;
+
+    void GetVSync(const device::mojom::VRVSyncProvider::GetVSyncCallback&
+                      callback) override;
+
+    scoped_refptr<base::SingleThreadTaskRunner> main_thread_task_runner_;
+    vr::IVRSystem* vr_system_;
+    mojo::Binding<device::mojom::VRVSyncProvider> binding_;
+  };
+
+  std::unique_ptr<OpenVRRenderLoop>
+      render_loop_;  // TODO (BillOrr): This should not be a unique_ptr because
+                     // the render_loop_ binds to VRVSyncProvider requests,
+                     // so its lifetime should be tied to the lifetime of that
+                     // binding.
+
+  mojom::VRSubmitFrameClientPtr submit_client_;
+
+  DISALLOW_COPY_AND_ASSIGN(OpenVRDevice);
+};
+
+}  // namespace device
+
+#endif  // DEVICE_VR_OPENVR_DEVICE_H
\ No newline at end of file
diff --git a/device/vr/openvr/openvr_device_provider.cc b/device/vr/openvr/openvr_device_provider.cc
new file mode 100644
index 0000000..aee062f1
--- /dev/null
+++ b/device/vr/openvr/openvr_device_provider.cc
@@ -0,0 +1,25 @@
+// 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 "device/vr/openvr/openvr_device_provider.h"
+#include "device/vr/openvr/openvr_device.h"
+#include "third_party/openvr/src/headers/openvr.h"
+
+namespace device {
+
+OpenVRDeviceProvider::OpenVRDeviceProvider() {}
+
+OpenVRDeviceProvider::~OpenVRDeviceProvider() {}
+
+void OpenVRDeviceProvider::GetDevices(std::vector<VRDevice*>* devices) {
+  if (vr::VR_IsRuntimeInstalled() && vr::VR_IsHmdPresent()) {
+    devices->push_back(new OpenVRDevice());
+  }
+}
+
+void OpenVRDeviceProvider::Initialize() {}
+
+void OpenVRDeviceProvider::SetListeningForActivate(bool listening) {}
+
+}  // namespace device
\ No newline at end of file
diff --git a/device/vr/openvr/openvr_device_provider.h b/device/vr/openvr/openvr_device_provider.h
new file mode 100644
index 0000000..7ef17b6
--- /dev/null
+++ b/device/vr/openvr/openvr_device_provider.h
@@ -0,0 +1,33 @@
+// 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 DEVICE_VR_OPENVR_DEVICE_PROVIDER_H
+#define DEVICE_VR_OPENVR_DEVICE_PROVIDER_H
+
+#include <memory>
+
+#include "base/callback.h"
+#include "base/macros.h"
+#include "device/vr/vr_device_provider.h"
+#include "device/vr/vr_export.h"
+
+namespace device {
+
+class OpenVRDeviceProvider : public VRDeviceProvider {
+ public:
+  OpenVRDeviceProvider();
+  ~OpenVRDeviceProvider() override;
+
+  void GetDevices(std::vector<VRDevice*>* devices) override;
+  void Initialize() override;
+
+  void SetListeningForActivate(bool listening) override;
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(OpenVRDeviceProvider);
+};
+
+}  // namespace device
+
+#endif  // DEVICE_VR_OPENVR_DEVICE_PROVIDER_H
\ No newline at end of file
diff --git a/device/vr/vr_device_manager.cc b/device/vr/vr_device_manager.cc
index 994f202..bd314f4c 100644
--- a/device/vr/vr_device_manager.cc
+++ b/device/vr/vr_device_manager.cc
@@ -10,11 +10,16 @@
 #include "base/memory/ptr_util.h"
 #include "base/memory/singleton.h"
 #include "build/build_config.h"
+#include "device/vr/features.h"
 
 #if defined(OS_ANDROID)
 #include "device/vr/android/gvr/gvr_device_provider.h"
 #endif
 
+#if BUILDFLAG(ENABLE_OPENVR)
+#include "device/vr/openvr/openvr_device_provider.h"
+#endif
+
 namespace device {
 
 namespace {
@@ -30,6 +35,10 @@
 #if defined(OS_ANDROID)
   RegisterProvider(base::MakeUnique<GvrDeviceProvider>());
 #endif
+
+#if BUILDFLAG(ENABLE_OPENVR)
+  RegisterProvider(base::MakeUnique<OpenVRDeviceProvider>());
+#endif
 }
 
 VRDeviceManager::VRDeviceManager(std::unique_ptr<VRDeviceProvider> provider)
diff --git a/extensions/browser/api/cast_channel/cast_message_util.cc b/extensions/browser/api/cast_channel/cast_message_util.cc
index 0f4d952..95ba5d4 100644
--- a/extensions/browser/api/cast_channel/cast_message_util.cc
+++ b/extensions/browser/api/cast_channel/cast_message_util.cc
@@ -86,7 +86,7 @@
     break;
   case CastMessage_PayloadType_BINARY:
     if (message_proto.has_payload_binary())
-      value = base::BinaryValue::CreateWithCopiedBuffer(
+      value = base::Value::CreateWithCopiedBuffer(
           message_proto.payload_binary().data(),
           message_proto.payload_binary().size());
     break;
diff --git a/extensions/browser/api/declarative/declarative_api.cc b/extensions/browser/api/declarative/declarative_api.cc
index 84dbfff..1b7ca18 100644
--- a/extensions/browser/api/declarative/declarative_api.cc
+++ b/extensions/browser/api/declarative/declarative_api.cc
@@ -41,7 +41,7 @@
 
 // Encodes |binary| as base64 and returns a new StringValue populated with the
 // encoded string.
-std::unique_ptr<base::Value> ConvertBinaryToBase64(base::BinaryValue* binary) {
+std::unique_ptr<base::Value> ConvertBinaryToBase64(base::Value* binary) {
   std::string binary_data = std::string(binary->GetBuffer(), binary->GetSize());
   std::string data64;
   base::Base64Encode(binary_data, &data64);
@@ -56,7 +56,7 @@
   for (base::ListValue::iterator iter = args->begin(); iter != args->end();
        ++iter, ++index) {
     if ((*iter)->IsType(base::Value::Type::BINARY)) {
-      base::BinaryValue* binary = NULL;
+      base::Value* binary = NULL;
       if (args->GetBinary(index, &binary))
         args->Set(index, ConvertBinaryToBase64(binary).release());
     } else if ((*iter)->IsType(base::Value::Type::LIST)) {
@@ -78,7 +78,7 @@
   for (base::DictionaryValue::Iterator iter(*dict); !iter.IsAtEnd();
        iter.Advance()) {
     if (iter.value().IsType(base::Value::Type::BINARY)) {
-      base::BinaryValue* binary = NULL;
+      base::Value* binary = NULL;
       if (dict->GetBinary(iter.key(), &binary))
         dict->Set(iter.key(), ConvertBinaryToBase64(binary).release());
     } else if (iter.value().IsType(base::Value::Type::LIST)) {
diff --git a/extensions/browser/api/hid/hid_api.cc b/extensions/browser/api/hid/hid_api.cc
index 0f8fb50..ff3d8e7 100644
--- a/extensions/browser/api/hid/hid_api.cc
+++ b/extensions/browser/api/hid/hid_api.cc
@@ -11,6 +11,7 @@
 #include <vector>
 
 #include "base/memory/ptr_util.h"
+#include "base/values.h"
 #include "device/base/device_client.h"
 #include "device/hid/hid_connection.h"
 #include "device/hid/hid_device_filter.h"
@@ -268,9 +269,9 @@
     DCHECK_GE(size, 1u);
     int report_id = reinterpret_cast<uint8_t*>(buffer->data())[0];
 
-    Respond(TwoArguments(base::MakeUnique<base::Value>(report_id),
-                         base::BinaryValue::CreateWithCopiedBuffer(
-                             buffer->data() + 1, size - 1)));
+    Respond(TwoArguments(
+        base::MakeUnique<base::Value>(report_id),
+        base::Value::CreateWithCopiedBuffer(buffer->data() + 1, size - 1)));
   } else {
     Respond(Error(kErrorTransfer));
   }
@@ -329,8 +330,8 @@
     scoped_refptr<net::IOBuffer> buffer,
     size_t size) {
   if (success) {
-    Respond(OneArgument(
-        base::BinaryValue::CreateWithCopiedBuffer(buffer->data(), size)));
+    Respond(
+        OneArgument(base::Value::CreateWithCopiedBuffer(buffer->data(), size)));
   } else {
     Respond(Error(kErrorTransfer));
   }
diff --git a/extensions/browser/api/networking_config/OWNERS b/extensions/browser/api/networking_config/OWNERS
index 17c27e6..607dc3e 100644
--- a/extensions/browser/api/networking_config/OWNERS
+++ b/extensions/browser/api/networking_config/OWNERS
@@ -1,2 +1,2 @@
-cschuet@chromium.org
 stevenjb@chromium.org
+emaxx@chromium.org
diff --git a/extensions/browser/api/socket/socket_api.cc b/extensions/browser/api/socket/socket_api.cc
index e64c272..8a84f46 100644
--- a/extensions/browser/api/socket/socket_api.cc
+++ b/extensions/browser/api/socket/socket_api.cc
@@ -519,9 +519,8 @@
   std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
   result->SetInteger(kResultCodeKey, bytes_read);
   if (bytes_read > 0) {
-    result->Set(kDataKey,
-                base::BinaryValue::CreateWithCopiedBuffer(io_buffer->data(),
-                                                          bytes_read));
+    result->Set(kDataKey, base::Value::CreateWithCopiedBuffer(io_buffer->data(),
+                                                              bytes_read));
   } else {
     result->Set(kDataKey, new base::Value(base::Value::Type::BINARY));
   }
@@ -537,7 +536,7 @@
 
 bool SocketWriteFunction::Prepare() {
   EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &socket_id_));
-  base::BinaryValue* data = NULL;
+  base::Value* data = NULL;
   EXTENSION_FUNCTION_VALIDATE(args_->GetBinary(1, &data));
 
   io_buffer_size_ = data->GetSize();
@@ -597,9 +596,8 @@
   std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
   result->SetInteger(kResultCodeKey, bytes_read);
   if (bytes_read > 0) {
-    result->Set(kDataKey,
-                base::BinaryValue::CreateWithCopiedBuffer(io_buffer->data(),
-                                                          bytes_read));
+    result->Set(kDataKey, base::Value::CreateWithCopiedBuffer(io_buffer->data(),
+                                                              bytes_read));
   } else {
     result->Set(kDataKey, new base::Value(base::Value::Type::BINARY));
   }
@@ -618,7 +616,7 @@
 
 bool SocketSendToFunction::Prepare() {
   EXTENSION_FUNCTION_VALIDATE(args_->GetInteger(0, &socket_id_));
-  base::BinaryValue* data = NULL;
+  base::Value* data = NULL;
   EXTENSION_FUNCTION_VALIDATE(args_->GetBinary(1, &data));
   EXTENSION_FUNCTION_VALIDATE(args_->GetString(2, &hostname_));
   int port;
diff --git a/extensions/browser/api/usb/usb_api.cc b/extensions/browser/api/usb/usb_api.cc
index 1125cb2a..6006dfb 100644
--- a/extensions/browser/api/usb/usb_api.cc
+++ b/extensions/browser/api/usb/usb_api.cc
@@ -14,6 +14,7 @@
 
 #include "base/barrier_closure.h"
 #include "base/memory/ptr_util.h"
+#include "base/values.h"
 #include "device/base/device_client.h"
 #include "device/usb/usb_descriptors.h"
 #include "device/usb/usb_device_handle.h"
@@ -465,8 +466,8 @@
   transfer_info->SetInteger(kResultCodeKey, status);
 
   if (data) {
-    transfer_info->Set(kDataKey, base::BinaryValue::CreateWithCopiedBuffer(
-                                     data->data(), length));
+    transfer_info->Set(
+        kDataKey, base::Value::CreateWithCopiedBuffer(data->data(), length));
   } else {
     transfer_info->Set(kDataKey, new base::Value(base::Value::Type::BINARY));
   }
@@ -1239,7 +1240,7 @@
   std::unique_ptr<base::DictionaryValue> transfer_info(
       new base::DictionaryValue());
   transfer_info->SetInteger(kResultCodeKey, status);
-  transfer_info->Set(kDataKey, new base::BinaryValue(std::move(buffer)));
+  transfer_info->Set(kDataKey, new base::Value(std::move(buffer)));
   if (status == device::USB_TRANSFER_COMPLETED) {
     Respond(OneArgument(std::move(transfer_info)));
   } else {
diff --git a/extensions/browser/api/web_request/upload_data_presenter.cc b/extensions/browser/api/web_request/upload_data_presenter.cc
index dfe9eda0..259865da 100644
--- a/extensions/browser/api/web_request/upload_data_presenter.cc
+++ b/extensions/browser/api/web_request/upload_data_presenter.cc
@@ -16,7 +16,6 @@
 #include "net/base/upload_file_element_reader.h"
 #include "net/url_request/url_request.h"
 
-using base::BinaryValue;
 using base::DictionaryValue;
 using base::ListValue;
 using base::Value;
@@ -90,7 +89,7 @@
 
 void RawDataPresenter::FeedNextBytes(const char* bytes, size_t size) {
   subtle::AppendKeyValuePair(keys::kRequestBodyRawBytesKey,
-                             BinaryValue::CreateWithCopiedBuffer(bytes, size),
+                             Value::CreateWithCopiedBuffer(bytes, size),
                              list_.get());
 }
 
diff --git a/extensions/browser/api/web_request/upload_data_presenter_unittest.cc b/extensions/browser/api/web_request/upload_data_presenter_unittest.cc
index 548ad63..4cbf5ce 100644
--- a/extensions/browser/api/web_request/upload_data_presenter_unittest.cc
+++ b/extensions/browser/api/web_request/upload_data_presenter_unittest.cc
@@ -51,13 +51,13 @@
   const size_t block2_size = sizeof(block2) - 1;
 
   // Expected output.
-  std::unique_ptr<base::BinaryValue> expected_a(
-      base::BinaryValue::CreateWithCopiedBuffer(block1, block1_size));
+  std::unique_ptr<base::Value> expected_a(
+      base::Value::CreateWithCopiedBuffer(block1, block1_size));
   ASSERT_TRUE(expected_a.get() != NULL);
   std::unique_ptr<base::Value> expected_b(new base::Value(kFilename));
   ASSERT_TRUE(expected_b.get() != NULL);
-  std::unique_ptr<base::BinaryValue> expected_c(
-      base::BinaryValue::CreateWithCopiedBuffer(block2, block2_size));
+  std::unique_ptr<base::Value> expected_c(
+      base::Value::CreateWithCopiedBuffer(block2, block2_size));
   ASSERT_TRUE(expected_c.get() != NULL);
 
   base::ListValue expected_list;
diff --git a/extensions/renderer/argument_spec_unittest.cc b/extensions/renderer/argument_spec_unittest.cc
index 7bdda59..a580a74 100644
--- a/extensions/renderer/argument_spec_unittest.cc
+++ b/extensions/renderer/argument_spec_unittest.cc
@@ -303,18 +303,16 @@
     {
       // A non-empty (but zero-filled) ArrayBufferView.
       const char kBuffer[] = {0, 0, 0, 0};
-      std::unique_ptr<base::BinaryValue> expected_value =
-          base::BinaryValue::CreateWithCopiedBuffer(kBuffer,
-                                                    arraysize(kBuffer));
+      std::unique_ptr<base::Value> expected_value =
+          base::Value::CreateWithCopiedBuffer(kBuffer, arraysize(kBuffer));
       ASSERT_TRUE(expected_value);
       ExpectSuccessWithNoConversion(spec, "(new Int32Array(2))");
     }
     {
       // Actual data.
       const char kBuffer[] = {'p', 'i', 'n', 'g'};
-      std::unique_ptr<base::BinaryValue> expected_value =
-          base::BinaryValue::CreateWithCopiedBuffer(kBuffer,
-                                                    arraysize(kBuffer));
+      std::unique_ptr<base::Value> expected_value =
+          base::Value::CreateWithCopiedBuffer(kBuffer, arraysize(kBuffer));
       ASSERT_TRUE(expected_value);
       ExpectSuccess(spec,
                     "var b = new ArrayBuffer(4);\n"
diff --git a/ios/chrome/app/chrome_app_startup_parameters.mm b/ios/chrome/app/chrome_app_startup_parameters.mm
index 74054b02..bc1a9f8 100644
--- a/ios/chrome/app/chrome_app_startup_parameters.mm
+++ b/ios/chrome/app/chrome_app_startup_parameters.mm
@@ -286,6 +286,33 @@
                                                     completeURL:url];
   }
 
+  if ([command
+          isEqualToString:base::SysUTF8ToNSString(
+                              app_group::kChromeAppGroupQRScannerCommand)]) {
+    ChromeAppStartupParameters* params = [[ChromeAppStartupParameters alloc]
+        initWithExternalURL:GURL(kChromeUINewTabURL)
+        xCallbackParameters:nil
+          declaredSourceApp:appId
+            secureSourceApp:secureSourceApp
+                completeURL:url];
+    [params setLaunchQRScanner:YES];
+    return params;
+  }
+
+  if ([command isEqualToString:
+                   base::SysUTF8ToNSString(
+                       app_group::kChromeAppGroupIncognitoSearchCommand)]) {
+    ChromeAppStartupParameters* params = [[ChromeAppStartupParameters alloc]
+        initWithExternalURL:GURL(kChromeUINewTabURL)
+        xCallbackParameters:nil
+          declaredSourceApp:appId
+            secureSourceApp:secureSourceApp
+                completeURL:url];
+    [params setLaunchInIncognito:YES];
+    [params setLaunchFocusOmnibox:YES];
+    return params;
+  }
+
   return nil;
 }
 
diff --git a/ios/chrome/browser/native_app_launcher/ios_appstore_ids.h b/ios/chrome/browser/native_app_launcher/ios_appstore_ids.h
index 03c2878..ac3ad10 100644
--- a/ios/chrome/browser/native_app_launcher/ios_appstore_ids.h
+++ b/ios/chrome/browser/native_app_launcher/ios_appstore_ids.h
@@ -15,7 +15,6 @@
 extern const char kIOSAppStoreGooglePlus[];
 extern const char kIOSAppStoreGoogleSheets[];
 extern const char kIOSAppStoreGoogleSlides[];
-extern const char kIOSAppStoreSpaces[];
 extern const char kIOSAppStoreTestFlight[];
 extern const char kIOSAppStoreYouTube[];
 
diff --git a/ios/chrome/browser/native_app_launcher/ios_appstore_ids.mm b/ios/chrome/browser/native_app_launcher/ios_appstore_ids.mm
index a119c50f..48b96527 100644
--- a/ios/chrome/browser/native_app_launcher/ios_appstore_ids.mm
+++ b/ios/chrome/browser/native_app_launcher/ios_appstore_ids.mm
@@ -13,6 +13,5 @@
 const char kIOSAppStoreGooglePlus[] = "447119634";
 const char kIOSAppStoreGoogleSheets[] = "842849113";
 const char kIOSAppStoreGoogleSlides[] = "879478102";
-const char kIOSAppStoreSpaces[] = "1025159334";
 const char kIOSAppStoreTestFlight[] = "899247664";
 const char kIOSAppStoreYouTube[] = "544007664";
diff --git a/ios/chrome/common/app_group/app_group_constants.h b/ios/chrome/common/app_group/app_group_constants.h
index f4aa3c4f..0c65b49 100644
--- a/ios/chrome/common/app_group/app_group_constants.h
+++ b/ios/chrome/common/app_group/app_group_constants.h
@@ -54,6 +54,12 @@
 // The command to focus the omnibox.
 extern const char kChromeAppGroupFocusOmniboxCommand[];
 
+// The command to open an incognito search.
+extern const char kChromeAppGroupIncognitoSearchCommand[];
+
+// The command to open the QR Code scanner.
+extern const char kChromeAppGroupQRScannerCommand[];
+
 // The key in kChromeAppGroupCommandPreference containing a NSDate at which
 // |kChromeAppGroupCommandAppPreference| issued the command.
 extern const char kChromeAppGroupCommandTimePreference[];
diff --git a/ios/chrome/common/app_group/app_group_constants.mm b/ios/chrome/common/app_group/app_group_constants.mm
index 0f70824..2a01d972 100644
--- a/ios/chrome/common/app_group/app_group_constants.mm
+++ b/ios/chrome/common/app_group/app_group_constants.mm
@@ -32,6 +32,8 @@
 const char kChromeAppGroupVoiceSearchCommand[] = "voicesearch";
 const char kChromeAppGroupNewTabCommand[] = "newtab";
 const char kChromeAppGroupFocusOmniboxCommand[] = "focusomnibox";
+const char kChromeAppGroupIncognitoSearchCommand[] = "incognitosearch";
+const char kChromeAppGroupQRScannerCommand[] = "qrscanner";
 
 const char kChromeAppClientID[] = "ClientID";
 const char kUserMetricsEnabledDate[] = "UserMetricsEnabledDate";
diff --git a/ipc/ipc_message_utils.cc b/ipc/ipc_message_utils.cc
index 9ef571ff..c17c8be6 100644
--- a/ipc/ipc_message_utils.cc
+++ b/ipc/ipc_message_utils.cc
@@ -297,8 +297,8 @@
       int length;
       if (!iter->ReadData(&data, &length))
         return false;
-      std::unique_ptr<base::BinaryValue> val =
-          base::BinaryValue::CreateWithCopiedBuffer(data, length);
+      std::unique_ptr<base::Value> val =
+          base::Value::CreateWithCopiedBuffer(data, length);
       *value = val.release();
       break;
     }
diff --git a/media/base/video_frame_metadata.cc b/media/base/video_frame_metadata.cc
index 0ce0b2cd..292274e5 100644
--- a/media/base/video_frame_metadata.cc
+++ b/media/base/video_frame_metadata.cc
@@ -53,7 +53,7 @@
       // Using BinaryValue since we don't want the |value| interpreted as having
       // any particular character encoding (e.g., UTF-8) by
       // base::DictionaryValue.
-      base::BinaryValue::CreateWithCopiedBuffer(value.data(), value.size()));
+      base::Value::CreateWithCopiedBuffer(value.data(), value.size()));
 }
 
 namespace {
@@ -63,10 +63,9 @@
                   base::DictionaryValue* dictionary) {
   const int64_t internal_value = value.ToInternalValue();
   dictionary->SetWithoutPathExpansion(
-      ToInternalKey(key),
-      base::BinaryValue::CreateWithCopiedBuffer(
-          reinterpret_cast<const char*>(&internal_value),
-          sizeof(internal_value)));
+      ToInternalKey(key), base::Value::CreateWithCopiedBuffer(
+                              reinterpret_cast<const char*>(&internal_value),
+                              sizeof(internal_value)));
 }
 }  // namespace
 
@@ -110,15 +109,15 @@
 
 bool VideoFrameMetadata::GetString(Key key, std::string* value) const {
   DCHECK(value);
-  const base::BinaryValue* const binary_value = GetBinaryValue(key);
+  const base::Value* const binary_value = GetBinaryValue(key);
   if (binary_value)
     value->assign(binary_value->GetBuffer(), binary_value->GetSize());
   return !!binary_value;
 }
 
 namespace {
-template<class TimeType>
-bool ToTimeValue(const base::BinaryValue& binary_value, TimeType* value) {
+template <class TimeType>
+bool ToTimeValue(const base::Value& binary_value, TimeType* value) {
   DCHECK(value);
   int64_t internal_value;
   if (binary_value.GetSize() != sizeof(internal_value))
@@ -130,12 +129,12 @@
 }  // namespace
 
 bool VideoFrameMetadata::GetTimeDelta(Key key, base::TimeDelta* value) const {
-  const base::BinaryValue* const binary_value = GetBinaryValue(key);
+  const base::Value* const binary_value = GetBinaryValue(key);
   return binary_value && ToTimeValue(*binary_value, value);
 }
 
 bool VideoFrameMetadata::GetTimeTicks(Key key, base::TimeTicks* value) const {
-  const base::BinaryValue* const binary_value = GetBinaryValue(key);
+  const base::Value* const binary_value = GetBinaryValue(key);
   return binary_value && ToTimeValue(*binary_value, value);
 }
 
@@ -166,7 +165,7 @@
   dictionary_.MergeDictionary(&metadata_source->dictionary_);
 }
 
-const base::BinaryValue* VideoFrameMetadata::GetBinaryValue(Key key) const {
+const base::Value* VideoFrameMetadata::GetBinaryValue(Key key) const {
   const base::Value* internal_value = nullptr;
   if (dictionary_.GetWithoutPathExpansion(ToInternalKey(key),
                                           &internal_value) &&
diff --git a/media/base/video_frame_metadata.h b/media/base/video_frame_metadata.h
index e83f80c..069bcb28 100644
--- a/media/base/video_frame_metadata.h
+++ b/media/base/video_frame_metadata.h
@@ -163,7 +163,7 @@
   void MergeMetadataFrom(const VideoFrameMetadata* metadata_source);
 
  private:
-  const base::BinaryValue* GetBinaryValue(Key key) const;
+  const base::Value* GetBinaryValue(Key key) const;
 
   base::DictionaryValue dictionary_;
 
diff --git a/mojo/common/common_custom_types_unittest.cc b/mojo/common/common_custom_types_unittest.cc
index 36fc042..b0943783 100644
--- a/mojo/common/common_custom_types_unittest.cc
+++ b/mojo/common/common_custom_types_unittest.cc
@@ -294,7 +294,7 @@
   ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output));
   EXPECT_TRUE(base::Value::Equals(input.get(), output.get()));
 
-  input = base::BinaryValue::CreateWithCopiedBuffer("mojo", 4);
+  input = base::Value::CreateWithCopiedBuffer("mojo", 4);
   ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output));
   EXPECT_TRUE(base::Value::Equals(input.get(), output.get()));
 
@@ -304,8 +304,7 @@
   dict->SetString("string", "some string");
   dict->SetBoolean("nested.bool", true);
   dict->SetInteger("nested.int", 9);
-  dict->Set("some_binary",
-            base::BinaryValue::CreateWithCopiedBuffer("mojo", 4));
+  dict->Set("some_binary", base::Value::CreateWithCopiedBuffer("mojo", 4));
   dict->Set("null_value", base::MakeUnique<base::Value>());
   dict->SetIntegerWithoutPathExpansion("non_nested.int", 10);
   {
@@ -327,7 +326,7 @@
   list->AppendString("string");
   list->AppendDouble(42.1);
   list->AppendBoolean(true);
-  list->Append(base::BinaryValue::CreateWithCopiedBuffer("mojo", 4));
+  list->Append(base::Value::CreateWithCopiedBuffer("mojo", 4));
   list->Append(base::MakeUnique<base::Value>());
   {
     std::unique_ptr<base::DictionaryValue> list_dict(
diff --git a/mojo/common/values_struct_traits.cc b/mojo/common/values_struct_traits.cc
index ef88a09..6d392ec 100644
--- a/mojo/common/values_struct_traits.cc
+++ b/mojo/common/values_struct_traits.cc
@@ -83,7 +83,7 @@
     case common::mojom::ValueDataView::Tag::BINARY_VALUE: {
       mojo::ArrayDataView<uint8_t> binary_data;
       data.GetBinaryValueDataView(&binary_data);
-      *value_out = base::BinaryValue::CreateWithCopiedBuffer(
+      *value_out = base::Value::CreateWithCopiedBuffer(
           reinterpret_cast<const char*>(binary_data.data()),
           binary_data.size());
       return true;
diff --git a/mojo/common/values_struct_traits.h b/mojo/common/values_struct_traits.h
index befcf3a..4139ce6c 100644
--- a/mojo/common/values_struct_traits.h
+++ b/mojo/common/values_struct_traits.h
@@ -173,7 +173,7 @@
   }
 
   static mojo::ConstCArray<uint8_t> binary_value(const base::Value& value) {
-    const base::BinaryValue* binary_value = nullptr;
+    const base::Value* binary_value = nullptr;
     if (!value.GetAsBinary(&binary_value))
       NOTREACHED();
     return mojo::ConstCArray<uint8_t>(
diff --git a/third_party/WebKit/LayoutTests/fast/gradients/conic-gradient-parsing.html b/third_party/WebKit/LayoutTests/fast/gradients/conic-gradient-parsing.html
index df54ea66..4118478 100644
--- a/third_party/WebKit/LayoutTests/fast/gradients/conic-gradient-parsing.html
+++ b/third_party/WebKit/LayoutTests/fast/gradients/conic-gradient-parsing.html
@@ -38,6 +38,7 @@
     { style: "conic-gradient(at top left from 0, black, white)"            , computed: "none" },
     { style: "conic-gradient(black 10% 20% 30%, white)"                    , computed: "none" },
     { style: "conic-gradient(black, 30% 50%, white)"                       , computed: "none" },
+    { style: "conic-gradient(black, white calc(360deg / 10 + 50%)"         , computed: "none" },
 
     { style: "conic-gradient(black, white)"           , computed: "conic-gradient(black, white)" },
     { style: "conic-gradient(black 0, white)"         , computed: "conic-gradient(black 0deg, white)" },
@@ -90,6 +91,7 @@
     { style: "conic-gradient(white 45deg, black 225deg, white 405deg)"   , computed: "conic-gradient(white 45deg, black 225deg, white 405deg)" },
     { style: "conic-gradient(red, yellow, lime, aqua, blue, magenta, red", computed: "conic-gradient(red, yellow, lime, aqua, blue, magenta, red)" },
     { style: "conic-gradient(gold, #f06 20deg)"                          , computed: "conic-gradient(gold, rgb(255, 0, 102) 20deg)" },
+    { style: "conic-gradient(gold calc(100% / 2), #f06 calc(360deg * 4 / 5))"                    , computed: "conic-gradient(gold calc(50%), rgb(255, 0, 102) calc(288deg))" },
   ];
 
   test(function() {
diff --git a/third_party/WebKit/LayoutTests/sensor/absolute-orientation-sensor.html b/third_party/WebKit/LayoutTests/sensor/absolute-orientation-sensor.html
index 90065cf..8e563b65 100644
--- a/third_party/WebKit/LayoutTests/sensor/absolute-orientation-sensor.html
+++ b/third_party/WebKit/LayoutTests/sensor/absolute-orientation-sensor.html
@@ -11,7 +11,7 @@
 if (!window.testRunner)
     debug('This test cannot be run without the TestRunner');
 
-const kQuaternion = [0, 1, 0, 0]; // 180 degrees around X axis.
+const kQuaternion = [1, 0, 0, 0]; // 180 degrees around X axis.
 const kRotationMatrix = [1,  0,  0,  0,
                          0, -1,  0,  0,
                          0,  0, -1,  0,
diff --git a/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp b/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp
index 58cd47e..71282d5 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontFaceSource.cpp
@@ -58,7 +58,7 @@
   if (!font_data)
     font_data = CreateFontData(font_description);
   // No release, because fontData is a reference to a RefPtr that is held in the
-  // m_fontDataTable.
+  // font_data_table_.
   return font_data;
 }
 
diff --git a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
index 7e2c714d..4d45ff35 100644
--- a/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp
@@ -103,7 +103,7 @@
       return nullptr;
     fetched_ = FontResourceHelper::Create(resource);
   } else {
-    // FIXME: CSSFontFaceSrcValue::fetch is invoked when @font-face rule
+    // FIXME: CSSFontFaceSrcValue::Fetch is invoked when @font-face rule
     // is processed by StyleResolver / StyleEngine.
     RestoreCachedResourceIfNeeded(document);
   }
diff --git a/third_party/WebKit/Source/core/css/CSSFontSelector.cpp b/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
index 9bfc43bf..d01e918 100644
--- a/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSFontSelector.cpp
@@ -47,7 +47,7 @@
       generic_font_family_settings_(
           document->GetFrame()->GetSettings()->GetGenericFontFamilySettings()) {
   // FIXME: An old comment used to say there was no need to hold a reference to
-  // m_document because "we are guaranteed to be destroyed before the document".
+  // document_ because "we are guaranteed to be destroyed before the document".
   // But there does not seem to be any such guarantee.
   DCHECK(document_);
   DCHECK(document_->GetFrame());
diff --git a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
index 79c9680..9578fe3f 100644
--- a/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSImageSetValue.cpp
@@ -108,7 +108,7 @@
   if (IsCachePending(device_scale_factor)) {
     // FIXME: In the future, we want to take much more than deviceScaleFactor
     // into acount here. All forms of scale should be included:
-    // Page::pageScaleFactor(), LocalFrame::pageZoomFactor(), and any CSS
+    // Page::PageScaleFactor(), LocalFrame::PageZoomFactor(), and any CSS
     // transforms. https://bugs.webkit.org/show_bug.cgi?id=81698
     ImageWithScale image = BestImageForScaleFactor(device_scale_factor);
     ResourceRequest resource_request(document.CompleteURL(image.image_url));
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
index 5ea602d..bc791380 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.cpp
@@ -37,7 +37,7 @@
 // Max/min values for CSS, needs to slightly smaller/larger than the true
 // max/min values to allow for rounding without overflowing.
 // Subtract two (rather than one) to allow for values to be converted to float
-// and back without exceeding the LayoutUnit::max.
+// and back without exceeding the LayoutUnit::Max.
 const int kMaxValueForCssLength = INT_MAX / kFixedPointDenominator - 2;
 const int kMinValueForCssLength = INT_MIN / kFixedPointDenominator + 2;
 
@@ -414,7 +414,7 @@
 CSSPrimitiveValue::UnitType CSSPrimitiveValue::CanonicalUnitTypeForCategory(
     UnitCategory category) {
   // The canonical unit type is chosen according to the way
-  // CSSPropertyParser::validUnit() chooses the default unit in each category
+  // CSSPropertyParser::ValidUnit() chooses the default unit in each category
   // (based on unitflags).
   switch (category) {
     case kUNumber:
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
index a0c694e..ab683277 100644
--- a/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
+++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValue.h
@@ -164,7 +164,7 @@
     return unit == UnitType::kDegrees || unit == UnitType::kRadians ||
            unit == UnitType::kGradians || unit == UnitType::kTurns;
   }
-  bool IsAngle() const { return IsAngle(GetType()); }
+  bool IsAngle() const { return IsAngle(TypeWithCalcResolved()); }
   bool IsFontRelativeLength() const {
     return GetType() == UnitType::kQuirkyEms || GetType() == UnitType::kEms ||
            GetType() == UnitType::kExs || GetType() == UnitType::kRems ||
diff --git a/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h b/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h
index e550979..8474e9b 100644
--- a/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h
+++ b/third_party/WebKit/Source/core/css/CSSSegmentedFontFace.h
@@ -96,7 +96,7 @@
   FontFaceList::iterator first_non_css_connected_face_;
 
   // Approximate number of characters styled with this CSSSegmentedFontFace.
-  // LayoutText::styleDidChange() increments this on the first
+  // LayoutText::StyleDidChange() increments this on the first
   // CSSSegmentedFontFace in the style's font family list, so this is not
   // counted if this font is used as a fallback font. Also, this may be double
   // counted by style recalcs.
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.cpp b/third_party/WebKit/Source/core/css/CSSSelector.cpp
index 7fa6c20..5d6d185 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelector.cpp
@@ -394,7 +394,7 @@
   bool operator()(const NameToPseudoStruct& entry, const NameToPseudoStruct&) {
     DCHECK(entry.string);
     const char* key = reinterpret_cast<const char*>(key_.Characters8());
-    // If strncmp returns 0, then either the keys are equal, or |m_key| sorts
+    // If strncmp returns 0, then either the keys are equal, or |key_| sorts
     // before |entry|.
     return strncmp(entry.string, key, key_.length()) < 0;
   }
@@ -435,30 +435,30 @@
 
 #ifndef NDEBUG
 void CSSSelector::Show(int indent) const {
-  printf("%*sselectorText(): %s\n", indent, "", SelectorText().Ascii().Data());
-  printf("%*sm_match: %d\n", indent, "", match_);
+  printf("%*sSelectorText(): %s\n", indent, "", SelectorText().Ascii().Data());
+  printf("%*smatch_: %d\n", indent, "", match_);
   if (match_ != kTag)
-    printf("%*svalue(): %s\n", indent, "", Value().Ascii().Data());
-  printf("%*sgetPseudoType(): %d\n", indent, "", GetPseudoType());
+    printf("%*sValue(): %s\n", indent, "", Value().Ascii().Data());
+  printf("%*sGetPseudoType(): %d\n", indent, "", GetPseudoType());
   if (match_ == kTag)
-    printf("%*stagQName().localName: %s\n", indent, "",
+    printf("%*sTagQName().LocalName(): %s\n", indent, "",
            TagQName().LocalName().Ascii().Data());
-  printf("%*sisAttributeSelector(): %d\n", indent, "", IsAttributeSelector());
+  printf("%*sIsAttributeSelector(): %d\n", indent, "", IsAttributeSelector());
   if (IsAttributeSelector())
-    printf("%*sattribute(): %s\n", indent, "",
+    printf("%*sAttribute(): %s\n", indent, "",
            Attribute().LocalName().Ascii().Data());
-  printf("%*sargument(): %s\n", indent, "", Argument().Ascii().Data());
-  printf("%*sspecificity(): %u\n", indent, "", Specificity());
+  printf("%*sArgument(): %s\n", indent, "", Argument().Ascii().Data());
+  printf("%*sSpecificity(): %u\n", indent, "", Specificity());
   if (TagHistory()) {
-    printf("\n%*s--> (relation == %d)\n", indent, "", Relation());
+    printf("\n%*s--> (Relation() == %d)\n", indent, "", Relation());
     TagHistory()->Show(indent + 2);
   } else {
-    printf("\n%*s--> (relation == %d)\n", indent, "", Relation());
+    printf("\n%*s--> (Relation() == %d)\n", indent, "", Relation());
   }
 }
 
 void CSSSelector::Show() const {
-  printf("\n******* CSSSelector::show(\"%s\") *******\n",
+  printf("\n******* CSSSelector::Show(\"%s\") *******\n",
          SelectorText().Ascii().Data());
   Show(2);
   printf("******* end *******\n");
diff --git a/third_party/WebKit/Source/core/css/CSSSelector.h b/third_party/WebKit/Source/core/css/CSSSelector.h
index 94718e5e..23d9d27 100644
--- a/third_party/WebKit/Source/core/css/CSSSelector.h
+++ b/third_party/WebKit/Source/core/css/CSSSelector.h
@@ -38,7 +38,7 @@
 // representative list of selectors is in CSSSelectorTest; run it in a debug
 // build to see useful debugging output.
 //
-// ** tagHistory() and relation():
+// ** TagHistory() and Relation():
 //
 // Selectors are represented as a linked list of simple selectors (defined more
 // or less according to
@@ -47,11 +47,11 @@
 // returns the relationship of the current simple selector to the one in
 // tagHistory(). For example, the CSS selector .a.b #c is represented as:
 //
-// selectorText(): .a.b #c
-// --> (relation == Descendant)
-//   selectorText(): .a.b
-//   --> (relation == SubSelector)
-//     selectorText(): .b
+// SelectorText(): .a.b #c
+// --> (relation == kDescendant)
+//   SelectorText(): .a.b
+//   --> (relation == kSubSelector)
+//     SelectorText(): .b
 //
 // The order of tagHistory() varies depending on the situation.
 // * Relations using combinators
diff --git a/third_party/WebKit/Source/core/css/CSSSelectorList.cpp b/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
index 9cbcd2e0..7a9a8d4 100644
--- a/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
+++ b/third_party/WebKit/Source/core/css/CSSSelectorList.cpp
@@ -72,7 +72,7 @@
   for (size_t i = 0; i < selector_vector.size(); ++i) {
     CSSParserSelector* current = selector_vector[i].get();
     while (current) {
-      // Move item from the parser selector vector into m_selectorArray without
+      // Move item from the parser selector vector into selector_array_ without
       // invoking destructor (Ugh.)
       CSSSelector* current_selector = current->ReleaseSelector().release();
       memcpy(&list.selector_array_[array_index], current_selector,
diff --git a/third_party/WebKit/Source/core/css/CSSSelectorList.h b/third_party/WebKit/Source/core/css/CSSSelectorList.h
index 3c21e92..979fd9e 100644
--- a/third_party/WebKit/Source/core/css/CSSSelectorList.h
+++ b/third_party/WebKit/Source/core/css/CSSSelectorList.h
@@ -95,9 +95,9 @@
   CSSSelectorList(const CSSSelectorList&) = delete;
   CSSSelectorList& operator=(const CSSSelectorList&) = delete;
 
-  // End of a multipart selector is indicated by m_isLastInTagHistory bit in the
-  // last item. End of the array is indicated by m_isLastInSelectorList bit in
-  // the last item.
+  // End of a multipart selector is indicated by is_last_in_tag_history_ bit in
+  // the last item. End of the array is indicated by is_last_in_selector_list_
+  // bit in the last item.
   CSSSelector* selector_array_;
 };
 
diff --git a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
index 17cd5d8..5b20b9a6 100644
--- a/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
+++ b/third_party/WebKit/Source/core/css/CSSSyntaxDescriptor.h
@@ -35,7 +35,7 @@
       : type_(type), string_(string), repeatable_(repeatable) {}
 
   CSSSyntaxType type_;
-  String string_;  // Only used when m_type is CSSSyntaxType::Ident
+  String string_;  // Only used when type_ is CSSSyntaxType::kIdent
   bool repeatable_;
 };
 
diff --git a/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp b/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
index d409933..1a4ef71 100644
--- a/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
+++ b/third_party/WebKit/Source/core/css/CSSToLengthConversionData.cpp
@@ -97,7 +97,7 @@
                                 zoom) {}
 
 double CSSToLengthConversionData::ViewportWidthPercent() const {
-  // FIXME: Remove m_style from this class. Plumb viewport and rem unit
+  // FIXME: Remove style_ from this class. Plumb viewport and rem unit
   // information through as output parameters on functions involved in length
   // resolution.
   const_cast<ComputedStyle*>(style_)->SetHasViewportUnits(true);
@@ -124,9 +124,9 @@
 double CSSToLengthConversionData::ZoomedComputedPixels(
     double value,
     CSSPrimitiveValue::UnitType type) const {
-  // The logic in this function is duplicated in MediaValues::computeLength()
-  // because MediaValues::computeLength() needs nearly identical logic, but we
-  // haven't found a way to make zoomedComputedPixels() more generic (to solve
+  // The logic in this function is duplicated in MediaValues::ComputeLength()
+  // because MediaValues::ComputeLength() needs nearly identical logic, but we
+  // haven't found a way to make ZoomedComputedPixels() more generic (to solve
   // both cases) without hurting performance.
   switch (type) {
     case CSSPrimitiveValue::UnitType::kPixels:
diff --git a/third_party/WebKit/Source/core/css/CSSValueKeywords.json5 b/third_party/WebKit/Source/core/css/CSSValueKeywords.json5
index fb3b77d..6dfe0a6 100644
--- a/third_party/WebKit/Source/core/css/CSSValueKeywords.json5
+++ b/third_party/WebKit/Source/core/css/CSSValueKeywords.json5
@@ -256,7 +256,7 @@
     "-webkit-baseline-middle",
     //
     // text-align
-    // The order of this enum must match the order found in CSSParserFastPaths::isValidKeywordPropertyAndValue().
+    // The order of this enum must match the order found in CSSParserFastPaths::IsValidKeywordPropertyAndValue().
     //
     "-webkit-auto",
     "left",
@@ -282,7 +282,7 @@
     "inside",
     //
     // list-style-type
-    // The order of this enum must match the order found in CSSParserFastPaths::isValidKeywordPropertyAndValue().
+    // The order of this enum must match the order found in CSSParserFastPaths::IsValidKeywordPropertyAndValue().
     //
     "disc",
     "circle",
@@ -342,7 +342,7 @@
     //none
     //
     // display
-    // The order of this enum must match the order found in CSSParserFastPaths::isValidKeywordPropertyAndValue().
+    // The order of this enum must match the order found in CSSParserFastPaths::IsValidKeywordPropertyAndValue().
     //
     "inline",
     "block",
@@ -371,7 +371,7 @@
     "-webkit-inline-flex",
     //
     // cursor
-    // The order of this enum must match the order found in CSSPropertyParser::consumeCursor().
+    // The order of this enum must match the order found in CSSPropertyParser::ConsumeCursor().
     //
     "auto",
     "crosshair",
diff --git a/third_party/WebKit/Source/core/css/FontFaceSet.cpp b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
index dca0554b..adb3661 100644
--- a/third_party/WebKit/Source/core/css/FontFaceSet.cpp
+++ b/third_party/WebKit/Source/core/css/FontFaceSet.cpp
@@ -158,7 +158,7 @@
 }
 
 void FontFaceSet::HandlePendingEventsAndPromisesSoon() {
-  // m_asyncRunner will be automatically stopped on destruction.
+  // async_runner_ will be automatically stopped on destruction.
   async_runner_->RunAsync();
 }
 
@@ -246,10 +246,10 @@
 ScriptPromise FontFaceSet::ready(ScriptState* script_state) {
   if (ready_->GetState() != ReadyProperty::kPending &&
       InActiveDocumentContext()) {
-    // |m_ready| is already resolved, but there may be pending stylesheet
+    // |ready_| is already resolved, but there may be pending stylesheet
     // changes and/or layout operations that may cause another font loads.
     // So synchronously update style and layout here.
-    // This may trigger font loads, and replace |m_ready| with a new Promise.
+    // This may trigger font loads, and replace |ready_| with a new Promise.
     GetDocument()->UpdateStyleAndLayout();
   }
   return ready_->Promise(script_state->World());
diff --git a/third_party/WebKit/Source/core/css/MediaQueryListEvent.h b/third_party/WebKit/Source/core/css/MediaQueryListEvent.h
index 87c7b06f..d9182f1 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryListEvent.h
+++ b/third_party/WebKit/Source/core/css/MediaQueryListEvent.h
@@ -65,7 +65,7 @@
       matches_ = initializer.matches();
   }
 
-  // We have m_media/m_matches for JS-created events; we use m_mediaQueryList
+  // We have media_/matches_ for JS-created events; we use media_query_list_
   // for events that blink generates.
   Member<MediaQueryList> media_query_list_;
   String media_;
diff --git a/third_party/WebKit/Source/core/css/MediaValues.cpp b/third_party/WebKit/Source/core/css/MediaValues.cpp
index d8a7ed04..d2be2db 100644
--- a/third_party/WebKit/Source/core/css/MediaValues.cpp
+++ b/third_party/WebKit/Source/core/css/MediaValues.cpp
@@ -179,9 +179,9 @@
                                     double viewport_height,
                                     double& result) {
   // The logic in this function is duplicated from
-  // CSSToLengthConversionData::zoomedComputedPixels() because
-  // MediaValues::computeLength() needs nearly identical logic, but we haven't
-  // found a way to make CSSToLengthConversionData::zoomedComputedPixels() more
+  // CSSToLengthConversionData::ZoomedComputedPixels() because
+  // MediaValues::ComputeLength() needs nearly identical logic, but we haven't
+  // found a way to make CSSToLengthConversionData::ZoomedComputedPixels() more
   // generic (to solve both cases) without hurting performance.
   // FIXME - Unite the logic here with CSSToLengthConversionData in a performant
   // way.
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
index bfec3e22..7772f59 100644
--- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
+++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -81,7 +81,7 @@
             font_->Url().ElidedString()));
   }
 
-  // Note: this may call notifyFinished() and clear m_font.
+  // Note: this may call notifyFinished() and clear font_.
   font_->AddClient(this);
 }
 
@@ -347,7 +347,7 @@
     DataSource data_source) {
   if (data_source_ != kFromUnknown)
     return;
-  // Classify as memory cache hit if |m_loadStartTime| is not set, i.e.
+  // Classify as memory cache hit if |load_start_time_| is not set, i.e.
   // this RemoteFontFaceSource instance didn't trigger FontResource
   // loading.
   if (load_start_time_ == 0)
diff --git a/third_party/WebKit/Source/core/css/RuleSet.cpp b/third_party/WebKit/Source/core/css/RuleSet.cpp
index d4056c9..88c4e966 100644
--- a/third_party/WebKit/Source/core/css/RuleSet.cpp
+++ b/third_party/WebKit/Source/core/css/RuleSet.cpp
@@ -260,17 +260,17 @@
 }
 
 void RuleSet::AddPageRule(StyleRulePage* rule) {
-  EnsurePendingRules();  // So that m_pageRules.shrinkToFit() gets called.
+  EnsurePendingRules();  // So that page_rules_.ShrinkToFit() gets called.
   page_rules_.push_back(rule);
 }
 
 void RuleSet::AddFontFaceRule(StyleRuleFontFace* rule) {
-  EnsurePendingRules();  // So that m_fontFaceRules.shrinkToFit() gets called.
+  EnsurePendingRules();  // So that font_face_rules_.ShrinkToFit() gets called.
   font_face_rules_.push_back(rule);
 }
 
 void RuleSet::AddKeyframesRule(StyleRuleKeyframes* rule) {
-  EnsurePendingRules();  // So that m_keyframesRules.shrinkToFit() gets called.
+  EnsurePendingRules();  // So that keyframes_rules_.ShrinkToFit() gets called.
   keyframes_rules_.push_back(rule);
 }
 
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
index bd025d5..de3cc38e 100644
--- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp
+++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -499,7 +499,7 @@
   SelectorCheckingContext next_context(context);
   for (const auto& insertion_point : insertion_points) {
     next_context.element = insertion_point;
-    // TODO(esprehn): Why does SharingRules have a special case?
+    // TODO(esprehn): Why does kSharingRules have a special case?
     if (mode_ == kSharingRules)
       next_context.scope = insertion_point->ContainingShadowRoot();
     if (Match(next_context, result))
@@ -707,7 +707,7 @@
          sub_context.visited_match_type == kVisitedMatchEnabled))
       return true;
     if (mode_ == kSharingRules) {
-      // context.scope is not available if m_mode == SharingRules.
+      // context.scope is not available if mode_ == kSharingRules.
       // We cannot determine whether :host or :scope matches a given element or
       // not.
       if (sub_context.selector->IsHostPseudoClass() ||
diff --git a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
index 1ba7647..a1b8ccb 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySerializer.cpp
@@ -854,7 +854,7 @@
   for (unsigned i = 0; i < shorthand.length(); ++i) {
     const CSSValue* value =
         property_set_.GetPropertyCSSValue(shorthand.properties()[i]);
-    // FIXME: CSSInitialValue::cssText should generate the right value.
+    // FIXME: CSSInitialValue::CssText should generate the right value.
     String text = value->CssText();
     if (res.IsNull())
       res = text;
diff --git a/third_party/WebKit/Source/core/css/StylePropertySet.cpp b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
index 3cfcc8c..02681a2d 100644
--- a/third_party/WebKit/Source/core/css/StylePropertySet.cpp
+++ b/third_party/WebKit/Source/core/css/StylePropertySet.cpp
@@ -97,7 +97,7 @@
 
 ImmutableStylePropertySet::~ImmutableStylePropertySet() {}
 
-// Convert property into an uint16_t for comparison with metadata's m_propertyID
+// Convert property into an uint16_t for comparison with metadata's property_id_
 // to avoid the compiler converting it to an int multiple times in a loop.
 static uint16_t GetConvertedCSSPropertyID(CSSPropertyID property_id) {
   return static_cast<uint16_t>(property_id);
@@ -468,7 +468,7 @@
     const CSSProperty& property = properties[old_index];
     if (ContainsId(set, length, property.Id()))
       continue;
-    // Modify m_propertyVector in-place since this method is
+    // Modify property_vector_ in-place since this method is
     // performance-sensitive.
     properties[new_index++] = properties[old_index];
   }
diff --git a/third_party/WebKit/Source/core/css/StyleRule.cpp b/third_party/WebKit/Source/core/css/StyleRule.cpp
index 1b27772..95c1c64e 100644
--- a/third_party/WebKit/Source/core/css/StyleRule.cpp
+++ b/third_party/WebKit/Source/core/css/StyleRule.cpp
@@ -239,7 +239,7 @@
 StyleRule::~StyleRule() {}
 
 MutableStylePropertySet& StyleRule::MutableProperties() {
-  // Ensure m_properties is initialized.
+  // Ensure properties_ is initialized.
   if (!Properties().IsMutable())
     properties_ = properties_->MutableCopy();
   return *ToMutableStylePropertySet(properties_.Get());
@@ -257,7 +257,7 @@
 }
 
 bool StyleRule::HasParsedProperties() const {
-  // StyleRule should only have one of {m_lazyPropertyParser, m_properties} set.
+  // StyleRule should only have one of {lazy_property_parser_, properties_} set.
   DCHECK(lazy_property_parser_ || properties_);
   DCHECK(!lazy_property_parser_ || !properties_);
   return !lazy_property_parser_;
diff --git a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
index 8880f99..fed816f 100644
--- a/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
+++ b/third_party/WebKit/Source/core/css/StyleSheetContents.cpp
@@ -428,10 +428,10 @@
   if (loading_clients_.IsEmpty())
     return;
 
-  // Avoid |CSSSStyleSheet| and |ownerNode| being deleted by scripts that run
-  // via ScriptableDocumentParser::executeScriptsWaitingForResources(). Also
+  // Avoid |CSSSStyleSheet| and |OwnerNode| being deleted by scripts that run
+  // via ScriptableDocumentParser::ExecuteScriptsWaitingForResources(). Also
   // protect the |CSSStyleSheet| from being deleted during iteration via the
-  // |sheetLoaded| method.
+  // |SheetLoaded| method.
   //
   // When a sheet is loaded it is moved from the set of loading clients
   // to the set of completed clients. We therefore need the copy in order to
@@ -568,7 +568,7 @@
   DCHECK(!loading_clients_.Contains(sheet));
   DCHECK(!completed_clients_.Contains(sheet));
 
-  // InspectorCSSAgent::buildObjectForRule creates CSSStyleSheet without any
+  // InspectorCSSAgent::BuildObjectForRule creates CSSStyleSheet without any
   // owner node.
   if (!sheet->OwnerDocument())
     return;
@@ -594,8 +594,8 @@
 void StyleSheetContents::ClientLoadCompleted(CSSStyleSheet* sheet) {
   DCHECK(loading_clients_.Contains(sheet) || !sheet->OwnerDocument());
   loading_clients_.erase(sheet);
-  // In m_ownerNode->sheetLoaded, the CSSStyleSheet might be detached.
-  // (i.e. clearOwnerNode was invoked.)
+  // In owner_node_->SheetLoaded, the CSSStyleSheet might be detached.
+  // (i.e. ClearOwnerNode was invoked.)
   // In this case, we don't need to add the stylesheet to completed clients.
   if (!sheet->OwnerDocument())
     return;
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.cpp
index b5025ff9..683786b 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSLengthValue.cpp
@@ -21,7 +21,7 @@
 
 CSSLengthValue* CSSLengthValue::FromCSSValue(const CSSPrimitiveValue& value) {
   if (value.IsCalculated()) {
-    // TODO(meade): Implement CSSCalcLength::fromCSSValue.
+    // TODO(meade): Implement CSSCalcLength::FromCSSValue.
     return nullptr;
   }
   return CSSSimpleLength::FromCSSValue(value);
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp b/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp
index f8e4eb4..898f4f1 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSRotation.cpp
@@ -18,7 +18,7 @@
 CSSRotation* FromCSSRotate(const CSSFunctionValue& value) {
   DCHECK_EQ(value.length(), 1UL);
   const CSSPrimitiveValue& primitive_value = ToCSSPrimitiveValue(value.Item(0));
-  if (!primitive_value.IsAngle())
+  if (primitive_value.IsCalculated() || !primitive_value.IsAngle())
     return nullptr;
   return CSSRotation::Create(CSSAngleValue::FromCSSValue(primitive_value));
 }
@@ -29,7 +29,7 @@
   DCHECK(IsNumberValue(value.Item(1)));
   DCHECK(IsNumberValue(value.Item(2)));
   const CSSPrimitiveValue& angle = ToCSSPrimitiveValue(value.Item(3));
-  if (!angle.IsAngle())
+  if (angle.IsCalculated() || !angle.IsAngle())
     return nullptr;
 
   double x = ToCSSPrimitiveValue(value.Item(0)).GetDoubleValue();
@@ -41,9 +41,10 @@
 
 CSSRotation* FromCSSRotateXYZ(const CSSFunctionValue& value) {
   DCHECK_EQ(value.length(), 1UL);
-
-  CSSAngleValue* angle =
-      CSSAngleValue::FromCSSValue(ToCSSPrimitiveValue(value.Item(0)));
+  const CSSPrimitiveValue& primitive_value = ToCSSPrimitiveValue(value.Item(0));
+  if (primitive_value.IsCalculated())
+    return nullptr;
+  CSSAngleValue* angle = CSSAngleValue::FromCSSValue(primitive_value);
   switch (value.FunctionType()) {
     case CSSValueRotateX:
       return CSSRotation::Create(1, 0, 0, angle);
diff --git a/third_party/WebKit/Source/core/css/cssom/CSSUnitValue.cpp b/third_party/WebKit/Source/core/css/cssom/CSSUnitValue.cpp
index 0b6f5672..db4cde34 100644
--- a/third_party/WebKit/Source/core/css/cssom/CSSUnitValue.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/CSSUnitValue.cpp
@@ -11,7 +11,7 @@
 namespace {
 
 bool IsValidUnit(CSSPrimitiveValue::UnitType unit) {
-  // UserUnits returns true for CSSPrimitiveValue::isLength below.
+  // UserUnits returns true for CSSPrimitiveValue::IsLength below.
   if (unit == CSSPrimitiveValue::UnitType::kUserUnits)
     return false;
   if (unit == CSSPrimitiveValue::UnitType::kNumber ||
diff --git a/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
index 290561e1..f05d432 100644
--- a/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
+++ b/third_party/WebKit/Source/core/css/cssom/ComputedStylePropertyMap.cpp
@@ -50,7 +50,7 @@
   }
   if (node_->IsElementNode()) {
     // Seems to only support before, after, backdrop, first-letter. See
-    // PseudoElementData::pseudoElement.
+    // PseudoElementData::GetPseudoElement.
     if (PseudoElement* element =
             (ToElement(node_))->GetPseudoElement(pseudo_id_)) {
       return element;
@@ -59,7 +59,7 @@
   return nullptr;
 }
 
-// ComputedStylePropertyMap::getAllInternal/get should return computed styles
+// ComputedStylePropertyMap::GetAllInternal/Get should return computed styles
 // (as opposed to resolved styles a la getComputedStyle()).
 //
 // Property values are read from an up-to-date ComputedStyle and converted into
@@ -83,9 +83,10 @@
     return style_value_vector;
   }
   // I have copied this from
-  // CSSComputedStyleDeclaration::computeComputedStyle(). I don't know if there
-  // is any use in passing m_pseudoId if node is not already a PseudoElement,
-  // but passing pseudo_Id when it IS already a PseudoElement leads to disaster.
+  // CSSComputedStyleDeclaration::ComputeComputedStyle(). I don't know if there
+  // is any use in passing pseudo_id_ if node is not already a PseudoElement,
+  // but passing pseudo_id_ when it IS already a PseudoElement leads to
+  // disaster.
   const ComputedStyle* style = node->EnsureComputedStyle(
       node->IsPseudoElement() ? kPseudoIdNone : pseudo_id_);
   node = this->GetNode();
diff --git a/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h b/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h
index 70e50fa..23f2e3b 100644
--- a/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h
+++ b/third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h
@@ -183,7 +183,7 @@
   // Implement reference counting manually so we can call a derived
   // class destructor when the reference count decreases to 0.
   // If we use RefCounted instead, at least one of our compilers
-  // requires the ability for RefCounted<InvalidationSet>::deref()
+  // requires the ability for RefCounted<InvalidationSet>::Deref()
   // to call ~InvalidationSet(), but this is not a virtual call.
   int ref_count_;
 
diff --git a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
index 074980e..5203d02 100644
--- a/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/third_party/WebKit/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -249,7 +249,7 @@
   unsigned index = 0;
   while (index < invalidation_entries_.size()) {
     if (element_index_ > invalidation_entries_[index].invalidation_limit_) {
-      // m_invalidationEntries[index] only applies to earlier siblings. Remove
+      // invalidation_entries_[index] only applies to earlier siblings. Remove
       // it.
       invalidation_entries_[index] = invalidation_entries_.back();
       invalidation_entries_.pop_back();
diff --git a/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h b/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h
index 0536da8..e98dea3 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSLazyParsingState.h
@@ -31,7 +31,7 @@
   // know the total number of style rules that deferred parsing.
   void FinishInitialParsing();
 
-  // Helper method used to bump m_totalStyleRules.
+  // Helper method used to bump total_style_rules_.
   CSSLazyPropertyParserImpl* CreateLazyParser(const CSSParserTokenRange& block);
 
   const CSSParserContext* Context();
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
index 91583f8..fefc63d 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
@@ -467,7 +467,7 @@
       return ConsumeNamespaceRule(prelude);
     if (allowed_rules == kApplyRules && id == kCSSAtRuleApply) {
       ConsumeApplyRule(prelude);
-      return nullptr;  // consumeApplyRule just updates m_parsedProperties
+      return nullptr;  // ConsumeApplyRule just updates parsed_properties_
     }
     return nullptr;  // Parse error, unrecognised at-rule without block
   }
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
index f66861c6..4383eaa 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.h
@@ -132,7 +132,7 @@
                                            CSSParserTokenRange block);
   StyleRulePage* ConsumePageRule(CSSParserTokenRange prelude,
                                  CSSParserTokenRange block);
-  // Updates m_parsedProperties
+  // Updates parsed_properties_
   void ConsumeApplyRule(CSSParserTokenRange prelude);
 
   StyleRuleKeyframe* ConsumeKeyframeStyleRule(CSSParserTokenRange prelude,
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserToken.h b/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
index a1512ae..14ab60d0 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserToken.h
@@ -155,7 +155,7 @@
 
   bool ValueDataCharRawEqual(const CSSParserToken& other) const;
 
-  // m_value... is an unpacked StringView so that we can pack it
+  // value_... is an unpacked StringView so that we can pack it
   // tightly with the rest of this object for a smaller object size.
   bool value_is8_bit_ : 1;
   unsigned value_length_;
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
index c81d1ad..d0d8d6c66 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -298,7 +298,7 @@
   CSSValueList* values = CSSValueList::CreateCommaSeparated();
   do {
     if (range.Peek().Id() == CSSValueAll) {
-      // FIXME: CSSPropertyParser::parseFontVariant() implements
+      // FIXME: CSSPropertyParser::ParseFontVariant() implements
       // the old css3 draft:
       // http://www.w3.org/TR/2002/WD-css3-webfonts-20020802/#font-variant
       // 'all' is only allowed in @font-face and with no other values.
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
index 53eae84..7674a1d8 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParserHelpers.cpp
@@ -940,9 +940,19 @@
                                                 CSSParserMode,
                                                 ValueRange value_range,
                                                 UnitlessQuirk) {
-  return range.Peek().GetType() == kPercentageToken
-             ? ConsumePercent(range, value_range)
-             : ConsumeAngle(range);
+  const CSSParserToken& token = range.Peek();
+  if (token.GetType() == kDimensionToken || token.GetType() == kNumberToken)
+    return ConsumeAngle(range);
+  if (token.GetType() == kPercentageToken)
+    return ConsumePercent(range, value_range);
+  CalcParser calc_parser(range, value_range);
+  if (const CSSCalcValue* calculation = calc_parser.Value()) {
+    CalculationCategory category = calculation->Category();
+    // TODO(fs): Add and support kCalcPercentAngle?
+    if (category == kCalcAngle || category == kCalcPercent)
+      return calc_parser.ConsumeValue();
+  }
+  return nullptr;
 }
 
 using PositionFunctor = CSSPrimitiveValue* (*)(CSSParserTokenRange&,
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
index 65a3dd8..bc452d9 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
@@ -560,7 +560,7 @@
       // Check the 3rd '>'.
       if (range.Peek(1).GetType() != kDelimiterToken ||
           range.Peek(1).Delimiter() != '>') {
-        // TODO: Treat '>>' as a CSSSelector::Descendant here.
+        // TODO: Treat '>>' as a CSSSelector::kDescendant here.
         return CSSSelector::kChild;
       }
       range.Consume();
diff --git a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
index a6ff6e2..5831489 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSTokenizer.cpp
@@ -23,7 +23,7 @@
   // However, we can skip this step since:
   // * We're using HTML spaces (which accept \r and \f as a valid white space)
   // * Do not count white spaces
-  // * CSSTokenizerInputStream::nextInputChar() replaces NULLs for replacement
+  // * CSSTokenizerInputStream::NextInputChar() replaces NULLs for replacement
   //   characters
 
   if (string.IsEmpty())
diff --git a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
index 14e05c5..88e90dd 100644
--- a/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/ElementStyleResources.cpp
@@ -153,7 +153,7 @@
   // <div></div>
   //
   // We call styleImage() for both a.png and b.png adding the
-  // CSSPropertyBackgroundImage property to the m_pendingImageProperties set,
+  // CSSPropertyBackgroundImage property to the pending_image_properties_ set,
   // then we null out the background image because of the "none".
   //
   // If we eagerly loaded the images we'd fetch a.png, even though it's not
diff --git a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
index 02014ab..e4bc94b 100644
--- a/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp
@@ -320,7 +320,7 @@
   // We need to create a temporal Font to get xHeight of a primary font.
   // The aspect value is based on the xHeight of the font for the computed font
   // size, so we need to reset the adjustedSize to computedSize. See
-  // FontDescription::effectiveFontSize.
+  // FontDescription::EffectiveFontSize.
   font_description.SetAdjustedSize(font_description.ComputedSize());
 
   Font font(font_description);
diff --git a/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp b/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
index af0d153..b04ed63c 100644
--- a/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/FontBuilderTest.cpp
@@ -60,7 +60,8 @@
 }
 
 // This test verifies that when you are setting some field F via FontBuilder,
-// only F is actually modified on the incoming ComputedStyle::fontDescription.
+// only F is actually modified on the incoming
+// ComputedStyle::GetFontDescription.
 TEST_P(FontBuilderAdditiveTest, OnlySetValueIsModified) {
   FunctionPair funcs = GetParam();
 
diff --git a/third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.cpp b/third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.cpp
index 031aa62d..3222854 100644
--- a/third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/MatchedPropertiesCache.cpp
@@ -130,8 +130,8 @@
       style.Direction() != ComputedStyle::InitialDirection())
     return false;
   // The cache assumes static knowledge about which properties are inherited.
-  // Without a flat tree parent, StyleBuilder::applyProperty will not
-  // setHasExplicitlyInheritedProperties on the parent style.
+  // Without a flat tree parent, StyleBuilder::ApplyProperty will not
+  // SetHasExplicitlyInheritedProperties on the parent style.
   if (!state.ParentNode() || parent_style.HasExplicitlyInheritedProperties())
     return false;
   if (style.HasVariableReferenceFromNonInheritedProperty())
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
index e466983b..b40a2863 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -490,7 +490,7 @@
     //
     // If we wouldn't do this, then we'd need to ensure that display: contents
     // doesn't prevent SVG elements from generating a LayoutObject in
-    // SVGElement::layoutObjectIsNeeded.
+    // SVGElement::LayoutObjectIsNeeded.
     //
     // [1]: https://www.w3.org/TR/SVG/painting.html#DisplayProperty
     if (style.Display() == EDisplay::kContents)
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
index c25dc30..1961ee2 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -570,13 +570,13 @@
                                                         : READ_ONLY);
   // These are designed to match the user-agent stylesheet values for the
   // document element so that the common case doesn't need to create a new
-  // ComputedStyle in Document::inheritHtmlAndBodyElementStyles.
+  // ComputedStyle in Document::InheritHtmlAndBodyElementStyles.
   document_style->SetDisplay(EDisplay::kBlock);
   document_style->SetPosition(EPosition::kAbsolute);
 
-  // Document::inheritHtmlAndBodyElementStyles will set the final overflow
+  // Document::InheritHtmlAndBodyElementStyles will set the final overflow
   // style values, but they should initially be auto to avoid premature
-  // scrollbar removal in PaintLayerScrollableArea::updateAfterStyleChange.
+  // scrollbar removal in PaintLayerScrollableArea::UpdateAfterStyleChange.
   document_style->SetOverflowX(EOverflow::kAuto);
   document_style->SetOverflowY(EOverflow::kAuto);
 
@@ -1009,7 +1009,7 @@
 }
 
 PassRefPtr<ComputedStyle> StyleResolver::StyleForPage(int page_index) {
-  // m_rootElementStyle will be set to the document style.
+  // root_element_style_ will be set to the document style.
   StyleResolverState state(GetDocument(), GetDocument().documentElement());
 
   RefPtr<ComputedStyle> style = ComputedStyle::Create();
@@ -1224,7 +1224,7 @@
     const ActiveInterpolationsMap& active_interpolations_map) {
   // TODO(alancutter): Don't apply presentation attribute animations here,
   // they should instead apply in
-  // SVGElement::collectStyleForPresentationAttribute().
+  // SVGElement::CollectStyleForPresentationAttribute().
   for (const auto& entry : active_interpolations_map) {
     CSSPropertyID property = entry.key.IsCSSProperty()
                                  ? entry.key.CssProperty()
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.h b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
index 12345fb..6489472 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.h
@@ -139,7 +139,7 @@
   void SetResizedForViewportUnits();
   void ClearResizedForViewportUnits();
 
-  // Exposed for ComputedStyle::isStyleAvilable().
+  // Exposed for ComputedStyle::IsStyleAvailable().
   static ComputedStyle* StyleNotYetAvailable() {
     return style_not_yet_available_;
   }
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp
index d343146..a6e5200e 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.cpp
@@ -38,7 +38,7 @@
     : element_context_(element_context),
       document_(document),
       style_(nullptr),
-      // TODO(jchaffraix): We should make m_parentStyle const
+      // TODO(jchaffraix): We should make parent_style_ const
       // (https://crbug.com/468152)
       parent_style_(const_cast<ComputedStyle*>(parent_style)),
       layout_parent_style_(layout_parent_style),
@@ -52,7 +52,7 @@
   DCHECK(!!parent_style_ == !!layout_parent_style_);
 
   if (!parent_style_) {
-    // TODO(jchaffraix): We should make m_parentStyle const
+    // TODO(jchaffraix): We should make parent_style_ const
     // (https://crbug.com/468152)
     parent_style_ = const_cast<ComputedStyle*>(element_context_.ParentStyle());
   }
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
index 02a72da..0c88ce9 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
@@ -221,15 +221,15 @@
   ElementResolveContext element_context_;
   Member<Document> document_;
 
-  // m_style is the primary output for each element's style resolve.
+  // style_ is the primary output for each element's style resolve.
   RefPtr<ComputedStyle> style_;
 
   CSSToLengthConversionData css_to_length_conversion_data_;
 
-  // m_parentStyle is not always just ElementResolveContext::parentStyle,
+  // parent_style_ is not always just ElementResolveContext::ParentStyle(),
   // so we keep it separate.
   RefPtr<ComputedStyle> parent_style_;
-  // This will almost-always be the same that m_parentStyle, except in the
+  // This will almost-always be the same that parent_style_, except in the
   // presence of display: contents. This is the style against which we have to
   // do adjustment.
   RefPtr<const ComputedStyle> layout_parent_style_;
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
index 1055d876..57512ea 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -263,6 +263,10 @@
   return offset;
 }
 
+Element* RootEditableElementOfSelection(const FrameSelection& selection) {
+  return RootEditableElementOf(selection.GetSelectionInDOMTree().Base());
+}
+
 }  // anonymous namespace
 
 InputMethodController* InputMethodController::Create(LocalFrame& frame) {
@@ -1019,10 +1023,7 @@
     // plugins/mouse-capture-inside-shadow.html reaches here.
     return info;
   }
-  Element* element = GetFrame()
-                         .Selection()
-                         .ComputeVisibleSelectionInDOMTreeDeprecated()
-                         .RootEditableElement();
+  Element* element = RootEditableElementOfSelection(GetFrame().Selection());
   if (!element)
     return info;
 
@@ -1172,10 +1173,7 @@
   // It's important to preserve the equivalence of textInputInfo().type and
   // textInputType(), so perform the same rootEditableElement() existence check
   // here for consistency.
-  if (!GetFrame()
-           .Selection()
-           .ComputeVisibleSelectionInDOMTreeDeprecated()
-           .RootEditableElement())
+  if (!RootEditableElementOfSelection(GetFrame().Selection()))
     return kWebTextInputTypeNone;
 
   if (!IsAvailable())
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
index 20ec7f3..8025ec3 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.cpp
@@ -964,18 +964,17 @@
   image_->SetPremultiplied(parsed_options.premultiply_alpha);
 }
 
-ImageBitmap::ImageBitmap(PassRefPtr<StaticBitmapImage> image,
+ImageBitmap::ImageBitmap(RefPtr<StaticBitmapImage> image,
                          Optional<IntRect> crop_rect,
                          const ImageBitmapOptions& options) {
   bool origin_clean = image->OriginClean();
-  RefPtr<Image> input = image;
   ParsedOptions parsed_options =
-      ParseOptions(options, crop_rect, input->size());
+      ParseOptions(options, crop_rect, image->size());
   if (DstBufferSizeHasOverflow(parsed_options))
     return;
 
   image_ = CropImageAndApplyColorSpaceConversion(
-      input.Get(), parsed_options, kPremultiplyAlpha,
+      image.Get(), parsed_options, kPremultiplyAlpha,
       ColorBehavior::TransformToGlobalTarget());
   if (!image_)
     return;
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmap.h b/third_party/WebKit/Source/core/frame/ImageBitmap.h
index 54ea1b1..b2c6f5b 100644
--- a/third_party/WebKit/Source/core/frame/ImageBitmap.h
+++ b/third_party/WebKit/Source/core/frame/ImageBitmap.h
@@ -151,7 +151,7 @@
   ImageBitmap(ImageData*, Optional<IntRect>, const ImageBitmapOptions&);
   ImageBitmap(ImageBitmap*, Optional<IntRect>, const ImageBitmapOptions&);
   ImageBitmap(PassRefPtr<StaticBitmapImage>);
-  ImageBitmap(PassRefPtr<StaticBitmapImage>,
+  ImageBitmap(RefPtr<StaticBitmapImage>,
               Optional<IntRect>,
               const ImageBitmapOptions&);
   ImageBitmap(const void* pixel_data,
diff --git a/third_party/WebKit/Source/core/html/media/MediaControls.h b/third_party/WebKit/Source/core/html/media/MediaControls.h
index 7786d956..42776090 100644
--- a/third_party/WebKit/Source/core/html/media/MediaControls.h
+++ b/third_party/WebKit/Source/core/html/media/MediaControls.h
@@ -82,7 +82,6 @@
   virtual void DisableShowingTextTracks() = 0;
   virtual void EnterFullscreen() = 0;
   virtual void ExitFullscreen() = 0;
-  virtual void ShowOverlayCastButtonIfNeeded() = 0;
   virtual void ToggleOverflowMenu() = 0;
   virtual bool OverflowMenuVisible() = 0;
   virtual void OnMediaControlsEnabledChange() = 0;
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
index 43d3719..117b283 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.cpp
@@ -241,103 +241,6 @@
 
 // ----------------------------
 
-MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement(
-    MediaControls& media_controls)
-    // Mapping onto same MediaControlElementType as panel element, since it has
-    // similar properties.
-    : MediaControlDivElement(media_controls, kMediaControlsPanel) {}
-
-MediaControlPanelEnclosureElement* MediaControlPanelEnclosureElement::Create(
-    MediaControls& media_controls) {
-  MediaControlPanelEnclosureElement* enclosure =
-      new MediaControlPanelEnclosureElement(media_controls);
-  enclosure->SetShadowPseudoId(
-      AtomicString("-webkit-media-controls-enclosure"));
-  return enclosure;
-}
-
-// ----------------------------
-
-MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement(
-    MediaControls& media_controls)
-    // Mapping onto same MediaControlElementType as panel element, since it has
-    // similar properties.
-    : MediaControlDivElement(media_controls, kMediaControlsPanel) {}
-
-MediaControlOverlayEnclosureElement*
-MediaControlOverlayEnclosureElement::Create(MediaControls& media_controls) {
-  MediaControlOverlayEnclosureElement* enclosure =
-      new MediaControlOverlayEnclosureElement(media_controls);
-  enclosure->SetShadowPseudoId(
-      AtomicString("-webkit-media-controls-overlay-enclosure"));
-  return enclosure;
-}
-
-EventDispatchHandlingState*
-MediaControlOverlayEnclosureElement::PreDispatchEventHandler(Event* event) {
-  // When the media element is clicked or touched we want to make the overlay
-  // cast button visible (if the other requirements are right) even if
-  // JavaScript is doing its own handling of the event.  Doing it in
-  // preDispatchEventHandler prevents any interference from JavaScript.
-  // Note that we can't simply test for click, since JS handling of touch events
-  // can prevent their translation to click events.
-  if (event && (event->type() == EventTypeNames::click ||
-                event->type() == EventTypeNames::touchstart))
-    GetMediaControls().ShowOverlayCastButtonIfNeeded();
-  return MediaControlDivElement::PreDispatchEventHandler(event);
-}
-
-// ----------------------------
-
-MediaControlMuteButtonElement::MediaControlMuteButtonElement(
-    MediaControls& media_controls)
-    : MediaControlInputElement(media_controls, kMediaMuteButton) {}
-
-MediaControlMuteButtonElement* MediaControlMuteButtonElement::Create(
-    MediaControls& media_controls) {
-  MediaControlMuteButtonElement* button =
-      new MediaControlMuteButtonElement(media_controls);
-  button->EnsureUserAgentShadowRoot();
-  button->setType(InputTypeNames::button);
-  button->SetShadowPseudoId(AtomicString("-webkit-media-controls-mute-button"));
-  return button;
-}
-
-void MediaControlMuteButtonElement::DefaultEventHandler(Event* event) {
-  if (event->type() == EventTypeNames::click) {
-    if (MediaElement().muted())
-      Platform::Current()->RecordAction(
-          UserMetricsAction("Media.Controls.Unmute"));
-    else
-      Platform::Current()->RecordAction(
-          UserMetricsAction("Media.Controls.Mute"));
-
-    MediaElement().setMuted(!MediaElement().muted());
-    event->SetDefaultHandled();
-  }
-
-  MediaControlInputElement::DefaultEventHandler(event);
-}
-
-void MediaControlMuteButtonElement::UpdateDisplayType() {
-  // TODO(mlamouri): checking for volume == 0 because the mute button will look
-  // 'muted' when the volume is 0 even if the element is not muted. This allows
-  // the painting and the display type to actually match.
-  SetDisplayType((MediaElement().muted() || MediaElement().volume() == 0)
-                     ? kMediaUnMuteButton
-                     : kMediaMuteButton);
-  UpdateOverflowString();
-}
-
-WebLocalizedString::Name
-MediaControlMuteButtonElement::GetOverflowStringName() {
-  if (MediaElement().muted())
-    return WebLocalizedString::kOverflowMenuUnmute;
-  return WebLocalizedString::kOverflowMenuMute;
-}
-
-// ----------------------------
-
 MediaControlPlayButtonElement::MediaControlPlayButtonElement(
     MediaControls& media_controls)
     : MediaControlInputElement(media_controls, kMediaPlayButton) {}
diff --git a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
index 85ee394..537ef46 100644
--- a/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
+++ b/third_party/WebKit/Source/core/html/shadow/MediaControlElements.h
@@ -70,49 +70,6 @@
 
 // ----------------------------
 
-class CORE_EXPORT MediaControlPanelEnclosureElement final
-    : public MediaControlDivElement {
- public:
-  static MediaControlPanelEnclosureElement* Create(MediaControls&);
-
- private:
-  explicit MediaControlPanelEnclosureElement(MediaControls&);
-};
-
-// ----------------------------
-
-class CORE_EXPORT MediaControlOverlayEnclosureElement final
-    : public MediaControlDivElement {
- public:
-  static MediaControlOverlayEnclosureElement* Create(MediaControls&);
-
- private:
-  explicit MediaControlOverlayEnclosureElement(MediaControls&);
-  EventDispatchHandlingState* PreDispatchEventHandler(Event*) override;
-};
-
-// ----------------------------
-
-class CORE_EXPORT MediaControlMuteButtonElement final
-    : public MediaControlInputElement {
- public:
-  static MediaControlMuteButtonElement* Create(MediaControls&);
-
-  bool WillRespondToMouseClickEvents() override { return true; }
-  void UpdateDisplayType() override;
-
-  WebLocalizedString::Name GetOverflowStringName() override;
-
-  bool HasOverflowButton() override { return true; }
-
- private:
-  explicit MediaControlMuteButtonElement(MediaControls&);
-
-  void DefaultEventHandler(Event*) override;
-};
-
-// ----------------------------
-
 class CORE_EXPORT MediaControlPlayButtonElement final
     : public MediaControlInputElement {
  public:
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
index c76c035..bb6009d 100644
--- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -223,36 +223,21 @@
 // Determines WebCachePolicy for a main resource, or WebCachePolicy that is
 // corresponding to FrameLoadType.
 // TODO(toyoshim): Probably, we should split FrameLoadType to WebCachePolicy
-// conversion logic into a separate function once other TODOs in this function
-// are resolved.
+// conversion logic into a separate function.
 WebCachePolicy DetermineWebCachePolicy(RequestMethod method,
                                        RequestType request_type,
                                        ResourceType resource_type,
                                        FrameLoadType load_type) {
   switch (load_type) {
     case kFrameLoadTypeStandard:
+    case kFrameLoadTypeReplaceCurrentItem:
+    case kFrameLoadTypeInitialInChildFrame:
       return (request_type == RequestType::kIsConditional ||
               method == RequestMethod::kIsPost)
                  ? WebCachePolicy::kValidatingCacheData
                  : WebCachePolicy::kUseProtocolCachePolicy;
-    case kFrameLoadTypeReplaceCurrentItem:
-    case kFrameLoadTypeInitialInChildFrame:
-      // TODO(toyoshim): Should be the same with FrameLoadTypeStandard, but
-      // keep legacy logic as is. To be changed in a follow-up patch soon.
-      return (resource_type == ResourceType::kIsMainResource &&
-              (request_type == RequestType::kIsConditional ||
-               method == RequestMethod::kIsPost))
-                 ? WebCachePolicy::kValidatingCacheData
-                 : WebCachePolicy::kUseProtocolCachePolicy;
-    case kFrameLoadTypeInitialHistoryLoad:
-      // TODO(toyoshim): Should be the same with FrameLoadTypeBackForward, but
-      // keep legacy logic as is. To be changed in a follow-up patch soon.
-      return (resource_type == ResourceType::kIsMainResource &&
-              (request_type == RequestType::kIsConditional ||
-               method == RequestMethod::kIsPost))
-                 ? WebCachePolicy::kValidatingCacheData
-                 : WebCachePolicy::kUseProtocolCachePolicy;
     case kFrameLoadTypeBackForward:
+    case kFrameLoadTypeInitialHistoryLoad:
       // Mutates the policy for POST requests to avoid form resubmission.
       return method == RequestMethod::kIsPost
                  ? WebCachePolicy::kReturnCacheDataDontLoad
diff --git a/third_party/WebKit/Source/core/loader/LinkLoader.cpp b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
index 14f38843..48a12d98 100644
--- a/third_party/WebKit/Source/core/loader/LinkLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/LinkLoader.cpp
@@ -201,8 +201,6 @@
     return Resource::kTextTrack;
   } else if (as == "font") {
     return Resource::kFont;
-  } else if (as == "track") {
-    return Resource::kTextTrack;
   } else if (as.IsEmpty()) {
     return Resource::kRaw;
   }
diff --git a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
index ee18215..5f85965b 100644
--- a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
@@ -428,7 +428,7 @@
 
 void WorkerThreadableLoader::MainThreadLoaderHolder::CreateAndStart(
     WorkerThreadableLoader* worker_loader,
-    PassRefPtr<WorkerLoaderProxy> pass_loader_proxy,
+    RefPtr<WorkerLoaderProxy> loader_proxy,
     WorkerThreadLifecycleContext* worker_thread_lifecycle_context,
     std::unique_ptr<CrossThreadResourceRequestData> request,
     const ThreadableLoaderOptions& options,
@@ -436,7 +436,6 @@
     PassRefPtr<WaitableEventWithTasks> event_with_tasks) {
   DCHECK(IsMainThread());
   TaskForwarder* forwarder;
-  RefPtr<WorkerLoaderProxy> loader_proxy = pass_loader_proxy;
   ThreadableLoadingContext* loading_context =
       loader_proxy->GetThreadableLoadingContext();
   if (!loading_context)
@@ -444,7 +443,7 @@
   if (event_with_tasks)
     forwarder = new SyncTaskForwarder(std::move(event_with_tasks));
   else
-    forwarder = new AsyncTaskForwarder(loader_proxy);
+    forwarder = new AsyncTaskForwarder(std::move(loader_proxy));
 
   MainThreadLoaderHolder* main_thread_loader_holder =
       new MainThreadLoaderHolder(forwarder, worker_thread_lifecycle_context);
diff --git a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
index 323fa3d..0f902f1 100644
--- a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
+++ b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
@@ -141,7 +141,7 @@
 
    public:
     static void CreateAndStart(WorkerThreadableLoader*,
-                               PassRefPtr<WorkerLoaderProxy>,
+                               RefPtr<WorkerLoaderProxy>,
                                WorkerThreadLifecycleContext*,
                                std::unique_ptr<CrossThreadResourceRequestData>,
                                const ThreadableLoaderOptions&,
diff --git a/third_party/WebKit/Source/core/style/BasicShapes.cpp b/third_party/WebKit/Source/core/style/BasicShapes.cpp
index 09eb46c..969e66bc 100644
--- a/third_party/WebKit/Source/core/style/BasicShapes.cpp
+++ b/third_party/WebKit/Source/core/style/BasicShapes.cpp
@@ -91,7 +91,7 @@
     return std::min(std::min(std::abs(center.X()), width_delta),
                     std::min(std::abs(center.Y()), height_delta));
 
-  // If radius.type() == BasicShapeRadius::FarthestSide.
+  // If radius.type() == BasicShapeRadius::kFarthestSide.
   return std::max(std::max(center.X(), width_delta),
                   std::max(center.Y(), height_delta));
 }
diff --git a/third_party/WebKit/Source/core/style/CachedUAStyle.h b/third_party/WebKit/Source/core/style/CachedUAStyle.h
index 905cbc1..8c0c05c2 100644
--- a/third_party/WebKit/Source/core/style/CachedUAStyle.h
+++ b/third_party/WebKit/Source/core/style/CachedUAStyle.h
@@ -31,10 +31,10 @@
 
 namespace blink {
 
-// LayoutTheme::adjustStyle wants the background and borders
+// LayoutTheme::AdjustStyle wants the background and borders
 // as specified by the UA sheets, excluding any author rules.
 // We use this class to cache those values during
-// applyMatchedProperties for later use during adjustComputedStyle.
+// ApplyMatchedProperties for later use during AdjustComputedStyle.
 class CachedUAStyle {
   USING_FAST_MALLOC(CachedUAStyle);
   WTF_MAKE_NONCOPYABLE(CachedUAStyle);
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
index 907fab89..10216fb 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -510,7 +510,7 @@
 
 StyleDifference ComputedStyle::VisualInvalidationDiff(
     const ComputedStyle& other) const {
-  // Note, we use .get() on each DataRef below because DataRef::operator== will
+  // Note, we use .Get() on each DataRef below because DataRef::operator== will
   // do a deep compare, which is duplicate work when we're going to compare each
   // property inside this function anyway.
 
@@ -605,7 +605,7 @@
     const ComputedStyle& other) const {
   // FIXME: Not all cases in this method need both full layout and paint
   // invalidation.
-  // Should move cases into diffNeedsFullLayout() if
+  // Should move cases into DiffNeedsFullLayout() if
   // - don't need paint invalidation at all;
   // - or the layoutObject knows how to exactly invalidate paints caused by the
   //   layout change instead of forced full paint invalidation.
@@ -835,7 +835,7 @@
     return true;
 
   // Movement of non-static-positioned object is special cased in
-  // ComputedStyle::visualInvalidationDiff().
+  // ComputedStyle::VisualInvalidationDiff().
 
   return false;
 }
@@ -976,8 +976,8 @@
     return true;
 
   for (CSSPropertyID property_id : *value->NativeInvalidationProperties()) {
-    // TODO(ikilpatrick): remove isInterpolableProperty check once
-    // CSSPropertyEquality::propertiesEqual correctly handles all properties.
+    // TODO(ikilpatrick): remove IsInterpolableProperty check once
+    // CSSPropertyEquality::PropertiesEqual correctly handles all properties.
     if (!CSSPropertyMetadata::IsInterpolableProperty(property_id) ||
         !CSSPropertyEquality::PropertiesEqual(property_id, *this, other))
       return true;
@@ -1183,8 +1183,8 @@
 
   // Force a stacking context for transform-style: preserve-3d. This happens
   // even if preserves-3d is ignored due to a 'grouping property' being present
-  // which requires flattening. See ComputedStyle::usedTransformStyle3D() and
-  // ComputedStyle::hasGroupingProperty().
+  // which requires flattening. See ComputedStyle::UsedTransformStyle3D() and
+  // ComputedStyle::HasGroupingProperty().
   // This is legacy behavior that is left ambiguous in the official specs.
   // See crbug.com/663650 for more details."
   if (TransformStyle3D() == kTransformStyle3DPreserve3D) {
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index f685e133..1253de4 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -3281,7 +3281,7 @@
   // 'z-index: 0'.  The difference of them from normal stacking contexts is that
   // they don't determine the stacking of the elements underneath them.  (Note:
   // There are also other elements treated as stacking context during painting,
-  // but not managed in stacks. See ObjectPainter::paintAllPhasesAtomically().)
+  // but not managed in stacks. See ObjectPainter::PaintAllPhasesAtomically().)
   void UpdateIsStackingContext(bool is_document_element, bool is_in_top_layer);
   bool IsStacked() const {
     return IsStackingContext() || GetPosition() != EPosition::kStatic;
@@ -3294,9 +3294,9 @@
   bool HasUniquePseudoStyle() const;
   bool HasPseudoElementStyle() const;
 
-  // Note: canContainAbsolutePositionObjects should return true if
-  // canContainFixedPositionObjects.  We currently never use this value
-  // directly, always OR'ing it with canContainFixedPositionObjects.
+  // Note: CanContainAbsolutePositionObjects should return true if
+  // CanContainFixedPositionObjects.  We currently never use this value
+  // directly, always OR'ing it with CanContainFixedPositionObjects.
   bool CanContainAbsolutePositionObjects() const {
     return GetPosition() != EPosition::kStatic;
   }
@@ -3510,7 +3510,7 @@
   }
 
   // Color accessors are all private to make sure callers use
-  // visitedDependentColor instead to access them.
+  // VisitedDependentColor instead to access them.
   StyleColor BorderLeftColor() const {
     return surround_->border_.Left().GetColor();
   }
diff --git a/third_party/WebKit/Source/core/style/FilterOperation.h b/third_party/WebKit/Source/core/style/FilterOperation.h
index 8af0424d..df1b27f 100644
--- a/third_party/WebKit/Source/core/style/FilterOperation.h
+++ b/third_party/WebKit/Source/core/style/FilterOperation.h
@@ -110,7 +110,7 @@
 
   // Maps "forward" to determine which pixels in a destination rect are
   // affected by pixels in the source rect.
-  // See also FilterEffect::mapRect.
+  // See also FilterEffect::MapRect.
   virtual FloatRect MapRect(const FloatRect& rect) const { return rect; }
 
  protected:
diff --git a/third_party/WebKit/Source/core/style/FilterOperations.h b/third_party/WebKit/Source/core/style/FilterOperations.h
index 93e38f4..6782894 100644
--- a/third_party/WebKit/Source/core/style/FilterOperations.h
+++ b/third_party/WebKit/Source/core/style/FilterOperations.h
@@ -63,7 +63,7 @@
 
   // Maps "forward" to determine which pixels in a destination rect are
   // affected by pixels in the source rect.
-  // See also FilterEffect::mapRect.
+  // See also FilterEffect::MapRect.
   FloatRect MapRect(const FloatRect&) const;
 
   bool HasFilterThatAffectsOpacity() const;
diff --git a/third_party/WebKit/Source/core/style/GridArea.h b/third_party/WebKit/Source/core/style/GridArea.h
index cc86287..5876344 100644
--- a/third_party/WebKit/Source/core/style/GridArea.h
+++ b/third_party/WebKit/Source/core/style/GridArea.h
@@ -47,8 +47,8 @@
 // efficient one memory-wise.
 const int kGridMaxTracks = 1000;
 
-// A span in a single direction (either rows or columns). Note that |startLine|
-// and |endLine| are grid lines' indexes.
+// A span in a single direction (either rows or columns). Note that |start_line|
+// and |end_line| are grid lines' indexes.
 // Despite line numbers in the spec start in "1", the indexes here start in "0".
 struct GridSpan {
   USING_FAST_MALLOC(GridSpan);
diff --git a/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h b/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h
index a238136..cf2674b 100644
--- a/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h
+++ b/third_party/WebKit/Source/core/style/StyleRareNonInheritedData.h
@@ -64,8 +64,8 @@
 class StyleWillChangeData;
 
 // Page size type.
-// StyleRareNonInheritedData::m_pageSize is meaningful only when
-// StyleRareNonInheritedData::m_pageSizeType is PAGE_SIZE_RESOLVED.
+// StyleRareNonInheritedData::page_size_ is meaningful only when
+// StyleRareNonInheritedData::page_size_type_ is PAGE_SIZE_RESOLVED.
 enum PageSizeType {
   PAGE_SIZE_AUTO,            // size: auto
   PAGE_SIZE_AUTO_LANDSCAPE,  // size: landscape
diff --git a/third_party/WebKit/Source/modules/DEPS b/third_party/WebKit/Source/modules/DEPS
index 9f2ddf77..597a641 100644
--- a/third_party/WebKit/Source/modules/DEPS
+++ b/third_party/WebKit/Source/modules/DEPS
@@ -5,4 +5,7 @@
     "+platform",
     "+public/platform",
     "-web",
+
+    # Use platform/wtf/ now (see crbug.com/691465).
+    "-wtf/",
 ]
diff --git a/third_party/WebKit/Source/modules/EventModulesFactory.h b/third_party/WebKit/Source/modules/EventModulesFactory.h
index 835634e..21f1bf3 100644
--- a/third_party/WebKit/Source/modules/EventModulesFactory.h
+++ b/third_party/WebKit/Source/modules/EventModulesFactory.h
@@ -5,12 +5,12 @@
 #ifndef EventModulesFactory_h
 #define EventModulesFactory_h
 
+#include <memory>
 #include "core/events/EventFactory.h"
 #include "platform/heap/Handle.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/AtomicString.h"
-#include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/ModulesInitializer.cpp b/third_party/WebKit/Source/modules/ModulesInitializer.cpp
index 50ab74b..983e5ba2 100644
--- a/third_party/WebKit/Source/modules/ModulesInitializer.cpp
+++ b/third_party/WebKit/Source/modules/ModulesInitializer.cpp
@@ -32,8 +32,8 @@
 #include "modules/webgl/WebGL2RenderingContext.h"
 #include "modules/webgl/WebGLRenderingContext.h"
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/InterfaceRegistry.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.h b/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.h
index 9bd1aaa..ccd3b7f9 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXARIAGrid.h
@@ -30,7 +30,7 @@
 #define AXARIAGrid_h
 
 #include "modules/accessibility/AXTable.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
index 25caae96..332861b 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -90,7 +90,7 @@
 #include "platform/geometry/TransformState.h"
 #include "platform/text/PlatformLocale.h"
 #include "platform/text/TextDirection.h"
-#include "wtf/StdLibExtras.h"
+#include "platform/wtf/StdLibExtras.h"
 
 using blink::WebLocalizedString;
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
index cbe8326..66a5f3e4 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.h
@@ -32,7 +32,7 @@
 #include "modules/ModulesExport.h"
 #include "modules/accessibility/AXNodeObject.h"
 #include "platform/geometry/LayoutRect.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.h b/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.h
index c3abd27..0beb09d 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXListBoxOption.h
@@ -31,7 +31,7 @@
 
 #include "core/html/HTMLElement.h"
 #include "modules/accessibility/AXLayoutObject.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
index 9f55cc1..7b06537 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
@@ -70,7 +70,7 @@
 #include "platform/UserGestureIndicator.h"
 #include "platform/text/PlatformLocale.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
index 178ebb9..1a371e9 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
@@ -31,7 +31,7 @@
 
 #include "modules/ModulesExport.h"
 #include "modules/accessibility/AXObject.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
index 85af866..597376b2 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -44,9 +44,9 @@
 #include "modules/accessibility/AXObjectCacheImpl.h"
 #include "platform/UserGestureIndicator.h"
 #include "platform/text/PlatformLocale.h"
-#include "wtf/HashSet.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/StdLibExtras.h"
+#include "platform/wtf/text/WTFString.h"
 
 using blink::WebLocalizedString;
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.h b/third_party/WebKit/Source/modules/accessibility/AXObject.h
index ef68410..a471f6c4 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObject.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXObject.h
@@ -37,8 +37,8 @@
 #include "platform/geometry/FloatQuad.h"
 #include "platform/geometry/LayoutRect.h"
 #include "platform/graphics/Color.h"
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Vector.h"
 
 class SkMatrix44;
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
index 57b0838..1966982a 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp
@@ -79,8 +79,8 @@
 #include "modules/accessibility/AXTableColumn.h"
 #include "modules/accessibility/AXTableHeaderContainer.h"
 #include "modules/accessibility/AXTableRow.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
index d69fd99..c01b3fb 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.h
@@ -29,13 +29,13 @@
 #ifndef AXObjectCacheImpl_h
 #define AXObjectCacheImpl_h
 
+#include <memory>
 #include "core/dom/AXObjectCache.h"
 #include "modules/ModulesExport.h"
 #include "modules/accessibility/AXObject.h"
-#include "wtf/Forward.h"
-#include "wtf/HashMap.h"
-#include "wtf/HashSet.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/HashSet.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp b/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp
index 75f3a9c..0935500 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp
+++ b/third_party/WebKit/Source/modules/accessibility/AXProgressIndicator.cpp
@@ -23,7 +23,7 @@
 #include "core/html/HTMLProgressElement.h"
 #include "core/layout/LayoutProgress.h"
 #include "modules/accessibility/AXObjectCacheImpl.h"
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/AXTable.h b/third_party/WebKit/Source/modules/accessibility/AXTable.h
index 85616b2..db12ecfd 100644
--- a/third_party/WebKit/Source/modules/accessibility/AXTable.h
+++ b/third_party/WebKit/Source/modules/accessibility/AXTable.h
@@ -31,7 +31,7 @@
 
 #include "modules/ModulesExport.h"
 #include "modules/accessibility/AXLayoutObject.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/accessibility/testing/InternalsAccessibility.h b/third_party/WebKit/Source/modules/accessibility/testing/InternalsAccessibility.h
index 89b9d14..1e96a770 100644
--- a/third_party/WebKit/Source/modules/accessibility/testing/InternalsAccessibility.h
+++ b/third_party/WebKit/Source/modules/accessibility/testing/InternalsAccessibility.h
@@ -5,7 +5,7 @@
 #ifndef InternalsAccessibility_h
 #define InternalsAccessibility_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp b/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
index 15425f6..2e9de784 100644
--- a/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
+++ b/third_party/WebKit/Source/modules/app_banner/AppBannerController.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/app_banner/AppBannerController.h"
 
+#include <memory>
+#include <utility>
 #include "core/EventTypeNames.h"
 #include "core/dom/Document.h"
 #include "core/frame/DOMWindow.h"
@@ -13,10 +15,8 @@
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/Referrer.h"
 #include "platform/weborigin/SecurityPolicy.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/AtomicString.h"
-#include <memory>
-#include <utility>
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/app_banner/AppBannerController.h b/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
index 91cf931..29aed67 100644
--- a/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
+++ b/third_party/WebKit/Source/modules/app_banner/AppBannerController.h
@@ -7,9 +7,9 @@
 
 #include "modules/ModulesExport.h"
 #include "platform/heap/Persistent.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/modules/app_banner/app_banner.mojom-blink.h"
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/app_banner/AppBannerPromptResult.h b/third_party/WebKit/Source/modules/app_banner/AppBannerPromptResult.h
index 2a2dbe5..fcfbac65 100644
--- a/third_party/WebKit/Source/modules/app_banner/AppBannerPromptResult.h
+++ b/third_party/WebKit/Source/modules/app_banner/AppBannerPromptResult.h
@@ -6,8 +6,8 @@
 #define AppBannerPromptResult_h
 
 #include "bindings/core/v8/ScriptWrappable.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp b/third_party/WebKit/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
index 2ffedd5..ba837db 100644
--- a/third_party/WebKit/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
+++ b/third_party/WebKit/Source/modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/audio_output_devices/HTMLMediaElementAudioOutputDevice.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "core/dom/DOMException.h"
@@ -11,9 +12,8 @@
 #include "core/dom/TaskRunnerHelper.h"
 #include "modules/audio_output_devices/AudioOutputDeviceClient.h"
 #include "modules/audio_output_devices/SetSinkIdCallbacks.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebSecurityOrigin.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/audio_output_devices/SetSinkIdCallbacks.h b/third_party/WebKit/Source/modules/audio_output_devices/SetSinkIdCallbacks.h
index 260ffa1..81e55fa 100644
--- a/third_party/WebKit/Source/modules/audio_output_devices/SetSinkIdCallbacks.h
+++ b/third_party/WebKit/Source/modules/audio_output_devices/SetSinkIdCallbacks.h
@@ -7,10 +7,10 @@
 
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebSetSinkIdCallbacks.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.h
index b34107c..f80684d 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchBridge.h
@@ -9,10 +9,10 @@
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
-#include "wtf/Functional.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.h
index ab8252b..427d8c3 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.h
@@ -8,7 +8,7 @@
 #include "modules/ModulesExport.h"
 #include "modules/background_fetch/BackgroundFetchEvent.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.h
index 2403dc8..8d7cf2bf 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.h
@@ -8,7 +8,7 @@
 #include "modules/ModulesExport.h"
 #include "modules/serviceworkers/ExtendableEvent.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.h
index 076ea21..add4727 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.h
@@ -8,8 +8,8 @@
 #include "modules/ModulesExport.h"
 #include "modules/background_fetch/BackgroundFetchEvent.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/AtomicString.h"
 #include "public/platform/WebVector.h"
-#include "wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h
index 4c0fe525..e6c9996c 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchRegistration.h
@@ -9,8 +9,8 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/GarbageCollected.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
index 5bed3f1..b34ab2dcb 100644
--- a/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
+++ b/third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h
@@ -9,8 +9,8 @@
 #include "modules/ModulesExport.h"
 #include "modules/background_fetch/BackgroundFetchEvent.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/AtomicString.h"
 #include "public/platform/modules/background_fetch/background_fetch.mojom-blink.h"
-#include "wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerGlobalScopeBackgroundFetch.h b/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerGlobalScopeBackgroundFetch.h
index 2982858..b4cb919c 100644
--- a/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerGlobalScopeBackgroundFetch.h
+++ b/third_party/WebKit/Source/modules/background_fetch/ServiceWorkerGlobalScopeBackgroundFetch.h
@@ -6,7 +6,7 @@
 #define ServiceWorkerGlobalScopeBackgroundFetch_h
 
 #include "core/events/EventTarget.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncEvent.h b/third_party/WebKit/Source/modules/background_sync/SyncEvent.h
index 2cfe60c..3c6003d 100644
--- a/third_party/WebKit/Source/modules/background_sync/SyncEvent.h
+++ b/third_party/WebKit/Source/modules/background_sync/SyncEvent.h
@@ -9,8 +9,8 @@
 #include "modules/background_sync/SyncEventInit.h"
 #include "modules/serviceworkers/ExtendableEvent.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncManager.cpp b/third_party/WebKit/Source/modules/background_sync/SyncManager.cpp
index 986ebb1..1f3be19 100644
--- a/third_party/WebKit/Source/modules/background_sync/SyncManager.cpp
+++ b/third_party/WebKit/Source/modules/background_sync/SyncManager.cpp
@@ -13,10 +13,10 @@
 #include "core/dom/ExecutionContext.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
 #include "platform/heap/Persistent.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
-#include "wtf/Functional.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/background_sync/SyncManager.h b/third_party/WebKit/Source/modules/background_sync/SyncManager.h
index 4590c05..36c74da2 100644
--- a/third_party/WebKit/Source/modules/background_sync/SyncManager.h
+++ b/third_party/WebKit/Source/modules/background_sync/SyncManager.h
@@ -7,8 +7,8 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/background_sync/background_sync.mojom-blink.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp b/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
index e9386714..885c0a3a 100644
--- a/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
+++ b/third_party/WebKit/Source/modules/battery/BatteryDispatcher.cpp
@@ -5,10 +5,10 @@
 #include "modules/battery/BatteryDispatcher.h"
 
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/Assertions.h"
 #include "public/platform/Platform.h"
 #include "services/device/public/interfaces/constants.mojom-blink.h"
 #include "services/service_manager/public/cpp/connector.h"
-#include "wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/battery/BatteryManager.cpp b/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
index ce54477..41fbf31 100644
--- a/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
+++ b/third_party/WebKit/Source/modules/battery/BatteryManager.cpp
@@ -8,7 +8,7 @@
 #include "core/dom/Document.h"
 #include "core/events/Event.h"
 #include "modules/battery/BatteryDispatcher.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/battery/battery_status.h b/third_party/WebKit/Source/modules/battery/battery_status.h
index ad9f12e4..8347970 100644
--- a/third_party/WebKit/Source/modules/battery/battery_status.h
+++ b/third_party/WebKit/Source/modules/battery/battery_status.h
@@ -6,7 +6,7 @@
 #define BLINK_MODULES_BATTERY_BATTERY_STATUS_H_
 
 #include "modules/ModulesExport.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 #include <cmath>
 #include <limits>
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
index ee859a6a..d0a484a3 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothDevice.h
@@ -5,14 +5,14 @@
 #ifndef BluetoothDevice_h
 #define BluetoothDevice_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/EventTargetModules.h"
 #include "modules/bluetooth/BluetoothRemoteGATTServer.h"
 #include "platform/heap/Heap.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h
index 0ad83f7..0138b9e 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothError.h
@@ -6,8 +6,8 @@
 #define BluetoothError_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Allocator.h"
 #include "third_party/WebKit/public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
-#include "wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
index 66a3f7b..685ec74 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTCharacteristic.h
@@ -13,8 +13,8 @@
 #include "modules/bluetooth/BluetoothRemoteGATTService.h"
 #include "mojo/public/cpp/bindings/associated_binding_set.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h
index 33e395e..1e7ec665 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTDescriptor.h
@@ -5,6 +5,7 @@
 #ifndef BluetoothRemoteGATTDescriptor_h
 #define BluetoothRemoteGATTDescriptor_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMArrayPiece.h"
 #include "core/dom/DOMDataView.h"
@@ -13,8 +14,7 @@
 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
 #include "modules/bluetooth/BluetoothRemoteGATTService.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
index 7741a04..74f888b 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTServer.h
@@ -11,8 +11,8 @@
 #include "modules/bluetooth/BluetoothDevice.h"
 #include "mojo/public/cpp/bindings/associated_binding_set.h"
 #include "platform/heap/Heap.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
index 4f34ea76..0eb391f 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/bluetooth/BluetoothRemoteGATTService.h"
 
+#include <utility>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/DOMException.h"
@@ -13,8 +14,7 @@
 #include "modules/bluetooth/BluetoothError.h"
 #include "modules/bluetooth/BluetoothRemoteGATTCharacteristic.h"
 #include "modules/bluetooth/BluetoothUUID.h"
-#include "wtf/PtrUtil.h"
-#include <utility>
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.h
index 7202731..c012e371 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTService.h
@@ -5,14 +5,14 @@
 #ifndef BluetoothRemoteGATTService_h
 #define BluetoothRemoteGATTService_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "bindings/modules/v8/StringOrUnsignedLong.h"
 #include "modules/bluetooth/BluetoothDevice.h"
 #include "platform/heap/Handle.h"
 #include "platform/heap/Heap.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/bluetooth/web_bluetooth.mojom-blink.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.h b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.h
index 03c365e..a3e892c 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.h
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothRemoteGATTUtils.h
@@ -6,7 +6,7 @@
 #define BluetoothRemoteGATTUtils_h
 
 #include "core/dom/DOMDataView.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp b/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
index 2d17801f..497b1c1a5 100644
--- a/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
+++ b/third_party/WebKit/Source/modules/bluetooth/BluetoothUUID.cpp
@@ -7,10 +7,10 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "platform/UUID.h"
-#include "wtf/HashMap.h"
-#include "wtf/HexNumber.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/HexNumber.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
index ed68f9b..027148f 100644
--- a/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
+++ b/third_party/WebKit/Source/modules/broadcastchannel/BroadcastChannel.cpp
@@ -9,9 +9,9 @@
 #include "core/events/EventQueue.h"
 #include "core/events/MessageEvent.h"
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h b/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
index f0826b1..ccc12fd5 100644
--- a/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
+++ b/third_party/WebKit/Source/modules/budget/WorkerNavigatorBudget.h
@@ -8,7 +8,7 @@
 #include "core/workers/WorkerNavigator.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/GarbageCollected.h"
-#include "wtf/Noncopyable.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/Cache.h b/third_party/WebKit/Source/modules/cachestorage/Cache.h
index 7cf7398..b17782e 100644
--- a/third_party/WebKit/Source/modules/cachestorage/Cache.h
+++ b/third_party/WebKit/Source/modules/cachestorage/Cache.h
@@ -5,18 +5,18 @@
 #ifndef Cache_h
 #define Cache_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/ModulesExport.h"
 #include "modules/cachestorage/CacheQueryOptions.h"
 #include "modules/fetch/GlobalFetch.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
index 81a1719..1c51dc5 100644
--- a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/cachestorage/CacheStorage.h"
 
+#include <memory>
+#include <utility>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "core/dom/DOMException.h"
@@ -12,11 +14,9 @@
 #include "modules/cachestorage/CacheStorageError.h"
 #include "modules/fetch/Request.h"
 #include "modules/fetch/Response.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
-#include <utility>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.h b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.h
index c22b24f1..f8b4101 100644
--- a/third_party/WebKit/Source/modules/cachestorage/CacheStorage.h
+++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorage.h
@@ -5,17 +5,17 @@
 #ifndef CacheStorage_h
 #define CacheStorage_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/cachestorage/Cache.h"
 #include "modules/cachestorage/CacheQueryOptions.h"
 #include "modules/fetch/GlobalFetch.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h"
-#include "wtf/Forward.h"
-#include "wtf/HashMap.h"
-#include "wtf/Noncopyable.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheStorageError.h b/third_party/WebKit/Source/modules/cachestorage/CacheStorageError.h
index e2900d52..7a2e43c 100644
--- a/third_party/WebKit/Source/modules/cachestorage/CacheStorageError.h
+++ b/third_party/WebKit/Source/modules/cachestorage/CacheStorageError.h
@@ -5,9 +5,9 @@
 #ifndef CacheStorageError_h
 #define CacheStorageError_h
 
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheError.h"
-#include "wtf/Allocator.h"
-#include "wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp b/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp
index 583d9056..f1cd996 100644
--- a/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/CacheTest.cpp
@@ -4,6 +4,9 @@
 
 #include "modules/cachestorage/Cache.h"
 
+#include <algorithm>
+#include <memory>
+#include <string>
 #include "bindings/core/v8/ExceptionState.h"
 #include "bindings/core/v8/ScriptFunction.h"
 #include "bindings/core/v8/ScriptPromise.h"
@@ -21,13 +24,10 @@
 #include "modules/fetch/Request.h"
 #include "modules/fetch/Response.h"
 #include "modules/fetch/ResponseInit.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebURLResponse.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerCache.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
-#include <memory>
-#include <string>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/GlobalCacheStorage.h b/third_party/WebKit/Source/modules/cachestorage/GlobalCacheStorage.h
index 34ecddc..5cb4f3fe 100644
--- a/third_party/WebKit/Source/modules/cachestorage/GlobalCacheStorage.h
+++ b/third_party/WebKit/Source/modules/cachestorage/GlobalCacheStorage.h
@@ -5,7 +5,7 @@
 #ifndef GlobalCacheStorage_h
 #define GlobalCacheStorage_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp b/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
index 569d9d7..6e44efa 100644
--- a/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
+++ b/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.cpp
@@ -4,9 +4,19 @@
 
 #include "modules/cachestorage/InspectorCacheStorageAgent.h"
 
+#include <algorithm>
+#include <memory>
+#include <utility>
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/RefCounted.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/StringBuilder.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebSecurityOrigin.h"
 #include "public/platform/WebString.h"
@@ -17,16 +27,6 @@
 #include "public/platform/modules/serviceworker/WebServiceWorkerCacheStorage.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/StringBuilder.h"
-#include <algorithm>
-#include <memory>
-#include <utility>
 
 using blink::protocol::Array;
 using blink::protocol::CacheStorage::Cache;
diff --git a/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.h b/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.h
index d4cfbf9..969cf0ff 100644
--- a/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.h
+++ b/third_party/WebKit/Source/modules/cachestorage/InspectorCacheStorageAgent.h
@@ -8,7 +8,7 @@
 #include "core/inspector/InspectorBaseAgent.h"
 #include "core/inspector/protocol/CacheStorage.h"
 #include "modules/ModulesExport.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
index 2bc6a38..e8d9d5ab 100644
--- a/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
+++ b/third_party/WebKit/Source/modules/canvas/HTMLCanvasElementModule.h
@@ -7,7 +7,7 @@
 
 #include "core/html/HTMLCanvasElement.h"
 #include "modules/ModulesExport.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.h b/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.h
index 58c7160..a4ecfce 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.h
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasGradient.h
@@ -31,7 +31,7 @@
 #include "modules/ModulesExport.h"
 #include "platform/graphics/Gradient.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasPathMethods.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasPathMethods.cpp
index 87aef84..d01801b 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasPathMethods.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasPathMethods.cpp
@@ -39,7 +39,7 @@
 #include "core/dom/ExceptionCode.h"
 #include "platform/geometry/FloatRect.h"
 #include "platform/transforms/AffineTransform.h"
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.cpp
index 47e645a..6f9c755 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.cpp
@@ -27,7 +27,7 @@
 
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.h b/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.h
index c79d715..b62b1e6 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.h
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasPattern.h
@@ -29,7 +29,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/svg/SVGMatrixTearOff.h"
 #include "platform/graphics/Pattern.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
index 3f30acc3..1395cf4 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -62,11 +62,11 @@
 #include "platform/graphics/paint/PaintFlags.h"
 #include "platform/graphics/skia/SkiaUtils.h"
 #include "platform/text/BidiTextRun.h"
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/typed_arrays/ArrayBufferContents.h"
 #include "public/platform/Platform.h"
 #include "third_party/skia/include/core/SkImageFilter.h"
-#include "wtf/MathExtras.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/typed_arrays/ArrayBufferContents.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
index 93b0fc7b..2a9ff71 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h
@@ -39,9 +39,9 @@
 #include "modules/canvas2d/CanvasRenderingContext2DState.h"
 #include "platform/graphics/GraphicsTypes.h"
 #include "platform/heap/GarbageCollected.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebThread.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 class WebLayer;
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h
index 59938d1..0ad9baed 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h
@@ -10,8 +10,8 @@
 #include "platform/fonts/Font.h"
 #include "platform/graphics/paint/PaintFlags.h"
 #include "platform/transforms/AffineTransform.h"
+#include "platform/wtf/Vector.h"
 #include "third_party/skia/include/core/SkRefCnt.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
index e7e93bf..32d3a1a 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
@@ -26,12 +26,12 @@
 #include "platform/graphics/test/FakeGLES2Interface.h"
 #include "platform/graphics/test/FakeWebGraphicsContext3DProvider.h"
 #include "platform/loader/fetch/MemoryCache.h"
+#include "platform/wtf/PtrUtil.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/skia/include/core/SkColorSpaceXform.h"
 #include "third_party/skia/include/core/SkImage.h"
 #include "third_party/skia/include/core/SkSurface.h"
-#include "wtf/PtrUtil.h"
 
 using ::testing::Mock;
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
index 8b260e78..b19b158 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.cpp
@@ -37,8 +37,8 @@
 #include "modules/canvas2d/CanvasPattern.h"
 #include "platform/graphics/paint/PaintFlags.h"
 #include "platform/graphics/skia/SkiaUtils.h"
+#include "platform/wtf/PassRefPtr.h"
 #include "third_party/skia/include/core/SkShader.h"
-#include "wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.h b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.h
index ccbf0d7..434e2451 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.h
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasStyle.h
@@ -30,8 +30,8 @@
 #include "platform/graphics/Color.h"
 #include "platform/graphics/paint/PaintFlags.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/ClipList.h b/third_party/WebKit/Source/modules/canvas2d/ClipList.h
index ec9cb10..7e67233 100644
--- a/third_party/WebKit/Source/modules/canvas2d/ClipList.h
+++ b/third_party/WebKit/Source/modules/canvas2d/ClipList.h
@@ -7,8 +7,8 @@
 
 #include "platform/graphics/GraphicsTypes.h"
 #include "platform/graphics/paint/PaintCanvas.h"
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
 
 class SkPath;
 
diff --git a/third_party/WebKit/Source/modules/canvas2d/HitRegion.h b/third_party/WebKit/Source/modules/canvas2d/HitRegion.h
index cc235a4..2da98e5b 100644
--- a/third_party/WebKit/Source/modules/canvas2d/HitRegion.h
+++ b/third_party/WebKit/Source/modules/canvas2d/HitRegion.h
@@ -9,9 +9,9 @@
 #include "modules/canvas2d/HitRegionOptions.h"
 #include "platform/graphics/Path.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.cpp b/third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.cpp
index e5710e0e..b9d4099 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AbstractAnimationWorkletThread.cpp
@@ -4,14 +4,14 @@
 
 #include "modules/compositorworker/AbstractAnimationWorkletThread.h"
 
+#include <memory>
 #include "core/workers/WorkerBackingThread.h"
 #include "core/workers/WorkletThreadHolder.h"
 #include "platform/CrossThreadFunctional.h"
 #include "platform/WebThreadSupportingGC.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
-#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
index 5a64f36..be3f822 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletMessagingProxy.h
@@ -5,10 +5,10 @@
 #ifndef AnimationWorkletMessagingProxy_h
 #define AnimationWorkletMessagingProxy_h
 
+#include <memory>
 #include "core/dom/AnimationWorkletProxyClient.h"
 #include "core/workers/ThreadedWorkletMessagingProxy.h"
-#include "wtf/Allocator.h"
-#include <memory>
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp
index 8a5b74ad..f659116 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThread.cpp
@@ -8,7 +8,7 @@
 #include "modules/compositorworker/AnimationWorkletGlobalScope.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
 #include "platform/weborigin/SecurityOrigin.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
index ccc70f2..441a0fe 100644
--- a/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/AnimationWorkletThreadTest.cpp
@@ -23,10 +23,10 @@
 #include "platform/heap/Handle.h"
 #include "platform/testing/TestingPlatformSupport.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebAddressSpace.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.h b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.h
index 753b6843..726b864 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.h
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorker.h
@@ -7,8 +7,8 @@
 
 #include "core/workers/InProcessWorkerBase.h"
 #include "modules/ModulesExport.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
index 4a683a9..ffe4cc89 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerGlobalScope.cpp
@@ -12,7 +12,7 @@
 #include "core/workers/WorkerThreadStartupData.h"
 #include "modules/EventTargetModules.h"
 #include "modules/compositorworker/CompositorWorkerThread.h"
-#include "wtf/AutoReset.h"
+#include "platform/wtf/AutoReset.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h
index 42a02fc..8568b3ce 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerMessagingProxy.h
@@ -5,9 +5,9 @@
 #ifndef CompositorWorkerMessagingProxy_h
 #define CompositorWorkerMessagingProxy_h
 
-#include "core/workers/InProcessWorkerMessagingProxy.h"
-#include "wtf/Allocator.h"
 #include <memory>
+#include "core/workers/InProcessWorkerMessagingProxy.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
index f7ae2915..bc363d68 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThread.cpp
@@ -4,12 +4,12 @@
 
 #include "modules/compositorworker/CompositorWorkerThread.h"
 
+#include <memory>
 #include "core/workers/InProcessWorkerObjectProxy.h"
 #include "core/workers/WorkerThreadStartupData.h"
 #include "modules/compositorworker/CompositorWorkerGlobalScope.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
-#include "wtf/Assertions.h"
-#include <memory>
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
index fba086b..872a2d9 100644
--- a/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/compositorworker/CompositorWorkerThreadTest.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/compositorworker/CompositorWorkerThread.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptSourceCode.h"
 #include "bindings/core/v8/SourceLocation.h"
 #include "bindings/core/v8/V8GCController.h"
@@ -22,11 +23,10 @@
 #include "platform/heap/Handle.h"
 #include "platform/testing/TestingPlatformSupport.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebAddressSpace.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
index 2592a9e..209a51e 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/CredentialsContainer.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/credentialmanager/CredentialsContainer.h"
 
+#include <memory>
 #include "bindings/core/v8/Dictionary.h"
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
@@ -21,14 +22,13 @@
 #include "modules/credentialmanager/FederatedCredentialRequestOptions.h"
 #include "modules/credentialmanager/PasswordCredential.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebCredential.h"
 #include "public/platform/WebCredentialManagerClient.h"
 #include "public/platform/WebCredentialManagerError.h"
 #include "public/platform/WebFederatedCredential.h"
 #include "public/platform/WebPasswordCredential.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/credentialmanager/PasswordCredentialTest.cpp b/third_party/WebKit/Source/modules/credentialmanager/PasswordCredentialTest.cpp
index a83834e..0212cf0c 100644
--- a/third_party/WebKit/Source/modules/credentialmanager/PasswordCredentialTest.cpp
+++ b/third_party/WebKit/Source/modules/credentialmanager/PasswordCredentialTest.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/credentialmanager/PasswordCredential.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/Document.h"
 #include "core/dom/ExceptionCode.h"
@@ -13,9 +14,8 @@
 #include "core/html/HTMLFormElement.h"
 #include "core/html/forms/FormController.h"
 #include "core/testing/DummyPageHolder.h"
+#include "platform/wtf/text/StringBuilder.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/text/StringBuilder.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.h b/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.h
index 02acb05..e737a47 100644
--- a/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.h
+++ b/third_party/WebKit/Source/modules/crypto/AesKeyAlgorithm.h
@@ -34,7 +34,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/crypto/KeyAlgorithm.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/Crypto.cpp b/third_party/WebKit/Source/modules/crypto/Crypto.cpp
index 96b5e47..483f20e7 100644
--- a/third_party/WebKit/Source/modules/crypto/Crypto.cpp
+++ b/third_party/WebKit/Source/modules/crypto/Crypto.cpp
@@ -31,7 +31,7 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/DOMArrayBufferView.h"
 #include "core/dom/ExceptionCode.h"
-#include "wtf/CryptographicallyRandomNumber.h"
+#include "platform/wtf/CryptographicallyRandomNumber.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/CryptoKey.h b/third_party/WebKit/Source/modules/crypto/CryptoKey.h
index 8849f69..2c05332 100644
--- a/third_party/WebKit/Source/modules/crypto/CryptoKey.h
+++ b/third_party/WebKit/Source/modules/crypto/CryptoKey.h
@@ -35,9 +35,9 @@
 #include "modules/ModulesExport.h"
 #include "modules/crypto/NormalizeAlgorithm.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebCryptoKey.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.cpp b/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.cpp
index bf8332d..db5abe9 100644
--- a/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.cpp
+++ b/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.cpp
@@ -43,9 +43,9 @@
 #include "core/dom/ExecutionContext.h"
 #include "modules/crypto/CryptoKey.h"
 #include "modules/crypto/NormalizeAlgorithm.h"
+#include "platform/wtf/Atomics.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebCryptoAlgorithm.h"
-#include "wtf/Atomics.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.h b/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.h
index 06054e1..112efe6 100644
--- a/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.h
+++ b/third_party/WebKit/Source/modules/crypto/CryptoResultImpl.h
@@ -35,8 +35,8 @@
 #include "core/dom/ExceptionCode.h"
 #include "modules/ModulesExport.h"
 #include "platform/CryptoResult.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebCrypto.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.h b/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.h
index 0ae3778..b5777fe8 100644
--- a/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.h
+++ b/third_party/WebKit/Source/modules/crypto/KeyAlgorithm.h
@@ -33,8 +33,8 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebCryptoKeyAlgorithm.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp b/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp
index a5f1d15..7cd8662 100644
--- a/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp
+++ b/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.cpp
@@ -30,6 +30,8 @@
 
 #include "modules/crypto/NormalizeAlgorithm.h"
 
+#include <algorithm>
+#include <memory>
 #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h"
 #include "bindings/core/v8/Dictionary.h"
 #include "bindings/core/v8/V8ArrayBuffer.h"
@@ -37,14 +39,12 @@
 #include "bindings/modules/v8/V8CryptoKey.h"
 #include "core/dom/DOMArrayPiece.h"
 #include "core/dom/DOMTypedArray.h"
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/StringBuilder.h"
 #include "public/platform/WebCryptoAlgorithmParams.h"
 #include "public/platform/WebString.h"
-#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Vector.h"
-#include "wtf/text/StringBuilder.h"
-#include <algorithm>
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.h b/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.h
index 154a629..76d08b22 100644
--- a/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.h
+++ b/third_party/WebKit/Source/modules/crypto/NormalizeAlgorithm.h
@@ -33,13 +33,13 @@
 
 #include "bindings/modules/v8/DictionaryOrString.h"
 #include "modules/ModulesExport.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Compiler.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebCrypto.h"
 #include "public/platform/WebCryptoAlgorithm.h"
 #include "public/platform/WebString.h"
-#include "wtf/Allocator.h"
-#include "wtf/Assertions.h"
-#include "wtf/Compiler.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
index db4e0814..235e3f4e 100644
--- a/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
+++ b/third_party/WebKit/Source/modules/crypto/SubtleCrypto.h
@@ -37,7 +37,7 @@
 #include "bindings/modules/v8/ArrayBufferOrArrayBufferViewOrDictionary.h"
 #include "bindings/modules/v8/DictionaryOrString.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp
index 537ad50..785911fd 100644
--- a/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp
+++ b/third_party/WebKit/Source/modules/csspaint/CSSPaintDefinition.cpp
@@ -17,7 +17,7 @@
 #include "platform/graphics/ImageBuffer.h"
 #include "platform/graphics/PaintGeneratedImage.h"
 #include "platform/graphics/RecordingImageBufferSurface.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionDispatcher.h b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionDispatcher.h
index 4dfe2a8..97b0f61 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceMotionDispatcher.h
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceMotionDispatcher.h
@@ -33,8 +33,8 @@
 
 #include "core/frame/PlatformEventDispatcher.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/modules/device_orientation/WebDeviceMotionListener.h"
-#include "wtf/RefPtr.h"
 
 namespace device {
 class MotionData;
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
index ab8ca878..10eac3e 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationController.cpp
@@ -13,8 +13,8 @@
 #include "modules/device_orientation/DeviceOrientationDispatcher.h"
 #include "modules/device_orientation/DeviceOrientationEvent.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Assertions.h"
 #include "public/platform/Platform.h"
-#include "wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h
index c560137..587d695 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationDispatcher.h
@@ -33,9 +33,9 @@
 
 #include "core/frame/PlatformEventDispatcher.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebPlatformEventType.h"
 #include "public/platform/modules/device_orientation/WebDeviceOrientationListener.h"
-#include "wtf/RefPtr.h"
 
 namespace device {
 class OrientationData;
diff --git a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
index e7c240740..4fb5629 100644
--- a/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
+++ b/third_party/WebKit/Source/modules/device_orientation/DeviceOrientationInspectorAgent.cpp
@@ -8,7 +8,7 @@
 #include "core/inspector/InspectedFrames.h"
 #include "modules/device_orientation/DeviceOrientationController.h"
 #include "modules/device_orientation/DeviceOrientationData.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.cpp b/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.cpp
index ed11bf5..2e7e5182 100644
--- a/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.cpp
+++ b/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.cpp
@@ -4,6 +4,10 @@
 
 #include "modules/document_metadata/CopylessPasteExtractor.h"
 
+#include <algorithm>
+#include <memory>
+#include <utility>
+
 #include "core/HTMLNames.h"
 #include "core/dom/Document.h"
 #include "core/dom/ElementTraversal.h"
@@ -11,55 +15,291 @@
 #include "core/html/HTMLElement.h"
 #include "platform/Histogram.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/json/JSONParser.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "public/platform/modules/document_metadata/copyless_paste.mojom-blink.h"
 
 namespace blink {
 
 namespace {
 
-String ExtractMetadata(Element& root) {
-  StringBuilder result;
-  result.Append("[");
-  bool multiple = false;
+using mojom::document_metadata::blink::Entity;
+using mojom::document_metadata::blink::EntityPtr;
+using mojom::document_metadata::blink::Property;
+using mojom::document_metadata::blink::PropertyPtr;
+using mojom::document_metadata::blink::Values;
+using mojom::document_metadata::blink::ValuesPtr;
+using mojom::document_metadata::blink::WebPage;
+using mojom::document_metadata::blink::WebPagePtr;
+
+// App Indexing enforces a max nesting depth of 5. Our top level message
+// corresponds to the WebPage, so this only leaves 4 more levels. We will parse
+// entites up to this depth, and ignore any further nesting. If an object at the
+// max nesting depth has a property corresponding to an entity, that property
+// will be dropped. Note that we will still parse json-ld blocks deeper than
+// this, but it won't be passed to App Indexing.
+constexpr int kMaxDepth = 4;
+// Some strings are very long, and we don't currently use those, so limit string
+// length to something reasonable to avoid undue pressure on Icing. Note that
+// App Indexing supports strings up to length 20k.
+constexpr int kMaxStringLength = 200;
+// Enforced by App Indexing, so stop processing early if possible.
+constexpr size_t kMaxNumFields = 20;
+// Enforced by App Indexing, so stop processing early if possible.
+constexpr size_t kMaxRepeatedSize = 100;
+
+constexpr char kJSONLDKeyType[] = "@type";
+constexpr char kJSONLDKeyGraph[] = "@graph";
+bool isWhitelistedType(AtomicString type) {
+  DEFINE_STATIC_LOCAL(HashSet<AtomicString>, elements,
+                      ({// Common types that include addresses.
+                        "AutoDealer", "Hotel", "LocalBusiness", "Organization",
+                        "Person", "Place", "PostalAddress", "Product",
+                        "Residence", "Restaurant", "SingleFamilyResidence",
+                        // Common types including phone numbers
+                        "Store", "ContactPoint", "LodgingBusiness"}));
+  return type && elements.Contains(type);
+}
+
+void extractEntity(const JSONObject&, Entity&, int recursionLevel);
+
+bool parseRepeatedValue(const JSONArray& arr,
+                        Values& values,
+                        int recursionLevel) {
+  if (arr.size() < 1) {
+    return false;
+  }
+
+  const JSONValue::ValueType type = arr.at(0)->GetType();
+  switch (type) {
+    case JSONValue::ValueType::kTypeBoolean:
+      values.set_bool_values(Vector<bool>());
+      break;
+    case JSONValue::ValueType::kTypeInteger:
+      values.set_long_values(Vector<int64_t>());
+      break;
+    case JSONValue::ValueType::kTypeDouble:
+      // App Indexing doesn't support double type, so just encode its decimal
+      // value as a string instead.
+      values.set_string_values(Vector<String>());
+      break;
+    case JSONValue::ValueType::kTypeString:
+      values.set_string_values(Vector<String>());
+      break;
+    case JSONValue::ValueType::kTypeObject:
+      if (recursionLevel + 1 >= kMaxDepth) {
+        return false;
+      }
+      values.set_entity_values(Vector<EntityPtr>());
+      break;
+    case JSONArray::ValueType::kTypeArray:
+      // App Indexing doesn't support nested arrays.
+      return false;
+    default:
+      break;
+  }
+  for (size_t j = 0; j < std::min(arr.size(), kMaxRepeatedSize); ++j) {
+    const JSONValue* innerVal = arr.at(j);
+    if (innerVal->GetType() != type) {
+      // App Indexing doesn't support mixed types. If there are mixed
+      // types in the parsed object, we will drop the property.
+      return false;
+    }
+    switch (innerVal->GetType()) {
+      case JSONValue::ValueType::kTypeBoolean: {
+        bool v;
+        innerVal->AsBoolean(&v);
+        values.get_bool_values().push_back(v);
+      } break;
+      case JSONValue::ValueType::kTypeInteger: {
+        int v;
+        innerVal->AsInteger(&v);
+        values.get_long_values().push_back(v);
+      } break;
+      case JSONValue::ValueType::kTypeDouble: {
+        // App Indexing doesn't support double type, so just encode its decimal
+        // value as a string instead.
+        double v;
+        innerVal->AsDouble(&v);
+        String s = String::Number(v);
+        s.Truncate(kMaxStringLength);
+        values.get_string_values().push_back(s);
+      } break;
+      case JSONValue::ValueType::kTypeString: {
+        String v;
+        innerVal->AsString(&v);
+        v.Truncate(kMaxStringLength);
+        values.get_string_values().push_back(v);
+      } break;
+      case JSONValue::ValueType::kTypeObject:
+        values.get_entity_values().push_back(Entity::New());
+        extractEntity(*(JSONObject::Cast(innerVal)),
+                      *(values.get_entity_values().at(j)), recursionLevel + 1);
+        break;
+      default:
+        break;
+    }
+  }
+  return true;
+}
+
+void extractEntity(const JSONObject& val, Entity& entity, int recursionLevel) {
+  if (recursionLevel >= kMaxDepth) {
+    return;
+  }
+
+  String type;
+  val.GetString(kJSONLDKeyType, &type);
+  if (!type) {
+    type = "Thing";
+  }
+  entity.type = type;
+  for (size_t i = 0; i < std::min(val.size(), kMaxNumFields); ++i) {
+    PropertyPtr property = Property::New();
+    const JSONObject::Entry& entry = val.at(i);
+    property->name = entry.first;
+    if (property->name == kJSONLDKeyType) {
+      continue;
+    }
+    property->values = Values::New();
+
+    bool addProperty = true;
+
+    switch (entry.second->GetType()) {
+      case JSONValue::ValueType::kTypeBoolean: {
+        bool v;
+        val.GetBoolean(entry.first, &v);
+        property->values->set_bool_values({v});
+      } break;
+      case JSONValue::ValueType::kTypeInteger: {
+        int v;
+        val.GetInteger(entry.first, &v);
+        property->values->set_long_values({v});
+      } break;
+      case JSONValue::ValueType::kTypeDouble: {
+        double v;
+        val.GetDouble(entry.first, &v);
+        String s = String::Number(v);
+        s.Truncate(kMaxStringLength);
+        property->values->set_string_values({s});
+      } break;
+      case JSONValue::ValueType::kTypeString: {
+        String v;
+        val.GetString(entry.first, &v);
+        v.Truncate(kMaxStringLength);
+        property->values->set_string_values({v});
+      } break;
+      case JSONValue::ValueType::kTypeObject: {
+        if (recursionLevel + 1 >= kMaxDepth) {
+          addProperty = false;
+          break;
+        }
+        property->values->set_entity_values(Vector<EntityPtr>());
+        property->values->get_entity_values().push_back(Entity::New());
+
+        extractEntity(*(val.GetObject(entry.first)),
+                      *(property->values->get_entity_values().at(0)),
+                      recursionLevel + 1);
+      } break;
+      case JSONValue::ValueType::kTypeArray:
+        addProperty = parseRepeatedValue(*(val.GetArray(entry.first)),
+                                         *(property->values), recursionLevel);
+        break;
+      default:
+        break;
+    }
+    if (addProperty)
+      entity.properties.push_back(std::move(property));
+  }
+}
+
+void extractTopLevelEntity(const JSONObject& val, Vector<EntityPtr>& entities) {
+  // Now we have a JSONObject which corresponds to a single (possibly nested)
+  // entity.
+  EntityPtr entity = Entity::New();
+  String type;
+  val.GetString(kJSONLDKeyType, &type);
+  if (!isWhitelistedType(AtomicString(type))) {
+    return;
+  }
+  extractEntity(val, *entity, 0);
+  entities.push_back(std::move(entity));
+}
+
+void extractEntitiesFromArray(const JSONArray& arr,
+                              Vector<EntityPtr>& entities) {
+  for (size_t i = 0; i < arr.size(); ++i) {
+    const JSONValue* val = arr.at(i);
+    if (val->GetType() == JSONValue::ValueType::kTypeObject) {
+      extractTopLevelEntity(*(JSONObject::Cast(val)), entities);
+    }
+  }
+}
+
+void extractEntityFromTopLevelObject(const JSONObject& val,
+                                     Vector<EntityPtr>& entities) {
+  const JSONArray* graph = val.GetArray(kJSONLDKeyGraph);
+  if (graph) {
+    extractEntitiesFromArray(*graph, entities);
+  }
+  extractTopLevelEntity(val, entities);
+}
+
+bool extractMetadata(const Element& root, Vector<EntityPtr>& entities) {
   for (Element& element : ElementTraversal::DescendantsOf(root)) {
     if (element.HasTagName(HTMLNames::scriptTag) &&
         element.getAttribute(HTMLNames::typeAttr) == "application/ld+json") {
-      if (multiple) {
-        result.Append(",");
+      std::unique_ptr<JSONValue> json = ParseJSON(element.textContent());
+      if (!json) {
+        LOG(ERROR) << "Failed to parse json.";
+        return false;
       }
-      result.Append(element.textContent());
-      multiple = true;
+      switch (json->GetType()) {
+        case JSONValue::ValueType::kTypeArray:
+          extractEntitiesFromArray(*(JSONArray::Cast(json.get())), entities);
+          break;
+        case JSONValue::ValueType::kTypeObject:
+          extractEntityFromTopLevelObject(*(JSONObject::Cast(json.get())),
+                                          entities);
+          break;
+        default:
+          return false;
+      }
     }
   }
-  result.Append("]");
-  return result.ToString();
+  return !entities.IsEmpty();
 }
 
 }  // namespace
 
-String CopylessPasteExtractor::Extract(Document& document) {
+WebPagePtr CopylessPasteExtractor::extract(const Document& document) {
   TRACE_EVENT0("blink", "CopylessPasteExtractor::extract");
 
   if (!document.GetFrame() || !document.GetFrame()->IsMainFrame())
-    return g_empty_string;
-
-  DCHECK(document.HasFinishedParsing());
+    return nullptr;
 
   Element* html = document.documentElement();
   if (!html)
-    return g_empty_string;
+    return nullptr;
 
   double start_time = MonotonicallyIncreasingTime();
 
+  WebPagePtr page = WebPage::New();
+
   // Traverse the DOM tree and extract the metadata.
-  String result = ExtractMetadata(*html);
+  if (!extractMetadata(*html, page->entities))
+    return nullptr;
+  page->url = document.Url();
+  page->title = document.title();
 
   double elapsed_time = MonotonicallyIncreasingTime() - start_time;
 
-  DEFINE_STATIC_LOCAL(CustomCountHistogram, extraction_histogram,
+  DEFINE_STATIC_LOCAL(CustomCountHistogram, extractionHistogram,
                       ("CopylessPaste.ExtractionUs", 1, 1000000, 50));
-  extraction_histogram.Count(static_cast<int>(1e6 * elapsed_time));
-  return result;
+  extractionHistogram.Count(static_cast<int>(1e6 * elapsed_time));
+  return page;
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.h b/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.h
index b31684c..5cb94fe 100644
--- a/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.h
+++ b/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractor.h
@@ -6,7 +6,7 @@
 #define CopylessPasteExtractor_h
 
 #include "modules/ModulesExport.h"
-#include "wtf/text/WTFString.h"
+#include "public/platform/modules/document_metadata/copyless_paste.mojom-blink.h"
 
 namespace blink {
 
@@ -17,7 +17,7 @@
 // has finished parsing.
 class MODULES_EXPORT CopylessPasteExtractor final {
  public:
-  static String Extract(Document&);
+  static mojom::document_metadata::blink::WebPagePtr extract(const Document&);
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractorTest.cpp b/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractorTest.cpp
index 3da4c18..09461b70 100644
--- a/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractorTest.cpp
+++ b/third_party/WebKit/Source/modules/document_metadata/CopylessPasteExtractorTest.cpp
@@ -2,29 +2,34 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "modules/document_metadata/CopylessPasteExtractor.h"
 
 #include <memory>
+#include <string>
+#include <utility>
 #include "core/dom/Document.h"
 #include "core/dom/Element.h"
 #include "core/testing/DummyPageHolder.h"
+#include "modules/document_metadata/CopylessPasteExtractor.h"
+#include "platform/json/JSONValues.h"
+#include "public/platform/modules/document_metadata/copyless_paste.mojom-blink.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/text/StringBuilder.h"
 
 namespace blink {
 
 namespace {
 
+using mojom::document_metadata::blink::Entity;
+using mojom::document_metadata::blink::EntityPtr;
+using mojom::document_metadata::blink::Property;
+using mojom::document_metadata::blink::PropertyPtr;
+using mojom::document_metadata::blink::Values;
+using mojom::document_metadata::blink::ValuesPtr;
+using mojom::document_metadata::blink::WebPage;
+using mojom::document_metadata::blink::WebPagePtr;
+
 class CopylessPasteExtractorTest : public ::testing::Test {
  public:
-  CopylessPasteExtractorTest()
-      : content_(
-            "\n"
-            "\n"
-            "{\"@type\": \"NewsArticle\","
-            "\"headline\": \"Special characters for ya >_<;\"\n"
-            "}\n"
-            "\n") {}
+  CopylessPasteExtractorTest() {}
 
  protected:
   void SetUp() override;
@@ -33,11 +38,25 @@
 
   Document& GetDocument() const { return dummy_page_holder_->GetDocument(); }
 
-  String Extract() { return CopylessPasteExtractor::Extract(GetDocument()); }
+  WebPagePtr Extract() {
+    return CopylessPasteExtractor::extract(GetDocument());
+  }
 
-  void SetHtmlInnerHTML(const String&);
+  void SetHTMLInnerHTML(const String&);
 
-  String content_;
+  void SetURL(const String&);
+
+  void SetTitle(const String&);
+
+  PropertyPtr createStringProperty(const String& name, const String& value);
+
+  PropertyPtr createBooleanProperty(const String& name, const bool& value);
+
+  PropertyPtr createLongProperty(const String& name, const int64_t& value);
+
+  PropertyPtr createEntityProperty(const String& name, EntityPtr value);
+
+  WebPagePtr createWebPage(const String& url, const String& title);
 
  private:
   std::unique_ptr<DummyPageHolder> dummy_page_holder_;
@@ -47,63 +66,769 @@
   dummy_page_holder_ = DummyPageHolder::Create(IntSize(800, 600));
 }
 
-void CopylessPasteExtractorTest::SetHtmlInnerHTML(const String& html_content) {
+void CopylessPasteExtractorTest::SetHTMLInnerHTML(const String& html_content) {
   GetDocument().documentElement()->setInnerHTML((html_content));
 }
 
+void CopylessPasteExtractorTest::SetURL(const String& url) {
+  GetDocument().SetURL(blink::KURL(blink::kParsedURLString, url));
+}
+
+void CopylessPasteExtractorTest::SetTitle(const String& title) {
+  GetDocument().setTitle(title);
+}
+
+PropertyPtr CopylessPasteExtractorTest::createStringProperty(
+    const String& name,
+    const String& value) {
+  PropertyPtr property = Property::New();
+  property->name = name;
+  property->values = Values::New();
+  property->values->set_string_values({value});
+  return property;
+}
+
+PropertyPtr CopylessPasteExtractorTest::createBooleanProperty(
+    const String& name,
+    const bool& value) {
+  PropertyPtr property = Property::New();
+  property->name = name;
+  property->values = Values::New();
+  property->values->set_bool_values({value});
+  return property;
+}
+
+PropertyPtr CopylessPasteExtractorTest::createLongProperty(
+    const String& name,
+    const int64_t& value) {
+  PropertyPtr property = Property::New();
+  property->name = name;
+  property->values = Values::New();
+  property->values->set_long_values({value});
+  return property;
+}
+
+PropertyPtr CopylessPasteExtractorTest::createEntityProperty(const String& name,
+                                                             EntityPtr value) {
+  PropertyPtr property = Property::New();
+  property->name = name;
+  property->values = Values::New();
+  property->values->set_entity_values(Vector<EntityPtr>());
+  property->values->get_entity_values().push_back(std::move(value));
+  return property;
+}
+
+WebPagePtr CopylessPasteExtractorTest::createWebPage(const String& url,
+                                                     const String& title) {
+  WebPagePtr page = WebPage::New();
+  page->url = blink::KURL(blink::kParsedURLString, url);
+  page->title = title;
+  return page;
+}
+
 TEST_F(CopylessPasteExtractorTest, empty) {
-  String extracted = Extract();
-  String expected = "[]";
-  EXPECT_EQ(expected, extracted);
+  ASSERT_TRUE(Extract().is_null());
 }
 
 TEST_F(CopylessPasteExtractorTest, basic) {
-  SetHtmlInnerHTML(
+  SetHTMLInnerHTML(
       "<body>"
-      "<script type=\"application/ld+json\">" +
-      content_ +
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
       "</script>"
       "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
 
-  String extracted = Extract();
-  String expected = "[" + content_ + "]";
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", "Special characters for ya >_<;"));
+
+  expected->entities.push_back(std::move(restaurant));
   EXPECT_EQ(expected, extracted);
 }
 
 TEST_F(CopylessPasteExtractorTest, header) {
-  SetHtmlInnerHTML(
+  SetHTMLInnerHTML(
       "<head>"
-      "<script type=\"application/ld+json\">" +
-      content_ +
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
       "</script>"
       "</head>");
 
-  String extracted = Extract();
-  String expected = "[" + content_ + "]";
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", "Special characters for ya >_<;"));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, booleanValue) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"open\": true"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(createBooleanProperty("open", true));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, longValue) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"long\": 1"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(createLongProperty("long", 1ll));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, doubleValue) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"double\": 1.5"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(createStringProperty("double", "1.5"));
+
+  expected->entities.push_back(std::move(restaurant));
   EXPECT_EQ(expected, extracted);
 }
 
 TEST_F(CopylessPasteExtractorTest, multiple) {
-  SetHtmlInnerHTML(
+  SetHTMLInnerHTML(
       "<head>"
-      "<script type=\"application/ld+json\">" +
-      content_ +
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
       "</script>"
       "</head>"
       "<body>"
-      "<script type=\"application/ld+json\">" +
-      content_ +
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
       "</script>"
-      "<script type=\"application/ld+json\">" +
-      content_ +
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
       "</script>"
       "</body>");
 
-  String extracted = Extract();
-  String expected = "[" + content_ + "," + content_ + "," + content_ + "]";
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  for (int i = 0; i < 3; ++i) {
+    EntityPtr restaurant = Entity::New();
+    restaurant->type = "Restaurant";
+    restaurant->properties.push_back(
+        createStringProperty("name", "Special characters for ya >_<;"));
+
+    expected->entities.push_back(std::move(restaurant));
+  }
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, nested) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Ye ol greasy diner\","
+      "\"address\": {"
+      "\n"
+      "  \"streetAddress\": \"123 Big Oak Road\","
+      "  \"addressLocality\": \"San Francisco\""
+      "  }\n"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", "Ye ol greasy diner"));
+
+  EntityPtr address = Entity::New();
+  address->type = "Thing";
+  address->properties.push_back(
+      createStringProperty("streetAddress", "123 Big Oak Road"));
+  address->properties.push_back(
+      createStringProperty("addressLocality", "San Francisco"));
+
+  restaurant->properties.push_back(
+      createEntityProperty("address", std::move(address)));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, repeated) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": [ \"First name\", \"Second name\" ]"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+
+  PropertyPtr name = Property::New();
+  name->name = "name";
+  name->values = Values::New();
+  Vector<String> nameValues;
+  nameValues.push_back("First name");
+  nameValues.push_back("Second name");
+  name->values->set_string_values(nameValues);
+
+  restaurant->properties.push_back(std::move(name));
+
+  expected->entities.push_back(std::move(restaurant));
+
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, repeatedObject) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Ye ol greasy diner\","
+      "\"address\": ["
+      "\n"
+      "  {"
+      "  \"streetAddress\": \"123 Big Oak Road\","
+      "  \"addressLocality\": \"San Francisco\""
+      "  },\n"
+      "  {"
+      "  \"streetAddress\": \"123 Big Oak Road\","
+      "  \"addressLocality\": \"San Francisco\""
+      "  }\n"
+      "]\n"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", "Ye ol greasy diner"));
+
+  PropertyPtr addressProperty = Property::New();
+  addressProperty->name = "address";
+  addressProperty->values = Values::New();
+  addressProperty->values->set_entity_values(Vector<EntityPtr>());
+  for (int i = 0; i < 2; ++i) {
+    EntityPtr address = Entity::New();
+    address->type = "Thing";
+    address->properties.push_back(
+        createStringProperty("streetAddress", "123 Big Oak Road"));
+    address->properties.push_back(
+        createStringProperty("addressLocality", "San Francisco"));
+    addressProperty->values->get_entity_values().push_back(std::move(address));
+  }
+  restaurant->properties.push_back(std::move(addressProperty));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, truncateLongString) {
+  String maxLengthString;
+  for (int i = 0; i < 200; ++i) {
+    maxLengthString.Append("a");
+  }
+  String tooLongString(maxLengthString);
+  tooLongString.Append("a");
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"" +
+      tooLongString +
+      "\""
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", maxLengthString));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, enforceTypeExists) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_TRUE(extracted.is_null());
+}
+
+TEST_F(CopylessPasteExtractorTest, enforceTypeWhitelist) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"UnsupportedType\","
+      "\"name\": \"Special characters for ya >_<;\""
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_TRUE(extracted.is_null());
+}
+
+TEST_F(CopylessPasteExtractorTest, truncateTooManyValuesInField) {
+  String largeRepeatedField = "[";
+  for (int i = 0; i < 101; ++i) {
+    largeRepeatedField.Append("\"a\"");
+    if (i != 100) {
+      largeRepeatedField.Append(", ");
+    }
+  }
+  largeRepeatedField.Append("]");
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": " +
+      largeRepeatedField +
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+
+  PropertyPtr name = Property::New();
+  name->name = "name";
+  name->values = Values::New();
+  Vector<String> nameValues;
+  for (int i = 0; i < 100; ++i) {
+    nameValues.push_back("a");
+  }
+  name->values->set_string_values(nameValues);
+
+  restaurant->properties.push_back(std::move(name));
+
+  expected->entities.push_back(std::move(restaurant));
+
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, truncateTooManyFields) {
+  String tooManyFields;
+  for (int i = 0; i < 20; ++i) {
+    tooManyFields.Append(String::Format("\"%d\": \"a\"", i));
+    if (i != 19) {
+      tooManyFields.Append(",\n");
+    }
+  }
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\"," +
+      tooManyFields +
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+
+  for (int i = 0; i < 19; ++i) {
+    restaurant->properties.push_back(
+        createStringProperty(String::Number(i), "a"));
+  }
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, ignorePropertyWithEmptyArray) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": []"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+
+  expected->entities.push_back(std::move(restaurant));
+
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, ignorePropertyWithMixedTypes) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": [ \"Name\", 1 ]"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+
+  expected->entities.push_back(std::move(restaurant));
+
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, ignorePropertyWithNestedArray) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": [ [ \"Name\" ] ]"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+
+  expected->entities.push_back(std::move(restaurant));
+
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, enforceMaxNestingDepth) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Ye ol greasy diner\","
+      "\"1\": {"
+      "  \"2\": {"
+      "    \"3\": {"
+      "      \"4\": {"
+      "        \"5\": 6"
+      "      }\n"
+      "    }\n"
+      "  }\n"
+      "}\n"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", "Ye ol greasy diner"));
+
+  EntityPtr entity1 = Entity::New();
+  entity1->type = "Thing";
+
+  EntityPtr entity2 = Entity::New();
+  entity2->type = "Thing";
+
+  EntityPtr entity3 = Entity::New();
+  entity3->type = "Thing";
+
+  entity2->properties.push_back(createEntityProperty("3", std::move(entity3)));
+
+  entity1->properties.push_back(createEntityProperty("2", std::move(entity2)));
+
+  restaurant->properties.push_back(
+      createEntityProperty("1", std::move(entity1)));
+
+  expected->entities.push_back(std::move(restaurant));
+  EXPECT_EQ(expected, extracted);
+}
+
+TEST_F(CopylessPasteExtractorTest, maxNestingDepthWithTerminalProperty) {
+  SetHTMLInnerHTML(
+      "<body>"
+      "<script type=\"application/ld+json\">"
+      "\n"
+      "\n"
+      "{\"@type\": \"Restaurant\","
+      "\"name\": \"Ye ol greasy diner\","
+      "\"1\": {"
+      "  \"2\": {"
+      "    \"3\": {"
+      "      \"4\": 5"
+      "    }\n"
+      "  }\n"
+      "}\n"
+      "}\n"
+      "\n"
+      "</script>"
+      "</body>");
+  SetURL("http://www.test.com/");
+  SetTitle("My neat website about cool stuff");
+
+  WebPagePtr extracted = Extract();
+  ASSERT_FALSE(extracted.is_null());
+
+  WebPagePtr expected =
+      createWebPage("http://www.test.com/", "My neat website about cool stuff");
+
+  EntityPtr restaurant = Entity::New();
+  restaurant->type = "Restaurant";
+  restaurant->properties.push_back(
+      createStringProperty("name", "Ye ol greasy diner"));
+
+  EntityPtr entity1 = Entity::New();
+  entity1->type = "Thing";
+
+  EntityPtr entity2 = Entity::New();
+  entity2->type = "Thing";
+
+  EntityPtr entity3 = Entity::New();
+  entity3->type = "Thing";
+
+  entity3->properties.push_back(createLongProperty("4", 5));
+
+  entity2->properties.push_back(createEntityProperty("3", std::move(entity3)));
+
+  entity1->properties.push_back(createEntityProperty("2", std::move(entity2)));
+
+  restaurant->properties.push_back(
+      createEntityProperty("1", std::move(entity1)));
+
+  expected->entities.push_back(std::move(restaurant));
   EXPECT_EQ(expected, extracted);
 }
 
 }  // namespace
-
 }  // namespace blink
diff --git a/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.h b/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.h
index 8803c20..9bd7443 100644
--- a/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.h
+++ b/third_party/WebKit/Source/modules/donottrack/NavigatorDoNotTrack.h
@@ -34,7 +34,7 @@
 #include "core/frame/Navigator.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encoding/Encoding.h b/third_party/WebKit/Source/modules/encoding/Encoding.h
index 97c6e831..8120635 100644
--- a/third_party/WebKit/Source/modules/encoding/Encoding.h
+++ b/third_party/WebKit/Source/modules/encoding/Encoding.h
@@ -5,7 +5,7 @@
 #ifndef Encoding_h
 #define Encoding_h
 
-#include "wtf/text/Unicode.h"
+#include "platform/wtf/text/Unicode.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encoding/TextDecoder.cpp b/third_party/WebKit/Source/modules/encoding/TextDecoder.cpp
index 07e86a1..e2c5fc9 100644
--- a/third_party/WebKit/Source/modules/encoding/TextDecoder.cpp
+++ b/third_party/WebKit/Source/modules/encoding/TextDecoder.cpp
@@ -34,8 +34,8 @@
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/DOMArrayBufferView.h"
 #include "modules/encoding/Encoding.h"
-#include "wtf/StringExtras.h"
-#include "wtf/text/TextEncodingRegistry.h"
+#include "platform/wtf/StringExtras.h"
+#include "platform/wtf/text/TextEncodingRegistry.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encoding/TextDecoder.h b/third_party/WebKit/Source/modules/encoding/TextDecoder.h
index 82c18c4..6a00b4f 100644
--- a/third_party/WebKit/Source/modules/encoding/TextDecoder.h
+++ b/third_party/WebKit/Source/modules/encoding/TextDecoder.h
@@ -31,15 +31,15 @@
 #ifndef TextDecoder_h
 #define TextDecoder_h
 
+#include <memory>
 #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/encoding/TextDecodeOptions.h"
 #include "modules/encoding/TextDecoderOptions.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/TextCodec.h"
-#include "wtf/text/TextEncoding.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/text/TextCodec.h"
+#include "platform/wtf/text/TextEncoding.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp b/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp
index e63c3a6..f206788 100644
--- a/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp
+++ b/third_party/WebKit/Source/modules/encoding/TextEncoder.cpp
@@ -33,8 +33,8 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExecutionContext.h"
 #include "modules/encoding/Encoding.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/TextEncodingRegistry.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/TextEncodingRegistry.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encoding/TextEncoder.h b/third_party/WebKit/Source/modules/encoding/TextEncoder.h
index 2f63a48..21c59997 100644
--- a/third_party/WebKit/Source/modules/encoding/TextEncoder.h
+++ b/third_party/WebKit/Source/modules/encoding/TextEncoder.h
@@ -31,13 +31,13 @@
 #ifndef TextEncoder_h
 #define TextEncoder_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMTypedArray.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/TextCodec.h"
-#include "wtf/text/TextEncoding.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/text/TextCodec.h"
+#include "platform/wtf/text/TextEncoding.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp b/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp
index 8b2754c..14a53322 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/ContentDecryptionModuleResultPromise.cpp
@@ -9,8 +9,8 @@
 #include "bindings/core/v8/V8ThrowException.h"
 #include "core/dom/DOMException.h"
 #include "core/dom/ExecutionContext.h"
+#include "platform/wtf/Assertions.h"
 #include "public/platform/WebString.h"
-#include "wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/EncryptedMediaUtils.h b/third_party/WebKit/Source/modules/encryptedmedia/EncryptedMediaUtils.h
index 42540da4..558af1c 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/EncryptedMediaUtils.h
+++ b/third_party/WebKit/Source/modules/encryptedmedia/EncryptedMediaUtils.h
@@ -5,9 +5,9 @@
 #ifndef EncryptedMediaUtils_h
 #define EncryptedMediaUtils_h
 
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebEncryptedMediaTypes.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
index 7bdacb15..1455505 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/HTMLMediaElementEncryptedMedia.cpp
@@ -19,7 +19,7 @@
 #include "modules/encryptedmedia/MediaEncryptedEvent.h"
 #include "modules/encryptedmedia/MediaKeys.h"
 #include "platform/ContentDecryptionModuleResult.h"
-#include "wtf/Functional.h"
+#include "platform/wtf/Functional.h"
 
 #define EME_LOG_LEVEL 3
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
index fcaa6ca4..1d2c604 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -25,6 +25,8 @@
 
 #include "modules/encryptedmedia/MediaKeySession.h"
 
+#include <cmath>
+#include <limits>
 #include "bindings/core/v8/DOMWrapperWorld.h"
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
@@ -44,16 +46,14 @@
 #include "platform/InstanceCounters.h"
 #include "platform/Timer.h"
 #include "platform/network/mime/ContentType.h"
+#include "platform/wtf/ASCIICType.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebContentDecryptionModule.h"
 #include "public/platform/WebContentDecryptionModuleException.h"
 #include "public/platform/WebContentDecryptionModuleSession.h"
 #include "public/platform/WebEncryptedMediaKeyInformation.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebURL.h"
-#include "wtf/ASCIICType.h"
-#include "wtf/PtrUtil.h"
-#include <cmath>
-#include <limits>
 
 #define MEDIA_KEY_SESSION_LOG_LEVEL 3
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyStatusMap.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyStatusMap.cpp
index 21e5083..b1b5fba 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyStatusMap.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeyStatusMap.cpp
@@ -7,8 +7,8 @@
 #include "bindings/core/v8/ArrayBufferOrArrayBufferView.h"
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/DOMArrayPiece.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebData.h"
-#include "wtf/text/WTFString.h"
 
 #include <algorithm>
 #include <limits>
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
index e421a53..723137c 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/encryptedmedia/MediaKeySystemAccess.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "core/dom/DOMException.h"
@@ -14,11 +15,10 @@
 #include "modules/encryptedmedia/MediaKeys.h"
 #include "modules/encryptedmedia/MediaKeysController.h"
 #include "platform/Timer.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebContentDecryptionModule.h"
 #include "public/platform/WebEncryptedMediaTypes.h"
 #include "public/platform/WebMediaKeySystemConfiguration.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.h b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.h
index d50bdc9..491529e 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.h
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySystemAccess.h
@@ -5,12 +5,12 @@
 #ifndef MediaKeySystemAccess_h
 #define MediaKeySystemAccess_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/encryptedmedia/MediaKeySystemConfiguration.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebContentDecryptionModuleAccess.h"
-#include "wtf/Forward.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
index 3ab31cc..80b1a5d 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp
@@ -25,6 +25,7 @@
 
 #include "modules/encryptedmedia/MediaKeys.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/V8ThrowException.h"
@@ -39,9 +40,8 @@
 #include "modules/encryptedmedia/MediaKeySession.h"
 #include "platform/InstanceCounters.h"
 #include "platform/Timer.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebContentDecryptionModule.h"
-#include "wtf/RefPtr.h"
-#include <memory>
 
 #define MEDIA_KEYS_LOG_LEVEL 3
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.h b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.h
index ac56329..6d8c8ff 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.h
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.h
@@ -26,19 +26,19 @@
 #ifndef MediaKeys_h
 #define MediaKeys_h
 
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/dom/DOMArrayPiece.h"
 #include "platform/Timer.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebContentDecryptionModule.h"
 #include "public/platform/WebEncryptedMediaTypes.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebVector.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h
index 17b1de5..52441b67 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeysClient.h
@@ -5,7 +5,7 @@
 #ifndef MediaKeysClient_h
 #define MediaKeysClient_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
index 7f90ff81..38fe480 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.cpp
@@ -24,14 +24,14 @@
 #include "platform/Histogram.h"
 #include "platform/network/ParsedContentType.h"
 #include "platform/network/mime/ContentType.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebEncryptedMediaClient.h"
 #include "public/platform/WebEncryptedMediaRequest.h"
 #include "public/platform/WebMediaKeySystemConfiguration.h"
 #include "public/platform/WebMediaKeySystemMediaCapability.h"
 #include "public/platform/WebVector.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h
index 3b1fd5af..98a475ec 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h
+++ b/third_party/WebKit/Source/modules/encryptedmedia/NavigatorRequestMediaKeySystemAccess.h
@@ -10,7 +10,7 @@
 #include "core/frame/Navigator.h"
 #include "modules/encryptedmedia/MediaKeySystemConfiguration.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSource.cpp b/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
index 114fbd5..6922cde7 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
+++ b/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
@@ -56,8 +56,8 @@
 #include "platform/loader/fetch/ResourceRequest.h"
 #include "platform/loader/fetch/ResourceResponse.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/text/StringBuilder.h"
 #include "public/platform/WebURLRequest.h"
-#include "wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSource.h b/third_party/WebKit/Source/modules/eventsource/EventSource.h
index 813f7db6..600fa6e 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSource.h
+++ b/third_party/WebKit/Source/modules/eventsource/EventSource.h
@@ -32,6 +32,7 @@
 #ifndef EventSource_h
 #define EventSource_h
 
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/events/EventTarget.h"
@@ -42,8 +43,7 @@
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Forward.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSourceParser.cpp b/third_party/WebKit/Source/modules/eventsource/EventSourceParser.cpp
index 6fd76f72..59f3a62 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSourceParser.cpp
+++ b/third_party/WebKit/Source/modules/eventsource/EventSourceParser.cpp
@@ -6,12 +6,12 @@
 
 #include "core/EventTypeNames.h"
 #include "modules/eventsource/EventSource.h"
-#include "wtf/ASCIICType.h"
-#include "wtf/Assertions.h"
-#include "wtf/NotFound.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/text/TextEncoding.h"
-#include "wtf/text/TextEncodingRegistry.h"
+#include "platform/wtf/ASCIICType.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/NotFound.h"
+#include "platform/wtf/StdLibExtras.h"
+#include "platform/wtf/text/TextEncoding.h"
+#include "platform/wtf/text/TextEncodingRegistry.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSourceParser.h b/third_party/WebKit/Source/modules/eventsource/EventSourceParser.h
index b2b255cc..e78f6b4 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSourceParser.h
+++ b/third_party/WebKit/Source/modules/eventsource/EventSourceParser.h
@@ -5,13 +5,13 @@
 #ifndef EventSourceParser_h
 #define EventSourceParser_h
 
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/TextCodec.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/TextCodec.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSourceParserTest.cpp b/third_party/WebKit/Source/modules/eventsource/EventSourceParserTest.cpp
index 96baeae..4686cc7 100644
--- a/third_party/WebKit/Source/modules/eventsource/EventSourceParserTest.cpp
+++ b/third_party/WebKit/Source/modules/eventsource/EventSourceParserTest.cpp
@@ -5,8 +5,8 @@
 #include "modules/eventsource/EventSourceParser.h"
 
 #include "modules/eventsource/EventSource.h"
+#include "platform/wtf/text/CharacterNames.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/text/CharacterNames.h"
 
 #include <string.h>
 
diff --git a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.h b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.h
index 803d280..41b3f743 100644
--- a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.h
+++ b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.h
@@ -5,14 +5,14 @@
 #ifndef BlobBytesConsumer_h
 #define BlobBytesConsumer_h
 
+#include <memory>
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/loader/ThreadableLoaderClient.h"
 #include "modules/ModulesExport.h"
 #include "modules/fetch/BytesConsumer.h"
 #include "platform/heap/Handle.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
index 953aa82..0a07e6e4 100644
--- a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
@@ -14,9 +14,9 @@
 #include "platform/loader/fetch/ResourceResponse.h"
 #include "platform/network/EncodedFormData.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/Body.cpp b/third_party/WebKit/Source/modules/fetch/Body.cpp
index 4e5feb3e..2eb441bd 100644
--- a/third_party/WebKit/Source/modules/fetch/Body.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Body.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/fetch/Body.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/V8ArrayBuffer.h"
@@ -13,10 +14,9 @@
 #include "core/fileapi/Blob.h"
 #include "modules/fetch/BodyStreamBuffer.h"
 #include "modules/fetch/FetchDataLoader.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebDataConsumerHandle.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/Body.h b/third_party/WebKit/Source/modules/fetch/Body.h
index 5722db5..9079dcf4 100644
--- a/third_party/WebKit/Source/modules/fetch/Body.h
+++ b/third_party/WebKit/Source/modules/fetch/Body.h
@@ -12,7 +12,7 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp b/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp
index 066121c..6015958 100644
--- a/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BodyStreamBufferTest.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/fetch/BodyStreamBuffer.h"
 
+#include <memory>
 #include "bindings/core/v8/V8BindingForTesting.h"
 #include "core/dom/Document.h"
 #include "core/html/FormData.h"
@@ -14,10 +15,9 @@
 #include "platform/blob/BlobURL.h"
 #include "platform/network/EncodedFormData.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/PtrUtil.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp
index c1baf6d..33acb4c 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumer.cpp
@@ -4,15 +4,15 @@
 
 #include "modules/fetch/BytesConsumer.h"
 
+#include <string.h>
+#include <algorithm>
 #include "core/dom/ExecutionContext.h"
 #include "core/dom/TaskRunnerHelper.h"
 #include "modules/fetch/BlobBytesConsumer.h"
 #include "platform/WebTaskRunner.h"
 #include "platform/blob/BlobData.h"
-#include "wtf/Functional.h"
-#include "wtf/RefPtr.h"
-#include <algorithm>
-#include <string.h>
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumer.h b/third_party/WebKit/Source/modules/fetch/BytesConsumer.h
index ef82992..28d4f6f 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumer.h
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumer.h
@@ -9,9 +9,9 @@
 #include "platform/blob/BlobData.h"
 #include "platform/heap/Handle.h"
 #include "platform/network/EncodedFormData.h"
-#include "wtf/Compiler.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Compiler.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.cpp
index e12a703..1294d990 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.cpp
@@ -7,8 +7,8 @@
 #include "core/dom/ExecutionContext.h"
 #include "core/dom/TaskRunnerHelper.h"
 #include "platform/WebTaskRunner.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/Functional.h"
 
 #include <algorithm>
 #include <string.h>
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.h b/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.h
index ff4a2e0..eabc1b5 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.h
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerForDataConsumerHandle.h
@@ -8,9 +8,9 @@
 #include "modules/ModulesExport.h"
 #include "modules/fetch/BytesConsumer.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebDataConsumerHandle.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerTest.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumerTest.cpp
index b9379a8..2bb46fb 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerTest.cpp
@@ -8,8 +8,8 @@
 #include "modules/fetch/BytesConsumerTestUtil.h"
 #include "platform/blob/BlobData.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/RefPtr.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
index 476dd09..ba67ff5c 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.cpp
@@ -8,8 +8,8 @@
 #include "core/dom/TaskRunnerHelper.h"
 #include "platform/WebTaskRunner.h"
 #include "platform/testing/UnitTestHelpers.h"
-#include "wtf/Assertions.h"
-#include "wtf/Functional.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.h b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.h
index a31e288f..c70a84bd 100644
--- a/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.h
+++ b/third_party/WebKit/Source/modules/fetch/BytesConsumerTestUtil.h
@@ -8,10 +8,10 @@
 #include "modules/fetch/BytesConsumer.h"
 #include "modules/fetch/FetchDataLoader.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/Vector.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/Deque.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp
index 68c4c8ef..438e3b9 100644
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.cpp
@@ -4,10 +4,10 @@
 
 #include "modules/fetch/DataConsumerHandleTestUtil.h"
 
-#include "bindings/core/v8/DOMWrapperWorld.h"
-#include "public/platform/WebScheduler.h"
-#include "wtf/PtrUtil.h"
 #include <memory>
+#include "bindings/core/v8/DOMWrapperWorld.h"
+#include "platform/wtf/PtrUtil.h"
+#include "public/platform/WebScheduler.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
index 87d36a1..506ba6b 100644
--- a/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
+++ b/third_party/WebKit/Source/modules/fetch/DataConsumerHandleTestUtil.h
@@ -14,19 +14,19 @@
 #include "platform/WaitableEvent.h"
 #include "platform/WebThreadSupportingGC.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/Locker.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/ThreadSafeRefCounted.h"
+#include "platform/wtf/ThreadingPrimitives.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/StringBuilder.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebDataConsumerHandle.h"
 #include "public/platform/WebTraceLocation.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
-#include "wtf/Deque.h"
-#include "wtf/Locker.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/ThreadSafeRefCounted.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/Vector.h"
-#include "wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp
index 0a0fae8..1953256 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.cpp
@@ -4,13 +4,13 @@
 
 #include "modules/fetch/FetchDataLoader.h"
 
+#include <memory>
 #include "core/html/parser/TextResourceDecoder.h"
 #include "modules/fetch/BytesConsumer.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/WTFString.h"
-#include "wtf/typed_arrays/ArrayBufferBuilder.h"
-#include <memory>
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/text/WTFString.h"
+#include "platform/wtf/typed_arrays/ArrayBufferBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
index 690b3aa..62065b1 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchDataLoader.h
@@ -10,7 +10,7 @@
 #include "modules/ModulesExport.h"
 #include "platform/blob/BlobData.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp b/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp
index 6c7e8eeb..f8b5634ef 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchHeaderList.cpp
@@ -4,10 +4,10 @@
 
 #include "modules/fetch/FetchHeaderList.h"
 
+#include <algorithm>
 #include "platform/loader/fetch/FetchUtils.h"
 #include "platform/network/HTTPParsers.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchHeaderList.h b/third_party/WebKit/Source/modules/fetch/FetchHeaderList.h
index ff7ece4..28bdd3f 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchHeaderList.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchHeaderList.h
@@ -5,13 +5,13 @@
 #ifndef FetchHeaderList_h
 #define FetchHeaderList_h
 
-#include "modules/ModulesExport.h"
-#include "platform/heap/Handle.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 #include <memory>
 #include <utility>
+#include "modules/ModulesExport.h"
+#include "platform/heap/Handle.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
index 38693a3..feeb7e99 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -40,10 +40,10 @@
 #include "platform/weborigin/SecurityOrigin.h"
 #include "platform/weborigin/SecurityPolicy.h"
 #include "platform/weborigin/Suborigin.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebURLRequest.h"
-#include "wtf/HashSet.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchRequestData.h b/third_party/WebKit/Source/modules/fetch/FetchRequestData.h
index d96b3353..fa803d5 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchRequestData.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchRequestData.h
@@ -10,11 +10,11 @@
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/Referrer.h"
 #include "platform/weborigin/ReferrerPolicy.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebURLRequest.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp b/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
index bc6c3d7..732b8d22 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseData.cpp
@@ -9,8 +9,8 @@
 #include "modules/fetch/BodyStreamBuffer.h"
 #include "modules/fetch/FetchHeaderList.h"
 #include "platform/loader/fetch/FetchUtils.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseData.h b/third_party/WebKit/Source/modules/fetch/FetchResponseData.h
index 024ca01..53ef249 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseData.h
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseData.h
@@ -5,15 +5,15 @@
 #ifndef FetchResponseData_h
 #define FetchResponseData_h
 
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
 #include "platform/loader/fetch/CrossOriginAccessControl.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/AtomicString.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/AtomicString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp b/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
index 5552dba4..369287a 100644
--- a/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FetchResponseDataTest.cpp
@@ -7,9 +7,9 @@
 #include "core/dom/DOMArrayBuffer.h"
 #include "modules/fetch/FetchHeaderList.h"
 #include "platform/blob/BlobData.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.cpp
index b120103..245def42 100644
--- a/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.cpp
@@ -9,10 +9,10 @@
 #include "modules/fetch/BlobBytesConsumer.h"
 #include "platform/blob/BlobData.h"
 #include "platform/network/EncodedFormData.h"
-#include "wtf/Vector.h"
-#include "wtf/text/TextCodec.h"
-#include "wtf/text/TextEncoding.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/TextCodec.h"
+#include "platform/wtf/text/TextEncoding.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.h b/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.h
index 9a080e6..fa21d68f 100644
--- a/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.h
+++ b/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumer.h
@@ -8,8 +8,8 @@
 #include "modules/ModulesExport.h"
 #include "modules/fetch/BytesConsumer.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumerTest.cpp b/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumerTest.cpp
index 773ecaf..c60f673 100644
--- a/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumerTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/FormDataBytesConsumerTest.cpp
@@ -12,11 +12,11 @@
 #include "modules/fetch/BytesConsumerTestUtil.h"
 #include "platform/blob/BlobData.h"
 #include "platform/network/EncodedFormData.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/fetch/Headers.cpp b/third_party/WebKit/Source/modules/fetch/Headers.cpp
index 09b928f2..1e41606f 100644
--- a/third_party/WebKit/Source/modules/fetch/Headers.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Headers.cpp
@@ -9,10 +9,10 @@
 #include "bindings/core/v8/V8IteratorResultValue.h"
 #include "core/dom/Iterator.h"
 #include "platform/loader/fetch/FetchUtils.h"
-#include "wtf/NotFound.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/NotFound.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/Headers.h b/third_party/WebKit/Source/modules/fetch/Headers.h
index 2f515ff..7cf4ce4 100644
--- a/third_party/WebKit/Source/modules/fetch/Headers.h
+++ b/third_party/WebKit/Source/modules/fetch/Headers.h
@@ -10,7 +10,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/ModulesExport.h"
 #include "modules/fetch/FetchHeaderList.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp
index 115ecfb..bc65a2f 100644
--- a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.cpp
@@ -16,9 +16,9 @@
 #include "bindings/core/v8/V8IteratorResultValue.h"
 #include "bindings/core/v8/V8Uint8Array.h"
 #include "core/streams/ReadableStreamOperations.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/WTFString.h"
 #include "v8/include/v8.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.h b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.h
index efe07a7..089a42c 100644
--- a/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.h
+++ b/third_party/WebKit/Source/modules/fetch/ReadableStreamBytesConsumer.h
@@ -5,14 +5,14 @@
 #ifndef ReadableStreamBytesConsumer_h
 #define ReadableStreamBytesConsumer_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptValue.h"
 #include "core/dom/DOMTypedArray.h"
 #include "modules/ModulesExport.h"
 #include "modules/fetch/BytesConsumer.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/RefPtr.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/Request.h b/third_party/WebKit/Source/modules/fetch/Request.h
index 1c97f82..c79d0eb 100644
--- a/third_party/WebKit/Source/modules/fetch/Request.h
+++ b/third_party/WebKit/Source/modules/fetch/Request.h
@@ -15,8 +15,8 @@
 #include "platform/heap/Handle.h"
 #include "platform/network/EncodedFormData.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebURLRequest.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/RequestInit.h b/third_party/WebKit/Source/modules/fetch/RequestInit.h
index a73480173..cbde8fb 100644
--- a/third_party/WebKit/Source/modules/fetch/RequestInit.h
+++ b/third_party/WebKit/Source/modules/fetch/RequestInit.h
@@ -5,13 +5,13 @@
 #ifndef RequestInit_h
 #define RequestInit_h
 
+#include <memory>
 #include "bindings/core/v8/Dictionary.h"
 #include "platform/heap/Handle.h"
 #include "platform/network/EncodedFormData.h"
 #include "platform/weborigin/Referrer.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/RequestTest.cpp b/third_party/WebKit/Source/modules/fetch/RequestTest.cpp
index aa21209..b7d135f1 100644
--- a/third_party/WebKit/Source/modules/fetch/RequestTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/RequestTest.cpp
@@ -4,16 +4,16 @@
 
 #include "modules/fetch/Request.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionState.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/V8BindingForTesting.h"
 #include "core/dom/Document.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebURLRequest.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/HashMap.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/fetch/Response.cpp b/third_party/WebKit/Source/modules/fetch/Response.cpp
index 2c2660b..57aae12b 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.cpp
+++ b/third_party/WebKit/Source/modules/fetch/Response.cpp
@@ -31,8 +31,8 @@
 #include "platform/network/EncodedFormData.h"
 #include "platform/network/HTTPHeaderMap.h"
 #include "platform/network/NetworkUtils.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/Response.h b/third_party/WebKit/Source/modules/fetch/Response.h
index 44ca897..735bdf7 100644
--- a/third_party/WebKit/Source/modules/fetch/Response.h
+++ b/third_party/WebKit/Source/modules/fetch/Response.h
@@ -15,8 +15,8 @@
 #include "modules/fetch/Headers.h"
 #include "platform/blob/BlobData.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp b/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp
index 70b5f0f9..857d974 100644
--- a/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp
+++ b/third_party/WebKit/Source/modules/fetch/ResponseTest.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/fetch/Response.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionState.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/V8BindingForTesting.h"
@@ -17,11 +18,10 @@
 #include "modules/fetch/FetchResponseData.h"
 #include "platform/blob/BlobData.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerResponse.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Vector.h"
-#include <memory>
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.cpp b/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.cpp
index adb7f99..3a42336 100644
--- a/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.cpp
+++ b/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.cpp
@@ -5,7 +5,7 @@
 #include "modules/fetch/testing/InternalsFetch.h"
 
 #include "modules/fetch/Response.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.h b/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.h
index 605b6f4..c5ef169 100644
--- a/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.h
+++ b/third_party/WebKit/Source/modules/fetch/testing/InternalsFetch.h
@@ -5,9 +5,9 @@
 #ifndef InternalsFetch_h
 #define InternalsFetch_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.cpp b/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.cpp
index d420919..86e1134 100644
--- a/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.cpp
+++ b/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.cpp
@@ -5,7 +5,7 @@
 #include "modules/fetch/testing/WorkerInternalsFetch.h"
 
 #include "modules/fetch/Response.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.h b/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.h
index 0c3a6cf..7d86a05 100644
--- a/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.h
+++ b/third_party/WebKit/Source/modules/fetch/testing/WorkerInternalsFetch.h
@@ -5,9 +5,9 @@
 #ifndef WorkerInternalsFetch_h
 #define WorkerInternalsFetch_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp
index 5c7ce69..17237801 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFilePath.cpp
@@ -30,9 +30,9 @@
 
 #include "modules/filesystem/DOMFilePath.h"
 
-#include "wtf/Vector.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFilePath.h b/third_party/WebKit/Source/modules/filesystem/DOMFilePath.h
index 7ada0ed..f22ece7 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFilePath.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFilePath.h
@@ -31,8 +31,8 @@
 #ifndef DOMFilePath_h
 #define DOMFilePath_h
 
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
index 9867972..f5f865f 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.cpp
@@ -44,12 +44,12 @@
 #include "platform/FileMetadata.h"
 #include "platform/WebTaskRunner.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebFileSystem.h"
 #include "public/platform/WebFileSystemCallbacks.h"
 #include "public/platform/WebSecurityOrigin.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
index 8c54c80..24cefb73 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystem.h
@@ -40,8 +40,8 @@
 #include "modules/filesystem/DOMFileSystemBase.h"
 #include "modules/filesystem/EntriesCallback.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
index d0a24ea..ad694a0 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.cpp
@@ -30,6 +30,7 @@
 
 #include "modules/filesystem/DOMFileSystemBase.h"
 
+#include <memory>
 #include "core/dom/ExecutionContext.h"
 #include "core/fileapi/File.h"
 #include "core/fileapi/FileError.h"
@@ -44,12 +45,11 @@
 #include "modules/filesystem/FileSystemCallbacks.h"
 #include "modules/filesystem/MetadataCallback.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/text/TextEncoding.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebFileSystem.h"
 #include "public/platform/WebFileSystemCallbacks.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/TextEncoding.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
index a4c1790..d192856 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemBase.h
@@ -37,7 +37,7 @@
 #include "platform/FileSystemType.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 class WebFileSystem;
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
index 36dd003c..dcc14900 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/DOMFileSystemSync.cpp
@@ -30,6 +30,7 @@
 
 #include "modules/filesystem/DOMFileSystemSync.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/fileapi/File.h"
 #include "core/fileapi/FileError.h"
@@ -41,10 +42,9 @@
 #include "modules/filesystem/FileWriterBaseCallback.h"
 #include "modules/filesystem/FileWriterSync.h"
 #include "platform/FileMetadata.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebFileSystem.h"
 #include "public/platform/WebFileSystemCallbacks.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h
index c6db8cb..ee300e9 100644
--- a/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DOMWindowFileSystem.h
@@ -27,8 +27,8 @@
 #define DOMWindowFileSystem_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.h
index 45b96ad0..3007d37 100644
--- a/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DataTransferItemFileSystem.h
@@ -32,7 +32,7 @@
 #define DataTransferItemFileSystem_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.h b/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.h
index 93e64166..f830bcf 100644
--- a/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/DevToolsHostFileSystem.h
@@ -6,8 +6,8 @@
 #define DevToolsHostFileSystem_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h b/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h
index 0d7a2628..ffdc4a5f 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryEntry.h
@@ -34,7 +34,7 @@
 #include "modules/ModulesExport.h"
 #include "modules/filesystem/Entry.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryEntrySync.h b/third_party/WebKit/Source/modules/filesystem/DirectoryEntrySync.h
index 570c6a11..475f781 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryEntrySync.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryEntrySync.h
@@ -32,7 +32,7 @@
 #define DirectoryEntrySync_h
 
 #include "modules/filesystem/EntrySync.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h
index bd6af47..eaee954 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReader.h
@@ -36,7 +36,7 @@
 #include "modules/filesystem/DirectoryReaderBase.h"
 #include "modules/filesystem/EntriesCallback.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderBase.h b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderBase.h
index 379772b3..fcbdf41 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderBase.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderBase.h
@@ -33,7 +33,7 @@
 
 #include "modules/filesystem/DOMFileSystemBase.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.h b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.h
index f05b746..465a215 100644
--- a/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.h
+++ b/third_party/WebKit/Source/modules/filesystem/DirectoryReaderSync.h
@@ -35,7 +35,7 @@
 #include "core/fileapi/FileError.h"
 #include "modules/filesystem/DirectoryReaderBase.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystemImpl.h b/third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystemImpl.h
index 02c5bec..8a46460 100644
--- a/third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystemImpl.h
+++ b/third_party/WebKit/Source/modules/filesystem/DraggedIsolatedFileSystemImpl.h
@@ -35,8 +35,8 @@
 #include "core/clipboard/DraggedIsolatedFileSystem.h"
 #include "platform/heap/Handle.h"
 #include "platform/heap/HeapAllocator.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/Entry.cpp b/third_party/WebKit/Source/modules/filesystem/Entry.cpp
index 5813ab7..7201b21 100644
--- a/third_party/WebKit/Source/modules/filesystem/Entry.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/Entry.cpp
@@ -39,7 +39,7 @@
 #include "modules/filesystem/FileSystemCallbacks.h"
 #include "modules/filesystem/MetadataCallback.h"
 #include "platform/weborigin/SecurityOrigin.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/EntryBase.h b/third_party/WebKit/Source/modules/filesystem/EntryBase.h
index 2ffd7aed..3a65535 100644
--- a/third_party/WebKit/Source/modules/filesystem/EntryBase.h
+++ b/third_party/WebKit/Source/modules/filesystem/EntryBase.h
@@ -33,7 +33,7 @@
 
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/EntrySync.h b/third_party/WebKit/Source/modules/filesystem/EntrySync.h
index b1d2e813e..53aa2886 100644
--- a/third_party/WebKit/Source/modules/filesystem/EntrySync.h
+++ b/third_party/WebKit/Source/modules/filesystem/EntrySync.h
@@ -35,7 +35,7 @@
 #include "modules/filesystem/DOMFileSystemSync.h"
 #include "modules/filesystem/EntryBase.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/FileEntrySync.h b/third_party/WebKit/Source/modules/filesystem/FileEntrySync.h
index 1e430c4..d2f03dac 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileEntrySync.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileEntrySync.h
@@ -33,7 +33,7 @@
 
 #include "modules/filesystem/EntrySync.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
index 1760084..1e60f2a 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
@@ -30,6 +30,7 @@
 
 #include "modules/filesystem/FileSystemCallbacks.h"
 
+#include <memory>
 #include "core/dom/ExecutionContext.h"
 #include "core/fileapi/BlobCallback.h"
 #include "core/fileapi/File.h"
@@ -50,9 +51,8 @@
 #include "modules/filesystem/Metadata.h"
 #include "modules/filesystem/MetadataCallback.h"
 #include "platform/FileMetadata.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebFileWriter.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h
index 332d11e..284e8b1 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.h
@@ -31,13 +31,13 @@
 #ifndef FileSystemCallbacks_h
 #define FileSystemCallbacks_h
 
+#include <memory>
 #include "core/fileapi/FileError.h"
 #include "modules/filesystem/EntriesCallback.h"
 #include "platform/AsyncFileSystemCallbacks.h"
 #include "platform/FileSystemType.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemClient.h b/third_party/WebKit/Source/modules/filesystem/FileSystemClient.h
index 5705ea5..7c2b78b 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemClient.h
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemClient.h
@@ -31,12 +31,12 @@
 #ifndef FileSystemClient_h
 #define FileSystemClient_h
 
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "platform/FileSystemType.h"
-#include "wtf/Allocator.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include <memory>
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp b/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
index 8dde7498..febd37d4 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileWriter.cpp
@@ -34,9 +34,9 @@
 #include "core/events/ProgressEvent.h"
 #include "core/fileapi/Blob.h"
 #include "core/probe/CoreProbes.h"
+#include "platform/wtf/CurrentTime.h"
 #include "public/platform/WebFileWriter.h"
 #include "public/platform/WebURL.h"
-#include "wtf/CurrentTime.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.h b/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.h
index 817f617c..cf2d244e 100644
--- a/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/HTMLInputElementFileSystem.h
@@ -32,7 +32,7 @@
 #define HTMLInputElementFileSystem_h
 
 #include "modules/filesystem/EntriesCallback.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
index 20ed96f..720a709 100644
--- a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.cpp
@@ -30,6 +30,7 @@
 
 #include "modules/filesystem/LocalFileSystem.h"
 
+#include <memory>
 #include "core/dom/Document.h"
 #include "core/dom/ExecutionContext.h"
 #include "core/dom/TaskRunnerHelper.h"
@@ -39,10 +40,9 @@
 #include "modules/filesystem/FileSystemClient.h"
 #include "platform/AsyncFileSystemCallbacks.h"
 #include "platform/ContentSettingCallbacks.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebFileSystem.h"
-#include "wtf/Functional.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
index 737838c..49ed927 100644
--- a/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
+++ b/third_party/WebKit/Source/modules/filesystem/LocalFileSystem.h
@@ -31,14 +31,14 @@
 #ifndef LocalFileSystem_h
 #define LocalFileSystem_h
 
+#include <memory>
 #include "core/frame/LocalFrame.h"
 #include "core/workers/WorkerClients.h"
 #include "platform/FileSystemType.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/Functional.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/gamepad/Gamepad.h b/third_party/WebKit/Source/modules/gamepad/Gamepad.h
index 830576b8f..623d06e 100644
--- a/third_party/WebKit/Source/modules/gamepad/Gamepad.h
+++ b/third_party/WebKit/Source/modules/gamepad/Gamepad.h
@@ -30,9 +30,9 @@
 #include "modules/gamepad/GamepadButton.h"
 #include "modules/gamepad/GamepadPose.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebGamepad.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/gamepad/GamepadButton.h b/third_party/WebKit/Source/modules/gamepad/GamepadButton.h
index 175a7f2..5d288930f 100644
--- a/third_party/WebKit/Source/modules/gamepad/GamepadButton.h
+++ b/third_party/WebKit/Source/modules/gamepad/GamepadButton.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/gamepad/GamepadPose.h b/third_party/WebKit/Source/modules/gamepad/GamepadPose.h
index b2ac868..e40b4d0 100644
--- a/third_party/WebKit/Source/modules/gamepad/GamepadPose.h
+++ b/third_party/WebKit/Source/modules/gamepad/GamepadPose.h
@@ -8,8 +8,8 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMTypedArray.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebGamepad.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp b/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp
index 4c8a1fc..00a0658 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/GeoNotifier.cpp
@@ -8,7 +8,7 @@
 #include "modules/geolocation/PositionError.h"
 #include "modules/geolocation/PositionOptions.h"
 #include "platform/Histogram.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
index 1bf3847..f792e058 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/Geolocation.cpp
@@ -38,10 +38,10 @@
 #include "modules/geolocation/GeolocationError.h"
 #include "modules/permissions/PermissionUtils.h"
 #include "platform/UserGestureIndicator.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/CurrentTime.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
-#include "wtf/Assertions.h"
-#include "wtf/CurrentTime.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationError.h b/third_party/WebKit/Source/modules/geolocation/GeolocationError.h
index 28d3e88..d5780cf 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeolocationError.h
+++ b/third_party/WebKit/Source/modules/geolocation/GeolocationError.h
@@ -26,7 +26,7 @@
 #ifndef GeolocationError_h
 #define GeolocationError_h
 
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp b/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp
index cddb6bc..2286942 100644
--- a/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp
+++ b/third_party/WebKit/Source/modules/geolocation/GeolocationWatchers.cpp
@@ -5,7 +5,7 @@
 #include "modules/geolocation/GeolocationWatchers.h"
 
 #include "modules/geolocation/GeoNotifier.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/geolocation/Geoposition.h b/third_party/WebKit/Source/modules/geolocation/Geoposition.h
index b1f2598..c2419721 100644
--- a/third_party/WebKit/Source/modules/geolocation/Geoposition.h
+++ b/third_party/WebKit/Source/modules/geolocation/Geoposition.h
@@ -30,7 +30,7 @@
 #include "modules/EventModules.h"
 #include "modules/geolocation/Coordinates.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/geolocation/PositionError.h b/third_party/WebKit/Source/modules/geolocation/PositionError.h
index 8f01491..4a86efd 100644
--- a/third_party/WebKit/Source/modules/geolocation/PositionError.h
+++ b/third_party/WebKit/Source/modules/geolocation/PositionError.h
@@ -28,7 +28,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
index 60b5119..3ae29a0 100644
--- a/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
+++ b/third_party/WebKit/Source/modules/imagebitmap/ImageBitmapRenderingContext.h
@@ -8,7 +8,7 @@
 #include "core/html/canvas/CanvasRenderingContext.h"
 #include "core/html/canvas/CanvasRenderingContextFactory.h"
 #include "modules/ModulesExport.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
index e8b1c1d..3473914 100644
--- a/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
+++ b/third_party/WebKit/Source/modules/imagecapture/ImageCapture.cpp
@@ -19,11 +19,11 @@
 #include "modules/mediastream/MediaTrackConstraints.h"
 #include "platform/WaitableEvent.h"
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebImageCaptureFrameGrabber.h"
 #include "public/platform/WebMediaStreamTrack.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.h b/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.h
index 06d3085..dd7c704 100644
--- a/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.h
+++ b/third_party/WebKit/Source/modules/imagecapture/PhotoCapabilities.h
@@ -8,8 +8,8 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "media/capture/mojo/image_capture.mojom-blink.h"
 #include "modules/imagecapture/MediaSettingsRange.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/GlobalIndexedDB.h b/third_party/WebKit/Source/modules/indexeddb/GlobalIndexedDB.h
index 169e2381..2937c12 100644
--- a/third_party/WebKit/Source/modules/indexeddb/GlobalIndexedDB.h
+++ b/third_party/WebKit/Source/modules/indexeddb/GlobalIndexedDB.h
@@ -5,7 +5,7 @@
 #ifndef GlobalIndexedDB_h
 #define GlobalIndexedDB_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBAny.h b/third_party/WebKit/Source/modules/indexeddb/IDBAny.h
index f5234e3c..0fcc5ae 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBAny.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBAny.h
@@ -31,8 +31,8 @@
 #include "modules/ModulesExport.h"
 #include "modules/indexeddb/IDBKey.h"
 #include "modules/indexeddb/IDBValue.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h
index 96fd206..85cd1f0 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBCursor.h
@@ -26,17 +26,17 @@
 #ifndef IDBCursor_h
 #define IDBCursor_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptValue.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/indexeddb/IDBKey.h"
 #include "modules/indexeddb/IDBRequest.h"
 #include "modules/indexeddb/IndexedDB.h"
+#include "platform/wtf/Compiler.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/Compiler.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
index d023c4e..e52115a 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.cpp
@@ -43,9 +43,9 @@
 #include "modules/indexeddb/IDBVersionChangeEvent.h"
 #include "modules/indexeddb/WebIDBDatabaseCallbacksImpl.h"
 #include "platform/Histogram.h"
+#include "platform/wtf/Atomics.h"
 #include "public/platform/modules/indexeddb/WebIDBKeyPath.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/Atomics.h"
 
 #include <limits>
 #include <memory>
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
index 5c7fd26..c0d0f28 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabase.h
@@ -42,9 +42,9 @@
 #include "modules/indexeddb/IDBTransaction.h"
 #include "modules/indexeddb/IndexedDB.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabase.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
index fbb9568..ebe4116 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBDatabaseCallbacks.h
@@ -28,8 +28,8 @@
 
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/PassRefPtr.h"
 #include "public/platform/WebVector.h"
-#include "wtf/PassRefPtr.h"
 
 #include <unordered_map>
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.h b/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.h
index e15fd14..c8b24e5 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBEventDispatcher.h
@@ -31,9 +31,9 @@
 
 #include "core/events/EventTarget.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.h b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.h
index 84f6caf..90e9e84 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBFactory.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBFactory.h
@@ -31,7 +31,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/indexeddb/IDBOpenDBRequest.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h b/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
index 9582b2650..b190181 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBIndex.h
@@ -32,11 +32,11 @@
 #include "modules/indexeddb/IDBKeyRange.h"
 #include "modules/indexeddb/IDBMetadata.h"
 #include "modules/indexeddb/IDBRequest.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabase.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKey.h b/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
index ac8cd7f1..294fc24 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKey.h
@@ -29,9 +29,9 @@
 #include "modules/ModulesExport.h"
 #include "platform/SharedBuffer.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.cpp
index 79aa133..adb501cb 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.cpp
@@ -25,10 +25,10 @@
 
 #include "modules/indexeddb/IDBKeyPath.h"
 
-#include "wtf/ASCIICType.h"
-#include "wtf/dtoa.h"
-#include "wtf/text/CharacterNames.h"
-#include "wtf/text/Unicode.h"
+#include "platform/wtf/ASCIICType.h"
+#include "platform/wtf/dtoa.h"
+#include "platform/wtf/text/CharacterNames.h"
+#include "platform/wtf/text/Unicode.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
index ecf126e..78c867b 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPath.h
@@ -28,10 +28,10 @@
 
 #include "bindings/modules/v8/StringOrStringSequence.h"
 #include "modules/ModulesExport.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/indexeddb/WebIDBKeyPath.h"
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPathTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPathTest.cpp
index 603c3ae..4fce1bd8 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBKeyPathTest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBKeyPathTest.cpp
@@ -28,8 +28,8 @@
 #include "bindings/core/v8/SerializedScriptValue.h"
 #include "bindings/modules/v8/V8BindingForModules.h"
 #include "modules/indexeddb/IDBKey.h"
+#include "platform/wtf/Vector.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h b/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h
index 7788dc4..6552fe45 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBMetadata.h
@@ -30,13 +30,13 @@
 #define IDBMetadata_h
 
 #include "modules/indexeddb/IDBKeyPath.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/RefCounted.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/StringHash.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/indexeddb/WebIDBMetadata.h"
-#include "wtf/Allocator.h"
-#include "wtf/HashMap.h"
-#include "wtf/RefCounted.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/StringHash.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
index f65dab5..1c8bf9ca 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObjectStore.h
@@ -36,11 +36,11 @@
 #include "modules/indexeddb/IDBMetadata.h"
 #include "modules/indexeddb/IDBRequest.h"
 #include "modules/indexeddb/IDBTransaction.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabase.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBObservation.h b/third_party/WebKit/Source/modules/indexeddb/IDBObservation.h
index 6eb7720..7fd6eae 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBObservation.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBObservation.h
@@ -8,8 +8,8 @@
 #include "bindings/core/v8/ScriptValue.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/PassRefPtr.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
index 9f38d5b..8a7c323 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBRequestTest.cpp
@@ -40,12 +40,12 @@
 #include "modules/indexeddb/IDBValue.h"
 #include "modules/indexeddb/MockWebIDBDatabase.h"
 #include "platform/SharedBuffer.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/dtoa/utils.h"
 #include "public/platform/modules/indexeddb/WebIDBCallbacks.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/dtoa/utils.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
index 1ba605c..3c9e699 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.cpp
@@ -39,7 +39,7 @@
 #include "modules/indexeddb/IDBObjectStore.h"
 #include "modules/indexeddb/IDBOpenDBRequest.h"
 #include "modules/indexeddb/IDBTracing.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h
index 045f7e17..1046398c 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBTransaction.h
@@ -36,10 +36,10 @@
 #include "modules/indexeddb/IDBMetadata.h"
 #include "modules/indexeddb/IndexedDB.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabase.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/HashSet.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp b/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
index 3ac2a56..ae58020b 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBValue.cpp
@@ -6,10 +6,10 @@
 
 #include "bindings/core/v8/SerializedScriptValue.h"
 #include "platform/blob/BlobData.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebBlobInfo.h"
 #include "public/platform/modules/indexeddb/WebIDBValue.h"
 #include "v8/include/v8.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBValue.h b/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
index ada1769..a0be459 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBValue.h
@@ -10,8 +10,8 @@
 #include "modules/indexeddb/IDBKey.h"
 #include "modules/indexeddb/IDBKeyPath.h"
 #include "platform/SharedBuffer.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebVector.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.h b/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.h
index 6dc25e33..78a57115 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IDBVersionChangeEvent.h
@@ -32,10 +32,10 @@
 #include "modules/indexeddb/IDBAny.h"
 #include "modules/indexeddb/IDBRequest.h"
 #include "modules/indexeddb/IDBVersionChangeEventInit.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h b/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
index 230da87..2eea06e 100644
--- a/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
+++ b/third_party/WebKit/Source/modules/indexeddb/IndexedDBClient.h
@@ -33,7 +33,7 @@
 #include "modules/ModulesExport.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
index b66a2dbb..f7dd18d 100644
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.cpp
@@ -57,9 +57,9 @@
 #include "modules/indexeddb/IDBRequest.h"
 #include "modules/indexeddb/IDBTransaction.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
 #include "public/platform/modules/indexeddb/WebIDBTypes.h"
-#include "wtf/Vector.h"
 
 using blink::protocol::Array;
 using blink::protocol::IndexedDB::DatabaseWithObjectStores;
diff --git a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h
index 2f63b42e..4f72f97 100644
--- a/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h
+++ b/third_party/WebKit/Source/modules/indexeddb/InspectorIndexedDBAgent.h
@@ -34,7 +34,7 @@
 #include "core/inspector/InspectorBaseAgent.h"
 #include "core/inspector/protocol/IndexedDB.h"
 #include "modules/ModulesExport.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 #include <v8-inspector.h>
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/MockWebIDBDatabase.cpp b/third_party/WebKit/Source/modules/indexeddb/MockWebIDBDatabase.cpp
index 9f4c7ba..180be4f 100644
--- a/third_party/WebKit/Source/modules/indexeddb/MockWebIDBDatabase.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/MockWebIDBDatabase.cpp
@@ -4,8 +4,8 @@
 
 #include "MockWebIDBDatabase.h"
 
-#include "wtf/PtrUtil.h"
 #include <memory>
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
index 5bdb8fba..2f7f7df7 100644
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.cpp
@@ -36,12 +36,12 @@
 #include "modules/indexeddb/IDBRequest.h"
 #include "modules/indexeddb/IDBValue.h"
 #include "platform/SharedBuffer.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/indexeddb/WebIDBCursor.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabase.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabaseError.h"
 #include "public/platform/modules/indexeddb/WebIDBKey.h"
 #include "public/platform/modules/indexeddb/WebIDBValue.h"
-#include "wtf/PtrUtil.h"
 
 using blink::WebIDBCursor;
 using blink::WebIDBDatabase;
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h
index 77ad2399..b32f5e2 100644
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h
+++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBCallbacksImpl.h
@@ -29,10 +29,10 @@
 #ifndef WebIDBCallbacksImpl_h
 #define WebIDBCallbacksImpl_h
 
-#include "public/platform/modules/indexeddb/WebIDBCallbacks.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
 #include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "public/platform/modules/indexeddb/WebIDBCallbacks.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp b/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp
index bc106c7..5757266b 100644
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp
+++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.cpp
@@ -26,7 +26,7 @@
 #include "modules/indexeddb/WebIDBDatabaseCallbacksImpl.h"
 
 #include "core/dom/DOMException.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.h b/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.h
index bc6a7bf..2c07d191 100644
--- a/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.h
+++ b/third_party/WebKit/Source/modules/indexeddb/WebIDBDatabaseCallbacksImpl.h
@@ -27,11 +27,11 @@
 #define WebIDBDatabaseCallbacksImpl_h
 
 #include "modules/indexeddb/IDBDatabaseCallbacks.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebString.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabaseCallbacks.h"
 #include "public/platform/modules/indexeddb/WebIDBDatabaseError.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp b/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp
index 7012a0f..9d0c780 100644
--- a/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp
+++ b/third_party/WebKit/Source/modules/installation/InstallationServiceImpl.cpp
@@ -4,12 +4,12 @@
 
 #include "modules/installation/InstallationServiceImpl.h"
 
+#include <utility>
 #include "core/events/Event.h"
 #include "core/frame/LocalDOMWindow.h"
 #include "core/frame/LocalFrame.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "wtf/PtrUtil.h"
-#include <utility>
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp b/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp
index 46cefb0..a42d2e0 100644
--- a/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp
+++ b/third_party/WebKit/Source/modules/installedapp/InstalledAppController.cpp
@@ -6,8 +6,8 @@
 
 #include "core/dom/Document.h"
 #include "core/frame/LocalFrame.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/InterfaceProvider.h"
-#include "wtf/Functional.h"
 
 #include <utility>
 
diff --git a/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h b/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
index ac20a3a..430c9b8 100644
--- a/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
+++ b/third_party/WebKit/Source/modules/installedapp/InstalledAppController.h
@@ -9,13 +9,13 @@
 #include "core/frame/LocalFrame.h"
 #include "modules/ModulesExport.h"
 #include "platform/Supplementable.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/WebVector.h"
 #include "public/platform/modules/installedapp/WebRelatedApplication.h"
 #include "public/platform/modules/installedapp/WebRelatedAppsFetcher.h"
 #include "public/platform/modules/installedapp/installed_app_provider.mojom-blink.h"
 #include "public/platform/modules/installedapp/related_application.mojom-blink.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
index d2be857..a666b5c 100644
--- a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
+++ b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.cpp
@@ -16,8 +16,8 @@
 #include "core/frame/Navigator.h"
 #include "modules/installedapp/InstalledAppController.h"
 #include "modules/installedapp/RelatedApplication.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/installedapp/WebRelatedApplication.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.h b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.h
index 371c8f7..b7bc553 100644
--- a/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.h
+++ b/third_party/WebKit/Source/modules/installedapp/NavigatorInstalledApp.h
@@ -8,7 +8,7 @@
 #include "core/frame/Navigator.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/installedapp/RelatedApplication.h b/third_party/WebKit/Source/modules/installedapp/RelatedApplication.h
index ede0554..0068089 100644
--- a/third_party/WebKit/Source/modules/installedapp/RelatedApplication.h
+++ b/third_party/WebKit/Source/modules/installedapp/RelatedApplication.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/GarbageCollected.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/media_controls/BUILD.gn b/third_party/WebKit/Source/modules/media_controls/BUILD.gn
index 100d696c..406b4a9 100644
--- a/third_party/WebKit/Source/modules/media_controls/BUILD.gn
+++ b/third_party/WebKit/Source/modules/media_controls/BUILD.gn
@@ -14,5 +14,11 @@
     "MediaControlsOrientationLockDelegate.h",
     "MediaControlsWindowEventListener.cpp",
     "MediaControlsWindowEventListener.h",
+    "elements/MediaControlMuteButtonElement.cpp",
+    "elements/MediaControlMuteButtonElement.h",
+    "elements/MediaControlOverlayEnclosureElement.cpp",
+    "elements/MediaControlOverlayEnclosureElement.h",
+    "elements/MediaControlPanelEnclosureElement.cpp",
+    "elements/MediaControlPanelEnclosureElement.h",
   ]
 }
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
index 1524d75..372ad0e 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.cpp
@@ -46,6 +46,9 @@
 #include "modules/media_controls/MediaControlsMediaEventListener.h"
 #include "modules/media_controls/MediaControlsOrientationLockDelegate.h"
 #include "modules/media_controls/MediaControlsWindowEventListener.h"
+#include "modules/media_controls/elements/MediaControlMuteButtonElement.h"
+#include "modules/media_controls/elements/MediaControlOverlayEnclosureElement.h"
+#include "modules/media_controls/elements/MediaControlPanelEnclosureElement.h"
 #include "platform/EventDispatchForbiddenScope.h"
 
 namespace blink {
@@ -294,28 +297,25 @@
 //  +-MediaControlTextTrackListItemSubtitles
 //       (-internal-media-controls-text-track-list-kind-subtitles)
 void MediaControlsImpl::InitializeControls() {
-  MediaControlOverlayEnclosureElement* overlay_enclosure =
-      MediaControlOverlayEnclosureElement::Create(*this);
+  overlay_enclosure_ = new MediaControlOverlayEnclosureElement(*this);
 
   if (RuntimeEnabledFeatures::mediaControlsOverlayPlayButtonEnabled()) {
     MediaControlOverlayPlayButtonElement* overlay_play_button =
         MediaControlOverlayPlayButtonElement::Create(*this);
     overlay_play_button_ = overlay_play_button;
-    overlay_enclosure->AppendChild(overlay_play_button);
+    overlay_enclosure_->AppendChild(overlay_play_button);
   }
 
   MediaControlCastButtonElement* overlay_cast_button =
       MediaControlCastButtonElement::Create(*this, true);
   overlay_cast_button_ = overlay_cast_button;
-  overlay_enclosure->AppendChild(overlay_cast_button);
+  overlay_enclosure_->AppendChild(overlay_cast_button);
 
-  overlay_enclosure_ = overlay_enclosure;
-  AppendChild(overlay_enclosure);
+  AppendChild(overlay_enclosure_);
 
   // Create an enclosing element for the panel so we can visually offset the
   // controls correctly.
-  MediaControlPanelEnclosureElement* enclosure =
-      MediaControlPanelEnclosureElement::Create(*this);
+  enclosure_ = new MediaControlPanelEnclosureElement(*this);
 
   MediaControlPanelElement* panel = MediaControlPanelElement::Create(*this);
 
@@ -340,10 +340,8 @@
   timeline_ = timeline;
   panel->AppendChild(timeline);
 
-  MediaControlMuteButtonElement* mute_button =
-      MediaControlMuteButtonElement::Create(*this);
-  mute_button_ = mute_button;
-  panel->AppendChild(mute_button);
+  mute_button_ = new MediaControlMuteButtonElement(*this);
+  panel->AppendChild(mute_button_);
 
   MediaControlVolumeSliderElement* slider =
       MediaControlVolumeSliderElement::Create(*this);
@@ -373,10 +371,9 @@
   panel->AppendChild(toggle_closed_captions_button);
 
   panel_ = panel;
-  enclosure->AppendChild(panel);
+  enclosure_->AppendChild(panel);
 
-  enclosure_ = enclosure;
-  AppendChild(enclosure);
+  AppendChild(enclosure_);
 
   MediaControlTextTrackListElement* text_track_list =
       MediaControlTextTrackListElement::Create(*this);
@@ -404,7 +401,7 @@
   overflow_list_->AppendChild(download_button_->CreateOverflowElement(
       *this, MediaControlDownloadButtonElement::Create(*this)));
   overflow_list_->AppendChild(mute_button_->CreateOverflowElement(
-      *this, MediaControlMuteButtonElement::Create(*this)));
+      *this, new MediaControlMuteButtonElement(*this)));
   overflow_list_->AppendChild(cast_button_->CreateOverflowElement(
       *this, MediaControlCastButtonElement::Create(*this, false)));
   overflow_list_->AppendChild(
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
index 3a24a5f..bf839b5 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsImpl.h
@@ -38,6 +38,9 @@
 class MediaControlsMediaEventListener;
 class MediaControlsOrientationLockDelegate;
 class MediaControlsWindowEventListener;
+class MediaControlMuteButtonElement;
+class MediaControlOverlayEnclosureElement;
+class MediaControlPanelEnclosureElement;
 class ShadowRoot;
 
 // Default implementation of the core/ MediaControls interface used by
@@ -96,7 +99,6 @@
   // Called by the fullscreen buttons to toggle fulllscreen on/off.
   void EnterFullscreen() override;
   void ExitFullscreen() override;
-  void ShowOverlayCastButtonIfNeeded() override;
   void ToggleOverflowMenu() override;
   bool OverflowMenuVisible() override;
   // TODO(mlamouri): this method is needed in order to notify the controls that
@@ -107,6 +109,8 @@
   }
   Document& OwnerDocument() { return GetDocument(); }
 
+  void ShowOverlayCastButtonIfNeeded();
+
   DECLARE_VIRTUAL_TRACE();
 
  private:
diff --git a/third_party/WebKit/Source/modules/media_controls/MediaControlsWindowEventListener.h b/third_party/WebKit/Source/modules/media_controls/MediaControlsWindowEventListener.h
index 25b68cf..7267876 100644
--- a/third_party/WebKit/Source/modules/media_controls/MediaControlsWindowEventListener.h
+++ b/third_party/WebKit/Source/modules/media_controls/MediaControlsWindowEventListener.h
@@ -6,7 +6,7 @@
 #define MediaControlsWindowEventListener_h
 
 #include "core/events/EventListener.h"
-#include "wtf/Functional.h"
+#include "platform/wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlMuteButtonElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlMuteButtonElement.cpp
new file mode 100644
index 0000000..c4bc997
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlMuteButtonElement.cpp
@@ -0,0 +1,65 @@
+// 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 "modules/media_controls/elements/MediaControlMuteButtonElement.h"
+
+#include "core/InputTypeNames.h"
+#include "core/events/Event.h"
+#include "core/html/HTMLMediaElement.h"
+#include "modules/media_controls/MediaControlsImpl.h"
+#include "public/platform/Platform.h"
+
+namespace blink {
+
+MediaControlMuteButtonElement::MediaControlMuteButtonElement(
+    MediaControlsImpl& media_controls)
+    : MediaControlInputElement(media_controls, kMediaMuteButton) {
+  EnsureUserAgentShadowRoot();
+  setType(InputTypeNames::button);
+  SetShadowPseudoId(AtomicString("-webkit-media-controls-mute-button"));
+}
+
+bool MediaControlMuteButtonElement::WillRespondToMouseClickEvents() {
+  return true;
+}
+
+void MediaControlMuteButtonElement::UpdateDisplayType() {
+  // TODO(mlamouri): checking for volume == 0 because the mute button will look
+  // 'muted' when the volume is 0 even if the element is not muted. This allows
+  // the painting and the display type to actually match.
+  SetDisplayType((MediaElement().muted() || MediaElement().volume() == 0)
+                     ? kMediaUnMuteButton
+                     : kMediaMuteButton);
+  UpdateOverflowString();
+}
+
+WebLocalizedString::Name
+MediaControlMuteButtonElement::GetOverflowStringName() {
+  if (MediaElement().muted())
+    return WebLocalizedString::kOverflowMenuUnmute;
+  return WebLocalizedString::kOverflowMenuMute;
+}
+
+bool MediaControlMuteButtonElement::HasOverflowButton() {
+  return true;
+}
+
+void MediaControlMuteButtonElement::DefaultEventHandler(Event* event) {
+  if (event->type() == EventTypeNames::click) {
+    if (MediaElement().muted()) {
+      Platform::Current()->RecordAction(
+          UserMetricsAction("Media.Controls.Unmute"));
+    } else {
+      Platform::Current()->RecordAction(
+          UserMetricsAction("Media.Controls.Mute"));
+    }
+
+    MediaElement().setMuted(!MediaElement().muted());
+    event->SetDefaultHandled();
+  }
+
+  MediaControlInputElement::DefaultEventHandler(event);
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlMuteButtonElement.h b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlMuteButtonElement.h
new file mode 100644
index 0000000..c70fd28a
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlMuteButtonElement.h
@@ -0,0 +1,31 @@
+// 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 MediaControlMuteButtonElement_h
+#define MediaControlMuteButtonElement_h
+
+#include "core/html/shadow/MediaControlElementTypes.h"
+
+namespace blink {
+
+class Event;
+class MediaControlsImpl;
+
+class MediaControlMuteButtonElement final : public MediaControlInputElement {
+ public:
+  explicit MediaControlMuteButtonElement(MediaControlsImpl&);
+
+  // MediaControlInputElement overrides.
+  bool WillRespondToMouseClickEvents() override;
+  void UpdateDisplayType() override;
+  WebLocalizedString::Name GetOverflowStringName() override;
+  bool HasOverflowButton() override;
+
+ private:
+  void DefaultEventHandler(Event*) override;
+};
+
+}  // namespace blink
+
+#endif  // MediaControlMuteButtonElement_h
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayEnclosureElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayEnclosureElement.cpp
new file mode 100644
index 0000000..7811db2
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayEnclosureElement.cpp
@@ -0,0 +1,34 @@
+// 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 "modules/media_controls/elements/MediaControlOverlayEnclosureElement.h"
+
+#include "core/events/Event.h"
+#include "modules/media_controls/MediaControlsImpl.h"
+
+namespace blink {
+
+MediaControlOverlayEnclosureElement::MediaControlOverlayEnclosureElement(
+    MediaControlsImpl& media_controls)
+    : MediaControlDivElement(media_controls, kMediaControlsPanel) {
+  SetShadowPseudoId(AtomicString("-webkit-media-controls-overlay-enclosure"));
+}
+
+EventDispatchHandlingState*
+MediaControlOverlayEnclosureElement::PreDispatchEventHandler(Event* event) {
+  // When the media element is clicked or touched we want to make the overlay
+  // cast button visible (if the other requirements are right) even if
+  // JavaScript is doing its own handling of the event.  Doing it in
+  // preDispatchEventHandler prevents any interference from JavaScript.
+  // Note that we can't simply test for click, since JS handling of touch events
+  // can prevent their translation to click events.
+  if (event && (event->type() == EventTypeNames::click ||
+                event->type() == EventTypeNames::touchstart)) {
+    static_cast<MediaControlsImpl&>(GetMediaControls())
+        .ShowOverlayCastButtonIfNeeded();
+  }
+  return MediaControlDivElement::PreDispatchEventHandler(event);
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayEnclosureElement.h b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayEnclosureElement.h
new file mode 100644
index 0000000..c9451c39
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlOverlayEnclosureElement.h
@@ -0,0 +1,27 @@
+// 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 MediaControlOverlayEnclosureElement_h
+#define MediaControlOverlayEnclosureElement_h
+
+#include "core/html/shadow/MediaControlElementTypes.h"
+
+namespace blink {
+
+class Event;
+class EventDispatchHandlingState;
+class MediaControlsImpl;
+
+class MediaControlOverlayEnclosureElement final
+    : public MediaControlDivElement {
+ public:
+  explicit MediaControlOverlayEnclosureElement(MediaControlsImpl&);
+
+ private:
+  EventDispatchHandlingState* PreDispatchEventHandler(Event*) override;
+};
+
+}  // namespace blink
+
+#endif  // MediaControlOverlayEnclosureElement_h
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlPanelEnclosureElement.cpp b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlPanelEnclosureElement.cpp
new file mode 100644
index 0000000..00550294
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlPanelEnclosureElement.cpp
@@ -0,0 +1,17 @@
+// 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 "modules/media_controls/elements/MediaControlPanelEnclosureElement.h"
+
+#include "modules/media_controls/MediaControlsImpl.h"
+
+namespace blink {
+
+MediaControlPanelEnclosureElement::MediaControlPanelEnclosureElement(
+    MediaControlsImpl& media_controls)
+    : MediaControlDivElement(media_controls, kMediaControlsPanel) {
+  SetShadowPseudoId(AtomicString("-webkit-media-controls-enclosure"));
+}
+
+}  // namespace blink
diff --git a/third_party/WebKit/Source/modules/media_controls/elements/MediaControlPanelEnclosureElement.h b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlPanelEnclosureElement.h
new file mode 100644
index 0000000..df4b385
--- /dev/null
+++ b/third_party/WebKit/Source/modules/media_controls/elements/MediaControlPanelEnclosureElement.h
@@ -0,0 +1,21 @@
+// 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 MediaControlPanelEnclosureElement_h
+#define MediaControlPanelEnclosureElement_h
+
+#include "core/html/shadow/MediaControlElementTypes.h"
+
+namespace blink {
+
+class MediaControlsImpl;
+
+class MediaControlPanelEnclosureElement final : public MediaControlDivElement {
+ public:
+  explicit MediaControlPanelEnclosureElement(MediaControlsImpl&);
+};
+
+}  // namespace blink
+
+#endif  // MediaControlPanelEnclosureElement_h
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
index 2248805..a338af7 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.cpp
@@ -4,16 +4,16 @@
 
 #include "modules/mediacapturefromelement/HTMLCanvasElementCapture.h"
 
+#include <memory>
 #include "core/dom/ExceptionCode.h"
 #include "core/html/HTMLCanvasElement.h"
 #include "modules/mediacapturefromelement/CanvasCaptureMediaStreamTrack.h"
 #include "modules/mediastream/MediaStream.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebCanvasCaptureHandler.h"
 #include "public/platform/WebMediaStream.h"
 #include "public/platform/WebMediaStreamTrack.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace {
 const double kDefaultFrameRate = 60.0;
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.h b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.h
index 887b7a38..06d3187 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.h
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLCanvasElementCapture.h
@@ -7,7 +7,7 @@
 
 #include "core/html/HTMLCanvasElement.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.h b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.h
index f63749cc..8fa60066 100644
--- a/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.h
+++ b/third_party/WebKit/Source/modules/mediacapturefromelement/HTMLMediaElementCapture.h
@@ -5,7 +5,7 @@
 #ifndef HTMLMediaElementCapture_h
 #define HTMLMediaElementCapture_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.cpp b/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.cpp
index fdddda1..d735c937 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.cpp
+++ b/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.cpp
@@ -5,7 +5,7 @@
 #include "modules/mediarecorder/BlobEvent.h"
 
 #include "modules/mediarecorder/BlobEventInit.h"
-#include "wtf/dtoa/double.h"
+#include "platform/wtf/dtoa/double.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.h b/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.h
index caf21f3..be08089 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.h
+++ b/third_party/WebKit/Source/modules/mediarecorder/BlobEvent.h
@@ -9,7 +9,7 @@
 #include "core/fileapi/Blob.h"
 #include "modules/EventModules.h"
 #include "modules/ModulesExport.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
index ea06ca4..941d836 100644
--- a/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
+++ b/third_party/WebKit/Source/modules/mediarecorder/MediaRecorder.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/mediarecorder/MediaRecorder.h"
 
+#include <algorithm>
+#include <limits>
 #include "bindings/core/v8/Dictionary.h"
 #include "core/events/Event.h"
 #include "core/fileapi/Blob.h"
@@ -12,12 +14,10 @@
 #include "modules/mediarecorder/BlobEvent.h"
 #include "platform/blob/BlobData.h"
 #include "platform/network/mime/ContentType.h"
+#include "platform/wtf/CurrentTime.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebMediaStream.h"
-#include "wtf/CurrentTime.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
-#include <limits>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.h b/third_party/WebKit/Source/modules/mediasession/MediaMetadata.h
index 6b4357b..bb756a6 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaMetadata.h
+++ b/third_party/WebKit/Source/modules/mediasession/MediaMetadata.h
@@ -9,7 +9,7 @@
 #include "modules/ModulesExport.h"
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp b/third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp
index 54955eac..b12b74ff 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp
+++ b/third_party/WebKit/Source/modules/mediasession/MediaMetadataSanitizer.cpp
@@ -8,10 +8,10 @@
 #include "core/inspector/ConsoleMessage.h"
 #include "modules/mediasession/MediaImage.h"
 #include "modules/mediasession/MediaMetadata.h"
+#include "platform/wtf/text/StringOperators.h"
 #include "public/platform/WebIconSizesParser.h"
 #include "public/platform/WebSize.h"
 #include "url/url_constants.h"
-#include "wtf/text/StringOperators.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp b/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp
index e4b1d98..747c899 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp
+++ b/third_party/WebKit/Source/modules/mediasession/MediaSession.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/mediasession/MediaSession.h"
 
+#include <memory>
 #include "bindings/modules/v8/MediaSessionActionHandler.h"
 #include "core/dom/Document.h"
 #include "core/dom/DocumentUserGestureToken.h"
@@ -12,10 +13,9 @@
 #include "modules/mediasession/MediaMetadata.h"
 #include "modules/mediasession/MediaMetadataSanitizer.h"
 #include "platform/UserGestureIndicator.h"
+#include "platform/wtf/Optional.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
-#include "wtf/Optional.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasession/MediaSession.h b/third_party/WebKit/Source/modules/mediasession/MediaSession.h
index 038d5b95..b0f5dc8 100644
--- a/third_party/WebKit/Source/modules/mediasession/MediaSession.h
+++ b/third_party/WebKit/Source/modules/mediasession/MediaSession.h
@@ -5,15 +5,15 @@
 #ifndef MediaSession_h
 #define MediaSession_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "bindings/core/v8/TraceWrapperMember.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/ModulesExport.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/mediasession/media_session.mojom-blink.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.h b/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.h
index c5d54938..8542592 100644
--- a/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.h
+++ b/third_party/WebKit/Source/modules/mediasource/HTMLVideoElementMediaSource.h
@@ -32,7 +32,7 @@
 #define HTMLVideoElementMediaSource_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp b/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
index db6432b..d9e13a27 100644
--- a/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.cpp
@@ -30,6 +30,7 @@
 
 #include "modules/mediasource/MediaSource.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
@@ -46,11 +47,10 @@
 #include "platform/instrumentation/tracing/TraceEvent.h"
 #include "platform/network/mime/ContentType.h"
 #include "platform/network/mime/MIMETypeRegistry.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/CString.h"
 #include "public/platform/WebMediaSource.h"
 #include "public/platform/WebSourceBuffer.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/CString.h"
-#include <memory>
 
 #ifndef BLINK_MSLOG
 #define BLINK_MSLOG DVLOG(3)
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSource.h b/third_party/WebKit/Source/modules/mediasource/MediaSource.h
index 2cbb4469..c9262d3 100644
--- a/third_party/WebKit/Source/modules/mediasource/MediaSource.h
+++ b/third_party/WebKit/Source/modules/mediasource/MediaSource.h
@@ -41,8 +41,8 @@
 #include "modules/EventTargetModules.h"
 #include "modules/mediasource/SourceBuffer.h"
 #include "modules/mediasource/SourceBufferList.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/WebMediaSource.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h b/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h
index 00943e2..64c4c31 100644
--- a/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h
+++ b/third_party/WebKit/Source/modules/mediasource/MediaSourceRegistry.h
@@ -33,9 +33,9 @@
 
 #include "core/html/URLRegistry.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashMap.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
index 8ac5648a..724e3ac3 100644
--- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.cpp
@@ -30,6 +30,9 @@
 
 #include "modules/mediasource/SourceBuffer.h"
 
+#include <limits>
+#include <memory>
+#include <sstream>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/DOMArrayBuffer.h"
@@ -50,11 +53,8 @@
 #include "modules/mediasource/SourceBufferTrackBaseSupplement.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
+#include "platform/wtf/MathExtras.h"
 #include "public/platform/WebSourceBuffer.h"
-#include "wtf/MathExtras.h"
-#include <limits>
-#include <memory>
-#include <sstream>
 
 #ifndef BLINK_SBLOG
 #define BLINK_SBLOG DVLOG(3)
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
index 2002e6f..2a8ad76 100644
--- a/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBuffer.h
@@ -31,15 +31,15 @@
 #ifndef SourceBuffer_h
 #define SourceBuffer_h
 
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "core/dom/SuspendableObject.h"
 #include "modules/EventTargetModules.h"
 #include "modules/mediasource/TrackDefaultList.h"
 #include "platform/AsyncMethodRunner.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebSourceBufferClient.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/SourceBufferTrackBaseSupplement.h b/third_party/WebKit/Source/modules/mediasource/SourceBufferTrackBaseSupplement.h
index 3c2a539..9ce9a6c 100644
--- a/third_party/WebKit/Source/modules/mediasource/SourceBufferTrackBaseSupplement.h
+++ b/third_party/WebKit/Source/modules/mediasource/SourceBufferTrackBaseSupplement.h
@@ -6,7 +6,7 @@
 #define SourceBufferTrackBaseSupplement_h
 
 #include "platform/Supplementable.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/TrackDefault.h b/third_party/WebKit/Source/modules/mediasource/TrackDefault.h
index 6141af7..16394ab2 100644
--- a/third_party/WebKit/Source/modules/mediasource/TrackDefault.h
+++ b/third_party/WebKit/Source/modules/mediasource/TrackDefault.h
@@ -6,7 +6,7 @@
 #define TrackDefault_h
 
 #include "bindings/core/v8/ScriptWrappable.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.cpp b/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.cpp
index adad9ea..45c9c8b 100644
--- a/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.cpp
+++ b/third_party/WebKit/Source/modules/mediasource/TrackDefaultList.cpp
@@ -6,8 +6,8 @@
 
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
-#include "wtf/text/AtomicStringHash.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/text/AtomicStringHash.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediasource/URLMediaSource.h b/third_party/WebKit/Source/modules/mediasource/URLMediaSource.h
index 353fdbf..346cbe3 100644
--- a/third_party/WebKit/Source/modules/mediasource/URLMediaSource.h
+++ b/third_party/WebKit/Source/modules/mediasource/URLMediaSource.h
@@ -31,8 +31,8 @@
 #ifndef URLMediaSource_h
 #define URLMediaSource_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp b/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
index dfd5206..24b4b7e 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.cpp
@@ -38,10 +38,10 @@
 #include "core/inspector/ConsoleMessage.h"
 #include "modules/mediastream/MediaTrackConstraints.h"
 #include "platform/RuntimeEnabledFeatures.h"
-#include "wtf/Assertions.h"
-#include "wtf/HashMap.h"
-#include "wtf/Vector.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.h b/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.h
index 184fe36..0a013f98 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaConstraintsImpl.h
@@ -33,8 +33,8 @@
 
 #include "modules/ModulesExport.h"
 #include "modules/mediastream/MediaErrorState.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebMediaConstraints.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp b/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp
index 43576d3..63ddc29f 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaDeviceInfo.cpp
@@ -28,7 +28,7 @@
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/ScriptValue.h"
 #include "bindings/core/v8/V8ObjectBuilder.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.h
index 4930cb1..17de2809 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamEvent.h
@@ -28,7 +28,7 @@
 #include "modules/EventModules.h"
 #include "modules/mediastream/MediaStream.h"
 #include "modules/mediastream/MediaStreamEventInit.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h
index f2bb416..c06adef0 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamRegistry.h
@@ -28,8 +28,8 @@
 #include "core/html/URLRegistry.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashMap.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
index 914d570..6b119c4 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.cpp
@@ -43,8 +43,8 @@
 #include "modules/mediastream/UserMediaController.h"
 #include "platform/mediastream/MediaStreamCenter.h"
 #include "platform/mediastream/MediaStreamComponent.h"
+#include "platform/wtf/Assertions.h"
 #include "public/platform/WebMediaStreamTrack.h"
-#include "wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
index 5a7b946f4b..78feed9 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrack.h
@@ -34,8 +34,8 @@
 #include "modules/ModulesExport.h"
 #include "platform/mediastream/MediaStreamDescriptor.h"
 #include "platform/mediastream/MediaStreamSource.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebMediaConstraints.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.h b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.h
index 46abee4..ecfc720 100644
--- a/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.h
+++ b/third_party/WebKit/Source/modules/mediastream/MediaStreamTrackEvent.h
@@ -27,7 +27,7 @@
 
 #include "modules/EventModules.h"
 #include "modules/mediastream/MediaStreamTrackEventInit.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h
index 0f14fc98..a6380fd 100644
--- a/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h
+++ b/third_party/WebKit/Source/modules/mediastream/NavigatorMediaStream.h
@@ -21,9 +21,9 @@
 #define NavigatorMediaStream_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Allocator.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.h b/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.h
index 742d7d5..ad51603 100644
--- a/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.h
+++ b/third_party/WebKit/Source/modules/mediastream/NavigatorUserMediaError.h
@@ -26,7 +26,7 @@
 #define NavigatorUserMediaError_h
 
 #include "bindings/core/v8/ScriptWrappable.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/URLMediaStream.h b/third_party/WebKit/Source/modules/mediastream/URLMediaStream.h
index da22ba1..d8499d9 100644
--- a/third_party/WebKit/Source/modules/mediastream/URLMediaStream.h
+++ b/third_party/WebKit/Source/modules/mediastream/URLMediaStream.h
@@ -31,8 +31,8 @@
 #ifndef URLMediaStream_h
 #define URLMediaStream_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/UserMediaClient.h b/third_party/WebKit/Source/modules/mediastream/UserMediaClient.h
index e1822cb..5931a94 100644
--- a/third_party/WebKit/Source/modules/mediastream/UserMediaClient.h
+++ b/third_party/WebKit/Source/modules/mediastream/UserMediaClient.h
@@ -34,7 +34,7 @@
 #include "modules/ModulesExport.h"
 #include "modules/mediastream/MediaDevicesRequest.h"
 #include "modules/mediastream/UserMediaRequest.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h
index fdaf798a..46552958 100644
--- a/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h
+++ b/third_party/WebKit/Source/modules/mediastream/UserMediaRequest.h
@@ -36,8 +36,8 @@
 #include "modules/mediastream/NavigatorUserMediaErrorCallback.h"
 #include "modules/mediastream/NavigatorUserMediaSuccessCallback.h"
 #include "platform/mediastream/MediaStreamSource.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebMediaConstraints.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.h b/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.h
index de1fd15..15a6df30 100644
--- a/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.h
+++ b/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.h
@@ -5,7 +5,7 @@
 #ifndef InternalsMediaStream_h
 #define InternalsMediaStream_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
index b786ee6..bd63603 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp
@@ -32,8 +32,8 @@
 #include "core/frame/LocalFrame.h"
 #include "core/frame/Navigator.h"
 #include "core/frame/UseCounter.h"
-#include "wtf/HashSet.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
index a7cbcc1..0a4f2796 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtils.h
@@ -32,7 +32,7 @@
 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h
index 8306822..700c5274 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/NavigatorContentUtilsClient.h
@@ -29,8 +29,8 @@
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.h b/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.h
index 6b086677..a28530a3f 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.h
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/testing/InternalsNavigatorContentUtils.h
@@ -5,7 +5,7 @@
 #ifndef InternalsNavigatorContentUtils_h
 #define InternalsNavigatorContentUtils_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp b/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp
index e3aa084a..1e1c838 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.cpp
@@ -6,7 +6,7 @@
 
 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h b/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h
index 5609f5f..84a6fd8 100644
--- a/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h
+++ b/third_party/WebKit/Source/modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.h
@@ -7,8 +7,8 @@
 
 #include "modules/navigatorcontentutils/NavigatorContentUtilsClient.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashSet.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
index 7dcfb9a..21a6d6b 100644
--- a/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
+++ b/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp
@@ -9,7 +9,7 @@
 #include "core/events/Event.h"
 #include "modules/EventTargetModules.h"
 #include "platform/RuntimeEnabledFeatures.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.h b/third_party/WebKit/Source/modules/nfc/NFC.h
index 2cbde8c15..2abea87 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.h
+++ b/third_party/WebKit/Source/modules/nfc/NFC.h
@@ -13,7 +13,7 @@
 #include "device/nfc/nfc.mojom-blink.h"
 #include "modules/nfc/MessageCallback.h"
 #include "mojo/public/cpp/bindings/binding.h"
-#include "wtf/HashMap.h"
+#include "platform/wtf/HashMap.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/nfc/NFCError.h b/third_party/WebKit/Source/modules/nfc/NFCError.h
index e269393..c1d10313 100644
--- a/third_party/WebKit/Source/modules/nfc/NFCError.h
+++ b/third_party/WebKit/Source/modules/nfc/NFCError.h
@@ -6,7 +6,7 @@
 #define NFCError_h
 
 #include "device/nfc/nfc.mojom-blink.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/Notification.cpp b/third_party/WebKit/Source/modules/notifications/Notification.cpp
index bf54a32..56b2186 100644
--- a/third_party/WebKit/Source/modules/notifications/Notification.cpp
+++ b/third_party/WebKit/Source/modules/notifications/Notification.cpp
@@ -52,13 +52,13 @@
 #include "modules/notifications/NotificationResourcesLoader.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/UserGestureIndicator.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebSecurityOrigin.h"
 #include "public/platform/modules/notifications/WebNotificationAction.h"
 #include "public/platform/modules/notifications/WebNotificationConstants.h"
 #include "public/platform/modules/notifications/WebNotificationManager.h"
-#include "wtf/Assertions.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
index cd71704..d453aae 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationData.cpp
@@ -11,8 +11,8 @@
 #include "modules/notifications/Notification.h"
 #include "modules/notifications/NotificationOptions.h"
 #include "modules/vibration/VibrationController.h"
+#include "platform/wtf/CurrentTime.h"
 #include "public/platform/WebURL.h"
-#include "wtf/CurrentTime.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp b/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp
index 6753035..b726b05 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationDataTest.cpp
@@ -8,10 +8,10 @@
 #include "core/testing/NullExecutionContext.h"
 #include "modules/notifications/Notification.h"
 #include "modules/notifications/NotificationOptions.h"
+#include "platform/wtf/CurrentTime.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/Vector.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/CurrentTime.h"
-#include "wtf/HashMap.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationEvent.cpp b/third_party/WebKit/Source/modules/notifications/NotificationEvent.cpp
index 3c39d34..698ae49 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationEvent.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationEvent.cpp
@@ -5,7 +5,7 @@
 #include "modules/notifications/NotificationEvent.h"
 
 #include "modules/notifications/NotificationEventInit.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp
index e3b7c6d5..e9e5094 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp
@@ -14,11 +14,11 @@
 #include "platform/loader/fetch/ResourceLoaderOptions.h"
 #include "platform/loader/fetch/ResourceRequest.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/CurrentTime.h"
+#include "platform/wtf/Threading.h"
 #include "public/platform/WebURLRequest.h"
 #include "public/platform/modules/notifications/WebNotificationConstants.h"
 #include "skia/ext/image_operations.h"
-#include "wtf/CurrentTime.h"
-#include "wtf/Threading.h"
 
 #define NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, type_name, value, max) \
   case NotificationImageLoader::Type::k##type_name: {                         \
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h
index a7c36f1..60e000c 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h
+++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.h
@@ -5,15 +5,15 @@
 #ifndef NotificationImageLoader_h
 #define NotificationImageLoader_h
 
+#include <memory>
 #include "core/loader/ThreadableLoader.h"
 #include "core/loader/ThreadableLoaderClient.h"
 #include "modules/ModulesExport.h"
 #include "platform/SharedBuffer.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/RefPtr.h"
 #include "third_party/skia/include/core/SkBitmap.h"
-#include "wtf/Functional.h"
-#include "wtf/RefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp b/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
index ee136db59..acf6a19 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp
@@ -11,13 +11,13 @@
 #include "platform/testing/TestingPlatformSupport.h"
 #include "platform/testing/URLTestHelpers.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebURL.h"
 #include "public/platform/WebURLLoaderMockFactory.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "third_party/WebKit/Source/platform/weborigin/KURL.h"
 #include "third_party/skia/include/core/SkBitmap.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp b/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp
index 173d66f..2a585106 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationManager.cpp
@@ -11,11 +11,11 @@
 #include "modules/permissions/PermissionUtils.h"
 #include "platform/UserGestureIndicator.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
 #include "public/platform/modules/permissions/permission.mojom-blink.h"
 #include "public/platform/modules/permissions/permission_status.mojom-blink.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationManager.h b/third_party/WebKit/Source/modules/notifications/NotificationManager.h
index 1a9110c6c..0e993c9 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationManager.h
+++ b/third_party/WebKit/Source/modules/notifications/NotificationManager.h
@@ -6,10 +6,10 @@
 #define NotificationManager_h
 
 #include "core/dom/ExecutionContext.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/notifications/notification_service.mojom-blink.h"
 #include "public/platform/modules/permissions/permission.mojom-blink.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h b/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h
index 6aa5aec..1e220c46 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h
+++ b/third_party/WebKit/Source/modules/notifications/NotificationPermissionCallback.h
@@ -27,7 +27,7 @@
 #define NotificationPermissionCallback_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
index 96e6d22..1ccd98199 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.cpp
@@ -4,13 +4,13 @@
 
 #include "modules/notifications/NotificationResourcesLoader.h"
 
+#include <cmath>
 #include "platform/Histogram.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/CurrentTime.h"
+#include "platform/wtf/Threading.h"
 #include "public/platform/modules/notifications/WebNotificationData.h"
 #include "public/platform/modules/notifications/WebNotificationResources.h"
-#include "wtf/CurrentTime.h"
-#include "wtf/Threading.h"
-#include <cmath>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.h b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.h
index f483ad6..6c79993 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.h
+++ b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoader.h
@@ -5,16 +5,16 @@
 #ifndef NotificationResourcesLoader_h
 #define NotificationResourcesLoader_h
 
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "modules/notifications/NotificationImageLoader.h"
 #include "platform/heap/GarbageCollected.h"
 #include "platform/heap/Handle.h"
 #include "platform/heap/HeapAllocator.h"
 #include "platform/heap/ThreadState.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/Vector.h"
 #include "third_party/skia/include/core/SkBitmap.h"
-#include "wtf/Functional.h"
-#include "wtf/Vector.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoaderTest.cpp b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoaderTest.cpp
index 266fe64..b50eae3 100644
--- a/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoaderTest.cpp
+++ b/third_party/WebKit/Source/modules/notifications/NotificationResourcesLoaderTest.cpp
@@ -11,6 +11,8 @@
 #include "platform/testing/URLTestHelpers.h"
 #include "platform/testing/UnitTestHelpers.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebURL.h"
 #include "public/platform/WebURLLoaderMockFactory.h"
@@ -19,8 +21,6 @@
 #include "public/platform/modules/notifications/WebNotificationData.h"
 #include "public/platform/modules/notifications/WebNotificationResources.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/Functional.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.h b/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.h
index 6534a337..f34e2dc 100644
--- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.h
+++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerGlobalScopeNotifications.h
@@ -6,7 +6,7 @@
 #define ServiceWorkerGlobalScopeNotifications_h
 
 #include "core/events/EventTarget.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
index 741bdb3d..f9cf60c 100644
--- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
+++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/notifications/ServiceWorkerRegistrationNotifications.h"
 
+#include <memory>
+#include <utility>
 #include "bindings/core/v8/CallbackPromiseAdapter.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
@@ -17,14 +19,12 @@
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
 #include "platform/Histogram.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebSecurityOrigin.h"
 #include "public/platform/modules/notifications/WebNotificationData.h"
-#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/RefPtr.h"
-#include <memory>
-#include <utility>
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
index f19ff718..adf2945 100644
--- a/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
+++ b/third_party/WebKit/Source/modules/notifications/ServiceWorkerRegistrationNotifications.h
@@ -5,6 +5,7 @@
 #ifndef ServiceWorkerRegistrationNotifications_h
 #define ServiceWorkerRegistrationNotifications_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "core/dom/ContextLifecycleObserver.h"
 #include "platform/Supplementable.h"
@@ -12,10 +13,9 @@
 #include "platform/heap/Handle.h"
 #include "platform/heap/HeapAllocator.h"
 #include "platform/heap/Visitor.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/PassRefPtr.h"
 #include "public/platform/modules/notifications/WebNotificationManager.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassRefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h
index 6c8f62b2..7740626 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h
+++ b/third_party/WebKit/Source/modules/offscreencanvas/OffscreenCanvasModules.h
@@ -8,8 +8,8 @@
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/offscreencanvas/OffscreenCanvas.h"
 #include "modules/ModulesExport.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
index 0636218..1f40dd1 100644
--- a/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
+++ b/third_party/WebKit/Source/modules/offscreencanvas2d/OffscreenCanvasRenderingContext2D.cpp
@@ -14,8 +14,8 @@
 #include "platform/graphics/UnacceleratedImageBufferSurface.h"
 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h"
 #include "platform/graphics/paint/PaintCanvas.h"
-#include "wtf/Assertions.h"
-#include "wtf/CurrentTime.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/CurrentTime.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAddress.cpp b/third_party/WebKit/Source/modules/payments/PaymentAddress.cpp
index 1ceecd97..894f4d3 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAddress.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentAddress.cpp
@@ -5,7 +5,7 @@
 #include "modules/payments/PaymentAddress.h"
 
 #include "bindings/core/v8/V8ObjectBuilder.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAddress.h b/third_party/WebKit/Source/modules/payments/PaymentAddress.h
index 14bcffd..805e0ba 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAddress.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentAddress.h
@@ -10,9 +10,9 @@
 #include "components/payments/content/payment_request.mojom-blink.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h
index 5289f3e..80b3c360 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppRequestConversion.h
@@ -6,7 +6,7 @@
 #define PaymentAppRequestConversion_h
 
 #include "modules/payments/PaymentAppRequest.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerGlobalScope.h b/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerGlobalScope.h
index f57192d..ee82750 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerGlobalScope.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentAppServiceWorkerGlobalScope.h
@@ -6,7 +6,7 @@
 #define PaymentAppServiceWorkerGlobalScope_h
 
 #include "core/events/EventTarget.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index fc07e3f..9b1f9b0 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -40,10 +40,10 @@
 #include "mojo/public/cpp/bindings/interface_request.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/HashSet.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/HashSet.h"
 
 using payments::mojom::blink::CanMakePaymentQueryResult;
 using payments::mojom::blink::PaymentAddressPtr;
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.h b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
index 2a8532e0..63022dc 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.h
@@ -19,11 +19,11 @@
 #include "mojo/public/cpp/bindings/binding.h"
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Compiler.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Compiler.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
index c799c2dc..6ea9282 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestEvent.cpp
@@ -5,7 +5,7 @@
 #include "modules/payments/PaymentRequestEvent.h"
 
 #include "modules/serviceworkers/RespondWithObserver.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp
index 40d68196..33c95a2 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequestUpdateEvent.cpp
@@ -12,8 +12,8 @@
 #include "core/dom/ExecutionContext.h"
 #include "core/dom/TaskRunnerHelper.h"
 #include "modules/payments/PaymentUpdater.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
index 1e3967e..790b658f 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.cpp
@@ -8,7 +8,7 @@
 #include "bindings/core/v8/V8ObjectBuilder.h"
 #include "modules/payments/PaymentAddress.h"
 #include "modules/payments/PaymentCompleter.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentResponse.h b/third_party/WebKit/Source/modules/payments/PaymentResponse.h
index dc7066de..f6de224 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentResponse.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentResponse.h
@@ -12,8 +12,8 @@
 #include "modules/ModulesExport.h"
 #include "modules/payments/PaymentCurrencyAmount.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
index f673844..9d9d7aa 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
@@ -14,10 +14,10 @@
 #include "modules/payments/PaymentShippingOption.h"
 #include "platform/heap/HeapAllocator.h"
 #include "platform/heap/Persistent.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "testing/gmock/include/gmock/gmock.h"
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentUpdater.h b/third_party/WebKit/Source/modules/payments/PaymentUpdater.h
index dc911a2..60315f0 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentUpdater.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentUpdater.h
@@ -7,7 +7,7 @@
 
 #include "modules/ModulesExport.h"
 #include "platform/heap/GarbageCollected.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp b/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
index f220509..989d5ecf 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.cpp
@@ -6,7 +6,7 @@
 
 #include "bindings/core/v8/ScriptRegexp.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/text/StringImpl.h"
+#include "platform/wtf/text/StringImpl.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
index b736e67a..177fde0 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentsValidators.h
@@ -7,8 +7,8 @@
 
 #include "components/payments/content/payment_request.mojom-blink.h"
 #include "modules/ModulesExport.h"
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp b/third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp
index d03ef9f..91730135 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentsValidatorsTest.cpp
@@ -4,9 +4,9 @@
 
 #include "modules/payments/PaymentsValidators.h"
 
-#include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/text/WTFString.h"
 #include <ostream>  // NOLINT
+#include "platform/wtf/text/WTFString.h"
+#include "testing/gtest/include/gtest/gtest.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
index 39e40ad..25da97f 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.cpp
@@ -30,7 +30,7 @@
 
 #include "modules/peerconnection/RTCCertificate.h"
 
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDTMFSender.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCDTMFSender.cpp
index aa5a414c..10b66f6 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDTMFSender.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDTMFSender.cpp
@@ -25,6 +25,7 @@
 
 #include "modules/peerconnection/RTCDTMFSender.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
@@ -32,11 +33,10 @@
 #include "core/dom/TaskRunnerHelper.h"
 #include "modules/mediastream/MediaStreamTrack.h"
 #include "modules/peerconnection/RTCDTMFToneChangeEvent.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebMediaStreamTrack.h"
 #include "public/platform/WebRTCDTMFSenderHandler.h"
 #include "public/platform/WebRTCPeerConnectionHandler.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.h b/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.h
index ba4b28dc6..df6ac4d8 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDTMFToneChangeEvent.h
@@ -28,7 +28,7 @@
 
 #include "modules/EventModules.h"
 #include "modules/peerconnection/RTCDTMFToneChangeEventInit.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
index 0041bd24..872f4719 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.cpp
@@ -24,6 +24,7 @@
 
 #include "modules/peerconnection/RTCDataChannel.h"
 
+#include <memory>
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/DOMArrayBufferView.h"
@@ -33,9 +34,8 @@
 #include "core/events/MessageEvent.h"
 #include "core/fileapi/Blob.h"
 #include "modules/peerconnection/RTCPeerConnection.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebRTCPeerConnectionHandler.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.h b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.h
index fcde42d9..ca35fb7 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.h
@@ -25,16 +25,16 @@
 #ifndef RTCDataChannel_h
 #define RTCDataChannel_h
 
+#include <memory>
 #include "base/gtest_prod_util.h"
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "core/dom/SuspendableObject.h"
 #include "modules/EventTargetModules.h"
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Compiler.h"
 #include "public/platform/WebRTCDataChannelHandler.h"
 #include "public/platform/WebRTCDataChannelHandlerClient.h"
-#include "wtf/Compiler.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.h b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.h
index c8f441f5..fdbf1d4 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelEvent.h
@@ -28,7 +28,7 @@
 #include "modules/EventModules.h"
 #include "modules/peerconnection/RTCDataChannel.h"
 #include "modules/peerconnection/RTCDataChannelEventInit.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelTest.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelTest.cpp
index 8bdac92..49acc0c 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelTest.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannelTest.cpp
@@ -9,12 +9,12 @@
 #include "core/dom/DOMException.h"
 #include "core/events/Event.h"
 #include "platform/heap/Heap.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebRTCDataChannelHandler.h"
 #include "public/platform/WebVector.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCIceCandidate.h b/third_party/WebKit/Source/modules/peerconnection/RTCIceCandidate.h
index 46f04d7..dcea14d 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCIceCandidate.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCIceCandidate.h
@@ -32,8 +32,8 @@
 #define RTCIceCandidate_h
 
 #include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebRTCICECandidate.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCLegacyStatsReport.h b/third_party/WebKit/Source/modules/peerconnection/RTCLegacyStatsReport.h
index 3c89088..179f28e2 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCLegacyStatsReport.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCLegacyStatsReport.h
@@ -26,10 +26,10 @@
 #define RTCLegacyStatsReport_h
 
 #include "bindings/core/v8/ScriptWrappable.h"
-#include "wtf/HashMap.h"
-#include "wtf/Vector.h"
-#include "wtf/text/StringHash.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/StringHash.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
index 98700dde..569b12a 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -82,6 +82,8 @@
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/peerconnection/RTCAnswerOptionsPlatform.h"
 #include "platform/peerconnection/RTCOfferOptionsPlatform.h"
+#include "platform/wtf/CurrentTime.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebCryptoAlgorithmParams.h"
 #include "public/platform/WebMediaStream.h"
@@ -99,8 +101,6 @@
 #include "public/platform/WebRTCSessionDescriptionRequest.h"
 #include "public/platform/WebRTCStatsRequest.h"
 #include "public/platform/WebRTCVoidRequest.h"
-#include "wtf/CurrentTime.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnectionIceEvent.h b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnectionIceEvent.h
index 5b16546..0bc31eec 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnectionIceEvent.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnectionIceEvent.h
@@ -26,7 +26,7 @@
 #define RTCPeerConnectionIceEvent_h
 
 #include "modules/EventModules.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 class RTCIceCandidate;
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp
index e164e4d..3f57b445 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCRtpReceiver.cpp
@@ -5,8 +5,8 @@
 #include "modules/peerconnection/RTCRtpReceiver.h"
 
 #include "bindings/core/v8/Microtask.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebRTCRtpContributingSource.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.h b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.h
index 266646d..a3ad529 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescription.h
@@ -32,8 +32,8 @@
 #define RTCSessionDescription_h
 
 #include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebRTCSessionDescription.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.cpp
index 36cff8eb..b30a7ab 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.cpp
@@ -36,8 +36,8 @@
 #include "modules/peerconnection/RTCPeerConnectionErrorCallback.h"
 #include "modules/peerconnection/RTCSessionDescription.h"
 #include "modules/peerconnection/RTCSessionDescriptionCallback.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebRTCSessionDescription.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.h b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.h
index 1b89c33..4d0b988e 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestImpl.h
@@ -34,7 +34,7 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "platform/heap/Handle.h"
 #include "platform/peerconnection/RTCSessionDescriptionRequest.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestPromiseImpl.h b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestPromiseImpl.h
index 6e1f2a7..fb3aea1 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestPromiseImpl.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCSessionDescriptionRequestPromiseImpl.h
@@ -6,7 +6,7 @@
 #define RTCSessionDescriptionRequestPromiseImpl_h
 
 #include "platform/peerconnection/RTCSessionDescriptionRequest.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCStatsReport.h b/third_party/WebKit/Source/modules/peerconnection/RTCStatsReport.h
index 25e31a4..226b6ed 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCStatsReport.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCStatsReport.h
@@ -8,9 +8,9 @@
 #include "bindings/core/v8/Maplike.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/GarbageCollected.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebCString.h"
 #include "public/platform/WebRTCStats.h"
-#include "wtf/text/WTFString.h"
 
 #include <map>
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCStatsRequestImpl.h b/third_party/WebKit/Source/modules/peerconnection/RTCStatsRequestImpl.h
index fe91d4ef..adee2e75 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCStatsRequestImpl.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCStatsRequestImpl.h
@@ -29,8 +29,8 @@
 #include "modules/peerconnection/RTCStatsResponse.h"
 #include "platform/heap/Handle.h"
 #include "platform/peerconnection/RTCStatsRequest.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCStatsResponse.h b/third_party/WebKit/Source/modules/peerconnection/RTCStatsResponse.h
index 9a3972c..e361008 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCStatsResponse.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCStatsResponse.h
@@ -29,9 +29,9 @@
 #include "modules/peerconnection/RTCLegacyStatsReport.h"
 #include "platform/heap/Handle.h"
 #include "platform/peerconnection/RTCStatsResponseBase.h"
-#include "wtf/HashMap.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCVoidRequestPromiseImpl.h b/third_party/WebKit/Source/modules/peerconnection/RTCVoidRequestPromiseImpl.h
index a3f9dab..1e07c8c 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCVoidRequestPromiseImpl.h
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCVoidRequestPromiseImpl.h
@@ -6,7 +6,7 @@
 #define RTCVoidRequestPromiseImpl_h
 
 #include "platform/peerconnection/RTCVoidRequest.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/peerconnection/testing/InternalsRTCCertificate.h b/third_party/WebKit/Source/modules/peerconnection/testing/InternalsRTCCertificate.h
index 9f1a9eed..32b4ac6 100644
--- a/third_party/WebKit/Source/modules/peerconnection/testing/InternalsRTCCertificate.h
+++ b/third_party/WebKit/Source/modules/peerconnection/testing/InternalsRTCCertificate.h
@@ -6,7 +6,7 @@
 #define InternalsRTCCertificate_h
 
 #include "modules/peerconnection/RTCCertificate.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp b/third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp
index dd7b844..b5963fa 100644
--- a/third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp
+++ b/third_party/WebKit/Source/modules/permissions/PermissionStatus.cpp
@@ -9,8 +9,8 @@
 #include "core/events/Event.h"
 #include "modules/EventTargetModulesNames.h"
 #include "modules/permissions/PermissionUtils.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/Platform.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/permissions/PermissionStatus.h b/third_party/WebKit/Source/modules/permissions/PermissionStatus.h
index 848b2b4a..4ae2e100 100644
--- a/third_party/WebKit/Source/modules/permissions/PermissionStatus.h
+++ b/third_party/WebKit/Source/modules/permissions/PermissionStatus.h
@@ -10,9 +10,9 @@
 #include "core/events/EventTarget.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/permissions/permission.mojom-blink.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/permissions/Permissions.cpp b/third_party/WebKit/Source/modules/permissions/Permissions.cpp
index f622d3b..33e84e59 100644
--- a/third_party/WebKit/Source/modules/permissions/Permissions.cpp
+++ b/third_party/WebKit/Source/modules/permissions/Permissions.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/permissions/Permissions.h"
 
+#include <memory>
 #include "bindings/core/v8/Dictionary.h"
 #include "bindings/core/v8/Nullable.h"
 #include "bindings/core/v8/ScriptPromise.h"
@@ -19,12 +20,11 @@
 #include "modules/permissions/PermissionStatus.h"
 #include "modules/permissions/PermissionUtils.h"
 #include "platform/UserGestureIndicator.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/NotFound.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/Platform.h"
-#include "wtf/Functional.h"
-#include "wtf/NotFound.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Vector.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMMimeType.cpp b/third_party/WebKit/Source/modules/plugins/DOMMimeType.cpp
index 9ad5aa61..d64535b8 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMMimeType.cpp
+++ b/third_party/WebKit/Source/modules/plugins/DOMMimeType.cpp
@@ -23,7 +23,7 @@
 #include "core/loader/FrameLoader.h"
 #include "core/page/Page.h"
 #include "modules/plugins/DOMPlugin.h"
-#include "wtf/text/StringBuilder.h"
+#include "platform/wtf/text/StringBuilder.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMMimeType.h b/third_party/WebKit/Source/modules/plugins/DOMMimeType.h
index 57359669..adb79df 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMMimeType.h
+++ b/third_party/WebKit/Source/modules/plugins/DOMMimeType.h
@@ -24,8 +24,8 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "platform/heap/Handle.h"
 #include "platform/plugins/PluginData.h"
-#include "wtf/Forward.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp b/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp
index 823cbd3..86f6be51 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp
+++ b/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.cpp
@@ -23,8 +23,8 @@
 #include "core/frame/LocalFrame.h"
 #include "core/page/Page.h"
 #include "platform/plugins/PluginData.h"
-#include "wtf/Vector.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.h b/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.h
index 81c2740..7d25549 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.h
+++ b/third_party/WebKit/Source/modules/plugins/DOMMimeTypeArray.h
@@ -25,7 +25,7 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/plugins/DOMMimeType.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMPlugin.cpp b/third_party/WebKit/Source/modules/plugins/DOMPlugin.cpp
index ac0fb25..0518480b5 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMPlugin.cpp
+++ b/third_party/WebKit/Source/modules/plugins/DOMPlugin.cpp
@@ -20,7 +20,7 @@
 #include "modules/plugins/DOMPlugin.h"
 
 #include "platform/plugins/PluginData.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMPlugin.h b/third_party/WebKit/Source/modules/plugins/DOMPlugin.h
index a566b03d..46f7659 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMPlugin.h
+++ b/third_party/WebKit/Source/modules/plugins/DOMPlugin.h
@@ -24,8 +24,8 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/plugins/DOMMimeType.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
index 9a4a602..af7a2bfb 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
+++ b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.cpp
@@ -24,8 +24,8 @@
 #include "core/page/Page.h"
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/plugins/PluginData.h"
-#include "wtf/Vector.h"
-#include "wtf/text/AtomicString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.h b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.h
index c9ed62b4..d76d39f 100644
--- a/third_party/WebKit/Source/modules/plugins/DOMPluginArray.h
+++ b/third_party/WebKit/Source/modules/plugins/DOMPluginArray.h
@@ -25,7 +25,7 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/plugins/DOMPlugin.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
index 8fd5095..5a71550d0 100644
--- a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
+++ b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
@@ -39,7 +39,7 @@
 #include "core/layout/LayoutBox.h"
 #include "core/layout/LayoutObject.h"
 #include "platform/FrameViewBase.h"
-#include "wtf/HashSet.h"
+#include "platform/wtf/HashSet.h"
 
 // This file provides a utility function to support rendering certain elements
 // above plugins.
diff --git a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.h b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.h
index 637767cc..66eebd27 100644
--- a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.h
+++ b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.h
@@ -21,7 +21,7 @@
 #define PluginOcclusionSupport_h
 
 #include "modules/ModulesExport.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 class Element;
diff --git a/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.cpp b/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.cpp
index ec0192a..da99a30 100644
--- a/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.cpp
@@ -4,13 +4,13 @@
 
 #include "modules/presentation/ExistingPresentationConnectionCallbacks.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/DOMException.h"
 #include "modules/presentation/PresentationConnection.h"
 #include "modules/presentation/PresentationError.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/presentation/WebPresentationError.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.h b/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.h
index d51ac02..e17fc9b 100644
--- a/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.h
+++ b/third_party/WebKit/Source/modules/presentation/ExistingPresentationConnectionCallbacks.h
@@ -6,9 +6,9 @@
 #define ExistingPresentationConnectionCallbacks_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/WebCallbacks.h"
 #include "public/platform/modules/presentation/WebPresentationConnectionCallbacks.h"
-#include "wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/Presentation.cpp b/third_party/WebKit/Source/modules/presentation/Presentation.cpp
index b50d657..d29a2ba 100644
--- a/third_party/WebKit/Source/modules/presentation/Presentation.cpp
+++ b/third_party/WebKit/Source/modules/presentation/Presentation.cpp
@@ -11,7 +11,7 @@
 #include "modules/presentation/PresentationReceiver.h"
 #include "modules/presentation/PresentationRequest.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailability.cpp b/third_party/WebKit/Source/modules/presentation/PresentationAvailability.cpp
index 9632c75..2f08e51f 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationAvailability.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailability.cpp
@@ -10,9 +10,9 @@
 #include "core/frame/UseCounter.h"
 #include "modules/EventTargetModulesNames.h"
 #include "modules/presentation/PresentationController.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/Platform.h"
 #include "public/platform/modules/presentation/WebPresentationClient.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailability.h b/third_party/WebKit/Source/modules/presentation/PresentationAvailability.h
index 35cf9c1..e10d392 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationAvailability.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailability.h
@@ -12,10 +12,10 @@
 #include "modules/ModulesExport.h"
 #include "modules/presentation/PresentationPromiseProperty.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/WebURL.h"
 #include "public/platform/WebVector.h"
 #include "public/platform/modules/presentation/WebPresentationAvailabilityObserver.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityCallbacks.h b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityCallbacks.h
index 53f5fd71..a7db8062 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityCallbacks.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityCallbacks.h
@@ -8,9 +8,9 @@
 #include "modules/presentation/PresentationPromiseProperty.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/WebCallbacks.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
index f2e28a1..082e6ad 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationAvailabilityTest.cpp
@@ -13,9 +13,9 @@
 #include "modules/presentation/PresentationRequest.h"
 #include "platform/testing/URLTestHelpers.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/Vector.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
-#include "wtf/Vector.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
index a4d35a3..2069e04 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/presentation/PresentationConnection.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/DOMArrayBufferView.h"
@@ -24,9 +25,8 @@
 #include "modules/presentation/PresentationController.h"
 #include "modules/presentation/PresentationReceiver.h"
 #include "modules/presentation/PresentationRequest.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/AtomicString.h"
-#include <memory>
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/AtomicString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
index c50f5dd..d4ed003 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnection.h
@@ -12,11 +12,11 @@
 #include "core/fileapi/FileError.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/presentation/WebPresentationConnection.h"
 #include "public/platform/modules/presentation/WebPresentationConnectionProxy.h"
 #include "public/platform/modules/presentation/WebPresentationController.h"
 #include "public/platform/modules/presentation/WebPresentationInfo.h"
-#include "wtf/text/WTFString.h"
 
 namespace WTF {
 class AtomicString;
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.cpp b/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.cpp
index 255ce31..cd9d089 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.cpp
@@ -4,14 +4,14 @@
 
 #include "modules/presentation/PresentationConnectionCallbacks.h"
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/DOMException.h"
 #include "modules/presentation/PresentationConnection.h"
 #include "modules/presentation/PresentationError.h"
 #include "modules/presentation/PresentationRequest.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/presentation/WebPresentationError.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h b/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h
index 5da88fe3..4fbc6ed 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationConnectionCallbacks.h
@@ -6,9 +6,9 @@
 #define PresentationConnectionCallbacks_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/WebCallbacks.h"
 #include "public/platform/modules/presentation/WebPresentationConnectionCallbacks.h"
-#include "wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationController.cpp b/third_party/WebKit/Source/modules/presentation/PresentationController.cpp
index 8f0cd973..20e8a6f 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationController.cpp
+++ b/third_party/WebKit/Source/modules/presentation/PresentationController.cpp
@@ -4,14 +4,14 @@
 
 #include "modules/presentation/PresentationController.h"
 
+#include <memory>
 #include "core/dom/Document.h"
 #include "core/frame/LocalFrame.h"
 #include "modules/presentation/PresentationConnection.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebVector.h"
 #include "public/platform/modules/presentation/WebPresentationClient.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationError.h b/third_party/WebKit/Source/modules/presentation/PresentationError.h
index 468d5ef..fc0a72a 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationError.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationError.h
@@ -6,8 +6,8 @@
 #define PresentationError_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Allocator.h"
 #include "public/platform/modules/presentation/WebPresentationError.h"
-#include "wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/presentation/PresentationRequest.h b/third_party/WebKit/Source/modules/presentation/PresentationRequest.h
index 2679e81..18229d5 100644
--- a/third_party/WebKit/Source/modules/presentation/PresentationRequest.h
+++ b/third_party/WebKit/Source/modules/presentation/PresentationRequest.h
@@ -14,7 +14,7 @@
 #include "platform/heap/Handle.h"
 #include "platform/heap/Heap.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushController.cpp b/third_party/WebKit/Source/modules/push_messaging/PushController.cpp
index 4dd73772..387d483 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushController.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushController.cpp
@@ -4,8 +4,8 @@
 
 #include "modules/push_messaging/PushController.h"
 
+#include "platform/wtf/Assertions.h"
 #include "public/platform/modules/push_messaging/WebPushClient.h"
-#include "wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushController.h b/third_party/WebKit/Source/modules/push_messaging/PushController.h
index e0ff0eb..b148eb6 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushController.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushController.h
@@ -8,8 +8,8 @@
 #include "core/frame/LocalFrame.h"
 #include "modules/ModulesExport.h"
 #include "platform/Supplementable.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushError.cpp b/third_party/WebKit/Source/modules/push_messaging/PushError.cpp
index 922fb4bd..9515a738 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushError.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushError.cpp
@@ -6,7 +6,7 @@
 
 #include "core/dom/DOMException.h"
 #include "core/dom/ExceptionCode.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushError.h b/third_party/WebKit/Source/modules/push_messaging/PushError.h
index 5cb2f9d5..97bd04e 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushError.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushError.h
@@ -7,8 +7,8 @@
 
 #include "core/dom/DOMException.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Allocator.h"
 #include "public/platform/modules/push_messaging/WebPushError.h"
-#include "wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushEvent.h b/third_party/WebKit/Source/modules/push_messaging/PushEvent.h
index 26f9257d..556d803d 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushEvent.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushEvent.h
@@ -10,8 +10,8 @@
 #include "modules/push_messaging/PushMessageData.h"
 #include "modules/serviceworkers/ExtendableEvent.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
index 546f804..0add47fc 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushManager.cpp
@@ -19,12 +19,12 @@
 #include "modules/push_messaging/PushSubscriptionOptions.h"
 #include "modules/push_messaging/PushSubscriptionOptionsInit.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/Platform.h"
 #include "public/platform/modules/push_messaging/WebPushClient.h"
 #include "public/platform/modules/push_messaging/WebPushProvider.h"
 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h"
-#include "wtf/Assertions.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp
index f6965ea..5786e6b 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.cpp
@@ -13,9 +13,9 @@
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/fileapi/Blob.h"
 #include "platform/blob/BlobData.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/TextEncoding.h"
 #include "v8/include/v8.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/TextEncoding.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.h b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.h
index eeb67db..273c65d3 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushMessageData.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushMessageData.h
@@ -9,8 +9,8 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp b/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp
index 8d70f46..6e3b222 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.cpp
@@ -6,8 +6,8 @@
 
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "modules/push_messaging/PushError.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h b/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h
index 71d36e2..e3efef4 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushPermissionStatusCallbacks.h
@@ -6,9 +6,9 @@
 #define PushPermissionStatusCallbacks_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/modules/push_messaging/WebPushPermissionStatus.h"
 #include "public/platform/modules/push_messaging/WebPushProvider.h"
-#include "wtf/Noncopyable.h"
 
 namespace WTF {
 class String;
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
index ea850d6b29..e6a1132 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.cpp
@@ -4,18 +4,18 @@
 
 #include "modules/push_messaging/PushSubscription.h"
 
+#include <memory>
 #include "bindings/core/v8/CallbackPromiseAdapter.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "bindings/core/v8/V8ObjectBuilder.h"
 #include "modules/push_messaging/PushError.h"
 #include "modules/push_messaging/PushSubscriptionOptions.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/Base64.h"
 #include "public/platform/Platform.h"
 #include "public/platform/modules/push_messaging/WebPushProvider.h"
 #include "public/platform/modules/push_messaging/WebPushSubscription.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/Base64.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.h b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.h
index a9a55d2..12f64e5 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushSubscription.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscription.h
@@ -5,15 +5,15 @@
 #ifndef PushSubscription_h
 #define PushSubscription_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptValue.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMArrayBuffer.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
index a16bd17..2e7d691c 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.cpp
@@ -8,9 +8,9 @@
 #include "modules/push_messaging/PushError.h"
 #include "modules/push_messaging/PushSubscription.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/push_messaging/WebPushSubscription.h"
-#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.h b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.h
index 15e6ca2..e909957a 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.h
+++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionCallbacks.h
@@ -6,8 +6,8 @@
 #define PushSubscriptionCallbacks_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/modules/push_messaging/WebPushProvider.h"
-#include "wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.cpp b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.cpp
index 9c25e43..5505e24 100644
--- a/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.cpp
+++ b/third_party/WebKit/Source/modules/push_messaging/PushSubscriptionOptions.cpp
@@ -8,11 +8,11 @@
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/push_messaging/PushSubscriptionOptionsInit.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebString.h"
 #include "public/platform/modules/push_messaging/WebPushSubscriptionOptions.h"
 #include "third_party/WebKit/Source/wtf/ASCIICType.h"
-#include "wtf/Assertions.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/quota/DOMError.h b/third_party/WebKit/Source/modules/quota/DOMError.h
index 3e472d29..2d27183 100644
--- a/third_party/WebKit/Source/modules/quota/DOMError.h
+++ b/third_party/WebKit/Source/modules/quota/DOMError.h
@@ -30,7 +30,7 @@
 #include "core/dom/DOMException.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/quota/DOMWindowQuota.cpp b/third_party/WebKit/Source/modules/quota/DOMWindowQuota.cpp
index 5150f396..93128e0 100644
--- a/third_party/WebKit/Source/modules/quota/DOMWindowQuota.cpp
+++ b/third_party/WebKit/Source/modules/quota/DOMWindowQuota.cpp
@@ -33,7 +33,7 @@
 #include "core/frame/LocalDOMWindow.h"
 #include "core/frame/LocalFrame.h"
 #include "modules/quota/DeprecatedStorageInfo.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h b/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h
index 42ccf12..dc14cd6 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageInfo.h
@@ -34,7 +34,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/quota/DeprecatedStorageQuota.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h
index 2ea4b8a..2b20434c 100644
--- a/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h
+++ b/third_party/WebKit/Source/modules/quota/DeprecatedStorageQuotaCallbacksImpl.h
@@ -36,8 +36,8 @@
 #include "modules/quota/StorageQuotaCallback.h"
 #include "modules/quota/StorageUsageCallback.h"
 #include "platform/StorageQuotaCallbacks.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h b/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h
index ccda74f..cd8cdc0 100644
--- a/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h
+++ b/third_party/WebKit/Source/modules/quota/StorageErrorCallback.h
@@ -34,7 +34,7 @@
 #include "core/dom/ExceptionCode.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/quota/StorageManager.cpp b/third_party/WebKit/Source/modules/quota/StorageManager.cpp
index 609a772..507ad4a 100644
--- a/third_party/WebKit/Source/modules/quota/StorageManager.cpp
+++ b/third_party/WebKit/Source/modules/quota/StorageManager.cpp
@@ -13,8 +13,8 @@
 #include "modules/quota/StorageEstimate.h"
 #include "platform/StorageQuotaCallbacks.h"
 #include "platform/UserGestureIndicator.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/Platform.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h b/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h
index 97f0066..3c5a2887 100644
--- a/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h
+++ b/third_party/WebKit/Source/modules/quota/StorageQuotaClient.h
@@ -35,8 +35,8 @@
 #include "modules/ModulesExport.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/WebStorageQuotaType.h"
-#include "wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
index 32d59d27..4b32800 100644
--- a/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
+++ b/third_party/WebKit/Source/modules/remoteplayback/RemotePlayback.h
@@ -12,12 +12,12 @@
 #include "core/events/EventTarget.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Compiler.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/remoteplayback/WebRemotePlaybackAvailability.h"
 #include "public/platform/modules/remoteplayback/WebRemotePlaybackClient.h"
 #include "public/platform/modules/remoteplayback/WebRemotePlaybackState.h"
-#include "wtf/Compiler.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/screen_orientation/LockOrientationCallback.h b/third_party/WebKit/Source/modules/screen_orientation/LockOrientationCallback.h
index ff41840..34afebd 100644
--- a/third_party/WebKit/Source/modules/screen_orientation/LockOrientationCallback.h
+++ b/third_party/WebKit/Source/modules/screen_orientation/LockOrientationCallback.h
@@ -6,11 +6,11 @@
 #define LockOrientationCallback_h
 
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/modules/screen_orientation/WebLockOrientationCallback.h"
 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.h b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.h
index 434c8da..346b66b 100644
--- a/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.h
+++ b/third_party/WebKit/Source/modules/screen_orientation/ScreenOrientation.h
@@ -9,9 +9,9 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "core/events/EventTarget.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/AtomicString.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
-#include "wtf/text/AtomicString.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp b/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
index 3d1cc15..a4d70a4 100644
--- a/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
+++ b/third_party/WebKit/Source/modules/sensor/OrientationSensor.cpp
@@ -15,10 +15,10 @@
   reading_dirty_ = false;
   is_null = !CanReturnReadings();
   return is_null ? Vector<double>()
-                 : Vector<double>({ReadingValueUnchecked(3),    // W
-                                   ReadingValueUnchecked(0),    // Vx
+                 : Vector<double>({ReadingValueUnchecked(0),    // Vx
                                    ReadingValueUnchecked(1),    // Vy
-                                   ReadingValueUnchecked(2)});  // Vz
+                                   ReadingValueUnchecked(2),    // Vz
+                                   ReadingValueUnchecked(3)});  // W
 }
 
 template <typename T>
diff --git a/third_party/WebKit/Source/modules/sensor/SensorProxy.h b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
index 84bc7a4..b21ac49 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorProxy.h
+++ b/third_party/WebKit/Source/modules/sensor/SensorProxy.h
@@ -13,7 +13,7 @@
 #include "mojo/public/cpp/bindings/binding.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp b/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp
index fb9d88d..8904912 100644
--- a/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp
+++ b/third_party/WebKit/Source/modules/sensor/SensorReadingUpdater.cpp
@@ -7,7 +7,7 @@
 #include "core/dom/Document.h"
 #include "device/generic_sensor/public/interfaces/sensor.mojom-blink.h"
 #include "modules/sensor/SensorProxy.h"
-#include "wtf/CurrentTime.h"
+#include "platform/wtf/CurrentTime.h"
 
 using device::mojom::blink::ReportingMode;
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
index 56ed7a9..d714e9e 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/FetchEvent.cpp
@@ -14,10 +14,10 @@
 #include "modules/serviceworkers/ServiceWorkerError.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
 #include "platform/network/NetworkUtils.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebURLResponse.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerError.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
index ffb726e..32ceb93 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ForeignFetchEvent.cpp
@@ -8,7 +8,7 @@
 #include "bindings/core/v8/V8PrivateProperty.h"
 #include "modules/fetch/Request.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h
index 90e0afe..72b9932ab 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorker.h
@@ -31,15 +31,15 @@
 #ifndef ServiceWorker_h
 #define ServiceWorker_h
 
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/SerializedScriptValue.h"
 #include "core/workers/AbstractWorker.h"
 #include "modules/ModulesExport.h"
+#include "platform/wtf/PassRefPtr.h"
 #include "public/platform/modules/serviceworker/WebServiceWorker.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerProxy.h"
-#include "wtf/PassRefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp
index 6370e73d..eecb7b5 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.cpp
@@ -11,8 +11,8 @@
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/SerializedScriptValue.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebString.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.h
index 63f2558..bb5a351 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClient.h
@@ -5,14 +5,14 @@
 #ifndef ServiceWorkerClient_h
 #define ServiceWorkerClient_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "bindings/core/v8/SerializedScriptValue.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
-#include "wtf/Forward.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
index 3a38c24d..760b26cf 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerClients.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/serviceworkers/ServiceWorkerClients.h"
 
+#include <memory>
+#include <utility>
 #include "bindings/core/v8/CallbackPromiseAdapter.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/DOMException.h"
@@ -14,13 +16,11 @@
 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
 #include "modules/serviceworkers/ServiceWorkerWindowClient.h"
 #include "modules/serviceworkers/ServiceWorkerWindowClientCallback.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerClientQueryOptions.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include <memory>
-#include <utility>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
index e6e72d0..87ceca0 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
@@ -57,12 +57,12 @@
 #include "platform/RuntimeEnabledFeatures.h"
 #include "platform/weborigin/SchemeRegistry.h"
 #include "platform/weborigin/SecurityViolationReportingPolicy.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebString.h"
 #include "public/platform/WebURL.h"
 #include "public/platform/modules/serviceworker/WebServiceWorker.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h
index f6b097f2..55aa4ed1 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h
@@ -31,6 +31,7 @@
 #ifndef ServiceWorkerContainer_h
 #define ServiceWorkerContainer_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptPromiseProperty.h"
 #include "bindings/core/v8/ScriptWrappable.h"
@@ -41,10 +42,9 @@
 #include "modules/serviceworkers/ServiceWorker.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerProviderClient.h"
-#include "wtf/Forward.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.h
index 896fbd2d..4d1d5fe 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerClient.h
@@ -5,11 +5,11 @@
 #ifndef ServiceWorkerContainerClient_h
 #define ServiceWorkerContainerClient_h
 
+#include <memory>
 #include "core/dom/Document.h"
 #include "core/workers/WorkerClients.h"
 #include "modules/ModulesExport.h"
-#include "wtf/Forward.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
index fcbc41ac..d4132287 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
@@ -24,13 +24,13 @@
 #include "modules/serviceworkers/ServiceWorkerContainerClient.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebURL.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
index 9697093..a6db17ab 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
@@ -60,10 +60,10 @@
 #include "platform/loader/fetch/ResourceLoaderOptions.h"
 #include "platform/loader/fetch/ResourceRequest.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/CurrentTime.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebURL.h"
-#include "wtf/CurrentTime.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
index c1d32db..ecb8482 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
@@ -30,14 +30,14 @@
 #ifndef ServiceWorkerGlobalScope_h
 #define ServiceWorkerGlobalScope_h
 
+#include <memory>
 #include "bindings/modules/v8/RequestOrUSVString.h"
 #include "core/workers/WorkerGlobalScope.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h"
-#include "wtf/Assertions.h"
-#include "wtf/Forward.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
index 7af5057..62e04e1a 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h
@@ -31,17 +31,17 @@
 #ifndef ServiceWorkerGlobalScopeClient_h
 #define ServiceWorkerGlobalScopeClient_h
 
+#include <memory>
 #include "core/dom/MessagePort.h"
 #include "core/workers/WorkerClients.h"
 #include "modules/ModulesExport.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/WebMessagePortChannel.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsClaimCallbacks.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerClientsInfo.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerSkipWaitingCallbacks.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
index 1ea985d..770789f 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
@@ -15,9 +15,9 @@
 #include "core/inspector/ConsoleMessage.h"
 #include "modules/serviceworkers/NavigatorServiceWorker.h"
 #include "modules/serviceworkers/ServiceWorkerContainer.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebScheduler.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.h
index 836d264e..3f28e991 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.h
@@ -7,8 +7,8 @@
 
 #include "core/html/LinkResource.h"
 #include "modules/ModulesExport.h"
-#include "wtf/Allocator.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
index a2ea3ac..31f1246 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
 
+#include <memory>
+#include <utility>
 #include "bindings/core/v8/CallbackPromiseAdapter.h"
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptState.h"
@@ -14,10 +16,8 @@
 #include "modules/EventTargetModules.h"
 #include "modules/serviceworkers/ServiceWorkerContainerClient.h"
 #include "modules/serviceworkers/ServiceWorkerError.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerProvider.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
-#include <utility>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h
index ef4963aa..673a3bf 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h
@@ -5,6 +5,7 @@
 #ifndef ServiceWorkerRegistration_h
 #define ServiceWorkerRegistration_h
 
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/ContextLifecycleObserver.h"
@@ -13,10 +14,9 @@
 #include "modules/serviceworkers/ServiceWorker.h"
 #include "modules/serviceworkers/ServiceWorkerRegistration.h"
 #include "platform/Supplementable.h"
+#include "platform/wtf/Forward.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistration.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerRegistrationProxy.h"
-#include "wtf/Forward.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h
index dd77122..a442a8a5 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h
@@ -5,11 +5,11 @@
 #ifndef ServiceWorkerScriptCachedMetadataHandler_h
 #define ServiceWorkerScriptCachedMetadataHandler_h
 
+#include <stdint.h>
 #include "platform/heap/Handle.h"
 #include "platform/loader/fetch/CachedMetadataHandler.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Vector.h"
-#include <stdint.h>
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.cpp
index 618ae230..d38d6c3b 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerThread.cpp
@@ -30,11 +30,11 @@
 
 #include "modules/serviceworkers/ServiceWorkerThread.h"
 
+#include <memory>
 #include "core/workers/WorkerBackingThread.h"
 #include "core/workers/WorkerThreadStartupData.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
index 08b24fb..a9b3218c 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/serviceworkers/ServiceWorkerWindowClient.h"
 
+#include <memory>
 #include "bindings/core/v8/CallbackPromiseAdapter.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "core/dom/DOMException.h"
@@ -14,9 +15,8 @@
 #include "modules/serviceworkers/ServiceWorkerError.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
 #include "modules/serviceworkers/ServiceWorkerWindowClientCallback.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebString.h"
-#include "wtf/RefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.h
index 7ed4eac..27f9fc9 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClient.h
@@ -5,12 +5,12 @@
 #ifndef ServiceWorkerWindowClient_h
 #define ServiceWorkerWindowClient_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "modules/ModulesExport.h"
 #include "modules/serviceworkers/ServiceWorkerClient.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClientCallback.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClientCallback.cpp
index 990cd02..801d110d 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClientCallback.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerWindowClientCallback.cpp
@@ -8,7 +8,7 @@
 #include "core/dom/DOMException.h"
 #include "modules/serviceworkers/ServiceWorkerError.h"
 #include "modules/serviceworkers/ServiceWorkerWindowClient.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
index e9cbe11..6d1773c7 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp
@@ -12,10 +12,10 @@
 #include "core/dom/ExecutionContext.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScope.h"
 #include "platform/LayoutTestSupport.h"
+#include "platform/wtf/Assertions.h"
 #include "public/platform/Platform.h"
 #include "public/platform/modules/serviceworker/WebServiceWorkerEventResult.h"
 #include "v8/include/v8.h"
-#include "wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
index 151c2d8..072d093 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
@@ -8,7 +8,7 @@
 #include "modules/ModulesExport.h"
 #include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h"
 #include "platform/Timer.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/serviceworkers/testing/InternalsServiceWorker.h b/third_party/WebKit/Source/modules/serviceworkers/testing/InternalsServiceWorker.h
index 3ad51fe..d5fbe07 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/testing/InternalsServiceWorker.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/testing/InternalsServiceWorker.h
@@ -5,7 +5,7 @@
 #ifndef InternalsServiceWorker_h
 #define InternalsServiceWorker_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.h b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.h
index 7898115..a79af1da 100644
--- a/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.h
+++ b/third_party/WebKit/Source/modules/shapedetection/DetectedBarcode.h
@@ -8,7 +8,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/ModulesExport.h"
 #include "modules/imagecapture/Point2D.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/shapedetection/DetectedText.h b/third_party/WebKit/Source/modules/shapedetection/DetectedText.h
index ff24120..4c92dc1 100644
--- a/third_party/WebKit/Source/modules/shapedetection/DetectedText.h
+++ b/third_party/WebKit/Source/modules/shapedetection/DetectedText.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/ModulesExport.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
index 308abd8..e54dd68ed 100644
--- a/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
+++ b/third_party/WebKit/Source/modules/shapedetection/ShapeDetector.cpp
@@ -14,9 +14,9 @@
 #include "core/html/ImageData.h"
 #include "core/loader/resource/ImageResourceContent.h"
 #include "platform/graphics/Image.h"
+#include "platform/wtf/CheckedNumeric.h"
 #include "third_party/skia/include/core/SkImage.h"
 #include "third_party/skia/include/core/SkImageInfo.h"
-#include "wtf/CheckedNumeric.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp b/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp
index 15d848c..f0f337c4 100644
--- a/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp
+++ b/third_party/WebKit/Source/modules/speech/DOMWindowSpeechSynthesis.cpp
@@ -33,7 +33,7 @@
 #include "bindings/core/v8/ScriptState.h"
 #include "core/frame/LocalDOMWindow.h"
 #include "core/frame/LocalFrame.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechGrammar.h b/third_party/WebKit/Source/modules/speech/SpeechGrammar.h
index c62f77c..3e9016c 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechGrammar.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechGrammar.h
@@ -30,7 +30,7 @@
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognition.h b/third_party/WebKit/Source/modules/speech/SpeechRecognition.h
index 584d609..0f64f75 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechRecognition.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechRecognition.h
@@ -33,9 +33,9 @@
 #include "modules/speech/SpeechGrammarList.h"
 #include "modules/speech/SpeechRecognitionResult.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Compiler.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebPrivatePtr.h"
-#include "wtf/Compiler.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.h b/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.h
index da30dd9..bdddbdd 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechRecognitionAlternative.h
@@ -29,7 +29,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognitionClient.h b/third_party/WebKit/Source/modules/speech/SpeechRecognitionClient.h
index 8deb07d3..cefed7ec 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechRecognitionClient.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechRecognitionClient.h
@@ -26,9 +26,9 @@
 #ifndef SpeechRecognitionClient_h
 #define SpeechRecognitionClient_h
 
-#include "modules/ModulesExport.h"
-#include "wtf/text/WTFString.h"
 #include <memory>
+#include "modules/ModulesExport.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.h b/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.h
index df12885..e8d8729 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechRecognitionError.h
@@ -29,7 +29,7 @@
 #include "modules/EventModules.h"
 #include "modules/ModulesExport.h"
 #include "modules/speech/SpeechRecognitionErrorInit.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp
index 218671c9..a6c620f 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp
+++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesis.cpp
@@ -28,7 +28,7 @@
 #include "core/dom/ExecutionContext.h"
 #include "modules/speech/SpeechSynthesisEvent.h"
 #include "platform/speech/PlatformSpeechSynthesisVoice.h"
-#include "wtf/CurrentTime.h"
+#include "platform/wtf/CurrentTime.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
index 847cc91..1d49cf7 100644
--- a/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
+++ b/third_party/WebKit/Source/modules/speech/SpeechSynthesisVoice.h
@@ -29,8 +29,8 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
 #include "platform/speech/PlatformSpeechSynthesisVoice.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/speech/testing/InternalsSpeechSynthesis.h b/third_party/WebKit/Source/modules/speech/testing/InternalsSpeechSynthesis.h
index 9c7d8720..8ebccc6 100644
--- a/third_party/WebKit/Source/modules/speech/testing/InternalsSpeechSynthesis.h
+++ b/third_party/WebKit/Source/modules/speech/testing/InternalsSpeechSynthesis.h
@@ -31,7 +31,7 @@
 #ifndef InternalsSpeechSynthesis_h
 #define InternalsSpeechSynthesis_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/srcobject/HTMLMediaElementSrcObject.h b/third_party/WebKit/Source/modules/srcobject/HTMLMediaElementSrcObject.h
index cadd9f2..6220870c3 100644
--- a/third_party/WebKit/Source/modules/srcobject/HTMLMediaElementSrcObject.h
+++ b/third_party/WebKit/Source/modules/srcobject/HTMLMediaElementSrcObject.h
@@ -6,7 +6,7 @@
 #define HTMLMediaElementSrcObject_h
 
 #include "modules/ModulesExport.h"
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/DOMWindowStorage.cpp b/third_party/WebKit/Source/modules/storage/DOMWindowStorage.cpp
index aa9530a..fb8a44a7 100644
--- a/third_party/WebKit/Source/modules/storage/DOMWindowStorage.cpp
+++ b/third_party/WebKit/Source/modules/storage/DOMWindowStorage.cpp
@@ -12,7 +12,7 @@
 #include "modules/storage/Storage.h"
 #include "modules/storage/StorageNamespace.h"
 #include "modules/storage/StorageNamespaceController.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/InspectorDOMStorageAgent.h b/third_party/WebKit/Source/modules/storage/InspectorDOMStorageAgent.h
index a6e32ad2..d6d9044 100644
--- a/third_party/WebKit/Source/modules/storage/InspectorDOMStorageAgent.h
+++ b/third_party/WebKit/Source/modules/storage/InspectorDOMStorageAgent.h
@@ -33,8 +33,8 @@
 #include "core/inspector/protocol/DOMStorage.h"
 #include "modules/ModulesExport.h"
 #include "modules/storage/StorageArea.h"
-#include "wtf/HashMap.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/Storage.cpp b/third_party/WebKit/Source/modules/storage/Storage.cpp
index 47a2814..16ab5bc 100644
--- a/third_party/WebKit/Source/modules/storage/Storage.cpp
+++ b/third_party/WebKit/Source/modules/storage/Storage.cpp
@@ -26,8 +26,8 @@
 #include "modules/storage/Storage.h"
 
 #include "bindings/core/v8/ExceptionState.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/Storage.h b/third_party/WebKit/Source/modules/storage/Storage.h
index 8fa1c87..f61201c0 100644
--- a/third_party/WebKit/Source/modules/storage/Storage.h
+++ b/third_party/WebKit/Source/modules/storage/Storage.h
@@ -31,8 +31,8 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "modules/storage/StorageArea.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/StorageArea.h b/third_party/WebKit/Source/modules/storage/StorageArea.h
index 65ef26cb..92201fbf 100644
--- a/third_party/WebKit/Source/modules/storage/StorageArea.h
+++ b/third_party/WebKit/Source/modules/storage/StorageArea.h
@@ -26,11 +26,11 @@
 #ifndef StorageArea_h
 #define StorageArea_h
 
+#include <memory>
 #include "core/frame/LocalFrame.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/StorageEvent.h b/third_party/WebKit/Source/modules/storage/StorageEvent.h
index 3d86f5c..a492d126 100644
--- a/third_party/WebKit/Source/modules/storage/StorageEvent.h
+++ b/third_party/WebKit/Source/modules/storage/StorageEvent.h
@@ -28,7 +28,7 @@
 
 #include "core/events/Event.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp b/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
index ac6857e..ea002bb8 100644
--- a/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
+++ b/third_party/WebKit/Source/modules/storage/StorageNamespace.cpp
@@ -25,14 +25,14 @@
 
 #include "modules/storage/StorageNamespace.h"
 
+#include <memory>
 #include "modules/storage/StorageArea.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebSecurityOrigin.h"
 #include "public/platform/WebStorageArea.h"
 #include "public/platform/WebStorageNamespace.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
index 21eddb3..052786b 100644
--- a/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
+++ b/third_party/WebKit/Source/modules/vibration/NavigatorVibration.h
@@ -26,8 +26,8 @@
 #include "platform/Supplementable.h"
 #include "platform/heap/GarbageCollected.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vibration/VibrationController.h b/third_party/WebKit/Source/modules/vibration/VibrationController.h
index a8d4310..6da7754 100644
--- a/third_party/WebKit/Source/modules/vibration/VibrationController.h
+++ b/third_party/WebKit/Source/modules/vibration/VibrationController.h
@@ -27,8 +27,8 @@
 #include "platform/Timer.h"
 #include "platform/heap/GarbageCollected.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vibration/testing/InternalsVibration.h b/third_party/WebKit/Source/modules/vibration/testing/InternalsVibration.h
index 7e6632d..9db4e7fc 100644
--- a/third_party/WebKit/Source/modules/vibration/testing/InternalsVibration.h
+++ b/third_party/WebKit/Source/modules/vibration/testing/InternalsVibration.h
@@ -31,8 +31,8 @@
 #ifndef InternalsVibration_h
 #define InternalsVibration_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
index b1922b31..2dc43c9 100644
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.cpp
@@ -18,8 +18,8 @@
 #include "modules/vr/VRDisplay.h"
 #include "modules/vr/VRGetDevicesCallback.h"
 #include "modules/vr/VRPose.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/NavigatorVR.h b/third_party/WebKit/Source/modules/vr/NavigatorVR.h
index 001c962..97f942d 100644
--- a/third_party/WebKit/Source/modules/vr/NavigatorVR.h
+++ b/third_party/WebKit/Source/modules/vr/NavigatorVR.h
@@ -14,8 +14,8 @@
 #include "modules/vr/VRDisplayEvent.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Noncopyable.h"
 #include "public/platform/WebVector.h"
-#include "wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VRController.cpp b/third_party/WebKit/Source/modules/vr/VRController.cpp
index 79c6a18..cbbcda1 100644
--- a/third_party/WebKit/Source/modules/vr/VRController.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRController.cpp
@@ -12,7 +12,7 @@
 #include "modules/vr/VRGetDevicesCallback.h"
 #include "public/platform/InterfaceProvider.h"
 
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VRController.h b/third_party/WebKit/Source/modules/vr/VRController.h
index d06b7cc..1094b81 100644
--- a/third_party/WebKit/Source/modules/vr/VRController.h
+++ b/third_party/WebKit/Source/modules/vr/VRController.h
@@ -11,7 +11,7 @@
 #include "modules/vr/VRDisplay.h"
 #include "mojo/public/cpp/bindings/binding.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Deque.h"
+#include "platform/wtf/Deque.h"
 
 #include <memory>
 
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
index 5e13e54..bc08afd 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
@@ -31,9 +31,9 @@
 #include "platform/Histogram.h"
 #include "platform/UserGestureIndicator.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
+#include "platform/wtf/AutoReset.h"
+#include "platform/wtf/Time.h"
 #include "public/platform/Platform.h"
-#include "wtf/AutoReset.h"
-#include "wtf/Time.h"
 
 #include <array>
 
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplay.h b/third_party/WebKit/Source/modules/vr/VRDisplay.h
index 457f8b7..25f30e8 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplay.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplay.h
@@ -14,9 +14,9 @@
 #include "mojo/public/cpp/bindings/binding.h"
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebGraphicsContext3DProvider.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
 
 namespace gpu {
 namespace gles2 {
diff --git a/third_party/WebKit/Source/modules/vr/VRDisplayCapabilities.h b/third_party/WebKit/Source/modules/vr/VRDisplayCapabilities.h
index 7832c33..73f84840 100644
--- a/third_party/WebKit/Source/modules/vr/VRDisplayCapabilities.h
+++ b/third_party/WebKit/Source/modules/vr/VRDisplayCapabilities.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VREyeParameters.h b/third_party/WebKit/Source/modules/vr/VREyeParameters.h
index 2b0e830b..1ced1e6 100644
--- a/third_party/WebKit/Source/modules/vr/VREyeParameters.h
+++ b/third_party/WebKit/Source/modules/vr/VREyeParameters.h
@@ -11,7 +11,7 @@
 #include "modules/vr/VRFieldOfView.h"
 #include "platform/heap/Handle.h"
 
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VRFieldOfView.h b/third_party/WebKit/Source/modules/vr/VRFieldOfView.h
index c870650..ee9e0f2 100644
--- a/third_party/WebKit/Source/modules/vr/VRFieldOfView.h
+++ b/third_party/WebKit/Source/modules/vr/VRFieldOfView.h
@@ -6,7 +6,7 @@
 #define VRFieldOfView_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VRFrameData.h b/third_party/WebKit/Source/modules/vr/VRFrameData.h
index f8d2eb6..3440e105 100644
--- a/third_party/WebKit/Source/modules/vr/VRFrameData.h
+++ b/third_party/WebKit/Source/modules/vr/VRFrameData.h
@@ -9,7 +9,7 @@
 #include "core/dom/DOMTypedArray.h"
 #include "device/vr/vr_service.mojom-blink.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VRPose.h b/third_party/WebKit/Source/modules/vr/VRPose.h
index 183ca67..fa55930 100644
--- a/third_party/WebKit/Source/modules/vr/VRPose.h
+++ b/third_party/WebKit/Source/modules/vr/VRPose.h
@@ -9,7 +9,7 @@
 #include "core/dom/DOMTypedArray.h"
 #include "device/vr/vr_service.mojom-blink.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/vr/VRStageParameters.h b/third_party/WebKit/Source/modules/vr/VRStageParameters.h
index f9c51107a..230eefe9 100644
--- a/third_party/WebKit/Source/modules/vr/VRStageParameters.h
+++ b/third_party/WebKit/Source/modules/vr/VRStageParameters.h
@@ -9,7 +9,7 @@
 #include "core/dom/DOMTypedArray.h"
 #include "device/vr/vr_service.mojom-blink.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
index 285b8cf6..b9a6124 100644
--- a/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
+++ b/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
@@ -10,7 +10,7 @@
 #include "core/page/PageVisibilityObserver.h"
 #include "device/wake_lock/public/interfaces/wake_lock_service.mojom-blink.h"
 #include "modules/ModulesExport.h"
-#include "wtf/Noncopyable.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
index 0a3e904a..c43bcff 100644
--- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.cpp
@@ -23,8 +23,8 @@
  * DAMAGE.
  */
 
-#include "core/dom/DOMArrayBuffer.h"
 #include "modules/webaudio/AsyncAudioDecoder.h"
+#include "core/dom/DOMArrayBuffer.h"
 #include "modules/webaudio/AudioBuffer.h"
 #include "modules/webaudio/AudioBufferCallback.h"
 #include "modules/webaudio/BaseAudioContext.h"
@@ -32,9 +32,9 @@
 #include "platform/audio/AudioBus.h"
 #include "platform/audio/AudioFileReader.h"
 #include "platform/threading/BackgroundTaskRunner.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
index 316a1090..e5ba089 100644
--- a/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
+++ b/third_party/WebKit/Source/modules/webaudio/AsyncAudioDecoder.h
@@ -26,9 +26,9 @@
 #ifndef AsyncAudioDecoder_h
 #define AsyncAudioDecoder_h
 
-#include "platform/heap/Handle.h"
-#include "wtf/build_config.h"
 #include <memory>
+#include "platform/heap/Handle.h"
+#include "platform/wtf/build_config.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandler.h b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandler.h
index 6d0c734e..ae145b8 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandler.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandler.h
@@ -26,10 +26,10 @@
 #ifndef AudioBasicProcessorHandler_h
 #define AudioBasicProcessorHandler_h
 
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "modules/webaudio/AudioNode.h"
-#include "wtf/Forward.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
index 07f250e9..2c47c71 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBasicProcessorHandlerTest.cpp
@@ -2,13 +2,13 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <memory>
 #include "core/testing/DummyPageHolder.h"
 #include "modules/webaudio/AudioBasicProcessorHandler.h"
 #include "modules/webaudio/OfflineAudioContext.h"
 #include "platform/audio/AudioProcessor.h"
+#include "platform/wtf/PtrUtil.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp
index 08f092de..8d07c3c 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.cpp
@@ -36,7 +36,7 @@
 #include "platform/audio/AudioBus.h"
 #include "platform/audio/AudioFileReader.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/typed_arrays/Float32Array.h"
+#include "platform/wtf/typed_arrays/Float32Array.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h
index d946994..782b1b9 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBuffer.h
@@ -32,10 +32,10 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMTypedArray.h"
 #include "modules/ModulesExport.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/build_config.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/build_config.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h b/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h
index c3ebd48..e8ccc98 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferCallback.h
@@ -27,7 +27,7 @@
 #define AudioBufferCallback_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/build_config.h"
+#include "platform/wtf/build_config.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
index d0904f9..771a7a2 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.cpp
@@ -23,18 +23,18 @@
  * DAMAGE.
  */
 
+#include "modules/webaudio/AudioBufferSourceNode.h"
+#include <algorithm>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "core/frame/UseCounter.h"
-#include "modules/webaudio/AudioBufferSourceNode.h"
 #include "modules/webaudio/AudioBufferSourceOptions.h"
 #include "modules/webaudio/AudioNodeOutput.h"
 #include "modules/webaudio/BaseAudioContext.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
index cf90708a..0c6df89f 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioBufferSourceNode.h
@@ -26,15 +26,15 @@
 #ifndef AudioBufferSourceNode_h
 #define AudioBufferSourceNode_h
 
+#include <memory>
 #include "modules/webaudio/AudioBuffer.h"
 #include "modules/webaudio/AudioParam.h"
 #include "modules/webaudio/AudioScheduledSourceNode.h"
 #include "modules/webaudio/PannerNode.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Threading.h"
-#include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp
index 1dbde4b..2cd793cc 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioDestinationNode.cpp
@@ -29,7 +29,7 @@
 #include "modules/webaudio/BaseAudioContext.h"
 #include "platform/audio/AudioUtilities.h"
 #include "platform/audio/DenormalDisabler.h"
-#include "wtf/Atomics.h"
+#include "platform/wtf/Atomics.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioListener.h b/third_party/WebKit/Source/modules/webaudio/AudioListener.h
index bfa00e6a..c20d103 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioListener.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioListener.h
@@ -33,7 +33,7 @@
 #include "modules/webaudio/AudioParam.h"
 #include "platform/geometry/FloatPoint3D.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
index 14067d18..68cabdd 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
@@ -32,7 +32,7 @@
 #include "modules/webaudio/AudioParam.h"
 #include "modules/webaudio/BaseAudioContext.h"
 #include "platform/InstanceCounters.h"
-#include "wtf/Atomics.h"
+#include "platform/wtf/Atomics.h"
 
 #if DEBUG_AUDIONODE_REFERENCES
 #include <stdio.h>
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.h b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
index ff984fc..292b3388 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.h
@@ -26,16 +26,16 @@
 #ifndef AudioNode_h
 #define AudioNode_h
 
+#include <memory>
 #include "modules/EventTargetModules.h"
 #include "modules/ModulesExport.h"
 #include "platform/audio/AudioBus.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/Forward.h"
-#include "wtf/RefPtr.h"
-#include "wtf/ThreadSafeRefCounted.h"
-#include "wtf/Vector.h"
-#include "wtf/build_config.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/ThreadSafeRefCounted.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/build_config.h"
 
 #define DEBUG_AUDIONODE_REFERENCES 0
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
index d419082..06bc04cc 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.cpp
@@ -24,10 +24,10 @@
  */
 
 #include "modules/webaudio/AudioNodeInput.h"
-#include "modules/webaudio/AudioNodeOutput.h"
-#include "wtf/PtrUtil.h"
 #include <algorithm>
 #include <memory>
+#include "modules/webaudio/AudioNodeOutput.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h
index 7f93215..2adfe3d 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeInput.h
@@ -26,12 +26,12 @@
 #ifndef AudioNodeInput_h
 #define AudioNodeInput_h
 
+#include <memory>
 #include "modules/webaudio/AudioNode.h"
 #include "modules/webaudio/AudioSummingJunction.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/Allocator.h"
-#include "wtf/HashSet.h"
-#include <memory>
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/HashSet.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
index 7689153..28ebb98 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.cpp
@@ -23,12 +23,12 @@
  * DAMAGE.
  */
 
-#include "modules/webaudio/AudioNodeInput.h"
 #include "modules/webaudio/AudioNodeOutput.h"
-#include "modules/webaudio/BaseAudioContext.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Threading.h"
 #include <memory>
+#include "modules/webaudio/AudioNodeInput.h"
+#include "modules/webaudio/BaseAudioContext.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h
index a9b89c03..7b5426b 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNodeOutput.h
@@ -26,12 +26,12 @@
 #ifndef AudioNodeOutput_h
 #define AudioNodeOutput_h
 
+#include <memory>
 #include "modules/webaudio/AudioNode.h"
 #include "modules/webaudio/AudioParam.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/HashSet.h"
-#include "wtf/RefPtr.h"
-#include <memory>
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
index 00465aa..85805c51 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.cpp
@@ -31,7 +31,7 @@
 #include "modules/webaudio/AudioNodeOutput.h"
 #include "platform/Histogram.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParam.h b/third_party/WebKit/Source/modules/webaudio/AudioParam.h
index cd4e8647..c393187b 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParam.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParam.h
@@ -29,15 +29,15 @@
 #ifndef AudioParam_h
 #define AudioParam_h
 
+#include <sys/types.h>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMTypedArray.h"
 #include "modules/webaudio/AudioParamTimeline.h"
 #include "modules/webaudio/AudioSummingJunction.h"
 #include "modules/webaudio/BaseAudioContext.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/ThreadSafeRefCounted.h"
-#include "wtf/text/WTFString.h"
-#include <sys/types.h>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/ThreadSafeRefCounted.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
index 100db80..026c7ccd 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp
@@ -24,13 +24,13 @@
  */
 
 #include "modules/webaudio/AudioParamTimeline.h"
+#include <algorithm>
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/CPU.h"
-#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
+#include "platform/wtf/CPU.h"
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/PtrUtil.h"
 
 #if CPU(X86) || CPU(X86_64)
 #include <emmintrin.h>
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
index b1477409..f21962c 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.h
@@ -32,9 +32,9 @@
 #include "core/dom/DOMTypedArray.h"
 #include "modules/webaudio/AudioDestinationNode.h"
 #include "modules/webaudio/BaseAudioContext.h"
-#include "wtf/Forward.h"
-#include "wtf/Threading.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/Vector.h"
 
 #include <tuple>
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h b/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h
index 42716d7..aa2369d4 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h
@@ -29,8 +29,8 @@
 #include "modules/EventModules.h"
 #include "modules/webaudio/AudioBuffer.h"
 #include "modules/webaudio/AudioProcessingEventInit.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
index 7373692..e0481f4 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioScheduledSourceNode.cpp
@@ -33,7 +33,7 @@
 #include "modules/webaudio/BaseAudioContext.h"
 #include "platform/CrossThreadFunctional.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioSummingJunction.h b/third_party/WebKit/Source/modules/webaudio/AudioSummingJunction.h
index ea5c4db..9c05d71 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioSummingJunction.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioSummingJunction.h
@@ -28,8 +28,8 @@
 
 #include "platform/audio/AudioBus.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashSet.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
index 6323c22..b294297 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletMessagingProxy.h
@@ -5,9 +5,9 @@
 #ifndef AudioWorkletMessagingProxy_h
 #define AudioWorkletMessagingProxy_h
 
-#include "core/workers/ThreadedWorkletMessagingProxy.h"
-#include "wtf/Allocator.h"
 #include <memory>
+#include "core/workers/ThreadedWorkletMessagingProxy.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h
index f5786bd..47307993 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessor.h
@@ -8,8 +8,8 @@
 #include "bindings/core/v8/ScopedPersistent.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/WTFString.h"
 #include "v8/include/v8.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h
index 550124b..f7f329c8 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h
@@ -8,8 +8,8 @@
 #include "bindings/core/v8/ScopedPersistent.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/text/WTFString.h"
 #include "v8/include/v8.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp
index 17baa1f..87362218 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThread.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/webaudio/AudioWorkletThread.h"
 
+#include <memory>
 #include "core/workers/WorkerBackingThread.h"
 #include "core/workers/WorkerThreadStartupData.h"
 #include "modules/webaudio/AudioWorkletGlobalScope.h"
@@ -12,10 +13,9 @@
 #include "platform/WebThreadSupportingGC.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
-#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
index 4354ef7..4fbbf59 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletThreadTest.cpp
@@ -21,10 +21,10 @@
 #include "platform/heap/Handle.h"
 #include "platform/testing/TestingPlatformSupport.h"
 #include "platform/testing/UnitTestHelpers.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebAddressSpace.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
index 769e600..71c25830 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.cpp
@@ -73,8 +73,8 @@
 #include "platform/Histogram.h"
 #include "platform/UserGestureIndicator.h"
 #include "platform/audio/IIRFilter.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/Platform.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
index dd0af87..6d88f775 100644
--- a/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/BaseAudioContext.h
@@ -40,11 +40,11 @@
 #include "modules/webaudio/IIRFilterNode.h"
 #include "platform/audio/AudioBus.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashSet.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Threading.h"
-#include "wtf/Vector.h"
-#include "wtf/build_config.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/build_config.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
index d394fd5..ca71be2 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadDSPKernel.cpp
@@ -24,10 +24,10 @@
  */
 
 #include "modules/webaudio/BiquadDSPKernel.h"
-#include "platform/audio/AudioUtilities.h"
-#include "wtf/MathExtras.h"
-#include "wtf/Vector.h"
 #include <limits.h>
+#include "platform/audio/AudioUtilities.h"
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp
index 964211a..1deb3078 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadFilterNode.cpp
@@ -28,7 +28,7 @@
 #include "modules/webaudio/AudioBasicProcessorHandler.h"
 #include "modules/webaudio/BiquadFilterOptions.h"
 #include "platform/Histogram.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp
index abbafedc..628289c 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.cpp
@@ -23,11 +23,11 @@
  * DAMAGE.
  */
 
-#include "modules/webaudio/BiquadDSPKernel.h"
 #include "modules/webaudio/BiquadProcessor.h"
-#include "platform/audio/AudioUtilities.h"
-#include "wtf/PtrUtil.h"
 #include <memory>
+#include "modules/webaudio/BiquadDSPKernel.h"
+#include "platform/audio/AudioUtilities.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h
index 221d1b5..f6886c8 100644
--- a/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h
+++ b/third_party/WebKit/Source/modules/webaudio/BiquadProcessor.h
@@ -26,13 +26,13 @@
 #ifndef BiquadProcessor_h
 #define BiquadProcessor_h
 
+#include <memory>
 #include "modules/webaudio/AudioNode.h"
 #include "modules/webaudio/AudioParam.h"
 #include "platform/audio/AudioDSPKernel.h"
 #include "platform/audio/AudioDSPKernelProcessor.h"
 #include "platform/audio/Biquad.h"
-#include "wtf/RefPtr.h"
-#include <memory>
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h
index 5f9319e..8fb97e0 100644
--- a/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/ChannelMergerNode.h
@@ -30,7 +30,7 @@
 #define ChannelMergerNode_h
 
 #include "modules/webaudio/AudioNode.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h
index 3cd8d35..6ca327c 100644
--- a/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/ChannelSplitterNode.h
@@ -27,7 +27,7 @@
 #define ChannelSplitterNode_h
 
 #include "modules/webaudio/AudioNode.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.cpp
index fde979f..7c69e1d9 100644
--- a/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.cpp
@@ -4,15 +4,15 @@
 
 #include "modules/webaudio/ConstantSourceNode.h"
 
+#include <algorithm>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/webaudio/AudioNodeOutput.h"
 #include "modules/webaudio/ConstantSourceOptions.h"
 #include "platform/audio/AudioUtilities.h"
-#include "wtf/MathExtras.h"
-#include "wtf/StdLibExtras.h"
-#include <algorithm>
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/StdLibExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.h b/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.h
index dc64a82..8a081b9 100644
--- a/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/ConstantSourceNode.h
@@ -8,9 +8,9 @@
 #include "modules/webaudio/AudioParam.h"
 #include "modules/webaudio/AudioScheduledSourceNode.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Threading.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp
index e0b5dc1..cf4b8155 100644
--- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.cpp
@@ -23,16 +23,16 @@
  * DAMAGE.
  */
 
+#include "modules/webaudio/ConvolverNode.h"
+#include <memory>
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/webaudio/AudioBuffer.h"
 #include "modules/webaudio/AudioNodeInput.h"
 #include "modules/webaudio/AudioNodeOutput.h"
-#include "modules/webaudio/ConvolverNode.h"
 #include "modules/webaudio/ConvolverOptions.h"
 #include "platform/audio/Reverb.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
+#include "platform/wtf/PtrUtil.h"
 
 // Note about empirical tuning:
 // The maximum FFT size affects reverb performance and accuracy.
diff --git a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h
index 903ea2cb..400387a9 100644
--- a/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/ConvolverNode.h
@@ -26,12 +26,12 @@
 #ifndef ConvolverNode_h
 #define ConvolverNode_h
 
+#include <memory>
 #include "base/gtest_prod_util.h"
 #include "modules/ModulesExport.h"
 #include "modules/webaudio/AudioNode.h"
-#include "wtf/RefPtr.h"
-#include "wtf/ThreadingPrimitives.h"
-#include <memory>
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/ThreadingPrimitives.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.h b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.h
index 5e4c4de..94dfd95 100644
--- a/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.h
+++ b/third_party/WebKit/Source/modules/webaudio/DeferredTaskHandler.h
@@ -28,14 +28,14 @@
 
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashSet.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/ThreadSafeRefCounted.h"
-#include "wtf/Threading.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/Vector.h"
-#include "wtf/build_config.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/ThreadSafeRefCounted.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/ThreadingPrimitives.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/build_config.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.cpp
index f14ded4..8acd50c 100644
--- a/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DelayDSPKernel.cpp
@@ -24,9 +24,9 @@
  */
 
 #include "modules/webaudio/DelayDSPKernel.h"
-#include "platform/audio/AudioUtilities.h"
-#include "wtf/MathExtras.h"
 #include <algorithm>
+#include "platform/audio/AudioUtilities.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp b/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp
index 04ecbb9..eac2b785 100644
--- a/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DelayNode.cpp
@@ -23,15 +23,15 @@
  * DAMAGE.
  */
 
+#include "modules/webaudio/DelayNode.h"
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/webaudio/AudioBasicProcessorHandler.h"
-#include "modules/webaudio/DelayNode.h"
 #include "modules/webaudio/DelayOptions.h"
 #include "modules/webaudio/DelayProcessor.h"
-#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp
index 8673b87..93058da 100644
--- a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.cpp
@@ -23,11 +23,11 @@
  * DAMAGE.
  */
 
-#include "modules/webaudio/DelayDSPKernel.h"
 #include "modules/webaudio/DelayProcessor.h"
-#include "platform/audio/AudioUtilities.h"
-#include "wtf/PtrUtil.h"
 #include <memory>
+#include "modules/webaudio/DelayDSPKernel.h"
+#include "platform/audio/AudioUtilities.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h
index 4f6cc8f..79a8c21 100644
--- a/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h
+++ b/third_party/WebKit/Source/modules/webaudio/DelayProcessor.h
@@ -26,10 +26,10 @@
 #ifndef DelayProcessor_h
 #define DelayProcessor_h
 
+#include <memory>
 #include "modules/webaudio/AudioParam.h"
 #include "platform/audio/AudioDSPKernelProcessor.h"
-#include "wtf/RefPtr.h"
-#include <memory>
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp b/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp
index 788df877..c90a80a24 100644
--- a/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/DynamicsCompressorNode.cpp
@@ -23,13 +23,13 @@
  * DAMAGE.
  */
 
+#include "modules/webaudio/DynamicsCompressorNode.h"
 #include "modules/webaudio/AudioNodeInput.h"
 #include "modules/webaudio/AudioNodeOutput.h"
-#include "modules/webaudio/DynamicsCompressorNode.h"
 #include "modules/webaudio/DynamicsCompressorOptions.h"
 #include "platform/audio/AudioUtilities.h"
 #include "platform/audio/DynamicsCompressor.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 // Set output to stereo by default.
 static const unsigned defaultNumberOfOutputChannels = 2;
diff --git a/third_party/WebKit/Source/modules/webaudio/GainNode.h b/third_party/WebKit/Source/modules/webaudio/GainNode.h
index fc825c71..4627f4e 100644
--- a/third_party/WebKit/Source/modules/webaudio/GainNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/GainNode.h
@@ -28,8 +28,8 @@
 
 #include "modules/webaudio/AudioNode.h"
 #include "modules/webaudio/AudioParam.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/Threading.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp
index 3b909fe..c3aa73c 100644
--- a/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/IIRDSPKernel.cpp
@@ -4,7 +4,7 @@
 
 #include "modules/webaudio/IIRDSPKernel.h"
 
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
index 140a6fc..d2f05e9 100644
--- a/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/IIRFilterNode.cpp
@@ -11,7 +11,7 @@
 #include "modules/webaudio/BaseAudioContext.h"
 #include "modules/webaudio/IIRFilterOptions.h"
 #include "platform/Histogram.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/IIRProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/IIRProcessor.cpp
index 423d162..656e18f 100644
--- a/third_party/WebKit/Source/modules/webaudio/IIRProcessor.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/IIRProcessor.cpp
@@ -4,9 +4,9 @@
 
 #include "modules/webaudio/IIRProcessor.h"
 
-#include "modules/webaudio/IIRDSPKernel.h"
-#include "wtf/PtrUtil.h"
 #include <memory>
+#include "modules/webaudio/IIRDSPKernel.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp
index 71c27a73..f290c3e 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.cpp
@@ -34,8 +34,8 @@
 #include "platform/CrossThreadFunctional.h"
 #include "platform/audio/AudioUtilities.h"
 #include "platform/weborigin/SecurityOrigin.h"
-#include "wtf/Locker.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/Locker.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h
index 4cd21f0..458ef7ce 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/MediaElementAudioSourceNode.h
@@ -26,12 +26,12 @@
 #ifndef MediaElementAudioSourceNode_h
 #define MediaElementAudioSourceNode_h
 
+#include <memory>
 #include "modules/webaudio/AudioNode.h"
 #include "platform/audio/AudioSourceProviderClient.h"
 #include "platform/audio/MultiChannelResampler.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/ThreadingPrimitives.h"
-#include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/ThreadingPrimitives.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
index def1e6b..c4fe53a 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.cpp
@@ -32,8 +32,8 @@
 #include "modules/webaudio/BaseAudioContext.h"
 #include "platform/UUID.h"
 #include "platform/mediastream/MediaStreamCenter.h"
+#include "platform/wtf/Locker.h"
 #include "public/platform/WebRTCPeerConnectionHandler.h"
-#include "wtf/Locker.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
index ec1564f2..6bbc8ed 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioDestinationNode.h
@@ -29,7 +29,7 @@
 #include "modules/mediastream/MediaStream.h"
 #include "modules/webaudio/AudioBasicInspectorNode.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
index 0ccaab5..6bbd754 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.cpp
@@ -25,12 +25,12 @@
 
 #include "modules/webaudio/MediaStreamAudioSourceNode.h"
 
+#include <memory>
 #include "core/dom/ExceptionCode.h"
 #include "modules/webaudio/AudioNodeOutput.h"
 #include "modules/webaudio/BaseAudioContext.h"
 #include "modules/webaudio/MediaStreamAudioSourceOptions.h"
-#include "wtf/Locker.h"
-#include <memory>
+#include "platform/wtf/Locker.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h
index 0fbf9bca..090d687d 100644
--- a/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/MediaStreamAudioSourceNode.h
@@ -26,13 +26,13 @@
 #ifndef MediaStreamAudioSourceNode_h
 #define MediaStreamAudioSourceNode_h
 
+#include <memory>
 #include "modules/mediastream/MediaStream.h"
 #include "modules/webaudio/AudioNode.h"
 #include "platform/audio/AudioSourceProvider.h"
 #include "platform/audio/AudioSourceProviderClient.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/Threading.h"
-#include <memory>
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h b/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h
index a29ba47..2a3b3f4 100644
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioCompletionEvent.h
@@ -29,8 +29,8 @@
 #include "modules/EventModules.h"
 #include "modules/webaudio/AudioBuffer.h"
 #include "modules/webaudio/OfflineAudioCompletionEventInit.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.h b/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.h
index 7450190..165d555 100644
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.h
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.h
@@ -28,7 +28,7 @@
 
 #include "modules/ModulesExport.h"
 #include "modules/webaudio/BaseAudioContext.h"
-#include "wtf/HashMap.h"
+#include "platform/wtf/HashMap.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
index 564c69f..9458026 100644
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.cpp
@@ -36,8 +36,8 @@
 #include "platform/audio/AudioUtilities.h"
 #include "platform/audio/DenormalDisabler.h"
 #include "platform/audio/HRTFDatabaseLoader.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h
index c3804f8..0efe1bb 100644
--- a/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/OfflineAudioDestinationNode.h
@@ -26,13 +26,13 @@
 #ifndef OfflineAudioDestinationNode_h
 #define OfflineAudioDestinationNode_h
 
+#include <memory>
 #include "modules/webaudio/AudioBuffer.h"
 #include "modules/webaudio/AudioDestinationNode.h"
 #include "modules/webaudio/OfflineAudioContext.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
 #include "public/platform/WebThread.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp
index 0fb5ef0f..59c1c6d3 100644
--- a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.cpp
@@ -24,6 +24,7 @@
  */
 
 #include "modules/webaudio/OscillatorNode.h"
+#include <algorithm>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
@@ -31,9 +32,8 @@
 #include "modules/webaudio/PeriodicWave.h"
 #include "platform/audio/AudioUtilities.h"
 #include "platform/audio/VectorMath.h"
-#include "wtf/MathExtras.h"
-#include "wtf/StdLibExtras.h"
-#include <algorithm>
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/StdLibExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
index 861a2b0..459c8ed 100644
--- a/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/OscillatorNode.h
@@ -30,9 +30,9 @@
 #include "modules/webaudio/AudioScheduledSourceNode.h"
 #include "modules/webaudio/OscillatorOptions.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Threading.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
index b3a3d67..d7ffad3 100644
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.cpp
@@ -35,7 +35,7 @@
 #include "modules/webaudio/PannerOptions.h"
 #include "platform/Histogram.h"
 #include "platform/audio/HRTFPanner.h"
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/PannerNode.h b/third_party/WebKit/Source/modules/webaudio/PannerNode.h
index 290952c..6297df78 100644
--- a/third_party/WebKit/Source/modules/webaudio/PannerNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/PannerNode.h
@@ -26,6 +26,7 @@
 #ifndef PannerNode_h
 #define PannerNode_h
 
+#include <memory>
 #include "modules/webaudio/AudioListener.h"
 #include "modules/webaudio/AudioNode.h"
 #include "modules/webaudio/AudioParam.h"
@@ -34,8 +35,7 @@
 #include "platform/audio/Distance.h"
 #include "platform/audio/Panner.h"
 #include "platform/geometry/FloatPoint3D.h"
-#include "wtf/HashMap.h"
-#include <memory>
+#include "platform/wtf/HashMap.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp b/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp
index 6bce59b..d1c45ca 100644
--- a/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/PeriodicWave.cpp
@@ -26,18 +26,18 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#include "modules/webaudio/PeriodicWave.h"
+#include <algorithm>
+#include <memory>
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/webaudio/BaseAudioContext.h"
 #include "modules/webaudio/OscillatorNode.h"
-#include "modules/webaudio/PeriodicWave.h"
 #include "modules/webaudio/PeriodicWaveOptions.h"
 #include "platform/audio/FFTFrame.h"
 #include "platform/audio/VectorMath.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
-#include <memory>
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h b/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h
index fcc26b6b..0a3e261 100644
--- a/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h
+++ b/third_party/WebKit/Source/modules/webaudio/PeriodicWave.h
@@ -29,12 +29,12 @@
 #ifndef PeriodicWave_h
 #define PeriodicWave_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMTypedArray.h"
 #include "platform/audio/AudioArray.h"
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
index 9e75035..d463d0ee 100644
--- a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.cpp
@@ -24,14 +24,14 @@
  */
 
 #include "modules/webaudio/RealtimeAnalyser.h"
+#include <limits.h>
+#include <algorithm>
+#include <complex>
 #include "platform/audio/AudioBus.h"
 #include "platform/audio/AudioUtilities.h"
 #include "platform/audio/VectorMath.h"
-#include "wtf/MathExtras.h"
-#include "wtf/PtrUtil.h"
-#include <algorithm>
-#include <complex>
-#include <limits.h>
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h
index e58fe77..8de30704 100644
--- a/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h
+++ b/third_party/WebKit/Source/modules/webaudio/RealtimeAnalyser.h
@@ -26,11 +26,11 @@
 #ifndef RealtimeAnalyser_h
 #define RealtimeAnalyser_h
 
+#include <memory>
 #include "core/dom/DOMTypedArray.h"
 #include "platform/audio/AudioArray.h"
 #include "platform/audio/FFTFrame.h"
-#include "wtf/Noncopyable.h"
-#include <memory>
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h
index 4ec8e67..094247a 100644
--- a/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h
+++ b/third_party/WebKit/Source/modules/webaudio/ScriptProcessorNode.h
@@ -30,10 +30,10 @@
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "modules/webaudio/AudioNode.h"
 #include "platform/audio/AudioBus.h"
-#include "wtf/Forward.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp b/third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp
index 98d7311..b342558b 100644
--- a/third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/StereoPannerNode.cpp
@@ -12,7 +12,7 @@
 #include "modules/webaudio/BaseAudioContext.h"
 #include "modules/webaudio/StereoPannerOptions.h"
 #include "platform/audio/StereoPanner.h"
-#include "wtf/MathExtras.h"
+#include "platform/wtf/MathExtras.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperDSPKernel.cpp b/third_party/WebKit/Source/modules/webaudio/WaveShaperDSPKernel.cpp
index 3ede0adb..ea95101 100644
--- a/third_party/WebKit/Source/modules/webaudio/WaveShaperDSPKernel.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperDSPKernel.cpp
@@ -25,10 +25,10 @@
 
 #include "modules/webaudio/WaveShaperDSPKernel.h"
 
-#include "platform/audio/AudioUtilities.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Threading.h"
 #include <algorithm>
+#include "platform/audio/AudioUtilities.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Threading.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp b/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp
index a80dd5d..8712b4b 100644
--- a/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperNode.cpp
@@ -23,14 +23,14 @@
  * DAMAGE.
  */
 
+#include "modules/webaudio/WaveShaperNode.h"
 #include "bindings/core/v8/ExceptionMessages.h"
 #include "bindings/core/v8/ExceptionState.h"
 #include "core/dom/ExceptionCode.h"
 #include "modules/webaudio/AudioBasicProcessorHandler.h"
 #include "modules/webaudio/BaseAudioContext.h"
-#include "modules/webaudio/WaveShaperNode.h"
 #include "modules/webaudio/WaveShaperOptions.h"
-#include "wtf/PtrUtil.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
index 611fe93..affe01c 100644
--- a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.cpp
@@ -23,10 +23,10 @@
  * DAMAGE.
  */
 
-#include "modules/webaudio/WaveShaperDSPKernel.h"
 #include "modules/webaudio/WaveShaperProcessor.h"
-#include "wtf/PtrUtil.h"
 #include <memory>
+#include "modules/webaudio/WaveShaperDSPKernel.h"
+#include "platform/wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.h b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.h
index cd6229f..9721da1a0 100644
--- a/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.h
+++ b/third_party/WebKit/Source/modules/webaudio/WaveShaperProcessor.h
@@ -26,13 +26,13 @@
 #ifndef WaveShaperProcessor_h
 #define WaveShaperProcessor_h
 
+#include <memory>
 #include "core/dom/DOMTypedArray.h"
 #include "modules/webaudio/AudioNode.h"
 #include "platform/audio/AudioDSPKernel.h"
 #include "platform/audio/AudioDSPKernelProcessor.h"
-#include "wtf/RefPtr.h"
-#include "wtf/ThreadingPrimitives.h"
-#include <memory>
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/ThreadingPrimitives.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webaudio/testing/InternalsWebAudio.h b/third_party/WebKit/Source/modules/webaudio/testing/InternalsWebAudio.h
index 14cef4d12e..3f29861 100644
--- a/third_party/WebKit/Source/modules/webaudio/testing/InternalsWebAudio.h
+++ b/third_party/WebKit/Source/modules/webaudio/testing/InternalsWebAudio.h
@@ -5,7 +5,7 @@
 #ifndef InternalsWebAudio_h
 #define InternalsWebAudio_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h
index bdc507d2..f26cc59 100644
--- a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h
+++ b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionData.h
@@ -26,8 +26,8 @@
 #ifndef ChangeVersionData_h
 #define ChangeVersionData_h
 
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.cpp b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.cpp
index b37d4f7..40e70af 100644
--- a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.cpp
@@ -39,7 +39,8 @@
 
 bool ChangeVersionWrapper::PerformPreflight(
     SQLTransactionBackend* transaction) {
-  ASSERT(transaction && transaction->GetDatabase());
+  DCHECK(transaction);
+  DCHECK(transaction->GetDatabase());
 
   Database* database = transaction->GetDatabase();
 
@@ -66,7 +67,8 @@
 
 bool ChangeVersionWrapper::PerformPostflight(
     SQLTransactionBackend* transaction) {
-  ASSERT(transaction && transaction->GetDatabase());
+  DCHECK(transaction);
+  DCHECK(transaction->GetDatabase());
 
   Database* database = transaction->GetDatabase();
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.h b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.h
index 350c93a4..32ff405 100644
--- a/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.h
+++ b/third_party/WebKit/Source/modules/webdatabase/ChangeVersionWrapper.h
@@ -28,10 +28,10 @@
 #ifndef ChangeVersionWrapper_h
 #define ChangeVersionWrapper_h
 
+#include <memory>
 #include "modules/webdatabase/SQLTransactionBackend.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
index 29095a0d..c7516a1 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.cpp
@@ -57,7 +57,7 @@
     database = db_manager.OpenDatabase(window.document(), name, version,
                                        display_name, estimated_size,
                                        creation_callback, error, error_message);
-    ASSERT(database || error != DatabaseError::kNone);
+    DCHECK(database || error != DatabaseError::kNone);
     if (error != DatabaseError::kNone)
       DatabaseManager::ThrowExceptionForDatabaseError(error, error_message,
                                                       exception_state);
diff --git a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
index 8af58f3..bb1b9ac7 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DOMWindowWebDatabase.h
@@ -28,7 +28,7 @@
 #define DOMWindowWebDatabase_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.cpp b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
index 192a48a..8990bfa 100644
--- a/third_party/WebKit/Source/modules/webdatabase/Database.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
@@ -52,11 +52,11 @@
 #include "platform/CrossThreadFunctional.h"
 #include "platform/WaitableEvent.h"
 #include "platform/heap/SafePoint.h"
+#include "platform/wtf/Atomics.h"
+#include "platform/wtf/CurrentTime.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebDatabaseObserver.h"
 #include "public/platform/WebSecurityOrigin.h"
-#include "wtf/Atomics.h"
-#include "wtf/CurrentTime.h"
 
 // Registering "opened" databases with the DatabaseTracker
 // =======================================================
@@ -92,9 +92,14 @@
 // Defines static local variable after making sure that guid lock is held.
 // (We can't use DEFINE_STATIC_LOCAL for this because it asserts thread
 // safety, which is externally guaranteed by the guideMutex lock)
+#if DCHECK_IS_ON()
 #define DEFINE_STATIC_LOCAL_WITH_LOCK(type, name, arguments) \
-  ASSERT(GuidMutex().Locked());                              \
+  DCHECK(GuidMutex().Locked());                              \
   static type& name = *new type arguments
+#else
+#define DEFINE_STATIC_LOCAL_WITH_LOCK(type, name, arguments) \
+  static type& name = *new type arguments
+#endif
 
 static const char kVersionKey[] = "WebKitDatabaseVersionKey";
 static const char kInfoTableName[] = "__WebKitDatabaseInfoTable__";
@@ -173,7 +178,9 @@
 // NOTE: Caller must lock guidMutex().
 static inline void UpdateGuidVersionMap(DatabaseGuid guid, String new_version) {
   // Ensure the the mutex is locked.
-  ASSERT(GuidMutex().Locked());
+#if DCHECK_IS_ON()
+  DCHECK(GuidMutex().Locked());
+#endif
 
   // Note: It is not safe to put an empty string into the guidToVersionMap()
   // map. That's because the map is cross-thread, but empty strings are
@@ -195,7 +202,9 @@
 static DatabaseGuid GuidForOriginAndName(const String& origin,
                                          const String& name) {
   // Ensure the the mutex is locked.
-  ASSERT(GuidMutex().Locked());
+#if DCHECK_IS_ON()
+  DCHECK(GuidMutex().Locked());
+#endif
 
   String string_id = origin + "/" + name;
 
@@ -246,8 +255,8 @@
 
   database_thread_security_origin_ =
       context_thread_security_origin_->IsolatedCopy();
-  ASSERT(database_context_->GetDatabaseThread());
-  ASSERT(database_context_->IsContextThread());
+  DCHECK(database_context_->GetDatabaseThread());
+  DCHECK(database_context_->IsContextThread());
   database_task_runner_ =
       TaskRunnerHelper::Get(TaskType::kDatabaseAccess, GetExecutionContext());
 }
@@ -262,7 +271,7 @@
   // DatabaseContext::stopDatabases()). By the time we get here, the SQLite
   // database should have already been closed.
 
-  ASSERT(!opened_);
+  DCHECK(!opened_);
 }
 
 DEFINE_TRACE(Database) {
@@ -289,8 +298,8 @@
 }
 
 void Database::Close() {
-  ASSERT(GetDatabaseContext()->GetDatabaseThread());
-  ASSERT(GetDatabaseContext()->GetDatabaseThread()->IsDatabaseThread());
+  DCHECK(GetDatabaseContext()->GetDatabaseThread());
+  DCHECK(GetDatabaseContext()->GetDatabaseThread()->IsDatabaseThread());
 
   {
     MutexLocker locker(transaction_in_progress_mutex_);
@@ -340,7 +349,7 @@
 }
 
 void Database::ScheduleTransaction() {
-  ASSERT(!transaction_in_progress_mutex_.TryLock());  // Locked by caller.
+  DCHECK(!transaction_in_progress_mutex_.TryLock());  // Locked by caller.
   SQLTransactionBackend* transaction = nullptr;
 
   if (is_transaction_queue_enabled_ && !transaction_queue_.IsEmpty())
@@ -393,7 +402,7 @@
   {
     MutexLocker locker(GuidMutex());
 
-    ASSERT(GuidCount().Contains(guid_));
+    DCHECK(GuidCount().Contains(guid_));
     if (GuidCount().erase(guid_)) {
       GuidToVersionMap().erase(guid_);
     }
@@ -431,8 +440,9 @@
                                     String& error_message) {
   double call_start_time = WTF::MonotonicallyIncreasingTime();
   DoneCreatingDatabaseOnExitCaller on_exit_caller(this);
-  ASSERT(error_message.IsEmpty());
-  ASSERT(error == DatabaseError::kNone);  // Better not have any errors already.
+  DCHECK(error_message.IsEmpty());
+  DCHECK_EQ(error,
+            DatabaseError::kNone);  // Better not have any errors already.
   // Presumed failure. We'll clear it if we succeed below.
   error = DatabaseError::kInvalidDatabaseState;
 
@@ -575,7 +585,7 @@
     return false;
   }
 
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   sqlite_database_.SetAuthorizer(database_authorizer_.Get());
 
   // See comment at the top this file regarding calling addOpenDatabase().
@@ -681,44 +691,44 @@
 }
 
 bool Database::GetActualVersionForTransaction(String& actual_version) {
-  ASSERT(sqlite_database_.TransactionInProgress());
+  DCHECK(sqlite_database_.TransactionInProgress());
   // Note: In multi-process browsers the cached value may be inaccurate. So we
   // retrieve the value from the database and update the cached value here.
   return GetVersionFromDatabase(actual_version, true);
 }
 
 void Database::DisableAuthorizer() {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   database_authorizer_->Disable();
 }
 
 void Database::EnableAuthorizer() {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   database_authorizer_->Enable();
 }
 
 void Database::SetAuthorizerPermissions(int permissions) {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   database_authorizer_->SetPermissions(permissions);
 }
 
 bool Database::LastActionChangedDatabase() {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   return database_authorizer_->LastActionChangedDatabase();
 }
 
 bool Database::LastActionWasInsert() {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   return database_authorizer_->LastActionWasInsert();
 }
 
 void Database::ResetDeletes() {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   database_authorizer_->ResetDeletes();
 }
 
 bool Database::HadDeletes() {
-  ASSERT(database_authorizer_);
+  DCHECK(database_authorizer_);
   return database_authorizer_->HadDeletes();
 }
 
@@ -814,7 +824,7 @@
 }
 
 void Database::CloseImmediately() {
-  ASSERT(GetExecutionContext()->IsContextThread());
+  DCHECK(GetExecutionContext()->IsContextThread());
   if (GetDatabaseContext()->DatabaseThreadAvailable() && Opened()) {
     LogErrorMessage("forcibly closing database");
     GetDatabaseContext()->GetDatabaseThread()->ScheduleTask(
@@ -857,7 +867,7 @@
   if (!GetExecutionContext())
     return;
 
-  ASSERT(GetExecutionContext()->IsContextThread());
+  DCHECK(GetExecutionContext()->IsContextThread());
 // FIXME: Rather than passing errorCallback to SQLTransaction and then
 // sometimes firing it ourselves, this code should probably be pushed down
 // into Database so that we only create the SQLTransaction if we're
@@ -871,7 +881,9 @@
       RunTransaction(transaction, read_only, change_version_data);
   if (!transaction_backend) {
     SQLTransactionErrorCallback* callback = transaction->ReleaseErrorCallback();
-    ASSERT(callback == original_error_callback);
+#if DCHECK_IS_ON()
+    DCHECK_EQ(callback, original_error_callback);
+#endif
     if (callback) {
       std::unique_ptr<SQLErrorData> error = SQLErrorData::Create(
           SQLError::kUnknownErr, "database has been closed");
diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.h b/third_party/WebKit/Source/modules/webdatabase/Database.h
index ae99d78..d1bb426 100644
--- a/third_party/WebKit/Source/modules/webdatabase/Database.h
+++ b/third_party/WebKit/Source/modules/webdatabase/Database.h
@@ -31,8 +31,8 @@
 #include "modules/webdatabase/DatabaseError.h"
 #include "modules/webdatabase/sqlite/SQLiteDatabase.h"
 #include "platform/weborigin/SecurityOrigin.h"
-#include "wtf/Deque.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp
index b38b0b6..5c370389 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.cpp
@@ -28,10 +28,10 @@
 
 #include "modules/webdatabase/DatabaseAuthorizer.h"
 
-#include "wtf/HashSet.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/Threading.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/StdLibExtras.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.h
index 6e5c9f00..57dccd2 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseAuthorizer.h
@@ -29,8 +29,8 @@
 #define DatabaseAuthorizer_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.h
index 143309f..fc8ef42 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseClient.h
@@ -35,7 +35,7 @@
 #include "modules/ModulesExport.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp
index bc77c1d..e5ab7ae 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseContext.cpp
@@ -35,7 +35,7 @@
 #include "modules/webdatabase/DatabaseThread.h"
 #include "platform/weborigin/SchemeRegistry.h"
 #include "platform/weborigin/SecurityOrigin.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
@@ -140,7 +140,7 @@
     // termination because we're still using it to execute the closing
     // of the database. However, it is NOT OK to create a new thread
     // after we've requested termination.
-    ASSERT(!has_requested_termination_);
+    DCHECK(!has_requested_termination_);
 
     // Create the database thread on first request - but not if at least one
     // database was already opened, because in that case we already had a
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
index 4723fca..a0e83e7 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.cpp
@@ -40,8 +40,8 @@
 #include "modules/webdatabase/DatabaseTracker.h"
 #include "modules/webdatabase/StorageLog.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
@@ -69,10 +69,12 @@
 
 DatabaseContext* DatabaseManager::ExistingDatabaseContextFor(
     ExecutionContext* context) {
-  ASSERT(database_context_registered_count_ >= 0);
-  ASSERT(database_context_instance_count_ >= 0);
-  ASSERT(database_context_registered_count_ <=
-         database_context_instance_count_);
+#if DCHECK_IS_ON()
+  DCHECK_GE(database_context_registered_count_, 0);
+  DCHECK_GE(database_context_instance_count_, 0);
+  DCHECK_LE(database_context_registered_count_,
+            database_context_instance_count_);
+#endif
   return context_map_.at(context);
 }
 
@@ -95,7 +97,7 @@
 void DatabaseManager::UnregisterDatabaseContext(
     DatabaseContext* database_context) {
   ExecutionContext* context = database_context->GetExecutionContext();
-  ASSERT(context_map_.at(context));
+  DCHECK(context_map_.at(context));
 #if DCHECK_IS_ON()
   database_context_registered_count_--;
 #endif
@@ -109,8 +111,8 @@
 
 void DatabaseManager::DidDestructDatabaseContext() {
   database_context_instance_count_--;
-  ASSERT(database_context_registered_count_ <=
-         database_context_instance_count_);
+  DCHECK_LE(database_context_registered_count_,
+            database_context_instance_count_);
 }
 #endif
 
@@ -128,7 +130,7 @@
       exception_state.ThrowDOMException(kInvalidStateError, error_message);
       return;
     default:
-      ASSERT_NOT_REACHED();
+      NOTREACHED();
   }
 }
 
@@ -148,7 +150,7 @@
     bool set_version_in_new_database,
     DatabaseError& error,
     String& error_message) {
-  ASSERT(error == DatabaseError::kNone);
+  DCHECK_EQ(error, DatabaseError::kNone);
 
   DatabaseContext* backend_context = DatabaseContextFor(context)->Backend();
   if (DatabaseTracker::Tracker().CanEstablishDatabase(
@@ -160,7 +162,7 @@
       return backend;
   }
 
-  ASSERT(error != DatabaseError::kNone);
+  DCHECK_NE(error, DatabaseError::kNone);
   switch (error) {
     case DatabaseError::kGenericSecurityError:
       LogOpenDatabaseError(context, name);
@@ -171,7 +173,7 @@
       return nullptr;
 
     default:
-      ASSERT_NOT_REACHED();
+      NOTREACHED();
   }
   return nullptr;
 }
@@ -184,7 +186,7 @@
                                         DatabaseCallback* creation_callback,
                                         DatabaseError& error,
                                         String& error_message) {
-  ASSERT(error == DatabaseError::kNone);
+  DCHECK_EQ(error, DatabaseError::kNone);
 
   bool set_version_in_new_database = !creation_callback;
   Database* database = OpenDatabaseInternal(
@@ -209,7 +211,7 @@
                                               WrapPersistent(database)));
   }
 
-  ASSERT(database);
+  DCHECK(database);
   return database;
 }
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h
index daf8a02..2dea015 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseManager.h
@@ -29,9 +29,9 @@
 #include "modules/webdatabase/DatabaseContext.h"
 #include "modules/webdatabase/DatabaseError.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Assertions.h"
-#include "wtf/Forward.h"
-#include "wtf/HashMap.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/HashMap.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
index 1decfec..49e1bda 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.cpp
@@ -55,7 +55,7 @@
 // Database tasks are meant to be used only once, so make sure this one hasn't
 // been performed before.
 #if DCHECK_IS_ON()
-  ASSERT(!complete_);
+  DCHECK(!complete_);
 #endif
 
   if (!complete_event_ &&
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h
index 4cc1e104..953d989 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseTask.h
@@ -29,17 +29,17 @@
 #ifndef DatabaseTask_h
 #define DatabaseTask_h
 
+#include <memory>
 #include "modules/webdatabase/Database.h"
 #include "modules/webdatabase/DatabaseBasicTypes.h"
 #include "modules/webdatabase/DatabaseError.h"
 #include "modules/webdatabase/SQLTransactionBackend.h"
 #include "platform/WaitableEvent.h"
 #include "platform/heap/Handle.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Threading.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
index 8104e55f..033a9d8 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.cpp
@@ -28,6 +28,7 @@
 
 #include "modules/webdatabase/DatabaseThread.h"
 
+#include <memory>
 #include "modules/webdatabase/Database.h"
 #include "modules/webdatabase/DatabaseTask.h"
 #include "modules/webdatabase/SQLTransactionClient.h"
@@ -36,9 +37,8 @@
 #include "platform/CrossThreadFunctional.h"
 #include "platform/WaitableEvent.h"
 #include "platform/WebThreadSupportingGC.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/Platform.h"
-#include "wtf/PtrUtil.h"
-#include <memory>
 
 namespace blink {
 
@@ -50,14 +50,14 @@
 }
 
 DatabaseThread::~DatabaseThread() {
-  ASSERT(open_database_set_.IsEmpty());
-  ASSERT(!thread_);
+  DCHECK(open_database_set_.IsEmpty());
+  DCHECK(!thread_);
 }
 
 DEFINE_TRACE(DatabaseThread) {}
 
 void DatabaseThread::Start() {
-  ASSERT(IsMainThread());
+  DCHECK(IsMainThread());
   if (thread_)
     return;
   thread_ = WebThreadSupportingGC::Create("WebCore: Database");
@@ -72,11 +72,11 @@
 }
 
 void DatabaseThread::Terminate() {
-  ASSERT(IsMainThread());
+  DCHECK(IsMainThread());
   WaitableEvent sync;
   {
     MutexLocker lock(termination_requested_mutex_);
-    ASSERT(!termination_requested_);
+    DCHECK(!termination_requested_);
     termination_requested_ = true;
     cleanup_sync_ = &sync;
     STORAGE_DVLOG(1) << "DatabaseThread " << this << " was asked to terminate";
@@ -128,29 +128,29 @@
 }
 
 void DatabaseThread::RecordDatabaseOpen(Database* database) {
-  ASSERT(IsDatabaseThread());
-  ASSERT(database);
-  ASSERT(!open_database_set_.Contains(database));
+  DCHECK(IsDatabaseThread());
+  DCHECK(database);
+  DCHECK(!open_database_set_.Contains(database));
   MutexLocker lock(termination_requested_mutex_);
   if (!termination_requested_)
     open_database_set_.insert(database);
 }
 
 void DatabaseThread::RecordDatabaseClosed(Database* database) {
-  ASSERT(IsDatabaseThread());
-  ASSERT(database);
+  DCHECK(IsDatabaseThread());
+  DCHECK(database);
 #if DCHECK_IS_ON()
   {
     MutexLocker lock(termination_requested_mutex_);
-    ASSERT(termination_requested_ || open_database_set_.Contains(database));
+    DCHECK(termination_requested_ || open_database_set_.Contains(database));
   }
 #endif
   open_database_set_.erase(database);
 }
 
 bool DatabaseThread::IsDatabaseOpen(Database* database) {
-  ASSERT(IsDatabaseThread());
-  ASSERT(database);
+  DCHECK(IsDatabaseThread());
+  DCHECK(database);
   MutexLocker lock(termination_requested_mutex_);
   return !termination_requested_ && open_database_set_.Contains(database);
 }
@@ -162,11 +162,11 @@
 }
 
 void DatabaseThread::ScheduleTask(std::unique_ptr<DatabaseTask> task) {
-  ASSERT(thread_);
+  DCHECK(thread_);
 #if DCHECK_IS_ON()
   {
     MutexLocker lock(termination_requested_mutex_);
-    ASSERT(!termination_requested_);
+    DCHECK(!termination_requested_);
   }
 #endif
   // WebThread takes ownership of the task.
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.h
index 0cbc2b3..894794d 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseThread.h
@@ -28,11 +28,11 @@
 #ifndef DatabaseThread_h
 #define DatabaseThread_h
 
+#include <memory>
 #include "platform/WebThreadSupportingGC.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashMap.h"
-#include "wtf/ThreadingPrimitives.h"
-#include <memory>
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/ThreadingPrimitives.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp b/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp
index f3383b6..30e54476 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.cpp
@@ -41,14 +41,14 @@
 #include "platform/CrossThreadFunctional.h"
 #include "platform/weborigin/SecurityOrigin.h"
 #include "platform/weborigin/SecurityOriginHash.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/StdLibExtras.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebDatabaseObserver.h"
 #include "public/platform/WebSecurityOrigin.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/Assertions.h"
-#include "wtf/Functional.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/StdLibExtras.h"
 
 namespace blink {
 
@@ -118,7 +118,7 @@
   {
     MutexLocker open_database_map_lock(open_database_map_guard_);
     String origin_string = database->GetSecurityOrigin()->ToRawString();
-    ASSERT(open_database_map_);
+    DCHECK(open_database_map_);
     DatabaseNameMap* name_map = open_database_map_->at(origin_string);
     if (!name_map)
       return;
@@ -146,7 +146,7 @@
 }
 
 void DatabaseTracker::PrepareToOpenDatabase(Database* database) {
-  ASSERT(
+  DCHECK(
       database->GetDatabaseContext()->GetExecutionContext()->IsContextThread());
   if (Platform::Current()->DatabaseObserver()) {
     Platform::Current()->DatabaseObserver()->DatabaseOpened(
@@ -205,7 +205,7 @@
     for (auto& name_database_set : *origin_map.value) {
       for (Database* database : *name_database_set.value) {
         ExecutionContext* context = database->GetExecutionContext();
-        ASSERT(context->IsDocument());
+        DCHECK(context->IsDocument());
         if (ToDocument(context)->GetFrame()->GetPage() == page)
           (*callback)(database);
       }
diff --git a/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.h b/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.h
index e440a9c..02143bf 100644
--- a/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.h
+++ b/third_party/WebKit/Source/modules/webdatabase/DatabaseTracker.h
@@ -29,16 +29,16 @@
 #ifndef DatabaseTracker_h
 #define DatabaseTracker_h
 
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "modules/webdatabase/DatabaseError.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Functional.h"
-#include "wtf/HashMap.h"
-#include "wtf/HashSet.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/text/StringHash.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/ThreadingPrimitives.h"
+#include "platform/wtf/text/StringHash.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
index bb13e65..9d66c9f 100644
--- a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.cpp
@@ -46,8 +46,8 @@
 #include "modules/webdatabase/SQLTransactionCallback.h"
 #include "modules/webdatabase/SQLTransactionErrorCallback.h"
 #include "modules/webdatabase/sqlite/SQLValue.h"
-#include "wtf/RefCounted.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/RefCounted.h"
+#include "platform/wtf/Vector.h"
 
 typedef blink::protocol::Database::Backend::ExecuteSQLCallback
     ExecuteSQLCallback;
@@ -252,7 +252,8 @@
       InspectorDatabaseResource::Create(database, domain, name, version);
   resources_.Set(resource->Id(), resource);
   // Resources are only bound while visible.
-  ASSERT(enabled_ && GetFrontend());
+  DCHECK(enabled_);
+  DCHECK(GetFrontend());
   resource->Bind(GetFrontend());
 }
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.h b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.h
index c1fe1bca..1c15049 100644
--- a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.h
+++ b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseAgent.h
@@ -33,9 +33,9 @@
 #include "core/inspector/protocol/Database.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/HashMap.h"
-#include "wtf/Noncopyable.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/Noncopyable.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseResource.h b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseResource.h
index 8305a381..f68a3ae 100644
--- a/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseResource.h
+++ b/third_party/WebKit/Source/modules/webdatabase/InspectorDatabaseResource.h
@@ -33,8 +33,8 @@
 
 #include "core/inspector/protocol/Database.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 class Database;
diff --git a/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.cpp b/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.cpp
index a4924e0..4c507f6 100644
--- a/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.cpp
@@ -31,10 +31,10 @@
 #include "modules/webdatabase/QuotaTracker.h"
 
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/StdLibExtras.h"
+#include "platform/wtf/Threading.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebSecurityOrigin.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/Threading.h"
 
 namespace blink {
 
@@ -51,10 +51,10 @@
   // Extra scope to unlock prior to potentially calling Platform.
   {
     MutexLocker lock_data(data_guard_);
-    ASSERT(database_sizes_.Contains(origin->ToRawString()));
+    DCHECK(database_sizes_.Contains(origin->ToRawString()));
     HashMap<String, SizeMap>::const_iterator it =
         database_sizes_.Find(origin->ToRawString());
-    ASSERT(it->value.Contains(database_name));
+    DCHECK(it->value.Contains(database_name));
     *database_size = it->value.at(database_name);
 
     if (space_available_to_origins_.Contains(origin->ToRawString())) {
diff --git a/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.h b/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.h
index ee2895a..a61308c 100644
--- a/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.h
+++ b/third_party/WebKit/Source/modules/webdatabase/QuotaTracker.h
@@ -32,10 +32,10 @@
 #define QuotaTracker_h
 
 #include "modules/ModulesExport.h"
-#include "wtf/HashMap.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/text/StringHash.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/ThreadingPrimitives.h"
+#include "platform/wtf/text/StringHash.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/QuotaTrackerTest.cpp b/third_party/WebKit/Source/modules/webdatabase/QuotaTrackerTest.cpp
index a4b9ce36..0a0a0b2 100644
--- a/third_party/WebKit/Source/modules/webdatabase/QuotaTrackerTest.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/QuotaTrackerTest.cpp
@@ -5,8 +5,8 @@
 #include "modules/webdatabase/QuotaTracker.h"
 
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/RefPtr.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/RefPtr.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLError.h b/third_party/WebKit/Source/modules/webdatabase/SQLError.h
index ae35aab..8a138dad 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLError.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLError.h
@@ -29,10 +29,10 @@
 #ifndef SQLError_h
 #define SQLError_h
 
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/WTFString.h"
 #include <memory>
+#include "bindings/core/v8/ScriptWrappable.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.cpp
index cccf7ca9..be0fbaa 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLResultSet.cpp
@@ -68,7 +68,7 @@
 }
 
 void SQLResultSet::SetInsertId(int64_t id) {
-  ASSERT(!insert_id_set_);
+  DCHECK(!insert_id_set_);
 
   insert_id_ = id;
   insert_id_set_ = true;
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.cpp
index 1e25a86d..8288bc9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.cpp
@@ -39,7 +39,7 @@
   if (result_.size() == 0)
     return 0;
 
-  ASSERT(result_.size() % columns_.size() == 0);
+  DCHECK_EQ(result_.size() % columns_.size(), 0u);
 
   return result_.size() / columns_.size();
 }
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.h b/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.h
index e9bd8cbf..acea4be7 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLResultSetRowList.h
@@ -32,7 +32,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/webdatabase/sqlite/SQLValue.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 class ScriptValue;
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
index f62edb3..adf8d1fb6 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.cpp
@@ -38,7 +38,7 @@
 #include "modules/webdatabase/SQLTransaction.h"
 #include "modules/webdatabase/sqlite/SQLiteDatabase.h"
 #include "modules/webdatabase/sqlite/SQLiteStatement.h"
-#include "wtf/text/CString.h"
+#include "platform/wtf/text/CString.h"
 
 namespace blink {
 
@@ -79,8 +79,8 @@
 }
 
 bool SQLStatement::PerformCallback(SQLTransaction* transaction) {
-  ASSERT(transaction);
-  ASSERT(backend_);
+  DCHECK(transaction);
+  DCHECK(backend_);
 
   bool callback_error = false;
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h
index 9c281d9..3c48a72 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatement.h
@@ -28,10 +28,10 @@
 #ifndef SQLStatement_h
 #define SQLStatement_h
 
-#include "modules/webdatabase/sqlite/SQLValue.h"
 #include "modules/webdatabase/SQLResultSet.h"
-#include "wtf/Forward.h"
-#include "wtf/text/WTFString.h"
+#include "modules/webdatabase/sqlite/SQLValue.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
index 180618a..791b0e2 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.cpp
@@ -34,7 +34,7 @@
 #include "modules/webdatabase/StorageLog.h"
 #include "modules/webdatabase/sqlite/SQLiteDatabase.h"
 #include "modules/webdatabase/sqlite/SQLiteStatement.h"
-#include "wtf/text/CString.h"
+#include "platform/wtf/text/CString.h"
 
 // The Life-Cycle of a SQLStatement i.e. Who's keeping the SQLStatement alive?
 // ==========================================================================
@@ -124,7 +124,7 @@
 }
 
 bool SQLStatementBackend::Execute(Database* db) {
-  ASSERT(!result_set_->IsValid());
+  DCHECK(!result_set_->IsValid());
 
   // If we're re-running this statement after a quota violation, we need to
   // clear that error now
@@ -247,7 +247,8 @@
 }
 
 void SQLStatementBackend::SetVersionMismatchedError(Database* database) {
-  ASSERT(!error_ && !result_set_->IsValid());
+  DCHECK(!error_);
+  DCHECK(!result_set_->IsValid());
   database->ReportExecuteStatementResult(7, SQLError::kVersionErr, 0);
   error_ = SQLErrorData::Create(
       SQLError::kVersionErr,
@@ -255,7 +256,8 @@
 }
 
 void SQLStatementBackend::SetFailureDueToQuota(Database* database) {
-  ASSERT(!error_ && !result_set_->IsValid());
+  DCHECK(!error_);
+  DCHECK(!result_set_->IsValid());
   database->ReportExecuteStatementResult(8, SQLError::kQuotaErr, 0);
   error_ = SQLErrorData::Create(SQLError::kQuotaErr,
                                 "there was not enough remaining storage "
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.h b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.h
index e892d3e..8625f17 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLStatementBackend.h
@@ -28,12 +28,12 @@
 #ifndef SQLStatementBackend_h
 #define SQLStatementBackend_h
 
+#include <memory>
 #include "modules/webdatabase/sqlite/SQLValue.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
index f666109..e6b1912 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransaction.cpp
@@ -44,8 +44,8 @@
 #include "modules/webdatabase/SQLTransactionClient.h"  // FIXME: Should be used in the backend only.
 #include "modules/webdatabase/SQLTransactionErrorCallback.h"
 #include "modules/webdatabase/StorageLog.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/StdLibExtras.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
@@ -71,7 +71,7 @@
       execute_sql_allowed_(false),
       read_only_(read_only) {
   DCHECK(IsMainThread());
-  ASSERT(database_);
+  DCHECK(database_);
   probe::AsyncTaskScheduled(db->GetExecutionContext(), "SQLTransaction", this);
 }
 
@@ -98,7 +98,7 @@
 }
 
 void SQLTransaction::SetBackend(SQLTransactionBackend* backend) {
-  ASSERT(!backend_);
+  DCHECK(!backend_);
   backend_ = backend;
 }
 
@@ -121,9 +121,9 @@
       &SQLTransaction::DeliverSuccessCallback            // 12.
   };
 
-  ASSERT(WTF_ARRAY_LENGTH(kStateFunctions) ==
+  DCHECK(WTF_ARRAY_LENGTH(kStateFunctions) ==
          static_cast<int>(SQLTransactionState::kNumberOfStates));
-  ASSERT(state < SQLTransactionState::kNumberOfStates);
+  DCHECK(state < SQLTransactionState::kNumberOfStates);
 
   return kStateFunctions[static_cast<int>(state)];
 }
@@ -141,7 +141,7 @@
 }
 
 SQLTransactionState SQLTransaction::NextStateForTransactionError() {
-  ASSERT(transaction_error_);
+  DCHECK(transaction_error_);
   if (HasErrorCallback())
     return SQLTransactionState::kDeliverTransactionErrorCallback;
 
@@ -188,10 +188,10 @@
     // Hence, it's thread safe to fetch the backend transactionError without
     // a lock.
     if (!transaction_error_) {
-      ASSERT(backend_->TransactionError());
+      DCHECK(backend_->TransactionError());
       transaction_error_ = SQLErrorData::Create(*backend_->TransactionError());
     }
-    ASSERT(transaction_error_);
+    DCHECK(transaction_error_);
     error_callback->handleEvent(SQLError::Create(*transaction_error_));
 
     transaction_error_ = nullptr;
@@ -211,7 +211,7 @@
   execute_sql_allowed_ = true;
 
   SQLStatement* current_statement = backend_->CurrentStatement();
-  ASSERT(current_statement);
+  DCHECK(current_statement);
 
   bool result = current_statement->PerformCallback(this);
 
@@ -230,7 +230,7 @@
 
 SQLTransactionState SQLTransaction::DeliverQuotaIncreaseCallback() {
   DCHECK(IsMainThread());
-  ASSERT(backend_->CurrentStatement());
+  DCHECK(backend_->CurrentStatement());
 
   bool should_retry_current_statement =
       database_->TransactionClient()->DidExceedQuota(GetDatabase());
@@ -258,12 +258,12 @@
 // in the state dispatch table. They are unimplemented because they should
 // never be reached in the course of correct execution.
 SQLTransactionState SQLTransaction::UnreachableState() {
-  ASSERT_NOT_REACHED();
+  NOTREACHED();
   return SQLTransactionState::kEnd;
 }
 
 SQLTransactionState SQLTransaction::SendToBackendState() {
-  ASSERT(next_state_ != SQLTransactionState::kIdle);
+  DCHECK_NE(next_state_, SQLTransactionState::kIdle);
   backend_->RequestTransitToState(next_state_);
   return SQLTransactionState::kIdle;
 }
@@ -329,7 +329,7 @@
   // cleaning up and shutting down:
   if (database_->Opened()) {
     SetStateToRequestedState();
-    ASSERT(next_state_ == SQLTransactionState::kEnd ||
+    DCHECK(next_state_ == SQLTransactionState::kEnd ||
            next_state_ == SQLTransactionState::kDeliverTransactionCallback ||
            next_state_ ==
                SQLTransactionState::kDeliverTransactionErrorCallback ||
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp
index fccdd593..e2ed4f86 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.cpp
@@ -28,6 +28,7 @@
 
 #include "modules/webdatabase/SQLTransactionBackend.h"
 
+#include <memory>
 #include "modules/webdatabase/Database.h"
 #include "modules/webdatabase/DatabaseAuthorizer.h"
 #include "modules/webdatabase/DatabaseContext.h"
@@ -41,9 +42,8 @@
 #include "modules/webdatabase/StorageLog.h"
 #include "modules/webdatabase/sqlite/SQLValue.h"
 #include "modules/webdatabase/sqlite/SQLiteTransaction.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/StdLibExtras.h"
-#include <memory>
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/StdLibExtras.h"
 
 // How does a SQLTransaction work?
 // ==============================
@@ -389,13 +389,13 @@
       read_only_(read_only),
       has_version_mismatch_(false) {
   DCHECK(IsMainThread());
-  ASSERT(database_);
+  DCHECK(database_);
   frontend_->SetBackend(this);
   requested_state_ = SQLTransactionState::kAcquireLock;
 }
 
 SQLTransactionBackend::~SQLTransactionBackend() {
-  ASSERT(!sqlite_transaction_);
+  DCHECK(!sqlite_transaction_);
 }
 
 DEFINE_TRACE(SQLTransactionBackend) {
@@ -409,7 +409,7 @@
   // Break the reference cycle. See comment about the life-cycle above.
   frontend_ = nullptr;
 
-  ASSERT(GetDatabase()
+  DCHECK(GetDatabase()
              ->GetDatabaseContext()
              ->GetDatabaseThread()
              ->IsDatabaseThread());
@@ -465,7 +465,7 @@
 }
 
 void SQLTransactionBackend::SetShouldRetryCurrentStatement(bool should_retry) {
-  ASSERT(!should_retry_current_statement_);
+  DCHECK(!should_retry_current_statement_);
   should_retry_current_statement_ = should_retry;
 }
 
@@ -492,9 +492,9 @@
       &SQLTransactionBackend::SendToFrontendState,
   };
 
-  ASSERT(WTF_ARRAY_LENGTH(kStateFunctions) ==
+  DCHECK(WTF_ARRAY_LENGTH(kStateFunctions) ==
          static_cast<int>(SQLTransactionState::kNumberOfStates));
-  ASSERT(state < SQLTransactionState::kNumberOfStates);
+  DCHECK_LT(state, SQLTransactionState::kNumberOfStates);
 
   return kStateFunctions[static_cast<int>(state)];
 }
@@ -515,7 +515,7 @@
   // cleaning up and shutting down:
   if (database_->Opened()) {
     SetStateToRequestedState();
-    ASSERT(next_state_ == SQLTransactionState::kAcquireLock ||
+    DCHECK(next_state_ == SQLTransactionState::kAcquireLock ||
            next_state_ == SQLTransactionState::kOpenTransactionAndPreflight ||
            next_state_ == SQLTransactionState::kRunStatements ||
            next_state_ == SQLTransactionState::kPostflightAndCommit ||
@@ -567,7 +567,7 @@
 }
 
 void SQLTransactionBackend::NotifyDatabaseThreadIsShuttingDown() {
-  ASSERT(GetDatabase()
+  DCHECK(GetDatabase()
              ->GetDatabaseContext()
              ->GetDatabaseThread()
              ->IsDatabaseThread());
@@ -595,8 +595,8 @@
              ->GetDatabaseContext()
              ->GetDatabaseThread()
              ->IsDatabaseThread());
-  ASSERT(!database_->SqliteDatabase().TransactionInProgress());
-  ASSERT(lock_acquired_);
+  DCHECK(!database_->SqliteDatabase().TransactionInProgress());
+  DCHECK(lock_acquired_);
 
   STORAGE_DVLOG(1) << "Opening and preflighting transaction " << this;
 
@@ -605,7 +605,7 @@
   if (!read_only_)
     database_->SqliteDatabase().SetMaximumSize(database_->MaximumSize());
 
-  ASSERT(!sqlite_transaction_);
+  DCHECK(!sqlite_transaction_);
   sqlite_transaction_ = WTF::WrapUnique(
       new SQLiteTransaction(database_->SqliteDatabase(), read_only_));
 
@@ -617,7 +617,7 @@
   // Spec 4.3.2.1+2: Open a transaction to the database, jumping to the error
   // callback if that fails.
   if (!sqlite_transaction_->InProgress()) {
-    ASSERT(!database_->SqliteDatabase().TransactionInProgress());
+    DCHECK(!database_->SqliteDatabase().TransactionInProgress());
     database_->ReportStartTransactionResult(
         2, SQLError::kDatabaseErr, database_->SqliteDatabase().LastError());
     transaction_error_ = SQLErrorData::Create(
@@ -679,7 +679,7 @@
              ->GetDatabaseContext()
              ->GetDatabaseThread()
              ->IsDatabaseThread());
-  ASSERT(lock_acquired_);
+  DCHECK(lock_acquired_);
   SQLTransactionState next_state;
 
   // If there is a series of statements queued up that are all successful and
@@ -784,7 +784,7 @@
 }
 
 SQLTransactionState SQLTransactionBackend::PostflightAndCommit() {
-  ASSERT(lock_acquired_);
+  DCHECK(lock_acquired_);
 
   // Spec 4.3.2.7: Perform postflight steps, jumping to the error callback if
   // they fail.
@@ -802,7 +802,7 @@
 
   // Spec 4.3.2.7: Commit the transaction, jumping to the error callback if that
   // fails.
-  ASSERT(sqlite_transaction_);
+  DCHECK(sqlite_transaction_);
 
   database_->DisableAuthorizer();
   sqlite_transaction_->Commit();
@@ -837,11 +837,11 @@
 }
 
 SQLTransactionState SQLTransactionBackend::CleanupAndTerminate() {
-  ASSERT(lock_acquired_);
+  DCHECK(lock_acquired_);
 
   // Spec 4.3.2.9: End transaction steps. There is no next step.
   STORAGE_DVLOG(1) << "Transaction " << this << " is complete";
-  ASSERT(!database_->SqliteDatabase().TransactionInProgress());
+  DCHECK(!database_->SqliteDatabase().TransactionInProgress());
 
   // Phase 5 cleanup. See comment on the SQLTransaction life-cycle above.
   DoCleanup();
@@ -850,7 +850,7 @@
 }
 
 SQLTransactionState SQLTransactionBackend::NextStateForTransactionError() {
-  ASSERT(transaction_error_);
+  DCHECK(transaction_error_);
   if (has_error_callback_)
     return SQLTransactionState::kDeliverTransactionErrorCallback;
 
@@ -861,7 +861,7 @@
 
 SQLTransactionState
 SQLTransactionBackend::CleanupAfterTransactionErrorCallback() {
-  ASSERT(lock_acquired_);
+  DCHECK(lock_acquired_);
 
   STORAGE_DVLOG(1) << "Transaction " << this << " is complete with an error";
   database_->DisableAuthorizer();
@@ -869,12 +869,12 @@
     // Spec 4.3.2.10: Rollback the transaction.
     sqlite_transaction_->Rollback();
 
-    ASSERT(!database_->SqliteDatabase().TransactionInProgress());
+    DCHECK(!database_->SqliteDatabase().TransactionInProgress());
     sqlite_transaction_.reset();
   }
   database_->EnableAuthorizer();
 
-  ASSERT(!database_->SqliteDatabase().TransactionInProgress());
+  DCHECK(!database_->SqliteDatabase().TransactionInProgress());
 
   return SQLTransactionState::kCleanupAndTerminate;
 }
@@ -889,7 +889,7 @@
                    << " for transaction " << this;
 #endif
   requested_state_ = next_state;
-  ASSERT(requested_state_ != SQLTransactionState::kEnd);
+  DCHECK_NE(requested_state_, SQLTransactionState::kEnd);
   database_->ScheduleTransactionStep(this);
 }
 
@@ -897,12 +897,12 @@
 // in the state dispatch table. They are unimplemented because they should
 // never be reached in the course of correct execution.
 SQLTransactionState SQLTransactionBackend::UnreachableState() {
-  ASSERT_NOT_REACHED();
+  NOTREACHED();
   return SQLTransactionState::kEnd;
 }
 
 SQLTransactionState SQLTransactionBackend::SendToFrontendState() {
-  ASSERT(next_state_ != SQLTransactionState::kIdle);
+  DCHECK_NE(next_state_, SQLTransactionState::kIdle);
   frontend_->RequestTransitToState(next_state_);
   return SQLTransactionState::kIdle;
 }
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.h
index 60aa7bf3..a4fe801 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionBackend.h
@@ -28,14 +28,14 @@
 #ifndef SQLTransactionBackend_h
 #define SQLTransactionBackend_h
 
+#include <memory>
 #include "modules/webdatabase/DatabaseBasicTypes.h"
 #include "modules/webdatabase/SQLStatement.h"
 #include "modules/webdatabase/SQLTransactionStateMachine.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Deque.h"
-#include "wtf/Forward.h"
-#include "wtf/ThreadingPrimitives.h"
-#include <memory>
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/ThreadingPrimitives.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp
index 3f61bfb6..00ee3e08 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.cpp
@@ -37,11 +37,11 @@
 #include "platform/CrossThreadFunctional.h"
 #include "platform/WebTaskRunner.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebDatabaseObserver.h"
 #include "public/platform/WebSecurityOrigin.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/Functional.h"
 
 namespace blink {
 
@@ -79,7 +79,7 @@
 bool SQLTransactionClient::DidExceedQuota(Database* database) {
   // Chromium does not allow users to manually change the quota for an origin
   // (for now, at least).  Don't do anything.
-  ASSERT(
+  DCHECK(
       database->GetDatabaseContext()->GetExecutionContext()->IsContextThread());
   return false;
 }
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.h
index 8a6225d..74501d5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionClient.h
@@ -31,8 +31,8 @@
 #ifndef SQLTransactionClient_h
 #define SQLTransactionClient_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Noncopyable.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
index c56e288b..1d1ba20a 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.cpp
@@ -38,7 +38,7 @@
 
 static String GetDatabaseIdentifier(SQLTransactionBackend* transaction) {
   Database* database = transaction->GetDatabase();
-  ASSERT(database);
+  DCHECK(database);
   return database->StringIdentifier();
 }
 
@@ -70,7 +70,7 @@
 
 void SQLTransactionCoordinator::AcquireLock(
     SQLTransactionBackend* transaction) {
-  ASSERT(!is_shutting_down_);
+  DCHECK(!is_shutting_down_);
 
   String db_identifier = GetDatabaseIdentifier(transaction);
 
@@ -103,10 +103,10 @@
   CoordinationInfo& info = coordination_info_iterator->value;
 
   if (transaction->IsReadOnly()) {
-    ASSERT(info.active_read_transactions.Contains(transaction));
+    DCHECK(info.active_read_transactions.Contains(transaction));
     info.active_read_transactions.erase(transaction);
   } else {
-    ASSERT(info.active_write_transaction == transaction);
+    DCHECK_EQ(info.active_write_transaction, transaction);
     info.active_write_transaction = nullptr;
   }
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.h
index b8321960..454b87db 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionCoordinator.h
@@ -33,10 +33,10 @@
 #define SQLTransactionCoordinator_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Deque.h"
-#include "wtf/HashMap.h"
-#include "wtf/HashSet.h"
-#include "wtf/text/StringHash.h"
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/HashMap.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/text/StringHash.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp
index ff35b296..f461db2 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.cpp
@@ -25,7 +25,7 @@
 
 #include "modules/webdatabase/SQLTransactionStateMachine.h"
 
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h
index 393bbdf..09283a5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h
+++ b/third_party/WebKit/Source/modules/webdatabase/SQLTransactionStateMachine.h
@@ -27,7 +27,7 @@
 #define SQLTransactionStateMachine_h
 
 #include "modules/webdatabase/SQLTransactionState.h"
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 namespace blink {
 
@@ -75,19 +75,19 @@
 
 template <typename T>
 void SQLTransactionStateMachine<T>::SetStateToRequestedState() {
-  ASSERT(next_state_ == SQLTransactionState::kIdle);
-  ASSERT(requested_state_ != SQLTransactionState::kIdle);
+  DCHECK_EQ(next_state_, SQLTransactionState::kIdle);
+  DCHECK_NE(requested_state_, SQLTransactionState::kIdle);
   next_state_ = requested_state_;
   requested_state_ = SQLTransactionState::kIdle;
 }
 
 template <typename T>
 void SQLTransactionStateMachine<T>::RunStateMachine() {
-  ASSERT(SQLTransactionState::kEnd < SQLTransactionState::kIdle);
+  DCHECK_LT(SQLTransactionState::kEnd, SQLTransactionState::kIdle);
   while (next_state_ > SQLTransactionState::kIdle) {
-    ASSERT(next_state_ < SQLTransactionState::kNumberOfStates);
+    DCHECK_LT(next_state_, SQLTransactionState::kNumberOfStates);
     StateFunction state_function = StateFunctionFor(next_state_);
-    ASSERT(state_function);
+    DCHECK(state_function);
 
 #if DCHECK_IS_ON()
     state_audit_trail_[next_state_audit_entry_] = next_state_;
diff --git a/third_party/WebKit/Source/modules/webdatabase/StorageLog.h b/third_party/WebKit/Source/modules/webdatabase/StorageLog.h
index a230d58f..52f7725 100644
--- a/third_party/WebKit/Source/modules/webdatabase/StorageLog.h
+++ b/third_party/WebKit/Source/modules/webdatabase/StorageLog.h
@@ -5,7 +5,7 @@
 #ifndef StorageLog_h
 #define StorageLog_h
 
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 #if DCHECK_IS_ON()
 // We can see logs with |--v=N| or |--vmodule=StorageLog=N| where N is a
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLLog.h b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLLog.h
index bcd2fe21..e0bcc50 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLLog.h
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLLog.h
@@ -5,7 +5,7 @@
 #ifndef SQLLog_h
 #define SQLLog_h
 
-#include "wtf/Assertions.h"
+#include "platform/wtf/Assertions.h"
 
 #if DCHECK_IS_ON()
 // We can see logs with |--v=N| or |--vmodule=SQLLog=N| where N is a
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.cpp
index 6dd6d71..35063263 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.cpp
@@ -36,14 +36,14 @@
       string_(val.string_.IsolatedCopy()) {}
 
 String SQLValue::GetString() const {
-  ASSERT(type_ == kStringValue);
+  DCHECK_EQ(type_, kStringValue);
 
   // Must return a copy since ref-shared Strings are not thread safe
   return string_.IsolatedCopy();
 }
 
 double SQLValue::Number() const {
-  ASSERT(type_ == kNumberValue);
+  DCHECK_EQ(type_, kNumberValue);
 
   return number_;
 }
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.h b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.h
index d46f6a3..5687afda 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.h
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLValue.h
@@ -29,8 +29,8 @@
 #ifndef SQLValue_h
 #define SQLValue_h
 
-#include "wtf/Allocator.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.cpp
index 0f53369..d7992392 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.cpp
@@ -121,7 +121,7 @@
 
   int current_page_size = PageSize();
 
-  ASSERT(current_page_size || !db_);
+  DCHECK(current_page_size || !db_);
   int64_t new_max_page_count = current_page_size ? size / current_page_size : 0;
 
   MutexLocker locker(authorizer_lock_);
@@ -261,7 +261,7 @@
                                        const char* /*databaseName*/,
                                        const char* /*trigger_or_view*/) {
   DatabaseAuthorizer* auth = static_cast<DatabaseAuthorizer*>(user_data);
-  ASSERT(auth);
+  DCHECK(auth);
 
   switch (action_code) {
     case SQLITE_CREATE_INDEX:
@@ -329,7 +329,7 @@
       return auth->AllowFunction(parameter2);
 #endif
     default:
-      ASSERT_NOT_REACHED();
+      NOTREACHED();
       return kSQLAuthDeny;
   }
 }
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.h b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.h
index 5f9f2e9..2b174c47 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.h
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteDatabase.h
@@ -28,10 +28,10 @@
 #define SQLiteDatabase_h
 
 #include "platform/heap/Handle.h"
-#include "wtf/Threading.h"
-#include "wtf/ThreadingPrimitives.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/ThreadingPrimitives.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/WTFString.h"
 
 #if COMPILER(MSVC)
 #pragma warning(disable : 4800)
@@ -95,7 +95,7 @@
   const char* LastErrorMsg();
 
   sqlite3* Sqlite3Handle() const {
-    ASSERT(sharable_ || CurrentThread() == opening_thread_ || !db_);
+    DCHECK_EQ(sharable_ || CurrentThread(), opening_thread_ || !db_);
     return db_;
   }
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp
index 33a60cc..a25ffb5 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.cpp
@@ -32,8 +32,8 @@
 
 #include "platform/heap/Handle.h"
 #include "platform/heap/SafePoint.h"
+#include "platform/wtf/text/CString.h"
 #include "third_party/sqlite/sqlite3.h"
-#include "wtf/text/CString.h"
 
 // SQLiteFileSystem::registerSQLiteVFS() is implemented in the
 // platform-specific files SQLiteFileSystemChromium{Win|Posix}.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.h b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.h
index c7012086..10394fb 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.h
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystem.h
@@ -31,9 +31,9 @@
 #ifndef SQLiteFileSystem_h
 #define SQLiteFileSystem_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Threading.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Threading.h"
+#include "platform/wtf/text/WTFString.h"
 
 struct sqlite3;
 
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
index db9c163..794ad460 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemPosix.cpp
@@ -341,9 +341,9 @@
 
   // These are implemented by delegating to |wrappedVfs|.
   // TODO(shess): Implement local versions.
-  ASSERT(wrapped_vfs->xRandomness);
-  ASSERT(wrapped_vfs->xSleep);
-  ASSERT(wrapped_vfs->xCurrentTime);
+  DCHECK(wrapped_vfs->xRandomness);
+  DCHECK(wrapped_vfs->xSleep);
+  DCHECK(wrapped_vfs->xCurrentTime);
 
   static sqlite3_vfs chromium_vfs = {1,
                                      sizeof(chromiumVfsFile),
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemWin.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemWin.cpp
index 70878054..2abe9eb 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemWin.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteFileSystemWin.cpp
@@ -168,9 +168,9 @@
 
   // These are implemented by delegating to |wrappedVfs|.
   // TODO(shess): Implement local versions.
-  ASSERT(wrapped_vfs->xRandomness);
-  ASSERT(wrapped_vfs->xSleep);
-  ASSERT(wrapped_vfs->xCurrentTime);
+  DCHECK(wrapped_vfs->xRandomness);
+  DCHECK(wrapped_vfs->xSleep);
+  DCHECK(wrapped_vfs->xCurrentTime);
 
   static sqlite3_vfs chromium_vfs = {1,
                                      wrapped_vfs->szOsFile,
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
index 5021747b..828173c 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteStatement.cpp
@@ -25,14 +25,14 @@
 
 #include "modules/webdatabase/sqlite/SQLiteStatement.h"
 
+#include <memory>
 #include "modules/webdatabase/sqlite/SQLLog.h"
 #include "modules/webdatabase/sqlite/SQLValue.h"
 #include "platform/heap/SafePoint.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/CString.h"
 #include "third_party/sqlite/sqlite3.h"
-#include "wtf/Assertions.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/CString.h"
-#include <memory>
 
 // SQLite 3.6.16 makes sqlite3_prepare_v2 automatically retry preparing the
 // statement once if the database scheme has changed. We rely on this behavior.
@@ -86,7 +86,9 @@
 }
 
 int SQLiteStatement::Prepare() {
-  ASSERT(!is_prepared_);
+#if DCHECK_IS_ON()
+  DCHECK(!is_prepared_);
+#endif
 
   CString query = query_.StripWhiteSpace().Utf8();
 
@@ -156,7 +158,9 @@
 bool SQLiteStatement::ExecuteCommand() {
   if (!statement_ && Prepare() != SQLITE_OK)
     return false;
-  ASSERT(is_prepared_);
+#if DCHECK_IS_ON()
+  DCHECK(is_prepared_);
+#endif
   if (Step() != SQLITE_DONE) {
     Finalize();
     return false;
@@ -166,9 +170,11 @@
 }
 
 int SQLiteStatement::BindText(int index, const String& text) {
-  ASSERT(is_prepared_);
-  ASSERT(index > 0);
-  ASSERT(static_cast<unsigned>(index) <= BindParameterCount());
+#if DCHECK_IS_ON()
+  DCHECK(is_prepared_);
+#endif
+  DCHECK_GT(index, 0);
+  DCHECK_LE(static_cast<unsigned>(index), BindParameterCount());
 
   String text16(text);
   text16.Ensure16Bit();
@@ -178,17 +184,21 @@
 }
 
 int SQLiteStatement::BindDouble(int index, double number) {
-  ASSERT(is_prepared_);
-  ASSERT(index > 0);
-  ASSERT(static_cast<unsigned>(index) <= BindParameterCount());
+#if DCHECK_IS_ON()
+  DCHECK(is_prepared_);
+#endif
+  DCHECK_GT(index, 0);
+  DCHECK_LE(static_cast<unsigned>(index), BindParameterCount());
 
   return restrictError(sqlite3_bind_double(statement_, index, number));
 }
 
 int SQLiteStatement::BindNull(int index) {
-  ASSERT(is_prepared_);
-  ASSERT(index > 0);
-  ASSERT(static_cast<unsigned>(index) <= BindParameterCount());
+#if DCHECK_IS_ON()
+  DCHECK(is_prepared_);
+#endif
+  DCHECK_GT(index, 0);
+  DCHECK_LE(static_cast<unsigned>(index), BindParameterCount());
 
   return restrictError(sqlite3_bind_null(statement_, index));
 }
@@ -203,26 +213,30 @@
       return BindNull(index);
   }
 
-  ASSERT_NOT_REACHED();
+  NOTREACHED();
   return SQLITE_ERROR;
 }
 
 unsigned SQLiteStatement::BindParameterCount() const {
-  ASSERT(is_prepared_);
+#if DCHECK_IS_ON()
+  DCHECK(is_prepared_);
+#endif
   if (!statement_)
     return 0;
   return sqlite3_bind_parameter_count(statement_);
 }
 
 int SQLiteStatement::ColumnCount() {
-  ASSERT(is_prepared_);
+#if DCHECK_IS_ON()
+  DCHECK(is_prepared_);
+#endif
   if (!statement_)
     return 0;
   return sqlite3_data_count(statement_);
 }
 
 String SQLiteStatement::GetColumnName(int col) {
-  ASSERT(col >= 0);
+  DCHECK_GE(col, 0);
   if (!statement_)
     if (PrepareAndStep() != SQLITE_ROW)
       return String();
@@ -233,7 +247,7 @@
 }
 
 SQLValue SQLiteStatement::GetColumnValue(int col) {
-  ASSERT(col >= 0);
+  DCHECK_GE(col, 0);
   if (!statement_)
     if (PrepareAndStep() != SQLITE_ROW)
       return SQLValue();
@@ -261,12 +275,12 @@
     default:
       break;
   }
-  ASSERT_NOT_REACHED();
+  NOTREACHED();
   return SQLValue();
 }
 
 String SQLiteStatement::GetColumnText(int col) {
-  ASSERT(col >= 0);
+  DCHECK_GE(col, 0);
   if (!statement_)
     if (PrepareAndStep() != SQLITE_ROW)
       return String();
@@ -279,7 +293,7 @@
 }
 
 int SQLiteStatement::GetColumnInt(int col) {
-  ASSERT(col >= 0);
+  DCHECK_GE(col, 0);
   if (!statement_)
     if (PrepareAndStep() != SQLITE_ROW)
       return 0;
@@ -289,7 +303,7 @@
 }
 
 int64_t SQLiteStatement::GetColumnInt64(int col) {
-  ASSERT(col >= 0);
+  DCHECK_GE(col, 0);
   if (!statement_)
     if (PrepareAndStep() != SQLITE_ROW)
       return 0;
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.cpp b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.cpp
index ca0db49..83878f0 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.cpp
@@ -39,7 +39,7 @@
 
 void SQLiteTransaction::begin() {
   if (!in_progress_) {
-    ASSERT(!db_.transaction_in_progress_);
+    DCHECK(!db_.transaction_in_progress_);
     // Call BEGIN IMMEDIATE for a write transaction to acquire
     // a RESERVED lock on the DB file. Otherwise, another write
     // transaction (on another connection) could make changes
@@ -57,7 +57,7 @@
 
 void SQLiteTransaction::Commit() {
   if (in_progress_) {
-    ASSERT(db_.transaction_in_progress_);
+    DCHECK(db_.transaction_in_progress_);
     in_progress_ = !db_.ExecuteCommand("COMMIT");
     db_.transaction_in_progress_ = in_progress_;
   }
@@ -70,7 +70,7 @@
   // fail, thus returning a non-zero/true result
   // (http://www.sqlite.org/lang_transaction.html).
   if (in_progress_) {
-    ASSERT(db_.transaction_in_progress_);
+    DCHECK(db_.transaction_in_progress_);
     db_.ExecuteCommand("ROLLBACK");
     in_progress_ = false;
     db_.transaction_in_progress_ = false;
diff --git a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.h b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.h
index 6c03e9b..06aa8ea9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.h
+++ b/third_party/WebKit/Source/modules/webdatabase/sqlite/SQLiteTransaction.h
@@ -26,8 +26,8 @@
 #ifndef SQLiteTransaction_h
 #define SQLiteTransaction_h
 
-#include "wtf/Allocator.h"
-#include "wtf/Noncopyable.h"
+#include "platform/wtf/Allocator.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.h b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.h
index 63d67cd6..7e1a207 100644
--- a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.h
+++ b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptValue.h"
 #include "modules/webgl/WebGLExtension.h"
-#include "wtf/HashMap.h"
+#include "platform/wtf/HashMap.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.h b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.h
index 5ab236ca..f0e038b3 100644
--- a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.h
+++ b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQueryWebGL2.h
@@ -8,7 +8,7 @@
 #include "bindings/core/v8/ScriptValue.h"
 #include "modules/webgl/WebGLExtension.h"
 #include "modules/webgl/WebGLQuery.h"
-#include "wtf/HashMap.h"
+#include "platform/wtf/HashMap.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/GLStringQuery.h b/third_party/WebKit/Source/modules/webgl/GLStringQuery.h
index 32f58fe7..2ea42f5 100644
--- a/third_party/WebKit/Source/modules/webgl/GLStringQuery.h
+++ b/third_party/WebKit/Source/modules/webgl/GLStringQuery.h
@@ -6,7 +6,7 @@
 #define GLStringQuery_h
 
 #include "gpu/command_buffer/client/gles2_interface.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 47eae64..21ee642 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -4,6 +4,7 @@
 
 #include "modules/webgl/WebGL2RenderingContextBase.h"
 
+#include <memory>
 #include "bindings/modules/v8/WebGLAny.h"
 #include "core/frame/ImageBitmap.h"
 #include "core/html/HTMLCanvasElement.h"
@@ -25,11 +26,10 @@
 #include "modules/webgl/WebGLTransformFeedback.h"
 #include "modules/webgl/WebGLUniformLocation.h"
 #include "modules/webgl/WebGLVertexArrayObject.h"
+#include "platform/wtf/CheckedNumeric.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebGraphicsContext3DProvider.h"
-#include "wtf/CheckedNumeric.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
 
 using WTF::String;
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.h b/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.h
index b850f7c..c52a5e37 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLContextGroup.h
@@ -28,9 +28,9 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "modules/webgl/WebGLRenderingContextBase.h"
-#include "wtf/HashSet.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefCounted.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefCounted.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.h b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.h
index 9120585..57bbaed 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLDrawBuffers.h
@@ -27,7 +27,7 @@
 #define WebGLDrawBuffers_h
 
 #include "modules/webgl/WebGLExtension.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLObject.h b/third_party/WebKit/Source/modules/webgl/WebGLObject.h
index 583775f..cf69fe2 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLObject.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLObject.h
@@ -29,8 +29,8 @@
 #include "bindings/core/v8/DOMWrapperWorld.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Assertions.h"
 #include "third_party/khronos/GLES2/gl2.h"
-#include "wtf/Assertions.h"
 
 namespace gpu {
 namespace gles2 {
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLProgram.h b/third_party/WebKit/Source/modules/webgl/WebGLProgram.h
index 999ab1fe..44712ac3 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLProgram.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLProgram.h
@@ -29,8 +29,8 @@
 #include "bindings/core/v8/TraceWrapperMember.h"
 #include "modules/webgl/WebGLShader.h"
 #include "modules/webgl/WebGLSharedPlatform3DObject.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.h
index 52cb934..9462de3 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderbuffer.h
@@ -27,7 +27,7 @@
 #define WebGLRenderbuffer_h
 
 #include "modules/webgl/WebGLSharedPlatform3DObject.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
index ae6aa696..0b4a7a2 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContext.cpp
@@ -61,9 +61,9 @@
 #include "modules/webgl/WebGLDrawBuffers.h"
 #include "modules/webgl/WebGLLoseContext.h"
 #include "platform/graphics/gpu/DrawingBuffer.h"
+#include "platform/wtf/CheckedNumeric.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebGraphicsContext3DProvider.h"
-#include "wtf/CheckedNumeric.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
index 46adea0..f6091bd 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp
@@ -96,14 +96,14 @@
 #include "platform/graphics/UnacceleratedImageBufferSurface.h"
 #include "platform/graphics/gpu/AcceleratedImageBufferSurface.h"
 #include "platform/graphics/gpu/SharedGpuContext.h"
+#include "platform/wtf/CheckedNumeric.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/text/StringUTF8Adaptor.h"
+#include "platform/wtf/typed_arrays/ArrayBufferContents.h"
 #include "public/platform/Platform.h"
 #include "skia/ext/texture_handle.h"
-#include "wtf/CheckedNumeric.h"
-#include "wtf/Functional.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/StringUTF8Adaptor.h"
-#include "wtf/typed_arrays/ArrayBufferContents.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
index 45a8a20..61362ce 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h
@@ -26,6 +26,8 @@
 #ifndef WebGLRenderingContextBase_h
 #define WebGLRenderingContextBase_h
 
+#include <memory>
+#include <set>
 #include "bindings/core/v8/Nullable.h"
 #include "bindings/core/v8/ScriptState.h"
 #include "bindings/core/v8/ScriptValue.h"
@@ -46,13 +48,11 @@
 #include "platform/graphics/gpu/DrawingBuffer.h"
 #include "platform/graphics/gpu/Extensions3DUtil.h"
 #include "platform/graphics/gpu/WebGLImageConversion.h"
+#include "platform/wtf/CheckedNumeric.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebGraphicsContext3DProvider.h"
 #include "third_party/khronos/GLES2/gl2.h"
-#include "wtf/CheckedNumeric.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
-#include <set>
 
 namespace blink {
 class WebLayer;
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLShader.h b/third_party/WebKit/Source/modules/webgl/WebGLShader.h
index 06fe5fa6..b86f69e 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLShader.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLShader.h
@@ -27,7 +27,7 @@
 #define WebGLShader_h
 
 #include "modules/webgl/WebGLSharedPlatform3DObject.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLSharedPlatform3DObject.h b/third_party/WebKit/Source/modules/webgl/WebGLSharedPlatform3DObject.h
index 8874b17..cd6ccef 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLSharedPlatform3DObject.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLSharedPlatform3DObject.h
@@ -6,7 +6,7 @@
 #define WebGLSharedPlatform3DObject_h
 
 #include "modules/webgl/WebGLSharedObject.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h b/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
index ea59d592..85e92d58 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
+++ b/third_party/WebKit/Source/modules/webgl/WebGLTransformFeedback.h
@@ -7,7 +7,7 @@
 
 #include "modules/webgl/WebGLProgram.h"
 #include "modules/webgl/WebGLSharedPlatform3DObject.h"
-#include "wtf/PassRefPtr.h"
+#include "platform/wtf/PassRefPtr.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.h b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.h
index 0cdaf4cb..f2b8bf3b 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccess.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccess.h
@@ -31,6 +31,7 @@
 #ifndef MIDIAccess_h
 #define MIDIAccess_h
 
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "bindings/core/v8/ScriptPromise.h"
 #include "core/dom/ContextLifecycleObserver.h"
@@ -40,8 +41,7 @@
 #include "modules/webmidi/MIDIAccessor.h"
 #include "modules/webmidi/MIDIAccessorClient.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
-#include <memory>
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.h b/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.h
index ed8b72e..601efcd1 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccessInitializer.h
@@ -5,6 +5,7 @@
 #ifndef MIDIAccessInitializer_h
 #define MIDIAccessInitializer_h
 
+#include <memory>
 #include "bindings/core/v8/ScriptPromise.h"
 #include "bindings/core/v8/ScriptPromiseResolver.h"
 #include "media/midi/midi_service.mojom-blink.h"
@@ -13,10 +14,9 @@
 #include "modules/webmidi/MIDIAccessorClient.h"
 #include "modules/webmidi/MIDIOptions.h"
 #include "modules/webmidi/MIDIPort.h"
+#include "platform/wtf/Vector.h"
 #include "third_party/WebKit/public/platform/modules/permissions/permission.mojom-blink.h"
 #include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom-blink.h"
-#include "wtf/Vector.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.cpp b/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.cpp
index f57a20ba..4ba03dc 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.cpp
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.cpp
@@ -30,11 +30,11 @@
 
 #include "modules/webmidi/MIDIAccessor.h"
 
-#include "modules/webmidi/MIDIAccessorClient.h"
-#include "public/platform/Platform.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/WTFString.h"
 #include <memory>
+#include "modules/webmidi/MIDIAccessorClient.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/WTFString.h"
+#include "public/platform/Platform.h"
 
 using blink::WebString;
 using midi::mojom::PortState;
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.h b/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.h
index bb49e259..ff5bc05 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccessor.h
@@ -31,11 +31,11 @@
 #ifndef MIDIAccessor_h
 #define MIDIAccessor_h
 
+#include <memory>
 #include "media/midi/midi_service.mojom-blink.h"
+#include "platform/wtf/Allocator.h"
 #include "public/platform/modules/webmidi/WebMIDIAccessor.h"
 #include "public/platform/modules/webmidi/WebMIDIAccessorClient.h"
-#include "wtf/Allocator.h"
-#include <memory>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIAccessorClient.h b/third_party/WebKit/Source/modules/webmidi/MIDIAccessorClient.h
index fbc02c9..a173e655 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIAccessorClient.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIAccessorClient.h
@@ -33,7 +33,7 @@
 
 #include "media/midi/midi_service.mojom-blink.h"
 #include "modules/webmidi/MIDIAccessor.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webmidi/MIDIPortMap.h b/third_party/WebKit/Source/modules/webmidi/MIDIPortMap.h
index 196715f46..ba7b2c6 100644
--- a/third_party/WebKit/Source/modules/webmidi/MIDIPortMap.h
+++ b/third_party/WebKit/Source/modules/webmidi/MIDIPortMap.h
@@ -9,7 +9,7 @@
 #include "bindings/core/v8/Maplike.h"
 #include "bindings/core/v8/V8Binding.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webshare/NavigatorShare.h b/third_party/WebKit/Source/modules/webshare/NavigatorShare.h
index 3d758918..74f7ddf 100644
--- a/third_party/WebKit/Source/modules/webshare/NavigatorShare.h
+++ b/third_party/WebKit/Source/modules/webshare/NavigatorShare.h
@@ -13,8 +13,8 @@
 #include "core/frame/Navigator.h"
 #include "platform/Supplementable.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/HashSet.h"
 #include "public/platform/modules/webshare/webshare.mojom-blink.h"
-#include "wtf/HashSet.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/CloseEvent.h b/third_party/WebKit/Source/modules/websockets/CloseEvent.h
index 7067651..6168a363 100644
--- a/third_party/WebKit/Source/modules/websockets/CloseEvent.h
+++ b/third_party/WebKit/Source/modules/websockets/CloseEvent.h
@@ -37,9 +37,9 @@
 #include "modules/EventModules.h"
 #include "modules/websockets/CloseEventInit.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
index e8480f5..767e95e 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.cpp
@@ -54,14 +54,14 @@
 #include "platform/network/NetworkLog.h"
 #include "platform/weborigin/KnownPorts.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/HashSet.h"
+#include "platform/wtf/MathExtras.h"
+#include "platform/wtf/StdLibExtras.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/StringBuilder.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebInsecureRequestPolicy.h"
-#include "wtf/Assertions.h"
-#include "wtf/HashSet.h"
-#include "wtf/MathExtras.h"
-#include "wtf/StdLibExtras.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/StringBuilder.h"
 
 static const size_t kMaxByteSizeForHistogram = 100 * 1000 * 1000;
 static const int32_t kBucketCountForMessageSizeHistogram = 50;
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.h b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.h
index a1eeae0..0f1cdff0 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocket.h
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocket.h
@@ -31,6 +31,9 @@
 #ifndef DOMWebSocket_h
 #define DOMWebSocket_h
 
+#include <stddef.h>
+#include <stdint.h>
+#include <memory>
 #include "bindings/core/v8/ActiveScriptWrappable.h"
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/SuspendableObject.h"
@@ -43,14 +46,11 @@
 #include "platform/Timer.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Deque.h"
-#include "wtf/Forward.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
-#include <stddef.h>
-#include <stdint.h>
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp b/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp
index b78dab1..a5ac482 100644
--- a/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DOMWebSocketTest.cpp
@@ -17,14 +17,14 @@
 #include "core/inspector/ConsoleTypes.h"
 #include "core/testing/DummyPageHolder.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/StringBuilder.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebInsecureRequestPolicy.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 #include "v8/include/v8.h"
-#include "wtf/Vector.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/StringBuilder.h"
-#include "wtf/text/WTFString.h"
 
 using testing::_;
 using testing::AnyNumber;
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
index 5c10c7e..40965e76 100644
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.cpp
@@ -55,11 +55,11 @@
 #include "platform/network/NetworkLog.h"
 #include "platform/network/WebSocketHandshakeRequest.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/PtrUtil.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/Functional.h"
-#include "wtf/PtrUtil.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
index aa5456de..d779151e 100644
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannel.h
@@ -44,12 +44,12 @@
 #include "platform/WebFrameScheduler.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
-#include "wtf/Deque.h"
-#include "wtf/PassRefPtr.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Deque.h"
+#include "platform/wtf/PassRefPtr.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
index 8caaeac..427b884 100644
--- a/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
+++ b/third_party/WebKit/Source/modules/websockets/DocumentWebSocketChannelTest.cpp
@@ -4,6 +4,8 @@
 
 #include "modules/websockets/WebSocketChannel.h"
 
+#include <stdint.h>
+#include <memory>
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/Document.h"
 #include "core/fileapi/Blob.h"
@@ -14,13 +16,11 @@
 #include "modules/websockets/WebSocketHandleClient.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
-#include <stdint.h>
 
 using testing::_;
 using testing::InSequence;
diff --git a/third_party/WebKit/Source/modules/websockets/InspectorWebSocketEvents.h b/third_party/WebKit/Source/modules/websockets/InspectorWebSocketEvents.h
index b2bd997..f1051bc 100644
--- a/third_party/WebKit/Source/modules/websockets/InspectorWebSocketEvents.h
+++ b/third_party/WebKit/Source/modules/websockets/InspectorWebSocketEvents.h
@@ -5,13 +5,13 @@
 #ifndef InspectorWebSocketEvents_h
 #define InspectorWebSocketEvents_h
 
+#include <memory>
 #include "core/inspector/InspectorTraceEvents.h"
 #include "platform/heap/Handle.h"
 #include "platform/instrumentation/tracing/TraceEvent.h"
 #include "platform/instrumentation/tracing/TracedValue.h"
-#include "wtf/Forward.h"
-#include "wtf/Functional.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Functional.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h b/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
index 30f765ab..4305d07 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketChannel.h
@@ -31,13 +31,13 @@
 #ifndef WebSocketChannel_h
 #define WebSocketChannel_h
 
+#include <memory>
 #include "bindings/core/v8/SourceLocation.h"
 #include "core/inspector/ConsoleTypes.h"
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/Noncopyable.h"
-#include <memory>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Noncopyable.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketChannelClient.h b/third_party/WebKit/Source/modules/websockets/WebSocketChannelClient.h
index 159e1f6..8850e7c0 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketChannelClient.h
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketChannelClient.h
@@ -31,12 +31,12 @@
 #ifndef WebSocketChannelClient_h
 #define WebSocketChannelClient_h
 
+#include <stdint.h>
+#include <memory>
 #include "modules/ModulesExport.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
-#include <memory>
-#include <stdint.h>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketFrame.h b/third_party/WebKit/Source/modules/websockets/WebSocketFrame.h
index b49c1c2..a00b110f 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketFrame.h
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketFrame.h
@@ -31,7 +31,7 @@
 #ifndef WebSocketFrame_h
 #define WebSocketFrame_h
 
-#include "wtf/Allocator.h"
+#include "platform/wtf/Allocator.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h b/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
index 82d99cc..dd311ff 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketHandle.h
@@ -31,9 +31,9 @@
 #ifndef WebSocketHandle_h
 #define WebSocketHandle_h
 
-#include "wtf/Forward.h"
-#include "wtf/Vector.h"
 #include <stdint.h>
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketHandleClient.h b/third_party/WebKit/Source/modules/websockets/WebSocketHandleClient.h
index 5403e36..3072c29 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketHandleClient.h
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketHandleClient.h
@@ -32,7 +32,7 @@
 #define WebSocketHandleClient_h
 
 #include "modules/websockets/WebSocketHandle.h"
-#include "wtf/Forward.h"
+#include "platform/wtf/Forward.h"
 
 namespace blink {
 class WebSocketHandshakeRequest;
diff --git a/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp b/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
index 40b26bf..5b734642 100644
--- a/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
+++ b/third_party/WebKit/Source/modules/websockets/WebSocketHandleImpl.cpp
@@ -11,11 +11,11 @@
 #include "platform/network/WebSocketHandshakeResponse.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/weborigin/SecurityOrigin.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
 #include "public/platform/WebScheduler.h"
-#include "wtf/Functional.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 namespace {
diff --git a/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp b/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
index 722af9e..33c118a9 100644
--- a/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
+++ b/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.cpp
@@ -42,12 +42,12 @@
 #include "platform/CrossThreadFunctional.h"
 #include "platform/WaitableEvent.h"
 #include "platform/heap/SafePoint.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Functional.h"
+#include "platform/wtf/PtrUtil.h"
+#include "platform/wtf/text/CString.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/Platform.h"
-#include "wtf/Assertions.h"
-#include "wtf/Functional.h"
-#include "wtf/PtrUtil.h"
-#include "wtf/text/CString.h"
-#include "wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h b/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
index 5cf9d8ce..d35f36b 100644
--- a/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
+++ b/third_party/WebKit/Source/modules/websockets/WorkerWebSocketChannel.h
@@ -31,19 +31,19 @@
 #ifndef WorkerWebSocketChannel_h
 #define WorkerWebSocketChannel_h
 
+#include <stdint.h>
+#include <memory>
 #include "bindings/core/v8/SourceLocation.h"
 #include "core/workers/WorkerThreadLifecycleObserver.h"
 #include "modules/websockets/WebSocketChannel.h"
 #include "modules/websockets/WebSocketChannelClient.h"
 #include "platform/heap/Handle.h"
+#include "platform/wtf/Assertions.h"
+#include "platform/wtf/Forward.h"
+#include "platform/wtf/RefPtr.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 #include "public/platform/WebTraceLocation.h"
-#include "wtf/Assertions.h"
-#include "wtf/Forward.h"
-#include "wtf/RefPtr.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
-#include <memory>
-#include <stdint.h>
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USB.cpp b/third_party/WebKit/Source/modules/webusb/USB.cpp
index 371de1e1..236a627 100644
--- a/third_party/WebKit/Source/modules/webusb/USB.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USB.cpp
@@ -17,9 +17,9 @@
 #include "modules/webusb/USBDeviceRequestOptions.h"
 #include "platform/UserGestureIndicator.h"
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/Functional.h"
 #include "public/platform/InterfaceProvider.h"
 #include "public/platform/Platform.h"
-#include "wtf/Functional.h"
 
 namespace usb = device::usb::blink;
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
index c0e999c..bbe535f 100644
--- a/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
+++ b/third_party/WebKit/Source/modules/webusb/USBDevice.cpp
@@ -18,8 +18,8 @@
 #include "modules/webusb/USBIsochronousOutTransferResult.h"
 #include "modules/webusb/USBOutTransferResult.h"
 #include "platform/mojo/MojoHelper.h"
+#include "platform/wtf/Assertions.h"
 #include "public/platform/Platform.h"
-#include "wtf/Assertions.h"
 
 namespace usb = device::usb::blink;
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBDevice.h b/third_party/WebKit/Source/modules/webusb/USBDevice.h
index 7740581..4139ebb 100644
--- a/third_party/WebKit/Source/modules/webusb/USBDevice.h
+++ b/third_party/WebKit/Source/modules/webusb/USBDevice.h
@@ -11,8 +11,8 @@
 #include "core/dom/ContextLifecycleObserver.h"
 #include "device/usb/public/interfaces/device.mojom-blink.h"
 #include "platform/heap/Handle.h"
-#include "wtf/BitVector.h"
-#include "wtf/Vector.h"
+#include "platform/wtf/BitVector.h"
+#include "platform/wtf/Vector.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBInTransferResult.h b/third_party/WebKit/Source/modules/webusb/USBInTransferResult.h
index 280314a..93608a39 100644
--- a/third_party/WebKit/Source/modules/webusb/USBInTransferResult.h
+++ b/third_party/WebKit/Source/modules/webusb/USBInTransferResult.h
@@ -9,8 +9,8 @@
 #include "core/dom/DOMArrayBuffer.h"
 #include "core/dom/DOMDataView.h"
 #include "platform/heap/Handle.h"
-#include "wtf/Vector.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/Vector.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.h b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.h
index b1b305d7..e6e878c6 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.h
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferPacket.h
@@ -8,7 +8,7 @@
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "core/dom/DOMDataView.h"
 #include "platform/heap/GarbageCollected.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.h b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.h
index 156b094..76855a6 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.h
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousInTransferResult.h
@@ -10,7 +10,7 @@
 #include "core/dom/DOMDataView.h"
 #include "modules/webusb/USBIsochronousInTransferPacket.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.h b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.h
index 530a731e7..97840a6 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.h
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferPacket.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/GarbageCollected.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.h b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.h
index c1cd745..0c080f9 100644
--- a/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.h
+++ b/third_party/WebKit/Source/modules/webusb/USBIsochronousOutTransferResult.h
@@ -9,7 +9,7 @@
 #include "core/dom/DOMDataView.h"
 #include "modules/webusb/USBIsochronousOutTransferPacket.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.h b/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.h
index 5115fbe8..7a3408f 100644
--- a/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.h
+++ b/third_party/WebKit/Source/modules/webusb/USBOutTransferResult.h
@@ -7,7 +7,7 @@
 
 #include "bindings/core/v8/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
-#include "wtf/text/WTFString.h"
+#include "platform/wtf/text/WTFString.h"
 
 namespace blink {
 
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
index cd31bda..8f60425 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.cpp
@@ -58,12 +58,10 @@
 };
 
 std::unique_ptr<DeferredImageDecoder> DeferredImageDecoder::Create(
-    PassRefPtr<SharedBuffer> pass_data,
+    RefPtr<SharedBuffer> data,
     bool data_complete,
     ImageDecoder::AlphaOption alpha_option,
     const ColorBehavior& color_behavior) {
-  RefPtr<SharedBuffer> data = pass_data;
-
   std::unique_ptr<ImageDecoder> actual_decoder =
       ImageDecoder::Create(data, data_complete, alpha_option, color_behavior);
   if (!actual_decoder)
@@ -146,10 +144,9 @@
   SetDataInternal(std::move(data), all_data_received, true);
 }
 
-void DeferredImageDecoder::SetDataInternal(PassRefPtr<SharedBuffer> pass_data,
+void DeferredImageDecoder::SetDataInternal(RefPtr<SharedBuffer> data,
                                            bool all_data_received,
                                            bool push_data_to_decoder) {
-  RefPtr<SharedBuffer> data = pass_data;
   if (actual_decoder_) {
     all_data_received_ = all_data_received;
     if (push_data_to_decoder)
diff --git a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
index f339d16..05eca6c 100644
--- a/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
+++ b/third_party/WebKit/Source/platform/graphics/DeferredImageDecoder.h
@@ -49,11 +49,10 @@
   USING_FAST_MALLOC(DeferredImageDecoder);
 
  public:
-  static std::unique_ptr<DeferredImageDecoder> Create(
-      PassRefPtr<SharedBuffer> data,
-      bool data_complete,
-      ImageDecoder::AlphaOption,
-      const ColorBehavior&);
+  static std::unique_ptr<DeferredImageDecoder> Create(RefPtr<SharedBuffer> data,
+                                                      bool data_complete,
+                                                      ImageDecoder::AlphaOption,
+                                                      const ColorBehavior&);
 
   static std::unique_ptr<DeferredImageDecoder> CreateForTesting(
       std::unique_ptr<ImageDecoder>);
@@ -92,7 +91,7 @@
 
   sk_sp<SkImage> CreateFrameImageAtIndex(size_t index, bool known_to_be_opaque);
 
-  void SetDataInternal(PassRefPtr<SharedBuffer> data,
+  void SetDataInternal(RefPtr<SharedBuffer> data,
                        bool all_data_received,
                        bool push_data_to_decoder);
 
diff --git a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
index 82de4f3..85de405 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
@@ -46,9 +46,7 @@
   return decoder_ ? decoder_->Data() : nullptr;
 }
 
-bool ImageSource::SetData(PassRefPtr<SharedBuffer> pass_data,
-                          bool all_data_received) {
-  RefPtr<SharedBuffer> data = pass_data;
+bool ImageSource::SetData(RefPtr<SharedBuffer> data, bool all_data_received) {
   all_data_received_ = all_data_received;
 
   if (decoder_) {
diff --git a/third_party/WebKit/Source/platform/graphics/ImageSource.h b/third_party/WebKit/Source/platform/graphics/ImageSource.h
index 1c27e91..f530753b 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageSource.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageSource.h
@@ -74,7 +74,7 @@
 
   PassRefPtr<SharedBuffer> Data();
   // Returns false when the decoder layer rejects the data.
-  bool SetData(PassRefPtr<SharedBuffer> data, bool all_data_received);
+  bool SetData(RefPtr<SharedBuffer> data, bool all_data_received);
   String FilenameExtension() const;
 
   bool IsSizeAvailable();
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
index cd45b1b..0372d6d 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.cpp
@@ -68,12 +68,10 @@
 static constexpr size_t kLongestSignatureLength = sizeof("RIFF????WEBPVP") - 1;
 
 std::unique_ptr<ImageDecoder> ImageDecoder::Create(
-    PassRefPtr<SegmentReader> pass_data,
+    RefPtr<SegmentReader> data,
     bool data_complete,
     AlphaOption alpha_option,
     const ColorBehavior& color_behavior) {
-  RefPtr<SegmentReader> data = pass_data;
-
   // We need at least kLongestSignatureLength bytes to run the signature
   // matcher.
   if (data->size() < kLongestSignatureLength)
@@ -122,7 +120,7 @@
   }
 
   if (decoder)
-    decoder->SetData(data.Release(), data_complete);
+    decoder->SetData(std::move(data), data_complete);
 
   return decoder;
 }
diff --git a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
index b2f1f05..946d6cd 100644
--- a/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
+++ b/third_party/WebKit/Source/platform/image-decoders/ImageDecoder.h
@@ -93,7 +93,7 @@
   // we can't sniff a supported type from the provided data (possibly
   // because there isn't enough data yet).
   // Sets m_maxDecodedBytes to Platform::maxImageDecodedBytes().
-  static std::unique_ptr<ImageDecoder> Create(PassRefPtr<SegmentReader> data,
+  static std::unique_ptr<ImageDecoder> Create(RefPtr<SegmentReader> data,
                                               bool data_complete,
                                               AlphaOption,
                                               const ColorBehavior&);
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
index f5eb494d..9a7e0144 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
+++ b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
@@ -472,7 +472,7 @@
 }
 
 bool CrossOriginAccessControl::HandleRedirect(
-    PassRefPtr<SecurityOrigin> security_origin,
+    RefPtr<SecurityOrigin> current_security_origin,
     ResourceRequest& new_request,
     const ResourceResponse& redirect_response,
     StoredCredentials with_credentials,
@@ -482,8 +482,6 @@
   const KURL& last_url = redirect_response.Url();
   const KURL& new_url = new_request.Url();
 
-  RefPtr<SecurityOrigin> current_security_origin = security_origin;
-
   RefPtr<SecurityOrigin> new_security_origin = current_security_origin;
 
   // TODO(tyoshino): This should be fixed to check not only the last one but
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h
index cdb9d55..c97eb867 100644
--- a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h
+++ b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h
@@ -119,7 +119,7 @@
   // message for any of the error conditions.
   static RedirectStatus CheckRedirectLocation(const KURL&);
 
-  static bool HandleRedirect(PassRefPtr<SecurityOrigin>,
+  static bool HandleRedirect(RefPtr<SecurityOrigin>,
                              ResourceRequest&,
                              const ResourceResponse&,
                              StoredCredentials,
diff --git a/third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp b/third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp
index f47a904..b99fc08 100644
--- a/third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp
+++ b/third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp
@@ -158,9 +158,8 @@
 void NetworkStateNotifier::NotifyObserversOnTaskRunner(
     ObserverListMap* map,
     ObserverType type,
-    PassRefPtr<WebTaskRunner> pass_task_runner,
+    RefPtr<WebTaskRunner> task_runner,
     const NetworkState& state) {
-  RefPtr<WebTaskRunner> task_runner = pass_task_runner;
   ObserverList* observer_list = LockAndFindObserverList(*map, task_runner);
 
   // The context could have been removed before the notification task got to
@@ -191,7 +190,7 @@
   observer_list->iterating = false;
 
   if (!observer_list->zeroed_observers.IsEmpty())
-    CollectZeroedObservers(*map, observer_list, task_runner);
+    CollectZeroedObservers(*map, observer_list, std::move(task_runner));
 }
 
 void NetworkStateNotifier::AddObserver(ObserverListMap& map,
@@ -210,11 +209,9 @@
   result.stored_value->value->observers.push_back(observer);
 }
 
-void NetworkStateNotifier::RemoveObserver(
-    ObserverListMap& map,
-    NetworkStateObserver* observer,
-    PassRefPtr<WebTaskRunner> pass_task_runner) {
-  RefPtr<WebTaskRunner> task_runner = pass_task_runner;
+void NetworkStateNotifier::RemoveObserver(ObserverListMap& map,
+                                          NetworkStateObserver* observer,
+                                          RefPtr<WebTaskRunner> task_runner) {
   DCHECK(task_runner->RunsTasksOnCurrentThread());
   DCHECK(observer);
 
@@ -230,7 +227,7 @@
   }
 
   if (!observer_list->iterating && !observer_list->zeroed_observers.IsEmpty())
-    CollectZeroedObservers(map, observer_list, task_runner);
+    CollectZeroedObservers(map, observer_list, std::move(task_runner));
 }
 
 NetworkStateNotifier::ObserverList*
diff --git a/third_party/WebKit/Source/platform/network/NetworkStateNotifier.h b/third_party/WebKit/Source/platform/network/NetworkStateNotifier.h
index 303d3f0..a1e80b2 100644
--- a/third_party/WebKit/Source/platform/network/NetworkStateNotifier.h
+++ b/third_party/WebKit/Source/platform/network/NetworkStateNotifier.h
@@ -166,7 +166,7 @@
   void NotifyObservers(ObserverListMap&, ObserverType, const NetworkState&);
   void NotifyObserversOnTaskRunner(ObserverListMap*,
                                    ObserverType,
-                                   PassRefPtr<WebTaskRunner>,
+                                   RefPtr<WebTaskRunner>,
                                    const NetworkState&);
 
   void AddObserver(ObserverListMap&,
@@ -174,7 +174,7 @@
                    PassRefPtr<WebTaskRunner>);
   void RemoveObserver(ObserverListMap&,
                       NetworkStateObserver*,
-                      PassRefPtr<WebTaskRunner>);
+                      RefPtr<WebTaskRunner>);
 
   ObserverList* LockAndFindObserverList(ObserverListMap&,
                                         PassRefPtr<WebTaskRunner>);
diff --git a/third_party/WebKit/Source/platform/text/BidiCharacterRun.h b/third_party/WebKit/Source/platform/text/BidiCharacterRun.h
index 807bc03..2e2cc02 100644
--- a/third_party/WebKit/Source/platform/text/BidiCharacterRun.h
+++ b/third_party/WebKit/Source/platform/text/BidiCharacterRun.h
@@ -39,7 +39,7 @@
         next_(0),
         start_(start),
         stop_(stop) {
-    ASSERT(start_ <= stop_);
+    DCHECK_LE(start_, stop_);
     if (dir == WTF::Unicode::kOtherNeutral)
       dir = override_dir;
 
diff --git a/third_party/WebKit/Source/platform/text/BidiContext.cpp b/third_party/WebKit/Source/platform/text/BidiContext.cpp
index cdbaa247..25659070 100644
--- a/third_party/WebKit/Source/platform/text/BidiContext.cpp
+++ b/third_party/WebKit/Source/platform/text/BidiContext.cpp
@@ -51,12 +51,12 @@
                                             bool override,
                                             BidiEmbeddingSource source,
                                             BidiContext* parent) {
-  ASSERT(direction == (level % 2 ? kRightToLeft : kLeftToRight));
+  DCHECK_EQ(direction, (level % 2 ? kRightToLeft : kLeftToRight));
 
   if (parent || level >= 2)
     return CreateUncached(level, direction, override, source, parent);
 
-  ASSERT(level <= 1);
+  DCHECK_LE(level, 1);
   if (!level) {
     if (!override) {
       DEFINE_STATIC_REF(
@@ -87,7 +87,7 @@
 static inline PassRefPtr<BidiContext> CopyContextAndRebaselineLevel(
     BidiContext* context,
     BidiContext* parent) {
-  ASSERT(context);
+  DCHECK(context);
   unsigned char new_level = parent ? parent->Level() : 0;
   if (context->Dir() == kRightToLeft)
     new_level = NextGreaterOddLevel(new_level);
@@ -108,7 +108,7 @@
     if (iter->Source() != kFromUnicode)
       contexts.push_back(iter);
   }
-  ASSERT(contexts.size());
+  DCHECK(contexts.size());
 
   RefPtr<BidiContext> top_context =
       CopyContextAndRebaselineLevel(contexts.back(), 0);
diff --git a/third_party/WebKit/Source/platform/text/BidiContext.h b/third_party/WebKit/Source/platform/text/BidiContext.h
index a0d8e43e..e8ff16e 100644
--- a/third_party/WebKit/Source/platform/text/BidiContext.h
+++ b/third_party/WebKit/Source/platform/text/BidiContext.h
@@ -71,7 +71,7 @@
         override_(override),
         source_(source),
         parent_(parent) {
-    ASSERT(level <= kMaxLevel);
+    DCHECK(level <= kMaxLevel);
   }
 
   static PassRefPtr<BidiContext> CreateUncached(unsigned char level,
diff --git a/third_party/WebKit/Source/platform/text/BidiResolver.h b/third_party/WebKit/Source/platform/text/BidiResolver.h
index cc928e2..cee4142c 100644
--- a/third_party/WebKit/Source/platform/text/BidiResolver.h
+++ b/third_party/WebKit/Source/platform/text/BidiResolver.h
@@ -48,12 +48,12 @@
   }
 
   void StartIgnoringSpaces(const Iterator& midpoint) {
-    ASSERT(!(num_midpoints_ % 2));
+    DCHECK(!(num_midpoints_ % 2));
     AddMidpoint(midpoint);
   }
 
   void StopIgnoringSpaces(const Iterator& midpoint) {
-    ASSERT(num_midpoints_ % 2);
+    DCHECK(num_midpoints_ % 2);
     AddMidpoint(midpoint);
   }
 
@@ -256,7 +256,7 @@
 
   const BidiStatus& Status() const { return status_; }
   void SetStatus(const BidiStatus s) {
-    ASSERT(s.context);
+    DCHECK(s.context);
     status_ = s;
     paragraph_directionality_ = s.context->Dir() == WTF::Unicode::kLeftToRight
                                     ? TextDirection::kLtr
@@ -270,7 +270,7 @@
   // ignore) all child isolated spans.
   void EnterIsolate() { nested_isolate_count_++; }
   void ExitIsolate() {
-    ASSERT(nested_isolate_count_ >= 1);
+    DCHECK_GE(nested_isolate_count_, 1u);
     nested_isolate_count_--;
   }
   bool InIsolate() const { return nested_isolate_count_; }
@@ -385,8 +385,8 @@
 template <class Iterator, class Run, class IsolatedRun>
 BidiResolver<Iterator, Run, IsolatedRun>::~BidiResolver() {
   // The owner of this resolver should have handled the isolated runs.
-  ASSERT(isolated_runs_.IsEmpty());
-  ASSERT(!runs_.RunCount());
+  DCHECK(isolated_runs_.IsEmpty());
+  DCHECK(!runs_.RunCount());
 }
 #endif
 
@@ -434,10 +434,10 @@
     BidiEmbeddingSource source) {
   // Isolated spans compute base directionality during their own UBA run.
   // Do not insert fake embed characters once we enter an isolated span.
-  ASSERT(!InIsolate());
+  DCHECK(!InIsolate());
   using namespace WTF::Unicode;
 
-  ASSERT(dir == kPopDirectionalFormat || dir == kLeftToRightEmbedding ||
+  DCHECK(dir == kPopDirectionalFormat || dir == kLeftToRightEmbedding ||
          dir == kLeftToRightOverride || dir == kRightToLeftEmbedding ||
          dir == kRightToLeftOverride);
   current_explicit_embedding_sequence_.push_back(BidiEmbedding(dir, source));
@@ -448,13 +448,14 @@
     CheckDirectionInLowerRaiseEmbeddingLevel() {
   using namespace WTF::Unicode;
 
-  ASSERT(status_.eor != kOtherNeutral || eor_.AtEnd());
-  ASSERT(status_.last != kNonSpacingMark && status_.last != kBoundaryNeutral &&
-         status_.last != kRightToLeftEmbedding &&
-         status_.last != kLeftToRightEmbedding &&
-         status_.last != kRightToLeftOverride &&
-         status_.last != kLeftToRightOverride &&
-         status_.last != kPopDirectionalFormat);
+  DCHECK(status_.eor != kOtherNeutral || eor_.AtEnd());
+  DCHECK_NE(status_.last, kNonSpacingMark);
+  DCHECK_NE(status_.last, kBoundaryNeutral);
+  DCHECK_NE(status_.last, kRightToLeftEmbedding);
+  DCHECK_NE(status_.last, kLeftToRightEmbedding);
+  DCHECK_NE(status_.last, kRightToLeftOverride);
+  DCHECK_NE(status_.last, kLeftToRightOverride);
+  DCHECK_NE(status_.last, kPopDirectionalFormat);
   if (direction_ == kOtherNeutral)
     direction_ =
         status_.last_strong == kLeftToRight ? kLeftToRight : kRightToLeft;
@@ -549,7 +550,7 @@
 template <class Iterator, class Run, class IsolatedRun>
 void BidiResolver<Iterator, Run, IsolatedRun>::ComputeTrailingSpace(
     BidiRunList<Run>& runs) {
-  ASSERT(runs.RunCount());
+  DCHECK(runs.RunCount());
 
   Run* trailing_space_run = runs.LogicallyLastRun();
 
@@ -569,7 +570,7 @@
     trailing_space_run_ = AddTrailingRun(
         runs, first_space, trailing_space_run->stop_, trailing_space_run,
         base_context, paragraph_directionality_);
-    ASSERT(trailing_space_run_);
+    DCHECK(trailing_space_run_);
     trailing_space_run->stop_ = first_space;
     return;
   }
@@ -596,7 +597,7 @@
   // ignores (skips over) the isolated content, including embedding levels.
   // We should never accrue embedding levels while skipping over isolated
   // content.
-  ASSERT(!InIsolate() || current_explicit_embedding_sequence_.IsEmpty());
+  DCHECK(!InIsolate() || current_explicit_embedding_sequence_.IsEmpty());
 
   using namespace WTF::Unicode;
 
@@ -791,7 +792,7 @@
     bool reorder_runs) {
   using namespace WTF::Unicode;
 
-  ASSERT(direction_ == kOtherNeutral);
+  DCHECK_EQ(direction_, kOtherNeutral);
   trailing_space_run_ = 0;
 
   end_of_line_ = end;
@@ -877,7 +878,7 @@
     if (InIsolate())
       dir_current = kOtherNeutral;
 
-    ASSERT(status_.eor != kOtherNeutral || eor_.AtEnd());
+    DCHECK(status_.eor != kOtherNeutral || eor_.AtEnd());
     switch (dir_current) {
       // embedding and overrides (X1-X9 in the Bidi specs)
       case kRightToLeftEmbedding:
@@ -1160,7 +1161,7 @@
                                                              : kEuropeanNumber;
             break;
           default:
-            ASSERT_NOT_REACHED();
+            NOTREACHED();
         }
         AppendRun(runs_);
       }
@@ -1217,7 +1218,7 @@
 void BidiResolver<Iterator, Run, IsolatedRun>::SetMidpointStateForIsolatedRun(
     Run& run,
     const MidpointState<Iterator>& midpoint) {
-  ASSERT(!midpoint_state_for_isolated_run_.Contains(&run));
+  DCHECK(!midpoint_state_for_isolated_run_.Contains(&run));
   midpoint_state_for_isolated_run_.insert(&run, midpoint);
 }
 
diff --git a/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp b/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp
index ccc0861..62eea87 100644
--- a/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp
+++ b/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp
@@ -216,7 +216,7 @@
     // Blink's UBA just makes runs, the actual ordering of the display of
     // characters is handled later in our pipeline, so we fake it here:
     bool reversed = run->Reversed(false);
-    ASSERT(run->Stop() >= run->Start());
+    DCHECK_GE(run->Stop(), run->Start());
     size_t length = run->Stop() - run->Start();
     for (size_t i = 0; i < length; i++) {
       int input_index = reversed ? run->Stop() - i - 1 : run->Start() + i;
diff --git a/third_party/WebKit/Source/platform/text/BidiRunList.h b/third_party/WebKit/Source/platform/text/BidiRunList.h
index 2ede7e1..cf25fe2 100644
--- a/third_party/WebKit/Source/platform/text/BidiRunList.h
+++ b/third_party/WebKit/Source/platform/text/BidiRunList.h
@@ -81,7 +81,7 @@
 
 template <class Run>
 inline void BidiRunList<Run>::PrependRun(Run* run) {
-  ASSERT(!run->next_);
+  DCHECK(!run->next_);
 
   if (!last_run_)
     last_run_ = run;
@@ -93,9 +93,9 @@
 
 template <class Run>
 inline void BidiRunList<Run>::MoveRunToEnd(Run* run) {
-  ASSERT(first_run_);
-  ASSERT(last_run_);
-  ASSERT(run->next_);
+  DCHECK(first_run_);
+  DCHECK(last_run_);
+  DCHECK(run->next_);
 
   Run* current = 0;
   Run* next = first_run_;
@@ -116,9 +116,9 @@
 
 template <class Run>
 inline void BidiRunList<Run>::MoveRunToBeginning(Run* run) {
-  ASSERT(first_run_);
-  ASSERT(last_run_);
-  ASSERT(run != first_run_);
+  DCHECK(first_run_);
+  DCHECK(last_run_);
+  DCHECK_NE(run, first_run_);
 
   Run* current = first_run_;
   Run* next = current->Next();
@@ -138,9 +138,9 @@
 template <class Run>
 void BidiRunList<Run>::ReplaceRunWithRuns(Run* to_replace,
                                           BidiRunList<Run>& new_runs) {
-  ASSERT(new_runs.RunCount());
-  ASSERT(first_run_);
-  ASSERT(to_replace);
+  DCHECK(new_runs.RunCount());
+  DCHECK(first_run_);
+  DCHECK(to_replace);
 
   if (first_run_ == to_replace) {
     first_run_ = new_runs.FirstRun();
@@ -149,7 +149,7 @@
     Run* previous_run = first_run_;
     while (previous_run->Next() != to_replace)
       previous_run = previous_run->Next();
-    ASSERT(previous_run);
+    DCHECK(previous_run);
     previous_run->SetNext(new_runs.FirstRun());
   }
 
@@ -192,11 +192,11 @@
 
 template <class Run>
 void BidiRunList<Run>::ReverseRuns(unsigned start, unsigned end) {
-  ASSERT(run_count_);
+  DCHECK(run_count_);
   if (start >= end)
     return;
 
-  ASSERT(end < run_count_);
+  DCHECK_LT(end, run_count_);
 
   // Get the item before the start of the runs to reverse and put it in
   // |beforeStart|. |curr| should point to the first run to reverse.
diff --git a/third_party/WebKit/Source/platform/text/Character.cpp b/third_party/WebKit/Source/platform/text/Character.cpp
index 2b96783..3a32e3a5 100644
--- a/third_party/WebKit/Source/platform/text/Character.cpp
+++ b/third_party/WebKit/Source/platform/text/Character.cpp
@@ -84,7 +84,7 @@
   UTrie2* trie = utrie2_openFromSerialized(
       UTrie2ValueBits::UTRIE2_16_VALUE_BITS, kSerializedCharacterData,
       kSerializedCharacterDataSize, nullptr, &error);
-  ASSERT(error == U_ZERO_ERROR);
+  DCHECK_EQ(error, U_ZERO_ERROR);
   return trie;
 }
 
diff --git a/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp b/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp
index 895ea03..af051b46 100644
--- a/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp
+++ b/third_party/WebKit/Source/platform/text/CharacterEmoji.cpp
@@ -189,7 +189,7 @@
   // Use ICU's invariant-character initialization method.
   unicodeSet->applyPattern(icu::UnicodeString(pattern, -1, US_INV), err);
   unicodeSet->freeze();
-  ASSERT(err == U_ZERO_ERROR);
+  DCHECK_EQ(err, U_ZERO_ERROR);
 }
 
 bool Character::isEmoji(UChar32 ch) {
diff --git a/third_party/WebKit/Source/platform/text/DateTimeFormat.cpp b/third_party/WebKit/Source/platform/text/DateTimeFormat.cpp
index 3e3c007..c0b0b40 100644
--- a/third_party/WebKit/Source/platform/text/DateTimeFormat.cpp
+++ b/third_party/WebKit/Source/platform/text/DateTimeFormat.cpp
@@ -179,9 +179,9 @@
         break;
 
       case kStateSymbol: {
-        ASSERT(field_type != kFieldTypeInvalid);
-        ASSERT(field_type != kFieldTypeLiteral);
-        ASSERT(literal_buffer.IsEmpty());
+        DCHECK_NE(field_type, kFieldTypeInvalid);
+        DCHECK_NE(field_type, kFieldTypeLiteral);
+        DCHECK(literal_buffer.IsEmpty());
 
         FieldType field_type2 = MapCharacterToFieldType(ch);
         if (field_type2 == kFieldTypeInvalid)
@@ -211,7 +211,7 @@
     }
   }
 
-  ASSERT(field_type != kFieldTypeInvalid);
+  DCHECK_NE(field_type, kFieldTypeInvalid);
 
   switch (state) {
     case kStateLiteral:
@@ -227,13 +227,13 @@
       return false;
 
     case kStateSymbol:
-      ASSERT(field_type != kFieldTypeLiteral);
-      ASSERT(!literal_buffer.length());
+      DCHECK_NE(field_type, kFieldTypeLiteral);
+      DCHECK(!literal_buffer.length());
       token_handler.VisitField(field_type, field_counter);
       return true;
   }
 
-  ASSERT_NOT_REACHED();
+  NOTREACHED();
   return false;
 }
 
diff --git a/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp b/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp
index 4074df1..6ae9205 100644
--- a/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp
+++ b/third_party/WebKit/Source/platform/text/DateTimeFormatTest.cpp
@@ -42,7 +42,7 @@
 
     Token(FieldType field_type, int count = 1)
         : count(count), field_type(field_type) {
-      ASSERT(field_type != DateTimeFormat::kFieldTypeLiteral);
+      DCHECK_NE(field_type, DateTimeFormat::kFieldTypeLiteral);
     }
 
     Token(const String& string)
diff --git a/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h b/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h
index 4cd555b..ee9fcc1 100644
--- a/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h
+++ b/third_party/WebKit/Source/platform/text/DecodeEscapeSequences.h
@@ -139,8 +139,8 @@
         run += 1;
       }
     }
-    ASSERT(
-        buffer.size() >=
+    DCHECK_GE(
+        buffer.size(),
         static_cast<size_t>(p - buffer.Data()));  // Prove buffer not overrun.
     return (encoding.IsValid() ? encoding : UTF8Encoding())
         .Decode(buffer.Data(), p - buffer.Data());
diff --git a/third_party/WebKit/Source/platform/text/LocaleICU.cpp b/third_party/WebKit/Source/platform/text/LocaleICU.cpp
index 4edf879..35fa661ab 100644
--- a/third_party/WebKit/Source/platform/text/LocaleICU.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleICU.cpp
@@ -73,7 +73,7 @@
 String LocaleICU::DecimalSymbol(UNumberFormatSymbol symbol) {
   UErrorCode status = U_ZERO_ERROR;
   int32_t buffer_length = unum_getSymbol(number_format_, symbol, 0, 0, &status);
-  ASSERT(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
+  DCHECK(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
   if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR)
     return String();
   StringBuffer<UChar> buffer(buffer_length);
@@ -89,14 +89,14 @@
   UErrorCode status = U_ZERO_ERROR;
   int32_t buffer_length =
       unum_getTextAttribute(number_format_, tag, 0, 0, &status);
-  ASSERT(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
+  DCHECK(U_SUCCESS(status) || status == U_BUFFER_OVERFLOW_ERROR);
   if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR)
     return String();
   StringBuffer<UChar> buffer(buffer_length);
   status = U_ZERO_ERROR;
   unum_getTextAttribute(number_format_, tag, buffer.Characters(), buffer_length,
                         &status);
-  ASSERT(U_SUCCESS(status));
+  DCHECK(U_SUCCESS(status));
   if (U_FAILURE(status))
     return String();
   return String::Adopt(buffer);
@@ -124,7 +124,7 @@
   symbols.push_back(DecimalSymbol(UNUM_NINE_DIGIT_SYMBOL));
   symbols.push_back(DecimalSymbol(UNUM_DECIMAL_SEPARATOR_SYMBOL));
   symbols.push_back(DecimalSymbol(UNUM_GROUPING_SEPARATOR_SYMBOL));
-  ASSERT(symbols.size() == kDecimalSymbolsSize);
+  DCHECK_EQ(symbols.size(), kDecimalSymbolsSize);
   SetLocaleData(symbols, DecimalTextAttribute(UNUM_POSITIVE_PREFIX),
                 DecimalTextAttribute(UNUM_POSITIVE_SUFFIX),
                 DecimalTextAttribute(UNUM_NEGATIVE_PREFIX),
@@ -160,7 +160,7 @@
       udat_open(UDAT_PATTERN, UDAT_PATTERN, locale_.Data(), 0, -1,
                 kMonthPattern, is_short ? 3 : 4, &status);
   udat_setContext(formatter, UDISPCTX_CAPITALIZATION_FOR_STANDALONE, &status);
-  ASSERT(U_SUCCESS(status));
+  DCHECK(U_SUCCESS(status));
   return formatter;
 }
 
diff --git a/third_party/WebKit/Source/platform/text/LocaleMac.mm b/third_party/WebKit/Source/platform/text/LocaleMac.mm
index c393454..cb94d10 100644
--- a/third_party/WebKit/Source/platform/text/LocaleMac.mm
+++ b/third_party/WebKit/Source/platform/text/LocaleMac.mm
@@ -316,11 +316,11 @@
   Vector<String, kDecimalSymbolsSize> symbols;
   for (unsigned i = 0; i < 10; ++i)
     symbols.push_back(nine_to_zero.Substring(9 - i, 1));
-  ASSERT(symbols.size() == kDecimalSeparatorIndex);
+  DCHECK(symbols.size() == kDecimalSeparatorIndex);
   symbols.push_back([formatter.Get() decimalSeparator]);
-  ASSERT(symbols.size() == kGroupSeparatorIndex);
+  DCHECK(symbols.size() == kGroupSeparatorIndex);
   symbols.push_back([formatter.Get() groupingSeparator]);
-  ASSERT(symbols.size() == kDecimalSymbolsSize);
+  DCHECK(symbols.size() == kDecimalSymbolsSize);
 
   String positive_prefix([formatter.Get() positivePrefix]);
   String positive_suffix([formatter.Get() positiveSuffix]);
diff --git a/third_party/WebKit/Source/platform/text/LocaleWin.cpp b/third_party/WebKit/Source/platform/text/LocaleWin.cpp
index 27fc7bd..e29432a9 100644
--- a/third_party/WebKit/Source/platform/text/LocaleWin.cpp
+++ b/third_party/WebKit/Source/platform/text/LocaleWin.cpp
@@ -208,7 +208,7 @@
     if (in_quote) {
       if (ch == '\'') {
         in_quote = false;
-        ASSERT(i);
+        DCHECK(i);
         if (last_quote_can_be_literal && format[i - 1] == '\'') {
           literal_buffer.Append('\'');
           last_quote_can_be_literal = false;
@@ -452,15 +452,15 @@
     symbols.push_back("9");
   } else {
     String digits = GetLocaleInfoString(LOCALE_SNATIVEDIGITS);
-    ASSERT(digits.length() >= 10);
+    DCHECK_GE(digits.length(), 10u);
     for (unsigned i = 0; i < 10; ++i)
       symbols.push_back(digits.Substring(i, 1));
   }
-  ASSERT(symbols.size() == kDecimalSeparatorIndex);
+  DCHECK(symbols.size() == kDecimalSeparatorIndex);
   symbols.push_back(GetLocaleInfoString(LOCALE_SDECIMAL));
-  ASSERT(symbols.size() == kGroupSeparatorIndex);
+  DCHECK(symbols.size() == kGroupSeparatorIndex);
   symbols.push_back(GetLocaleInfoString(LOCALE_STHOUSAND));
-  ASSERT(symbols.size() == kDecimalSymbolsSize);
+  DCHECK(symbols.size() == kDecimalSymbolsSize);
 
   String negative_sign = GetLocaleInfoString(LOCALE_SNEGATIVESIGN);
   enum NegativeFormat {
diff --git a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
index 5c46c33..c47ba14 100644
--- a/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
+++ b/third_party/WebKit/Source/platform/text/PlatformLocale.cpp
@@ -167,7 +167,7 @@
 }
 
 void DateTimeStringBuilder::VisitLiteral(const String& text) {
-  ASSERT(text.length());
+  DCHECK(text.length());
   builder_.Append(text);
 }
 
@@ -177,7 +177,7 @@
 
 Locale& Locale::DefaultLocale() {
   static Locale* locale = Locale::Create(DefaultLanguage()).release();
-  ASSERT(IsMainThread());
+  DCHECK(IsMainThread());
   return *locale;
 }
 
@@ -250,14 +250,14 @@
                            const String& negative_prefix,
                            const String& negative_suffix) {
   for (size_t i = 0; i < symbols.size(); ++i) {
-    ASSERT(!symbols[i].IsEmpty());
+    DCHECK(!symbols[i].IsEmpty());
     decimal_symbols_[i] = symbols[i];
   }
   positive_prefix_ = positive_prefix;
   positive_suffix_ = positive_suffix;
   negative_prefix_ = negative_prefix;
   negative_suffix_ = negative_suffix;
-  ASSERT(!positive_prefix_.IsEmpty() || !positive_suffix_.IsEmpty() ||
+  DCHECK(!positive_prefix_.IsEmpty() || !positive_suffix_.IsEmpty() ||
          !negative_prefix_.IsEmpty() || !negative_suffix_.IsEmpty());
   has_locale_data_ = true;
 
@@ -310,7 +310,7 @@
         builder.Append(decimal_symbols_[kDecimalSeparatorIndex]);
         break;
       default:
-        ASSERT_NOT_REACHED();
+        NOTREACHED();
     }
   }
 
@@ -465,7 +465,7 @@
                         : DateTimeFormatWithSeconds());
       break;
     case DateComponents::kInvalid:
-      ASSERT_NOT_REACHED();
+      NOTREACHED();
       break;
   }
   return builder.ToString();
diff --git a/third_party/WebKit/Source/platform/text/SegmentedString.cpp b/third_party/WebKit/Source/platform/text/SegmentedString.cpp
index 2f58754..cd2507a 100644
--- a/third_party/WebKit/Source/platform/text/SegmentedString.cpp
+++ b/third_party/WebKit/Source/platform/text/SegmentedString.cpp
@@ -57,7 +57,7 @@
 }
 
 void SegmentedString::Append(const SegmentedSubstring& s) {
-  ASSERT(!closed_);
+  DCHECK(!closed_);
   if (!s.length())
     return;
 
@@ -73,7 +73,7 @@
 }
 
 void SegmentedString::Push(UChar c) {
-  ASSERT(c);
+  DCHECK(c);
 
   // pushIfPossible attempts to rewind the pointer in the SegmentedSubstring,
   // however it will fail if the SegmentedSubstring is empty, or
@@ -88,7 +88,7 @@
 }
 
 void SegmentedString::Prepend(const SegmentedSubstring& s, PrependType type) {
-  ASSERT(!s.NumberOfCharactersConsumed());
+  DCHECK(!s.NumberOfCharactersConsumed());
   if (!s.length())
     return;
 
@@ -113,12 +113,12 @@
 
 void SegmentedString::Close() {
   // Closing a stream twice is likely a coding mistake.
-  ASSERT(!closed_);
+  DCHECK(!closed_);
   closed_ = true;
 }
 
 void SegmentedString::Append(const SegmentedString& s) {
-  ASSERT(!closed_);
+  DCHECK(!closed_);
 
   Append(s.current_string_);
   if (s.IsComposite()) {
@@ -195,7 +195,7 @@
 }
 
 void SegmentedString::AdvanceAndUpdateLineNumber8() {
-  ASSERT(current_string_.GetCurrentChar() == current_char_);
+  DCHECK_EQ(current_string_.GetCurrentChar(), current_char_);
   if (current_char_ == '\n') {
     ++current_line_;
     number_of_characters_consumed_prior_to_current_line_ =
@@ -206,7 +206,7 @@
 }
 
 void SegmentedString::AdvanceAndUpdateLineNumber16() {
-  ASSERT(current_string_.GetCurrentChar() == current_char_);
+  DCHECK_EQ(current_string_.GetCurrentChar(), current_char_);
   if (current_char_ == '\n') {
     ++current_line_;
     number_of_characters_consumed_prior_to_current_line_ =
@@ -260,7 +260,8 @@
 }
 
 void SegmentedString::AdvanceEmpty() {
-  ASSERT(!current_string_.length() && !IsComposite());
+  DCHECK(!current_string_.length());
+  DCHECK(!IsComposite());
   current_char_ = 0;
 }
 
diff --git a/third_party/WebKit/Source/platform/text/SegmentedString.h b/third_party/WebKit/Source/platform/text/SegmentedString.h
index 43645372..5b4c4051 100644
--- a/third_party/WebKit/Source/platform/text/SegmentedString.h
+++ b/third_party/WebKit/Source/platform/text/SegmentedString.h
@@ -118,12 +118,12 @@
   }
 
   UChar IncrementAndGetCurrentChar8() {
-    ASSERT(data_.string8_ptr);
+    DCHECK(data_.string8_ptr);
     return *++data_.string8_ptr;
   }
 
   UChar IncrementAndGetCurrentChar16() {
-    ASSERT(data_.string16_ptr);
+    DCHECK(data_.string16_ptr);
     return *++data_.string16_ptr;
   }
 
@@ -133,14 +133,14 @@
   }
 
   ALWAYS_INLINE UChar GetCurrentChar() {
-    ASSERT(length_);
+    DCHECK(length_);
     if (Is8Bit())
       return GetCurrentChar8();
     return GetCurrentChar16();
   }
 
   ALWAYS_INLINE UChar IncrementAndGetCurrentChar() {
-    ASSERT(length_);
+    DCHECK(length_);
     if (Is8Bit())
       return IncrementAndGetCurrentChar8();
     return IncrementAndGetCurrentChar16();
@@ -270,12 +270,12 @@
   }
 
   void AdvancePastNonNewline() {
-    ASSERT(CurrentChar() != '\n');
+    DCHECK_NE(CurrentChar(), '\n');
     Advance();
   }
 
   void AdvancePastNewlineAndUpdateLineNumber() {
-    ASSERT(CurrentChar() == '\n');
+    DCHECK_EQ(CurrentChar(), '\n');
     if (current_string_.length() > 1) {
       int new_line_flag = current_string_.DoNotExcludeLineNumbers();
       current_line_ += new_line_flag;
@@ -336,7 +336,7 @@
   void UpdateSlowCaseFunctionPointers();
 
   void DecrementAndCheckLength() {
-    ASSERT(current_string_.length() > 1);
+    DCHECK_GT(current_string_.length(), 1);
     current_string_.DecrementLength();
     if (current_string_.HaveOneCharacterLeft())
       UpdateSlowCaseFunctionPointers();
diff --git a/third_party/WebKit/Source/platform/text/StringTruncator.cpp b/third_party/WebKit/Source/platform/text/StringTruncator.cpp
index 99d6bf3..5211fce 100644
--- a/third_party/WebKit/Source/platform/text/StringTruncator.cpp
+++ b/third_party/WebKit/Source/platform/text/StringTruncator.cpp
@@ -65,8 +65,8 @@
                                        unsigned length,
                                        unsigned keep_count,
                                        UChar* buffer) {
-  ASSERT(keep_count < length);
-  ASSERT(keep_count < STRING_BUFFER_SIZE);
+  DCHECK_LT(keep_count, length);
+  DCHECK(keep_count < STRING_BUFFER_SIZE);
 
   unsigned omit_start = (keep_count + 1) / 2;
   NonSharedCharacterBreakIterator it(string);
@@ -75,7 +75,7 @@
   omit_start = TextBreakAtOrPreceding(it, omit_start);
 
   unsigned truncated_length = omit_start + 1 + (length - omit_end);
-  ASSERT(truncated_length <= length);
+  DCHECK_LE(truncated_length, length);
 
   string.CopyTo(buffer, 0, omit_start);
   buffer[omit_start] = kHorizontalEllipsisCharacter;
@@ -88,8 +88,8 @@
                                       unsigned length,
                                       unsigned keep_count,
                                       UChar* buffer) {
-  ASSERT(keep_count < length);
-  ASSERT(keep_count < STRING_BUFFER_SIZE);
+  DCHECK_LT(keep_count, length);
+  DCHECK(keep_count < STRING_BUFFER_SIZE);
 
   NonSharedCharacterBreakIterator it(string);
   unsigned keep_length = TextBreakAtOrPreceding(it, keep_count);
@@ -120,7 +120,7 @@
   if (string.IsEmpty())
     return string;
 
-  ASSERT(max_width >= 0);
+  DCHECK_GE(max_width, 0);
 
   float current_ellipsis_width =
       StringWidth(font, &kHorizontalEllipsisCharacter, 1);
@@ -157,8 +157,8 @@
 
   while (keep_count_for_largest_known_to_fit + 1 <
          keep_count_for_smallest_known_to_not_fit) {
-    ASSERT(width_for_largest_known_to_fit <= max_width);
-    ASSERT(width_for_smallest_known_to_not_fit > max_width);
+    DCHECK_LE(width_for_largest_known_to_fit, max_width);
+    DCHECK_GT(width_for_smallest_known_to_not_fit, max_width);
 
     float ratio =
         (keep_count_for_smallest_known_to_not_fit -
@@ -172,10 +172,10 @@
       keep_count = keep_count_for_smallest_known_to_not_fit - 1;
     }
 
-    ASSERT(keep_count < length);
-    ASSERT(keep_count > 0);
-    ASSERT(keep_count < keep_count_for_smallest_known_to_not_fit);
-    ASSERT(keep_count > keep_count_for_largest_known_to_fit);
+    DCHECK_LT(keep_count, length);
+    DCHECK_GT(keep_count, 0u);
+    DCHECK_LT(keep_count, keep_count_for_smallest_known_to_not_fit);
+    DCHECK_GT(keep_count, keep_count_for_largest_known_to_fit);
 
     truncated_length =
         truncate_to_buffer(string, length, keep_count, string_buffer);
diff --git a/third_party/WebKit/Source/platform/text/SuffixTree.h b/third_party/WebKit/Source/platform/text/SuffixTree.h
index 2c1b351..04e09e8 100644
--- a/third_party/WebKit/Source/platform/text/SuffixTree.h
+++ b/third_party/WebKit/Source/platform/text/SuffixTree.h
@@ -104,7 +104,7 @@
       Node* current = &root_;
       unsigned limit = std::min(base + depth_, text.length());
       for (unsigned offset = 0; base + offset < limit; ++offset) {
-        ASSERT(current != &leaf_);
+        DCHECK_NE(current, &leaf_);
         Node*& child = current->at(Codebook::CodeWord(text[base + offset]));
         if (!child)
           child = base + offset + 1 == limit ? &leaf_ : new Node();
diff --git a/third_party/WebKit/Source/platform/text/TextBreakIterator.h b/third_party/WebKit/Source/platform/text/TextBreakIterator.h
index f6447de..7780e9ed 100644
--- a/third_party/WebKit/Source/platform/text/TextBreakIterator.h
+++ b/third_party/WebKit/Source/platform/text/TextBreakIterator.h
@@ -151,7 +151,7 @@
   // primary breaking context and using previously stored prior context if
   // non-empty.
   TextBreakIterator* Get(unsigned prior_context_length) {
-    ASSERT(prior_context_length <= kPriorContextCapacity);
+    DCHECK(prior_context_length <= kPriorContextCapacity);
     const UChar* prior_context =
         prior_context_length
             ? &prior_context_[kPriorContextCapacity - prior_context_length]
@@ -247,19 +247,19 @@
   void CreateIteratorForBuffer(const UChar*, unsigned length);
 
   unsigned ClusterLengthStartingAt(unsigned offset) const {
-    ASSERT(is8_bit_);
+    DCHECK(is8_bit_);
     // The only Latin-1 Extended Grapheme Cluster is CR LF
     return IsCRBeforeLF(offset) ? 2 : 1;
   }
 
   bool IsCRBeforeLF(unsigned offset) const {
-    ASSERT(is8_bit_);
+    DCHECK(is8_bit_);
     return charaters8_[offset] == '\r' && offset + 1 < length_ &&
            charaters8_[offset + 1] == '\n';
   }
 
   bool IsLFAfterCR(unsigned offset) const {
-    ASSERT(is8_bit_);
+    DCHECK(is8_bit_);
     return charaters8_[offset] == '\n' && offset >= 1 &&
            charaters8_[offset - 1] == '\r';
   }
diff --git a/third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp b/third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp
index 5c61964..e80f929d 100644
--- a/third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp
+++ b/third_party/WebKit/Source/platform/text/TextBreakIteratorICU.cpp
@@ -83,7 +83,7 @@
       }
     }
 
-    ASSERT(!vended_iterators_.Contains(iterator));
+    DCHECK(!vended_iterators_.Contains(iterator));
     vended_iterators_.Set(iterator, locale);
     return iterator;
   }
@@ -176,7 +176,7 @@
   TextFixPointer(source, destination, destination->context);
   TextFixPointer(source, destination, destination->p);
   TextFixPointer(source, destination, destination->q);
-  ASSERT(!destination->r);
+  DCHECK(!destination->r);
   const void* chunk_contents =
       static_cast<const void*>(destination->chunkContents);
   TextFixPointer(source, destination, chunk_contents);
@@ -192,7 +192,7 @@
                            UErrorCode* error_code) {
   // In the present context, this text provider is used only with ICU functions
   // that do not perform an extract operation.
-  ASSERT_NOT_REACHED();
+  NOTREACHED();
   *error_code = U_UNSUPPORTED_ERROR;
   return 0;
 }
@@ -221,15 +221,17 @@
                                            int64_t native_index,
                                            int64_t native_length,
                                            UBool forward) {
-  ASSERT(text->chunkContents == text->pExtra);
+  DCHECK_EQ(text->chunkContents, text->pExtra);
   if (forward) {
-    ASSERT(native_index >= text->b && native_index < native_length);
+    DCHECK_GE(native_index, text->b);
+    DCHECK_LT(native_index, native_length);
     text->chunkNativeStart = native_index;
     text->chunkNativeLimit = native_index + text->extraSize / sizeof(UChar);
     if (text->chunkNativeLimit > native_length)
       text->chunkNativeLimit = native_length;
   } else {
-    ASSERT(native_index > text->b && native_index <= native_length);
+    DCHECK_GT(native_index, text->b);
+    DCHECK_LE(native_index, native_length);
     text->chunkNativeLimit = native_index;
     text->chunkNativeStart = native_index - text->extraSize / sizeof(UChar);
     if (text->chunkNativeStart < text->b)
@@ -238,7 +240,7 @@
   int64_t length = text->chunkNativeLimit - text->chunkNativeStart;
   // Ensure chunk length is well defined if computed length exceeds int32_t
   // range.
-  ASSERT(length <= std::numeric_limits<int32_t>::max());
+  DCHECK_LE(length, std::numeric_limits<int32_t>::max());
   text->chunkLength = length <= std::numeric_limits<int32_t>::max()
                           ? static_cast<int32_t>(length)
                           : 0;
@@ -254,7 +256,7 @@
                                              int64_t native_index,
                                              int64_t native_length,
                                              UBool forward) {
-  ASSERT(!text->chunkContents || text->chunkContents == text->q);
+  DCHECK(!text->chunkContents || text->chunkContents == text->q);
   text->chunkContents = static_cast<const UChar*>(text->pExtra);
   TextLatin1MoveInPrimaryContext(text, native_index, native_length, forward);
 }
@@ -263,8 +265,8 @@
                                          int64_t native_index,
                                          int64_t native_length,
                                          UBool forward) {
-  ASSERT(text->chunkContents == text->q);
-  ASSERT(forward ? native_index < text->b : native_index <= text->b);
+  DCHECK_EQ(text->chunkContents, text->q);
+  DCHECK(forward ? native_index < text->b : native_index <= text->b);
   DCHECK(forward ? native_index < native_length
                  : native_index <= native_length);
   DCHECK(forward ? native_index < native_length
@@ -276,7 +278,7 @@
   int64_t offset = native_index - text->chunkNativeStart;
   // Ensure chunk offset is well defined if computed offset exceeds int32_t
   // range or chunk length.
-  ASSERT(offset <= std::numeric_limits<int32_t>::max());
+  DCHECK_LE(offset, std::numeric_limits<int32_t>::max());
   text->chunkOffset = std::min(offset <= std::numeric_limits<int32_t>::max()
                                    ? static_cast<int32_t>(offset)
                                    : 0,
@@ -287,7 +289,7 @@
                                            int64_t native_index,
                                            int64_t native_length,
                                            UBool forward) {
-  ASSERT(!text->chunkContents || text->chunkContents == text->pExtra);
+  DCHECK(!text->chunkContents || text->chunkContents == text->pExtra);
   text->chunkContents = static_cast<const UChar*>(text->q);
   TextLatin1MoveInPriorContext(text, native_index, native_length, forward);
 }
@@ -303,7 +305,7 @@
       int64_t offset = native_index - text->chunkNativeStart;
       // Ensure chunk offset is well formed if computed offset exceeds int32_t
       // range.
-      ASSERT(offset <= std::numeric_limits<int32_t>::max());
+      DCHECK_LE(offset, std::numeric_limits<int32_t>::max());
       text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
                               ? static_cast<int32_t>(offset)
                               : 0;
@@ -322,7 +324,7 @@
       int64_t offset = native_index - text->chunkNativeStart;
       // Ensure chunk offset is well formed if computed offset exceeds int32_t
       // range.
-      ASSERT(offset <= std::numeric_limits<int32_t>::max());
+      DCHECK_LE(offset, std::numeric_limits<int32_t>::max());
       text->chunkOffset = offset <= std::numeric_limits<int32_t>::max()
                               ? static_cast<int32_t>(offset)
                               : 0;
@@ -351,7 +353,7 @@
   native_index = TextPinIndex(native_index, native_length - 1);
   TextContext current_context = TextLatin1GetCurrentContext(text);
   TextContext new_context = TextGetContext(text, native_index, forward);
-  ASSERT(new_context != kNoContext);
+  DCHECK_NE(new_context, kNoContext);
   if (new_context == current_context) {
     if (current_context == kPrimaryContext) {
       TextLatin1MoveInPrimaryContext(text, native_index, native_length,
@@ -363,7 +365,7 @@
     TextLatin1SwitchToPrimaryContext(text, native_index, native_length,
                                      forward);
   } else {
-    ASSERT(new_context == kPriorContext);
+    DCHECK_EQ(new_context, kPriorContext);
     TextLatin1SwitchToPriorContext(text, native_index, native_length, forward);
   }
   return TRUE;
@@ -407,7 +409,7 @@
   UText* text = utext_setup(&ut_with_buffer->text,
                             sizeof(ut_with_buffer->buffer), status);
   if (U_FAILURE(*status)) {
-    ASSERT(!text);
+    DCHECK(!text);
     return 0;
   }
   TextInit(text, &kTextLatin1Funcs, string, length, prior_context,
@@ -425,7 +427,7 @@
                                           int64_t native_index,
                                           int64_t native_length,
                                           UBool forward) {
-  ASSERT(text->chunkContents == text->p);
+  DCHECK_EQ(text->chunkContents, text->p);
   DCHECK(forward ? native_index >= text->b : native_index > text->b);
   DCHECK(forward ? native_index < native_length
                  : native_index <= native_length);
@@ -434,7 +436,7 @@
   int64_t length = text->chunkNativeLimit - text->chunkNativeStart;
   // Ensure chunk length is well defined if computed length exceeds int32_t
   // range.
-  ASSERT(length <= std::numeric_limits<int32_t>::max());
+  DCHECK_LE(length, std::numeric_limits<int32_t>::max());
   text->chunkLength = length <= std::numeric_limits<int32_t>::max()
                           ? static_cast<int32_t>(length)
                           : 0;
@@ -442,7 +444,7 @@
   int64_t offset = native_index - text->chunkNativeStart;
   // Ensure chunk offset is well defined if computed offset exceeds int32_t
   // range or chunk length.
-  ASSERT(offset <= std::numeric_limits<int32_t>::max());
+  DCHECK_LE(offset, std::numeric_limits<int32_t>::max());
   text->chunkOffset = std::min(offset <= std::numeric_limits<int32_t>::max()
                                    ? static_cast<int32_t>(offset)
                                    : 0,
@@ -453,7 +455,7 @@
                                             int64_t native_index,
                                             int64_t native_length,
                                             UBool forward) {
-  ASSERT(!text->chunkContents || text->chunkContents == text->q);
+  DCHECK(!text->chunkContents || text->chunkContents == text->q);
   text->chunkContents = static_cast<const UChar*>(text->p);
   TextUTF16MoveInPrimaryContext(text, native_index, native_length, forward);
 }
@@ -462,8 +464,8 @@
                                         int64_t native_index,
                                         int64_t native_length,
                                         UBool forward) {
-  ASSERT(text->chunkContents == text->q);
-  ASSERT(forward ? native_index < text->b : native_index <= text->b);
+  DCHECK_EQ(text->chunkContents, text->q);
+  DCHECK(forward ? native_index < text->b : native_index <= text->b);
   DCHECK(forward ? native_index < native_length
                  : native_index <= native_length);
   DCHECK(forward ? native_index < native_length
@@ -475,7 +477,7 @@
   int64_t offset = native_index - text->chunkNativeStart;
   // Ensure chunk offset is well defined if computed offset exceeds int32_t
   // range or chunk length.
-  ASSERT(offset <= std::numeric_limits<int32_t>::max());
+  DCHECK_LE(offset, std::numeric_limits<int32_t>::max());
   text->chunkOffset = std::min(offset <= std::numeric_limits<int32_t>::max()
                                    ? static_cast<int32_t>(offset)
                                    : 0,
@@ -486,7 +488,7 @@
                                           int64_t native_index,
                                           int64_t native_length,
                                           UBool forward) {
-  ASSERT(!text->chunkContents || text->chunkContents == text->p);
+  DCHECK(!text->chunkContents || text->chunkContents == text->p);
   text->chunkContents = static_cast<const UChar*>(text->q);
   TextUTF16MoveInPriorContext(text, native_index, native_length, forward);
 }
@@ -502,7 +504,7 @@
   native_index = TextPinIndex(native_index, native_length - 1);
   TextContext current_context = TextUTF16GetCurrentContext(text);
   TextContext new_context = TextGetContext(text, native_index, forward);
-  ASSERT(new_context != kNoContext);
+  DCHECK_NE(new_context, kNoContext);
   if (new_context == current_context) {
     if (current_context == kPrimaryContext) {
       TextUTF16MoveInPrimaryContext(text, native_index, native_length, forward);
@@ -512,7 +514,7 @@
   } else if (new_context == kPrimaryContext) {
     TextUTF16SwitchToPrimaryContext(text, native_index, native_length, forward);
   } else {
-    ASSERT(new_context == kPriorContext);
+    DCHECK_EQ(new_context, kPriorContext);
     TextUTF16SwitchToPriorContext(text, native_index, native_length, forward);
   }
   return TRUE;
@@ -541,7 +543,7 @@
 
   text = utext_setup(text, 0, status);
   if (U_FAILURE(*status)) {
-    ASSERT(!text);
+    DCHECK(!text);
     return 0;
   }
   TextInit(text, &kTextUTF16Funcs, string, length, prior_context,
diff --git a/third_party/WebKit/Source/platform/text/TextRun.h b/third_party/WebKit/Source/platform/text/TextRun.h
index 9a77db9..2fe7e4e 100644
--- a/third_party/WebKit/Source/platform/text/TextRun.h
+++ b/third_party/WebKit/Source/platform/text/TextRun.h
@@ -144,7 +144,7 @@
   }
 
   TextRun SubRun(unsigned start_offset, unsigned length) const {
-    ASSERT(start_offset < len_);
+    DCHECK_LT(start_offset, len_);
 
     TextRun result = *this;
 
@@ -162,21 +162,21 @@
   }
   const LChar* Data8(unsigned i) const {
     SECURITY_DCHECK(i < len_);
-    ASSERT(Is8Bit());
+    DCHECK(Is8Bit());
     return &data_.characters8[i];
   }
   const UChar* Data16(unsigned i) const {
     SECURITY_DCHECK(i < len_);
-    ASSERT(!Is8Bit());
+    DCHECK(!Is8Bit());
     return &data_.characters16[i];
   }
 
   const LChar* Characters8() const {
-    ASSERT(Is8Bit());
+    DCHECK(Is8Bit());
     return data_.characters8;
   }
   const UChar* Characters16() const {
-    ASSERT(!Is8Bit());
+    DCHECK(!Is8Bit());
     return data_.characters16;
   }
 
diff --git a/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp b/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
index d984be2..4291cb7 100644
--- a/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
+++ b/third_party/WebKit/Source/platform/text/UnicodeUtilities.cpp
@@ -151,7 +151,7 @@
 }
 
 bool IsSmallKanaLetter(UChar character) {
-  ASSERT(IsKanaLetter(character));
+  DCHECK(IsKanaLetter(character));
 
   switch (character) {
     case 0x3041:  // HIRAGANA LETTER SMALL A
@@ -209,7 +209,7 @@
 }
 
 static inline VoicedSoundMarkType ComposedVoicedSoundMark(UChar character) {
-  ASSERT(IsKanaLetter(character));
+  DCHECK(IsKanaLetter(character));
 
   switch (character) {
     case 0x304C:  // HIRAGANA LETTER GA
@@ -295,16 +295,16 @@
 void NormalizeCharactersIntoNFCForm(const UChar* characters,
                                     unsigned length,
                                     Vector<UChar>& buffer) {
-  ASSERT(length);
+  DCHECK(length);
 
   buffer.Resize(length);
 
   UErrorCode status = U_ZERO_ERROR;
   size_t buffer_size = unorm_normalize(characters, length, UNORM_NFC, 0,
                                        buffer.Data(), length, &status);
-  ASSERT(status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING ||
+  DCHECK(status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING ||
          status == U_BUFFER_OVERFLOW_ERROR);
-  ASSERT(buffer_size);
+  DCHECK(buffer_size);
 
   buffer.Resize(buffer_size);
 
@@ -314,7 +314,7 @@
   status = U_ZERO_ERROR;
   unorm_normalize(characters, length, UNORM_NFC, 0, buffer.Data(), buffer_size,
                   &status);
-  ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
+  DCHECK_EQ(status, U_STRING_NOT_TERMINATED_WARNING);
 }
 
 // This function returns kNotFound if |first| and |second| contain different
diff --git a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
index 2e2cf72..81f96ac 100644
--- a/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SchemeRegistry.cpp
@@ -68,7 +68,7 @@
   URLSchemesSet schemes_with_unique_origins;
   URLSchemesSet empty_document_schemes;
   URLSchemesSet schemes_forbidden_from_domain_relaxation;
-  URLSchemesSet not_allowing_javascript_ur_ls_schemes;
+  URLSchemesSet not_allowing_javascript_urls_schemes;
   URLSchemesSet cors_enabled_schemes;
   URLSchemesSet service_worker_schemes;
   URLSchemesSet fetch_api_schemes;
@@ -202,7 +202,7 @@
 void SchemeRegistry::RegisterURLSchemeAsNotAllowingJavascriptURLs(
     const String& scheme) {
   DCHECK_EQ(scheme, scheme.DeprecatedLower());
-  GetMutableURLSchemesRegistry().not_allowing_javascript_ur_ls_schemes.insert(
+  GetMutableURLSchemesRegistry().not_allowing_javascript_urls_schemes.insert(
       scheme);
 }
 
@@ -211,7 +211,7 @@
   DCHECK_EQ(scheme, scheme.DeprecatedLower());
   if (scheme.IsEmpty())
     return false;
-  return GetURLSchemesRegistry().not_allowing_javascript_ur_ls_schemes.Contains(
+  return GetURLSchemesRegistry().not_allowing_javascript_urls_schemes.Contains(
       scheme);
 }
 
diff --git a/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp b/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp
index 5f5f61f8..861cb664 100644
--- a/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp
+++ b/third_party/WebKit/Source/platform/weborigin/SecurityPolicyTest.cpp
@@ -182,13 +182,13 @@
 }
 
 TEST(SecurityPolicyTest, TrustworthyWhiteList) {
-  const char* insecure_ur_ls[] = {
+  const char* insecure_urls[] = {
       "http://a.test/path/to/file.html", "http://b.test/path/to/file.html",
       "blob:http://c.test/b3aae9c8-7f90-440d-8d7c-43aa20d72fde",
       "filesystem:http://d.test/path/t/file.html",
   };
 
-  for (const char* url : insecure_ur_ls) {
+  for (const char* url : insecure_urls) {
     RefPtr<SecurityOrigin> origin = SecurityOrigin::CreateFromString(url);
     EXPECT_FALSE(origin->IsPotentiallyTrustworthy());
     SecurityPolicy::AddOriginTrustworthyWhiteList(origin);
@@ -201,7 +201,7 @@
     const char* url;
     const char* another_url_in_origin;
   };
-  TestCase insecure_ur_ls_with_inner_origin[] = {
+  TestCase insecure_urls_with_inner_origin[] = {
       {"blob:http://e.test/b3aae9c8-7f90-440d-8d7c-43aa20d72fde",
        "http://e.test/foo.html"},
       {"filesystem:http://f.test/path/t/file.html", "http://f.test/bar.html"},
@@ -209,7 +209,7 @@
        "blob:http://g.test/b3aae9c8-7f90-440d-8d7c-43aa20d72fde"},
       {"http://h.test/bar.html", "filesystem:http://h.test/path/t/file.html"},
   };
-  for (const TestCase& test : insecure_ur_ls_with_inner_origin) {
+  for (const TestCase& test : insecure_urls_with_inner_origin) {
     // Actually origins of both URLs should be same.
     RefPtr<SecurityOrigin> origin1 = SecurityOrigin::CreateFromString(test.url);
     RefPtr<SecurityOrigin> origin2 =
diff --git a/third_party/WebKit/public/web/WebFrameLoadType.h b/third_party/WebKit/public/web/WebFrameLoadType.h
index 5d09625..fad45d43 100644
--- a/third_party/WebKit/public/web/WebFrameLoadType.h
+++ b/third_party/WebKit/public/web/WebFrameLoadType.h
@@ -8,30 +8,40 @@
 namespace blink {
 
 // The type of load for a navigation.
-// TODO(clamy): Return a WebFrameLoadType instead of a WebHistoryCommitType
-// in DidCommitProvisionalLoad.
+// TODO(clamy, toyoshim): Currently WebFrameLoadType represents multiple
+// concepts that should be orthogonal and could be represented by multiple enum
+// classes. We should consider what WebFrameLoadType should represent and what
+// shouldn't.
+// See https://crbug.com/707715 for further discussion.
 //
-// Standard:
+// kStandard:
 //   Follows network and cache protocols, e.g. using cached entries unless
 //   they are expired. Used in usual navigations.
-// BackForward:
+// kBackForward:
 //   Uses cached entries even if the entries are stale. Used in history back and
 //   forward navigations.
-// Reload:
+// kReload:
 //   Revalidates a cached entry for the main resource if one exists, but follows
 //   protocols for other subresources. Blink internally uses this for the same
 //   page navigation. Also used in optimized reload for mobiles in a field
 //   trial.
-// ReplaceCurrentItem:
-//   Same as Standard, but replaces current navigation entry in the history.
-// InitialInChildFrame:
+// kReplaceCurrentItem:
+//   Same as Standard, but replaces the current navigation entry in the history.
+// kInitialInChildFrame:
 //   Used in the first load for a subframe.
-// InitialHistoryLoad:
+// kInitialHistoryLoad:
 //   Used in history navigation in a newly created frame.
-// ReloadBypassingCache:
+// kReloadBypassingCache:
 //   Bypasses any caches, memory and disk cache in the browser, and caches in
 //   proxy servers, to fetch fresh contents directly from the end server.
 //   Used in Shift-Reload.
+//
+// Note: kInitialInChildFrame and kInitialHistoryLoad are used to determine
+// the WebHistoryCommitType, but in terms of cache policy, it should work in the
+// same manner as Standard and kBackForward respectively.
+// kReplaceCurrentItem is used to determine if the current navigation should
+// replace the current history item, but in terms of cache policy, it should
+// work in the same manner as Standard.
 enum class WebFrameLoadType {
   kStandard,
   kBackForward,
diff --git a/tools/ipc_fuzzer/fuzzer/fuzzer.cc b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
index eac733f..4120c54 100644
--- a/tools/ipc_fuzzer/fuzzer/fuzzer.cc
+++ b/tools/ipc_fuzzer/fuzzer/fuzzer.cc
@@ -12,6 +12,7 @@
 #include "base/macros.h"
 #include "base/memory/shared_memory_handle.h"
 #include "base/strings/string_util.h"
+#include "base/values.h"
 #include "build/build_config.h"
 #include "ipc/ipc_message.h"
 #include "ipc/ipc_message_utils.h"
@@ -537,8 +538,7 @@
           char tmp[200];
           size_t bin_length = RandInRange(sizeof(tmp));
           fuzzer->FuzzData(tmp, bin_length);
-          p->Set(index,
-                 base::BinaryValue::CreateWithCopiedBuffer(tmp, bin_length));
+          p->Set(index, base::Value::CreateWithCopiedBuffer(tmp, bin_length));
           break;
         }
         case base::Value::Type::DICTIONARY: {
@@ -607,8 +607,7 @@
           size_t bin_length = RandInRange(sizeof(tmp));
           fuzzer->FuzzData(tmp, bin_length);
           p->SetWithoutPathExpansion(
-              property,
-              base::BinaryValue::CreateWithCopiedBuffer(tmp, bin_length));
+              property, base::Value::CreateWithCopiedBuffer(tmp, bin_length));
           break;
         }
         case base::Value::Type::DICTIONARY: {
diff --git a/tools/json_schema_compiler/cc_generator.py b/tools/json_schema_compiler/cc_generator.py
index 26cab363..aa22ea1b 100644
--- a/tools/json_schema_compiler/cc_generator.py
+++ b/tools/json_schema_compiler/cc_generator.py
@@ -46,6 +46,7 @@
       .Append('#include "base/memory/ptr_util.h"')
       .Append('#include "base/strings/string_number_conversions.h"')
       .Append('#include "base/strings/utf_string_conversions.h"')
+      .Append('#include "base/values.h"')
       .Append('#include "%s/%s.h"' %
               (self._namespace.source_file_dir, self._namespace.short_filename))
       .Append('#include <set>')
@@ -638,7 +639,7 @@
         vardot = var + '->'
       else:
         vardot = var + '.'
-      return ('base::BinaryValue::CreateWithCopiedBuffer('
+      return ('base::Value::CreateWithCopiedBuffer('
               '%sdata(), %ssize())' % (vardot, vardot))
     elif underlying_type.property_type == PropertyType.ARRAY:
       return '%s' % self._util_cc_helper.CreateValueFromArray(
@@ -887,7 +888,7 @@
                                                     dst_var,
                                                     failure_value))
     elif underlying_type.property_type == PropertyType.BINARY:
-      (c.Append('const base::BinaryValue* binary_value = NULL;')
+      (c.Append('const base::Value* binary_value = NULL;')
         .Sblock('if (!%(src_var)s->IsType(base::Value::Type::BINARY)) {')
         .Concat(self._GenerateError(
           '"\'%%(key)s\': expected binary, got " + ' +
@@ -898,7 +899,7 @@
       (c.Eblock('}')
         .Sblock('else {')
         .Append(' binary_value =')
-        .Append('   static_cast<const base::BinaryValue*>(%(src_var)s);')
+        .Append('   static_cast<const base::Value*>(%(src_var)s);')
       )
       if is_ptr:
         (c.Append('%(dst_var)s.reset(new std::vector<char>(')
diff --git a/tools/json_schema_compiler/util.cc b/tools/json_schema_compiler/util.cc
index 9f4286a7..983dc66 100644
--- a/tools/json_schema_compiler/util.cc
+++ b/tools/json_schema_compiler/util.cc
@@ -69,7 +69,7 @@
 }
 
 bool PopulateItem(const base::Value& from, std::vector<char>* out) {
-  const base::BinaryValue* binary = nullptr;
+  const base::Value* binary = nullptr;
   if (!from.GetAsBinary(&binary))
     return false;
   out->assign(binary->GetBuffer(), binary->GetBuffer() + binary->GetSize());
@@ -79,7 +79,7 @@
 bool PopulateItem(const base::Value& from,
                   std::vector<char>* out,
                   base::string16* error) {
-  const base::BinaryValue* binary = nullptr;
+  const base::Value* binary = nullptr;
   if (!from.GetAsBinary(&binary))
     return ReportError(from, base::Value::Type::BINARY, error);
   out->assign(binary->GetBuffer(), binary->GetBuffer() + binary->GetSize());
@@ -134,8 +134,7 @@
 }
 
 void AddItemToList(const std::vector<char>& from, base::ListValue* out) {
-  out->Append(
-      base::BinaryValue::CreateWithCopiedBuffer(from.data(), from.size()));
+  out->Append(base::Value::CreateWithCopiedBuffer(from.data(), from.size()));
 }
 
 void AddItemToList(const std::unique_ptr<base::Value>& from,
diff --git a/tools/perf/benchmarks/tab_switching.py b/tools/perf/benchmarks/tab_switching.py
index ed75b50..89c6f986 100644
--- a/tools/perf/benchmarks/tab_switching.py
+++ b/tools/perf/benchmarks/tab_switching.py
@@ -9,6 +9,8 @@
 from telemetry import benchmark
 
 
+@benchmark.Owner(emails=['vovoy@chromium.org'],
+                 component='OS>Performance')
 @benchmark.Enabled('has tabs')
 @benchmark.Disabled('mac-reference')  # http://crbug.com/612774
 @benchmark.Disabled('android')  # http://crbug.com/460084
@@ -23,7 +25,8 @@
   test = tab_switching.TabSwitching
 
   def CreateStorySet(self, options):
-    return page_sets.Typical25PageSet(run_no_page_interactions=True)
+    return page_sets.SystemHealthStorySet(platform='desktop',
+                                          case='multitab:misc')
 
   @classmethod
   def Name(cls):
diff --git a/tools/perf/measurements/tab_switching.py b/tools/perf/measurements/tab_switching.py
index dd64dfa..5b8868e 100644
--- a/tools/perf/measurements/tab_switching.py
+++ b/tools/perf/measurements/tab_switching.py
@@ -10,114 +10,44 @@
 Power usage is also measured.
 """
 
-import json
-import time
-
-from telemetry.core import util
 from telemetry.page import legacy_page_test
 from telemetry.value import histogram
 from telemetry.value import histogram_util
 
 from metrics import keychain_metric
-from metrics import power
-
-# TODO: Revisit this test once multitab support is finalized.
 
 
 class TabSwitching(legacy_page_test.LegacyPageTest):
-
-  # Amount of time to measure, in seconds.
-  SAMPLE_TIME = 30
-
   def __init__(self):
     super(TabSwitching, self).__init__()
-    self.first_page_in_storyset = True
-    self._power_metric = None
+    self._first_histogram = None
 
   def CustomizeBrowserOptions(self, options):
     keychain_metric.KeychainMetric.CustomizeBrowserOptions(options)
 
-    options.AppendExtraBrowserArgs([
-        '--enable-stats-collection-bindings'
-    ])
-    # Enable background networking so we can test its impact on power usage.
-    options.disable_background_networking = False
-    power.PowerMetric.CustomizeBrowserOptions(options)
+    options.AppendExtraBrowserArgs(['--enable-stats-collection-bindings'])
 
-  def WillStartBrowser(self, platform):
-    self.first_page_in_storyset = True
-    self._power_metric = power.PowerMetric(platform, TabSwitching.SAMPLE_TIME)
-
-  def TabForPage(self, page, browser):
-    del page  # unused
-    if self.first_page_in_storyset:
-      # The initial browser window contains a single tab, navigate that tab
-      # rather than creating a new one.
-      self.first_page_in_storyset = False
-      return browser.tabs[0]
-
-    return browser.tabs.New()
-
-  def StopBrowserAfterPage(self, browser, page):
-    # Restart the browser after the last page in the pageset.
-    return len(browser.tabs) >= len(page.story_set.stories)
-
-  def ValidateAndMeasurePage(self, page, tab, results):
-    """On the last tab, cycle through each tab that was opened and then record
-    a single histogram for the tab switching metric."""
-    browser = tab.browser
-    if len(browser.tabs) != len(page.story_set.stories):
-      return
-
-    if browser.tabs < 2:
-      raise Exception('Should have at least two tabs for tab switching')
-
-    # Measure power usage of tabs after quiescence.
-    util.WaitFor(tab.HasReachedQuiescence, 60)
-
-    if browser.platform.CanMonitorPower():
-      self._power_metric.Start(page, tab)
-      time.sleep(TabSwitching.SAMPLE_TIME)
-      self._power_metric.Stop(page, tab)
-      self._power_metric.AddResults(tab, results,)
-
+  @classmethod
+  def _GetTabSwitchHistogram(cls, tab_to_switch):
     histogram_name = 'MPArch.RWH_TabSwitchPaintDuration'
     histogram_type = histogram_util.BROWSER_HISTOGRAM
-    display_name = 'MPArch_RWH_TabSwitchPaintDuration'
-    first_histogram = histogram_util.GetHistogram(
-        histogram_type, histogram_name, tab)
-    prev_histogram = first_histogram
+    return histogram_util.GetHistogram(
+        histogram_type, histogram_name, tab_to_switch)
 
-    for tab_to_switch in browser.tabs:
-      tab_to_switch.Activate()
-      def _IsDone():
-        # pylint: disable=W0640
-        cur_histogram = histogram_util.GetHistogram(
-            histogram_type, histogram_name, tab_to_switch)
-        diff_histogram = histogram_util.SubtractHistogram(
-            cur_histogram, prev_histogram)
-        # TODO(deanliao): Add SubtractHistogramRawValue to process histogram
-        #     object instead of JSON string.
-        diff_histogram_count = json.loads(diff_histogram).get('count', 0)
-        return diff_histogram_count > 0
-      util.WaitFor(_IsDone, 30)
+  def DidNavigateToPage(self, page, tab):
+    """record the starting histogram"""
+    self._first_histogram = self._GetTabSwitchHistogram(tab)
 
-      # We need to get histogram again instead of getting cur_histogram as
-      # variables modified inside inner function cannot be retrieved. However,
-      # inner function can see external scope's variables.
-      prev_histogram = histogram_util.GetHistogram(
-          histogram_type, histogram_name, tab_to_switch)
-
-    last_histogram = prev_histogram
+  def ValidateAndMeasurePage(self, page, tab, results):
+    """record the ending histogram for the tab switching metric."""
+    last_histogram = self._GetTabSwitchHistogram(tab)
     total_diff_histogram = histogram_util.SubtractHistogram(last_histogram,
-                                                            first_histogram)
+                            self._first_histogram)
+
+    display_name = 'MPArch_RWH_TabSwitchPaintDuration'
     results.AddSummaryValue(
         histogram.HistogramValue(None, display_name, 'ms',
-                                 raw_value_json=total_diff_histogram,
-                                 important=False))
+            raw_value_json=total_diff_histogram,
+            important=False))
 
     keychain_metric.KeychainMetric().AddResults(tab, results)
-
-  def DidRunPage(self, platform):
-    del platform  # unused
-    self._power_metric.Close()
diff --git a/tools/perf/measurements/tab_switching_unittest.py b/tools/perf/measurements/tab_switching_unittest.py
index 79efbb1..d16fcc4 100644
--- a/tools/perf/measurements/tab_switching_unittest.py
+++ b/tools/perf/measurements/tab_switching_unittest.py
@@ -3,12 +3,15 @@
 # found in the LICENSE file.
 
 import contextlib
+from measurements import tab_switching
+import mock
+from page_sets.system_health import multi_tab_stories
+from telemetry import benchmark
+from telemetry import story as story_module
 from telemetry.internal.results import page_test_results
 from telemetry.testing import page_test_test_case
-
-from measurements import tab_switching
-
-import mock
+from telemetry.testing import options_for_unittests
+from telemetry.value import histogram
 
 
 class BrowserForTest(object):
@@ -30,6 +33,12 @@
     story.story_set = self
     self.stories.append(story)
 
+INTEGRATION_TEST_TAB_COUNT = 3
+
+class EmptyMultiTabStory(multi_tab_stories.MultiTabStory):
+  NAME = 'multitab:test:empty'
+  URL_LIST = ['about:blank'] * INTEGRATION_TEST_TAB_COUNT
+  URL = URL_LIST[0]
 
 class TabSwitchingUnittest(page_test_test_case.PageTestTestCase):
   @staticmethod
@@ -63,22 +72,9 @@
 
     # Mock histogram result to test _IsDone really works.
     expected_histogram = [
-        # To get first_histogram for last tab (tab_1).
+        # DidNavigateToPage() calls GetHistogram() once
         '{"count": 0, "buckets": []}',
-        # First _IsDone check for tab_0. Retry.
-        '{"count": 0, "buckets": []}',
-        # Second _IsDone check for tab_0. Retry.
-        '{"count": 0, "buckets": []}',
-        # Third _IsDone check for tab_0. Pass.
-        '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}',
-        # To get prev_histogram. End of tab_0 loop.
-        '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}',
-        # First _IsDone check for tab_1. Retry.
-        '{"count": 1, "buckets": [{"low": 1, "high": 2, "count": 1}]}',
-        # Second _IsDone check for tab_1. Pass.
-        '{"count": 2, "buckets": [{"low": 1, "high": 2, "count": 1},'
-        '{"low": 2, "high": 3, "count": 1}]}',
-        # To get prev_histogram. End of tab_1 loop.
+        # ValidateAndMeasurePage() calls GetHistogram() once
         '{"count": 2, "buckets": [{"low": 1, "high": 2, "count": 1},'
         '{"low": 2, "high": 3, "count": 1}]}',
         ]
@@ -88,10 +84,34 @@
         mock.patch('telemetry.value.histogram_util.GetHistogram',
                    mock_get_histogram),
         mock.patch('metrics.keychain_metric.KeychainMetric')):
+      measure.DidNavigateToPage(story_set.stories[0], browser.tabs[-1])
       measure.ValidateAndMeasurePage(story_set.stories[0], browser.tabs[-1],
                                      page_test_results.PageTestResults())
       self.assertEqual(len(expected_histogram),
                        len(mock_get_histogram.mock_calls))
+      # The last tab is passed to DidNavigateToPage() and
+      # ValidateAndMeasurePage()
       expected_calls = [mock.call(mock.ANY, mock.ANY, t) for t in
-                        [tab_1] + [tab_0] * 4 + [tab_1] * 3]
+                        [browser.tabs[-1]] * 2]
       self.assertEqual(expected_calls, mock_get_histogram.mock_calls)
+
+  @benchmark.Enabled('has tabs')
+  @benchmark.Disabled('mac-reference')
+  @benchmark.Disabled('android')
+  def testTabSwitching(self):
+    """IT of TabSwitching measurement and multi-tab story"""
+    ps = story_module.StorySet()
+    ps.AddStory(EmptyMultiTabStory(ps, False))
+    measurement = tab_switching.TabSwitching()
+    options = options_for_unittests.GetCopy()
+    results = self.RunMeasurement(measurement, ps, options=options)
+    self.assertEquals(len(results.failures), 0)
+
+    self.assertEquals(len(results.all_summary_values), 1)
+    summary = results.all_summary_values[0]
+    self.assertIsInstance(summary, histogram.HistogramValue)
+    self.assertEquals(summary.name, 'MPArch_RWH_TabSwitchPaintDuration')
+    histogram_count = sum([b.count for b in summary.buckets])
+    self.assertEquals(histogram_count, INTEGRATION_TEST_TAB_COUNT)
+    histogram_mean = summary.GetRepresentativeNumber()
+    self.assertGreater(histogram_mean, 0)
diff --git a/tools/perf/page_sets/system_health/multi_tab_stories.py b/tools/perf/page_sets/system_health/multi_tab_stories.py
index 6841758..a9ab0c7 100644
--- a/tools/perf/page_sets/system_health/multi_tab_stories.py
+++ b/tools/perf/page_sets/system_health/multi_tab_stories.py
@@ -12,7 +12,7 @@
 from telemetry import benchmark
 
 
-class _MultiTabStory(system_health_story.SystemHealthStory):
+class MultiTabStory(system_health_story.SystemHealthStory):
   ABSTRACT_STORY = True
 
   def RunNavigateSteps(self, action_runner):
@@ -40,7 +40,7 @@
 
 
 @benchmark.Disabled('all')  # crbug.com/704197
-class MultiTabTypical24Story(_MultiTabStory):
+class MultiTabTypical24Story(MultiTabStory):
   NAME = 'multitab:misc:typical24'
   TAGS = [story_tags.TABS_SWITCHING]
   URL_LIST = [
diff --git a/ui/file_manager/zip_archiver/cpp/compressor.cc b/ui/file_manager/zip_archiver/cpp/compressor.cc
index 1d13d78a..17018f6c 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor.cc
+++ b/ui/file_manager/zip_archiver/cpp/compressor.cc
@@ -8,9 +8,9 @@
 #include <ctime>
 #include <sstream>
 
-#include "request.h"
-#include "compressor_io_javascript_stream.h"
 #include "compressor_archive_libarchive.h"
+#include "compressor_io_javascript_stream.h"
+#include "request.h"
 
 namespace {
 
@@ -20,10 +20,11 @@
   explicit JavaScriptCompressorRequestor(Compressor* compressor) :
       compressor_(compressor) {}
 
-  virtual void WriteChunkRequest(int64_t length,
+  virtual void WriteChunkRequest(int64_t offset,
+                                 int64_t length,
                                  const pp::VarArrayBuffer& buffer) {
-    compressor_->message_sender()->SendWriteChunk(
-        compressor_->compressor_id(), buffer, length);
+    compressor_->message_sender()->SendWriteChunk(compressor_->compressor_id(),
+                                                  buffer, offset, length);
   }
 
   virtual void ReadFileChunkRequest(int64_t length) {
@@ -63,7 +64,12 @@
 }
 
 void Compressor::CreateArchive() {
-  compressor_archive_->CreateArchive();
+  if (!compressor_archive_->CreateArchive()) {
+    message_sender_->SendCompressorError(
+        compressor_id_,
+        compressor_archive_->error_message());
+    return;
+  }
   message_sender_->SendCreateArchiveDone(compressor_id_);
 }
 
@@ -88,14 +94,18 @@
       dictionary.Get(request::key::kIsDirectory).AsBool();
 
   PP_DCHECK(dictionary.Get(request::key::kModificationTime).is_string());
-  std::string strtime =
-      dictionary.Get(request::key::kModificationTime).AsString();
-  tm tm;
-  strptime(strtime.c_str(), "%m/%d/%Y %T", &tm);
-  time_t modification_time = mktime(&tm);
+  // Since modification_time is milliseconds, we hold the value in int64_t.
+  int64_t modification_time =
+      static_cast<int64_t>(request::GetInt64FromString(dictionary,
+                                               request::key::kModificationTime));
 
-  compressor_archive_->AddToArchive(
-      pathname, file_size, modification_time, is_directory);
+  if (!compressor_archive_->AddToArchive(
+      pathname, file_size, modification_time, is_directory)) {
+    message_sender_->SendCompressorError(
+        compressor_id_,
+        compressor_archive_->error_message());
+    return;
+  }
   message_sender_->SendAddToArchiveDone(compressor_id_);
 }
 
@@ -126,7 +136,12 @@
   // If an error has occurred, no more write chunk requests are sent and
   // CloseArchive() can be safely called in the main thread.
   if (has_error) {
-    compressor_archive_->CloseArchive(has_error);
+    if (!compressor_archive_->CloseArchive(has_error)) {
+      message_sender_->SendCompressorError(
+          compressor_id_,
+          compressor_archive_->error_message());
+      return;
+    }
     message_sender_->SendCloseArchiveDone(compressor_id_);
   } else {
     worker_.message_loop().PostWork(callback_factory_.NewCallback(
@@ -135,6 +150,11 @@
 }
 
 void Compressor::CloseArchiveCallback(int32_t, bool has_error) {
-  compressor_archive_->CloseArchive(has_error);
+  if (!compressor_archive_->CloseArchive(has_error)) {
+    message_sender_->SendCompressorError(
+        compressor_id_,
+        compressor_archive_->error_message());
+    return;
+  }
   message_sender_->SendCloseArchiveDone(compressor_id_);
 }
diff --git a/ui/file_manager/zip_archiver/cpp/compressor.h b/ui/file_manager/zip_archiver/cpp/compressor.h
index 99236a1a..9a7a0df 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor.h
+++ b/ui/file_manager/zip_archiver/cpp/compressor.h
@@ -8,7 +8,6 @@
 #include <ctime>
 #include <pthread.h>
 
-#include "archive.h"
 #include "ppapi/cpp/instance_handle.h"
 #include "ppapi/cpp/var_array_buffer.h"
 #include "ppapi/cpp/var_dictionary.h"
diff --git a/ui/file_manager/zip_archiver/cpp/compressor_archive.h b/ui/file_manager/zip_archiver/cpp/compressor_archive.h
index 3c9ff880..4ce6ecb 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor_archive.h
+++ b/ui/file_manager/zip_archiver/cpp/compressor_archive.h
@@ -17,38 +17,46 @@
   virtual ~CompressorArchive() {}
 
   // Creates an archive object. This method does not call CustomArchiveWrite, so
-  // this is synchronous.
-  virtual void CreateArchive() = 0;
+  // this is synchronous. Returns true if successful. In case of failure the
+  // error message can be obtained with CompressorArchive::error_message().
+  virtual bool CreateArchive() = 0;
 
-  // Releases all resources obtained by libarchive.
+  // Releases all resources obtained by minizip.
   // This method also writes metadata about the archive itself onto the end of
   // the archive file before releasing resources if hasError is false. Since
   // writing data onto the archive is asynchronous, this function must not be
-  // called in the main thread if hasError is false.
-  virtual void CloseArchive(bool has_error) = 0;
+  // called in the main thread if hasError is false. Returns true if successful.
+  // In case of failure the error message can be obtained with
+  // CompressorArchive::error_message().
+  virtual bool CloseArchive(bool has_error) = 0;
 
   // Adds an entry to the archive. It writes the header of the entry onto the
   // archive first, and then if it is a file(not a directory), requests
   // JavaScript for file chunks, compresses and writes them onto the archive
   // until all chunks of the entry are written onto the archive. This method
   // calls IO operations, so this function must not be called in the main thread.
-  virtual void AddToArchive(const std::string& filename,
+  // Returns true if successful. In case of failure the error message can be
+  // obtained with CompressorArchive::error_message().
+  virtual bool AddToArchive(const std::string& filename,
                             int64_t file_size,
-                            time_t modification_time,
+                            int64_t modification_time,
                             bool is_directory) = 0;
 
-  // A getter function for archive_.
-  struct archive* archive() const { return archive_; }
-
   // A getter function for compressor_stream_.
   CompressorStream* compressor_stream() const { return compressor_stream_; }
 
- private:
-  // The libarchive correspondent archive object.
-  struct archive* archive_;
+  std::string error_message() const { return error_message_; }
 
+  void set_error_message(const std::string& error_message) {
+    error_message_ = error_message;
+  }
+
+ private:
   // An instance that takes care of all IO operations.
   CompressorStream* compressor_stream_;
+
+  // An error message set in case of any errors.
+  std::string error_message_;
 };
 
 #endif  // COMPRESSSOR_ARCHIVE_H_
diff --git a/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.cc b/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.cc
index 92ac415c..b6d97a5 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.cc
+++ b/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.cc
@@ -7,141 +7,237 @@
 #include <cerrno>
 #include <cstring>
 
-#include "archive_entry.h"
+#include "base/time/time.h"
 #include "ppapi/cpp/logging.h"
 
-namespace {
-  // Nothing to do here because JavaScript takes care of file open operations.
-  int CustomArchiveOpen(archive* archive_object, void* client_data) {
-    return ARCHIVE_OK;
-  }
+namespace compressor_archive_functions {
 
-  // Called when any data chunk must be written on the archive. It copies data
-  // from the given buffer processed by libarchive to an array buffer and passes
-  // it to compressor_stream.
-  ssize_t CustomArchiveWrite(archive* archive_object, void* client_data,
-      const void* buffer, size_t length) {
-    CompressorArchiveLibarchive* compressor_libarchive =
-        static_cast<CompressorArchiveLibarchive*>(client_data);
-
-    const char* char_buffer = static_cast<const char*>(buffer);
-
-    // Copy the data in buffer to array_buffer.
-    PP_DCHECK(length > 0);
-    pp::VarArrayBuffer array_buffer(length);
-    char* array_buffer_data = static_cast<char*>(array_buffer.Map());
-    memcpy(array_buffer_data, char_buffer, length);
-    array_buffer.Unmap();
-
-    ssize_t written_bytes =
-        compressor_libarchive->compressor_stream()->Write(length, array_buffer);
-
-    // Negative written_bytes represents an error.
-    if (written_bytes < 0) {
-      // When writing fails, archive_set_error() should be called and -1 should
-      // be returned.
-      archive_set_error(
-          compressor_libarchive->archive(), EIO, "Failed to write a chunk.");
-      return -1;
-    }
-    return written_bytes;
-  }
-
-  // Nothing to do here because JavaScript takes care of file close operations.
-  int CustomArchiveClose(archive* archive_object, void* client_data) {
-    return ARCHIVE_OK;
-  }
+// Called when minizip tries to open a zip archive file. We do nothing here
+// because JavaScript takes care of file opening operation.
+void* CustomArchiveOpen(void* compressor,
+                        const char* /*filename*/, int /*mode*/) {
+  return compressor;
 }
 
+// This function is not called because we don't unpack zip files here.
+uLong CustomArchiveRead(void* /*compressor*/, void* /*stream*/,
+                        void* /*buffur*/, uLong /*size*/) {
+  return 0 /* Success */;
+}
+
+// Called when data chunk must be written on the archive. It copies data
+// from the given buffer processed by minizip to an array buffer and passes
+// it to compressor_stream.
+uLong CustomArchiveWrite(void* compressor,
+                         void* /*stream*/,
+                         const void* zip_buffer,
+                         uLong zip_length) {
+  CompressorArchiveLibarchive* compressor_libarchive =
+      static_cast<CompressorArchiveLibarchive*>(compressor);
+
+  int64_t written_bytes = compressor_libarchive->compressor_stream()->Write(
+      compressor_libarchive->offset_, zip_length,
+      static_cast<const char*>(zip_buffer));
+
+  if (written_bytes != zip_length)
+    return 0 /* Error */;
+
+  // Update offset_ and length_.
+  compressor_libarchive->offset_ += written_bytes;
+  if (compressor_libarchive->offset_ > compressor_libarchive->length_)
+    compressor_libarchive->length_ = compressor_libarchive->offset_;
+  return static_cast<uLong>(written_bytes);
+}
+
+// Returns the offset from the beginning of the data.
+long CustomArchiveTell(void* compressor, void* /*stream*/) {
+  CompressorArchiveLibarchive* compressor_libarchive =
+      static_cast<CompressorArchiveLibarchive*>(compressor);
+  return static_cast<long>(compressor_libarchive->offset_);
+}
+
+// Moves the current offset to the specified position.
+long CustomArchiveSeek(void* compressor,
+                       void* /*stream*/,
+                       uLong offset,
+                       int origin) {
+  CompressorArchiveLibarchive* compressor_libarchive =
+      static_cast<CompressorArchiveLibarchive*>(compressor);
+
+  if (origin == ZLIB_FILEFUNC_SEEK_CUR) {
+    compressor_libarchive->offset_ =
+        std::min(compressor_libarchive->offset_ + static_cast<int64_t>(offset),
+                 compressor_libarchive->length_);
+    return 0 /* Success */;
+  }
+  if (origin == ZLIB_FILEFUNC_SEEK_END) {
+    compressor_libarchive->offset_ =
+        std::max(compressor_libarchive->length_ - static_cast<int64_t>(offset),
+                 0LL);
+    return 0 /* Success */;
+  }
+  if (origin == ZLIB_FILEFUNC_SEEK_SET) {
+    compressor_libarchive->offset_ =
+        std::min(static_cast<int64_t>(offset), compressor_libarchive->length_);
+    return 0 /* Success */;
+  }
+  return -1 /* Error */;
+}
+
+// Releases all used resources. compressor points to compressor_libarchive and
+// it is deleted in the destructor of Compressor, so we don't need to delete
+// it here.
+int CustomArchiveClose(void* /*compressor*/, void* /*stream*/) {
+  return 0 /* Success */;
+}
+
+// Returns the last error that happened when writing data. This function always
+// returns zero, which means there are no errors.
+int CustomArchiveError(void* /*compressor*/, void* /*stream*/) {
+  return 0 /* Success */;
+}
+
+} // compressor_archive_functions
+
 CompressorArchiveLibarchive::CompressorArchiveLibarchive(
     CompressorStream* compressor_stream)
     : CompressorArchive(compressor_stream),
-      compressor_stream_(compressor_stream) {
+      compressor_stream_(compressor_stream),
+      zip_file_(nullptr),
+      offset_(0),
+      length_(0) {
   destination_buffer_ =
-      new char[compressor_archive_constants::kMaximumDataChunkSize];
+      new char[compressor_stream_constants::kMaximumDataChunkSize];
 }
 
 CompressorArchiveLibarchive::~CompressorArchiveLibarchive() {
   delete destination_buffer_;
 }
 
-void CompressorArchiveLibarchive::CreateArchive() {
-  archive_ = archive_write_new();
-  archive_write_set_format_zip(archive_);
+bool CompressorArchiveLibarchive::CreateArchive() {
+  // Set up archive object.
+  zlib_filefunc_def zip_funcs;
+  zip_funcs.zopen_file = compressor_archive_functions::CustomArchiveOpen;
+  zip_funcs.zread_file = compressor_archive_functions::CustomArchiveRead;
+  zip_funcs.zwrite_file = compressor_archive_functions::CustomArchiveWrite;
+  zip_funcs.ztell_file = compressor_archive_functions::CustomArchiveTell;
+  zip_funcs.zseek_file = compressor_archive_functions::CustomArchiveSeek;
+  zip_funcs.zclose_file = compressor_archive_functions::CustomArchiveClose;
+  zip_funcs.zerror_file = compressor_archive_functions::CustomArchiveError;
+  zip_funcs.opaque = this;
 
-  // Passing 1 as the second argument causes the final chunk not to be padded.
-  archive_write_set_bytes_in_last_block(archive_, 1);
-  archive_write_set_bytes_per_block(
-     archive_, compressor_archive_constants::kMaximumDataChunkSize);
-  archive_write_open(archive_, this, CustomArchiveOpen,
-                     CustomArchiveWrite, CustomArchiveClose);
+  zip_file_ = zipOpen2(nullptr /* pathname */,
+                       APPEND_STATUS_CREATE,
+                       nullptr /* globalcomment */,
+                       &zip_funcs);
+  if (!zip_file_) {
+    set_error_message(compressor_archive_constants::kCreateArchiveError);
+    return false /* Error */;
+  }
+  return true /* Success */;
 }
 
-void CompressorArchiveLibarchive::AddToArchive(
-    const std::string& filename,
-    int64_t file_size,
-    time_t modification_time,
-    bool is_directory) {
-  entry = archive_entry_new();
+bool CompressorArchiveLibarchive::AddToArchive(const std::string& filename,
+                                               int64_t file_size,
+                                               int64_t modification_time,
+                                               bool is_directory) {
+  // Minizip takes filenames that end with '/' as directories.
+  std::string normalized_filename = filename;
+  if (is_directory)
+    normalized_filename += "/";
 
-  archive_entry_set_pathname(entry, filename.c_str());
-  archive_entry_set_size(entry, file_size);
-  archive_entry_set_mtime(entry, modification_time, 0 /* millisecond */);
+  // Fill zipfileMetadata with modification_time.
+  zip_fileinfo zipfileMetadata;
+  // modification_time is millisecond-based, while FromTimeT takes seconds.
+  base::Time tm = base::Time::FromTimeT((int64_t)modification_time / 1000);
+  base::Time::Exploded exploded_time = {};
+  tm.LocalExplode(&exploded_time);
+  zipfileMetadata.tmz_date.tm_sec = exploded_time.second;
+  zipfileMetadata.tmz_date.tm_min = exploded_time.minute;
+  zipfileMetadata.tmz_date.tm_hour = exploded_time.hour;
+  zipfileMetadata.tmz_date.tm_year = exploded_time.year;
+  zipfileMetadata.tmz_date.tm_mday = exploded_time.day_of_month;
+  // Convert from 1-based to 0-based.
+  zipfileMetadata.tmz_date.tm_mon = exploded_time.month - 1;
 
-  if (is_directory) {
-    archive_entry_set_filetype(entry, AE_IFDIR);
-    archive_entry_set_perm(
-        entry, compressor_archive_constants::kDirectoryPermission);
-  } else {
-    archive_entry_set_filetype(entry, AE_IFREG);
-    archive_entry_set_perm(
-        entry, compressor_archive_constants::kFilePermission);
-  }
-  archive_write_header(archive_, entry);
-  // If archive_errno() returns 0, the header was written correctly.
-  if (archive_errno(archive_) != 0) {
-    CloseArchive(true /* hasError */);
-    return;
+  // Section 4.4.4 http://www.pkware.com/documents/casestudies/APPNOTE.TXT
+  // Setting the Language encoding flag so the file is told to be in utf-8.
+  const uLong LANGUAGE_ENCODING_FLAG = 0x1 << 11;
+
+  int open_result = zipOpenNewFileInZip4(zip_file_,                      // file
+                                         normalized_filename.c_str(),// filename
+                                         &zipfileMetadata,              // zipfi
+                                         nullptr,            // extrafield_local
+                                         0u,            // size_extrafield_local
+                                         nullptr,           // extrafield_global
+                                         0u,           // size_extrafield_global
+                                         nullptr,                     // comment
+                                         Z_DEFLATED,                   // method
+                                         Z_DEFAULT_COMPRESSION,         // level
+                                         0,                               // raw
+                                         -MAX_WBITS,               // windowBits
+                                         DEF_MEM_LEVEL,              // memLevel
+                                         Z_DEFAULT_STRATEGY,         // strategy
+                                         nullptr,                    // password
+                                         0,                    // crcForCrypting
+                                         0,                     // versionMadeBy
+                                         LANGUAGE_ENCODING_FLAG);    // flagBase
+  if (open_result != ZIP_OK) {
+    CloseArchive(true /* has_error */);
+    set_error_message(compressor_archive_constants::kAddToArchiveError);
+    return false /* Error */;
   }
 
+  bool has_error = false;
   if (!is_directory) {
     int64_t remaining_size = file_size;
     while (remaining_size > 0) {
       int64_t chunk_size = std::min(remaining_size,
-          compressor_archive_constants::kMaximumDataChunkSize);
+          compressor_stream_constants::kMaximumDataChunkSize);
       PP_DCHECK(chunk_size > 0);
 
       int64_t read_bytes =
           compressor_stream_->Read(chunk_size, destination_buffer_);
+
       // Negative read_bytes indicates an error occurred when reading chunks.
-      if (read_bytes < 0) {
-        CloseArchive(true /* hasError */);
+      // 0 just means there is no more data available, but here we need positive
+      // length of bytes, so this is also an error here.
+      if (read_bytes <= 0) {
+        has_error = true;
         break;
       }
 
-      int64_t written_bytes =
-          archive_write_data(archive_, destination_buffer_, read_bytes);
-      // If archive_errno() returns 0, the buffer was written correctly.
-      if (archive_errno(archive_) != 0) {
-        CloseArchive(true /* hasError */);
+      if (zipWriteInFileInZip(zip_file_, destination_buffer_, read_bytes) !=
+          ZIP_OK) {
+        has_error = true;
         break;
       }
-      PP_DCHECK(written_bytes > 0);
-
-      remaining_size -= written_bytes;
+      remaining_size -= read_bytes;
     }
   }
 
-  archive_entry_free(entry);
+  if (!has_error && zipCloseFileInZip(zip_file_) != ZIP_OK)
+    has_error = true;
+
+  if (has_error) {
+    CloseArchive(true /* has_error */);
+    set_error_message(compressor_archive_constants::kAddToArchiveError);
+    return false /* Error */;
+  }
+
+  return true /* Success */;
 }
 
-void CompressorArchiveLibarchive::CloseArchive(bool has_error) {
-  // If has_error is true, mark the archive object as being unusable and
-  // release resources without writing no more data on the archive.
-  if (has_error)
-    archive_write_fail(archive_);
-  if (archive_) {
-    archive_write_free(archive_);
-    archive_ = NULL;
+bool CompressorArchiveLibarchive::CloseArchive(bool has_error) {
+  if (zipClose(zip_file_, nullptr /* global_comment */) != ZIP_OK) {
+    set_error_message(compressor_archive_constants::kCloseArchiveError);
+    return false /* Error */;
   }
+  if (!has_error) {
+    if (compressor_stream()->Flush() < 0) {
+      set_error_message(compressor_archive_constants::kCloseArchiveError);
+      return false /* Error */;
+    }
+  }
+  return true /* Success */;
 }
diff --git a/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.h b/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.h
index b0a299d..13e3c48 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.h
+++ b/ui/file_manager/zip_archiver/cpp/compressor_archive_libarchive.h
@@ -7,17 +7,37 @@
 
 #include <string>
 
-#include "archive.h"
+#include "third_party/zlib/contrib/minizip/unzip.h"
+#include "third_party/zlib/contrib/minizip/zip.h"
 
 #include "compressor_archive.h"
 #include "compressor_stream.h"
 
 // A namespace with constants used by CompressorArchiveLibarchive.
 namespace compressor_archive_constants {
-const int64_t kMaximumDataChunkSize = 512 * 1024;
-const int kFilePermission = 640;
-const int kDirectoryPermission = 760;
-}  // namespace compressor_archive_constants
+
+const char kCreateArchiveError[] = "Failed to create archive.";
+const char kAddToArchiveError[] = "Failed to add entry to archive.";
+const char kCloseArchiveError[] = "Failed to close archive.";
+
+}
+
+// A name space with custom functions passed to minizip.
+namespace compressor_archive_functions {
+
+  uLong CustomArchiveWrite(void* compressor,
+                           void* stream,
+                           const void* buffer,
+                           uLong length);
+
+  long CustomArchiveTell(void* compressor, void* stream);
+
+  long CustomArchiveSeek(void* compressor,
+                         void* stream,
+                         uLong offset,
+                         int origin);
+
+}  // compressor_archive_functions
 
 class CompressorArchiveLibarchive : public CompressorArchive {
  public:
@@ -26,36 +46,48 @@
   virtual ~CompressorArchiveLibarchive();
 
   // Creates an archive object.
-  virtual void CreateArchive();
+  virtual bool CreateArchive();
 
   // Releases all resources obtained by libarchive.
-  virtual void CloseArchive(bool has_error);
+  virtual bool CloseArchive(bool has_error);
 
   // Adds an entry to the archive.
-  virtual void AddToArchive(const std::string& filename,
+  virtual bool AddToArchive(const std::string& filename,
                             int64_t file_size,
-                            time_t modification_time,
+                            int64_t modification_time,
                             bool is_directory);
 
-  // A getter function for archive_.
-  struct archive* archive() const { return archive_; }
+  // A getter function for zip_file_.
+  zipFile zip_file() const { return zip_file_; }
 
   // A getter function for compressor_stream.
   CompressorStream* compressor_stream() const { return compressor_stream_; }
 
+  // Custom functions need to access private variables of
+  // CompressorArchiveLibarchive frequently.
+  friend uLong compressor_archive_functions::CustomArchiveWrite(
+      void* compressor, void* stream, const void* buffer, uLong length);
+
+  friend long compressor_archive_functions::CustomArchiveTell(
+      void* compressor, void* stream);
+
+  friend long compressor_archive_functions::CustomArchiveSeek(
+      void* compressor, void* stream, uLong offset, int origin);
+
  private:
   // An instance that takes care of all IO operations.
   CompressorStream* compressor_stream_;
 
-  // The libarchive correspondent archive object.
-  struct archive* archive_;
-
-  // The libarchive correspondent archive entry object that is currently
-  // processed.
-  struct archive_entry* entry;
+  // The minizip correspondent archive object.
+  zipFile zip_file_;
 
   // The buffer used to store the data read from JavaScript.
   char* destination_buffer_;
+
+  // The current offset of the zip archive file.
+  int64_t offset_;
+  // The size of the zip archive file.
+  int64_t length_;
 };
 
 #endif  // COMPRESSOR_ARCHIVE_LIBARCHIVE_H_
diff --git a/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.cc b/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.cc
index 5fdb081..92bba21 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.cc
+++ b/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.cc
@@ -7,45 +7,129 @@
 #include <limits>
 #include <thread>
 
-#include "archive.h"
 #include "ppapi/cpp/logging.h"
 
 CompressorIOJavaScriptStream::CompressorIOJavaScriptStream(
     JavaScriptCompressorRequestorInterface* requestor)
-    : requestor_(requestor) {
-  pthread_mutex_init(&shared_state_lock_, NULL);
-  pthread_cond_init(&available_data_cond_, NULL);
-  pthread_cond_init(&data_written_cond_, NULL);
+    : requestor_(requestor), buffer_offset_(-1), buffer_data_length_(0) {
+  pthread_mutex_init(&shared_state_lock_, nullptr);
+  pthread_cond_init(&available_data_cond_, nullptr);
+  pthread_cond_init(&data_written_cond_, nullptr);
 
   pthread_mutex_lock(&shared_state_lock_);
   available_data_ = false;
+  buffer_ = new char[compressor_stream_constants::kMaximumDataChunkSize];
   pthread_mutex_unlock(&shared_state_lock_);
 }
 
 CompressorIOJavaScriptStream::~CompressorIOJavaScriptStream() {
+  pthread_mutex_lock(&shared_state_lock_);
+  delete buffer_;
+  pthread_mutex_unlock(&shared_state_lock_);
   pthread_cond_destroy(&data_written_cond_);
   pthread_cond_destroy(&available_data_cond_);
   pthread_mutex_destroy(&shared_state_lock_);
 };
 
-int64_t CompressorIOJavaScriptStream::Write(int64_t byte_to_write,
-    const pp::VarArrayBuffer& buffer) {
+int64_t CompressorIOJavaScriptStream::Flush() {
   pthread_mutex_lock(&shared_state_lock_);
-  requestor_->WriteChunkRequest(byte_to_write, buffer);
+
+  if (buffer_data_length_ == 0) {
+    pthread_mutex_unlock(&shared_state_lock_);
+    return 0;
+  }
+
+  // Copy the data in buffer_ to array_buffer.
+  pp::VarArrayBuffer array_buffer(buffer_data_length_);
+  char* array_buffer_data = static_cast<char*>(array_buffer.Map());
+  memcpy(array_buffer_data, buffer_, buffer_data_length_);
+  array_buffer.Unmap();
+
+  requestor_->WriteChunkRequest(buffer_offset_,
+                                buffer_data_length_,
+                                array_buffer);
 
   pthread_cond_wait(&data_written_cond_, &shared_state_lock_);
 
   int64_t written_bytes = written_bytes_;
-  pthread_mutex_unlock(&shared_state_lock_);
+  if (written_bytes < buffer_data_length_) {
+    pthread_mutex_unlock(&shared_state_lock_);
+    return -1 /* Error */;
+  }
 
+  // Reset the offset and length to the default values.
+  buffer_offset_ = -1;
+  buffer_data_length_ = 0;
+
+  pthread_mutex_unlock(&shared_state_lock_);
   return written_bytes;
 }
 
-void CompressorIOJavaScriptStream::WriteChunkDone(int64_t written_bytes) {
+int64_t CompressorIOJavaScriptStream::Write(int64_t zip_offset,
+                                            int64_t zip_length,
+                                            const char* zip_buffer) {
+  pthread_mutex_lock(&shared_state_lock_);
+
+  // The offset from which the data should be written onto the archive.
+  int64_t current_offset = zip_offset;
+  int64_t left_length = zip_length;
+  const char* buffer_pointer = zip_buffer;
+
+  do {
+    // Flush the buffer if the data in the buffer cannot be reused.
+    // The following is the brief explanation about the conditions of the
+    // following if statement.
+    // 1: The buffer is not in the initial state (empty).
+    //    The buffer should have some data to flush.
+    // 2: This write operation is not to append the data to the buffer.
+    // 3: The buffer overflows if we append the data to the buffer.
+    //    If we can append the new data to the current data in the buffer,
+    //    we should not flush the buffer.
+    // 4: The index to write is outside the buffer.
+    //    If we want to write data outside the range, we first need to flush
+    //    the buffer, and then cache the data in the buffer.
+    if (buffer_offset_ >= 0 && /* 1 */
+        (current_offset != buffer_offset_ + buffer_data_length_ || /* 2 */
+         buffer_data_length_ + left_length >
+             compressor_stream_constants::kMaximumDataChunkSize) && /* 3 */
+        (current_offset < buffer_offset_ ||
+         buffer_offset_ + buffer_data_length_ <
+         current_offset + left_length) /* 4 */ ) {
+      pthread_mutex_unlock(&shared_state_lock_);
+      int64_t bytes_to_write = buffer_data_length_;
+      if (Flush() != bytes_to_write)
+        return -1;
+      pthread_mutex_lock(&shared_state_lock_);
+    }
+
+    // How many bytes we should copy to buffer_ in this iteration.
+    int64_t copy_length = std::min(
+        left_length, compressor_stream_constants::kMaximumDataChunkSize);
+    // Set up the buffer_offset_ if the buffer_ has no data.
+    if (buffer_offset_ == -1 /* initial state */)
+      buffer_offset_ = current_offset;
+    // Calculate the relative offset from left_length.
+    int64_t offset_in_buffer = current_offset - buffer_offset_;
+    // Copy data from zip_buffer, which is pointed by buffer_pointer, to buffer_.
+    memcpy(buffer_ + offset_in_buffer, buffer_pointer, copy_length);
+
+    buffer_pointer += copy_length;
+    buffer_data_length_ = std::max(
+        buffer_data_length_, offset_in_buffer + copy_length);
+    current_offset += copy_length;
+    left_length -= copy_length;
+  } while (left_length > 0);
+
+  pthread_mutex_unlock(&shared_state_lock_);
+  return zip_length;
+}
+
+int64_t CompressorIOJavaScriptStream::WriteChunkDone(int64_t written_bytes) {
   pthread_mutex_lock(&shared_state_lock_);
   written_bytes_ = written_bytes;
   pthread_cond_signal(&data_written_cond_);
   pthread_mutex_unlock(&shared_state_lock_);
+  return written_bytes;
 }
 
 int64_t CompressorIOJavaScriptStream::Read(int64_t bytes_to_read,
@@ -65,7 +149,7 @@
   return read_bytes;
 }
 
-void CompressorIOJavaScriptStream::ReadFileChunkDone(int64_t read_bytes,
+int64_t CompressorIOJavaScriptStream::ReadFileChunkDone(int64_t read_bytes,
       pp::VarArrayBuffer* array_buffer) {
   pthread_mutex_lock(&shared_state_lock_);
 
@@ -81,4 +165,5 @@
   available_data_ = true;
   pthread_cond_signal(&available_data_cond_);
   pthread_mutex_unlock(&shared_state_lock_);
+  return read_bytes;
 }
diff --git a/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.h b/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.h
index d0a22d8..d33172e 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.h
+++ b/ui/file_manager/zip_archiver/cpp/compressor_io_javascript_stream.h
@@ -8,7 +8,6 @@
 #include <pthread.h>
 #include <string>
 
-#include "archive.h"
 #include "ppapi/cpp/instance_handle.h"
 #include "ppapi/cpp/var_array_buffer.h"
 #include "ppapi/utility/completion_callback_factory.h"
@@ -18,6 +17,12 @@
 #include "compressor_stream.h"
 #include "javascript_compressor_requestor_interface.h"
 
+// A namespace with constants used by CompressorArchiveLibarchive.
+namespace compressor_stream_constants {
+// We need at least 256KB for MiniZip.
+const int64_t kMaximumDataChunkSize = 512 * 1024;
+}  // namespace compressor_archive_constants
+
 class CompressorIOJavaScriptStream : public CompressorStream {
  public:
   CompressorIOJavaScriptStream(
@@ -25,15 +30,21 @@
 
   virtual ~CompressorIOJavaScriptStream();
 
-  virtual int64_t Write(int64_t bytes_to_read,
-                        const pp::VarArrayBuffer& buffer);
+  // Flushes the data in buffer_. Since minizip sends tons of write requests and
+  // communication between C++ and JS is very expensive, we need to cache data
+  // in buffer_ and send them in a lump.
+  virtual int64_t Flush();
 
-  virtual void WriteChunkDone(int64_t write_bytes);
+  virtual int64_t Write(int64_t zip_offset,
+                        int64_t zip_length,
+                        const char* zip_buffer);
+
+  virtual int64_t WriteChunkDone(int64_t write_bytes);
 
   virtual int64_t Read(int64_t bytes_to_read, char* destination_buffer);
 
-  virtual void ReadFileChunkDone(int64_t read_bytes,
-                                 pp::VarArrayBuffer* buffer);
+  virtual int64_t ReadFileChunkDone(int64_t read_bytes,
+                                    pp::VarArrayBuffer* buffer);
 
 private:
   // A requestor that makes calls to JavaScript to read and write chunks.
@@ -58,6 +69,15 @@
 
   // Stores the data read from JavaScript.
   char* destination_buffer_;
+
+  // The current offset from which buffer_ has data.
+  int64_t buffer_offset_;
+
+  // The size of the data in buffer_.
+  int64_t buffer_data_length_;
+
+  // The buffer that contains cached data.
+  char* buffer_;
 };
 
 #endif  // COMPRESSOR_IO_JAVSCRIPT_STREAM_H_
diff --git a/ui/file_manager/zip_archiver/cpp/compressor_stream.h b/ui/file_manager/zip_archiver/cpp/compressor_stream.h
index de1f4209..f3564fb 100644
--- a/ui/file_manager/zip_archiver/cpp/compressor_stream.h
+++ b/ui/file_manager/zip_archiver/cpp/compressor_stream.h
@@ -15,15 +15,21 @@
  public:
   virtual ~CompressorStream() {}
 
+  // Flush the data in buffer_. This method is called when the buffer gets full
+  // or needs to have the different range of data from the current data in it.
+  // This method must not be called in the main thread.
+  virtual int64_t Flush() = 0;
+
   // Writes the given buffer onto the archive. After sending a write chunk
   // request to JavaScript, it waits until WriteChunkDone() is called in the
   // main thread. Thus, This method must not be called in the main thread.
-  virtual int64_t Write(int64_t bytes_to_write,
-                        const pp::VarArrayBuffer& buffer) = 0;
+  virtual int64_t Write(int64_t zip_offset,
+                        int64_t zip_length,
+                        const char* zip_buffer) = 0;
 
   // Called when write chunk done response arrives from JavaScript. Sends a
   // signal to invoke Write function in another thread again.
-  virtual void WriteChunkDone(int64_t write_bytes) = 0;
+  virtual int64_t WriteChunkDone(int64_t write_bytes) = 0;
 
   // Reads a file chunk from the entry that is currently being processed. After
   // sending a read file chunk request to JavaScript, it waits until
@@ -35,8 +41,8 @@
   // the binary data in the given buffer to destination_buffer_ and Sends a
   // signal to invoke Read function in another thread again. buffer must not be
   // const because buffer.Map() and buffer.Unmap() can not be called with const.
-  virtual void ReadFileChunkDone(int64_t read_bytes,
-                                 pp::VarArrayBuffer* buffer) = 0;
+  virtual int64_t ReadFileChunkDone(int64_t read_bytes,
+                                    pp::VarArrayBuffer* buffer) = 0;
 };
 
 #endif  // COMPRESSOR_STREAM_H_
diff --git a/ui/file_manager/zip_archiver/cpp/javascript_compressor_requestor_interface.h b/ui/file_manager/zip_archiver/cpp/javascript_compressor_requestor_interface.h
index 367c021..59dbd57 100644
--- a/ui/file_manager/zip_archiver/cpp/javascript_compressor_requestor_interface.h
+++ b/ui/file_manager/zip_archiver/cpp/javascript_compressor_requestor_interface.h
@@ -12,7 +12,8 @@
  public:
   virtual ~JavaScriptCompressorRequestorInterface() {}
 
-  virtual void WriteChunkRequest(int64_t length,
+  virtual void WriteChunkRequest(int64_t offset,
+                                 int64_t length,
                                  const pp::VarArrayBuffer& buffer) = 0;
 
   virtual void ReadFileChunkRequest(int64_t length) = 0;
diff --git a/ui/file_manager/zip_archiver/cpp/javascript_message_sender_interface.h b/ui/file_manager/zip_archiver/cpp/javascript_message_sender_interface.h
index 17c9f9e..5589745 100644
--- a/ui/file_manager/zip_archiver/cpp/javascript_message_sender_interface.h
+++ b/ui/file_manager/zip_archiver/cpp/javascript_message_sender_interface.h
@@ -57,6 +57,7 @@
 
   virtual void SendWriteChunk(int compressor_id,
                               const pp::VarArrayBuffer& array_buffer,
+                              int64_t offset,
                               int64_t length) = 0;
 
   virtual void SendAddToArchiveDone(int compressor_id) = 0;
diff --git a/ui/file_manager/zip_archiver/cpp/module.cc b/ui/file_manager/zip_archiver/cpp/module.cc
index 24ae6c0..1dfd6a4 100644
--- a/ui/file_manager/zip_archiver/cpp/module.cc
+++ b/ui/file_manager/zip_archiver/cpp/module.cc
@@ -110,10 +110,11 @@
   }
 
   virtual void SendWriteChunk(int compressor_id,
-      const pp::VarArrayBuffer& array_buffer,
-      int64_t length) {
+                              const pp::VarArrayBuffer& array_buffer,
+                              int64_t offset,
+                              int64_t length) {
     JavaScriptPostMessage(request::CreateWriteChunkRequest(
-        compressor_id, array_buffer, length));
+        compressor_id, array_buffer, offset, length));
   }
 
   virtual void SendAddToArchiveDone(int compressor_id) {
diff --git a/ui/file_manager/zip_archiver/cpp/request.cc b/ui/file_manager/zip_archiver/cpp/request.cc
index db8528bc..8f75d72 100644
--- a/ui/file_manager/zip_archiver/cpp/request.cc
+++ b/ui/file_manager/zip_archiver/cpp/request.cc
@@ -115,12 +115,17 @@
 pp::VarDictionary request::CreateWriteChunkRequest(
     int compressor_id,
     const pp::VarArrayBuffer& array_buffer,
+    int64_t offset,
     int64_t length) {
   pp::VarDictionary request;
   request.Set(request::key::kOperation, WRITE_CHUNK);
   request.Set(request::key::kCompressorId, compressor_id);
 
   request.Set(request::key::kChunkBuffer, array_buffer);
+
+  std::stringstream ss_offset;
+  ss_offset << offset;
+  request.Set(request::key::kOffset, ss_offset.str());
   std::stringstream ss_length;
   ss_length << length;
   request.Set(request::key::kLength, ss_length.str());
diff --git a/ui/file_manager/zip_archiver/cpp/request.h b/ui/file_manager/zip_archiver/cpp/request.h
index 197866c8..ef06a15 100644
--- a/ui/file_manager/zip_archiver/cpp/request.h
+++ b/ui/file_manager/zip_archiver/cpp/request.h
@@ -140,6 +140,7 @@
 
 pp::VarDictionary CreateWriteChunkRequest(int compressor_id,
                                           const pp::VarArrayBuffer& array_buffer,
+                                          int64_t offset,
                                           int64_t length);
 
 pp::VarDictionary CreateAddToArchiveDoneResponse(int compressor_id);
diff --git a/ui/file_manager/zip_archiver/cpp/volume.cc b/ui/file_manager/zip_archiver/cpp/volume.cc
index 588698f..97d63803 100644
--- a/ui/file_manager/zip_archiver/cpp/volume.cc
+++ b/ui/file_manager/zip_archiver/cpp/volume.cc
@@ -182,7 +182,7 @@
 Volume::Volume(const pp::InstanceHandle& instance_handle,
                const std::string& file_system_id,
                JavaScriptMessageSenderInterface* message_sender)
-    : volume_archive_(NULL),
+    : volume_archive_(nullptr),
       file_system_id_(file_system_id),
       message_sender_(message_sender),
       worker_(instance_handle),
@@ -198,7 +198,7 @@
                JavaScriptMessageSenderInterface* message_sender,
                VolumeArchiveFactoryInterface* volume_archive_factory,
                VolumeReaderFactoryInterface* volume_reader_factory)
-    : volume_archive_(NULL),
+    : volume_archive_(nullptr),
       file_system_id_(file_system_id),
       message_sender_(message_sender),
       worker_(instance_handle),
@@ -323,43 +323,62 @@
         file_system_id_, request_id, volume_archive_->error_message());
     ClearJob();
     delete volume_archive_;
-    volume_archive_ = NULL;
+    volume_archive_ = nullptr;
     return;
   }
 
   // Read and construct metadata.
   pp::VarDictionary root_metadata = CreateEntry(-1, "" /* name */, true, 0, 0);
 
-  const char* path_name = NULL;
+  std::string path_name;
   int64_t size = 0;
   bool is_directory = false;
   time_t modification_time = 0;
   int64_t index = 0;
 
   for (;;) {
-    VolumeArchive::Result ret = volume_archive_->GetNextHeader(
-        &path_name, &size, &is_directory, &modification_time);
-    if (ret == VolumeArchive::RESULT_FAIL) {
-      message_sender_->SendFileSystemError(
-          file_system_id_, request_id, volume_archive_->error_message());
+    path_name.clear();
+    if (volume_archive_->GetCurrentFileInfo(
+        &path_name,
+        &size,
+        &is_directory,
+        &modification_time) == VolumeArchive::RESULT_FAIL) {
+      message_sender_->SendFileSystemError(file_system_id_, request_id,
+                                           volume_archive_->error_message());
       ClearJob();
       delete volume_archive_;
-      volume_archive_ = NULL;
+      volume_archive_ = nullptr;
       return;
-    } else if (ret == VolumeArchive::RESULT_EOF)
+    }
+
+    if (path_name.empty())  // End of archive.
       break;
 
-    ConstructMetadata(index, path_name, size, is_directory, modification_time,
-        &root_metadata);
+    ConstructMetadata(index, path_name.c_str(), size, is_directory,
+                      modification_time, &root_metadata);
+
+    index_to_pathname_[index] = path_name;
 
     ++index;
+
+    int return_value = volume_archive_->GoToNextFile();
+    if (return_value == VolumeArchive::RESULT_FAIL) {
+      message_sender_->SendFileSystemError(file_system_id_, request_id,
+                                           volume_archive_->error_message());
+      ClearJob();
+      delete volume_archive_;
+      volume_archive_ = nullptr;
+      return;
+    }
+    if (return_value == VolumeArchive::RESULT_EOF)
+      break;
   }
 
   ClearJob();
 
   // Send metadata back to JavaScript.
-  message_sender_->SendReadMetadataDone(
-      file_system_id_, request_id, root_metadata);
+  message_sender_->SendReadMetadataDone(file_system_id_, request_id,
+                                        root_metadata);
 }
 
 void Volume::OpenFileCallback(int32_t /*result*/,
@@ -379,21 +398,31 @@
     job_lock_.Release();
     return;
   }
-  static_cast<VolumeReaderJavaScriptStream*>(volume_archive_->reader())->
-      SetRequestId(args.request_id);
+
+  static_cast<VolumeReaderJavaScriptStream*>(volume_archive_->reader())
+      ->SetRequestId(args.request_id);
   reader_request_id_ = args.request_id;
   job_lock_.Release();
 
-  if (!volume_archive_->SeekHeader(args.index)) {
-    message_sender_->SendFileSystemError(
-        file_system_id_, args.request_id, volume_archive_->error_message());
+  std::string path_name = index_to_pathname_[args.index];
+  int64_t size = 0;
+  bool is_directory = false;
+  time_t modification_time = 0;
+
+  if (!volume_archive_->SeekHeader(path_name)) {
+    message_sender_->SendFileSystemError(file_system_id_, args.request_id,
+                                         volume_archive_->error_message());
     ClearJob();
     return;
   }
 
-  if (volume_archive_->GetNextHeader() == VolumeArchive::RESULT_FAIL) {
-    message_sender_->SendFileSystemError(
-        file_system_id_, args.request_id, volume_archive_->error_message());
+  if (volume_archive_->GetCurrentFileInfo(
+      &path_name,
+      &size,
+      &is_directory,
+      &modification_time) != VolumeArchive::RESULT_SUCCESS) {
+    message_sender_->SendFileSystemError(file_system_id_, args.request_id,
+                                         volume_archive_->error_message());
     ClearJob();
     return;
   }
@@ -444,7 +473,7 @@
   // depending on how many bytes VolumeArchive::ReadData returns.
   int64_t left_length = length;
   while (left_length > 0) {
-    const char* destination_buffer = NULL;
+    const char* destination_buffer = nullptr;
     int64_t read_bytes = volume_archive_->ReadData(
         offset, left_length, &destination_buffer);
 
diff --git a/ui/file_manager/zip_archiver/cpp/volume.h b/ui/file_manager/zip_archiver/cpp/volume.h
index dc8efb43..4d05ca0 100644
--- a/ui/file_manager/zip_archiver/cpp/volume.h
+++ b/ui/file_manager/zip_archiver/cpp/volume.h
@@ -7,7 +7,6 @@
 
 #include <pthread.h>
 
-#include "archive.h"
 #include "ppapi/cpp/instance_handle.h"
 #include "ppapi/cpp/var_array_buffer.h"
 #include "ppapi/cpp/var_dictionary.h"
@@ -33,7 +32,7 @@
  public:
   virtual ~VolumeReaderFactoryInterface() {}
 
-  // Creates a new VolumeReader. Returns NULL if failed.
+  // Creates a new VolumeReader. Returns nullptr if failed.
   // Passes VolumeReader ownership to the implementation of
   // VolumeArchiveInterfaceInterface.
   virtual VolumeReader* Create(int64_t archive_size) = 0;
@@ -184,6 +183,9 @@
 
   // A factory for creating VolumeReader.
   VolumeReaderFactoryInterface* volume_reader_factory_;
+
+  // A map that converts index of file in the volume to pathname.
+  std::map<int, std::string> index_to_pathname_;
 };
 
 #endif  /// VOLUME_H_
diff --git a/ui/file_manager/zip_archiver/cpp/volume_archive.h b/ui/file_manager/zip_archiver/cpp/volume_archive.h
index cd7aac9..52067fe 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_archive.h
+++ b/ui/file_manager/zip_archiver/cpp/volume_archive.h
@@ -31,16 +31,20 @@
   // archive file.
   virtual bool Init(const std::string& encoding) = 0;
 
-  // Gets the next header.  In case of failure the error message can be
-  // obtained with VolumeArchive::error_message().
-  virtual Result GetNextHeader() = 0;
-  virtual Result GetNextHeader(const char** path_name,
-                               int64_t* size,
-                               bool* is_directory,
-                               time_t* modification_time) = 0;
+  // Gets the next header. If path_name is set to nullptr, then there are no more
+  // available headers. Returns true if reading next header was successful.
+  // In case of failure the error message can be obtained with
+  // VolumeArchive::error_message().
+  virtual VolumeArchive::Result GetCurrentFileInfo(
+      std::string* path_name,
+      int64_t* size,
+      bool* is_directory,
+      time_t* modification_time) = 0;
 
-  // Seeks to the |index|-th header.
-  virtual bool SeekHeader(int64_t index) = 0;
+  virtual VolumeArchive::Result GoToNextFile() = 0;
+
+  // Seeks to the header whose pathname is path_name.
+  virtual bool SeekHeader(const std::string& path_name) = 0;
 
   // Gets data from offset to offset + length for the file reached with
   // VolumeArchive::GetNextHeader. The data is stored in an internal buffer
@@ -86,7 +90,7 @@
   // cannot be reinitialized.
   void CleanupReader() {
     delete reader_;
-    reader_ = NULL;
+    reader_ = nullptr;
   }
 
   void set_error_message(const std::string& error_message) {
diff --git a/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.cc b/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.cc
index 72f71d6..96a4811 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.cc
+++ b/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.cc
@@ -6,145 +6,228 @@
 
 #include <algorithm>
 #include <cerrno>
+#include <cstring>
 #include <limits>
+#include <time.h>
 
-#include "archive_entry.h"
+#include "base/strings/string_util.h"
+#include "base/time/time.h"
 #include "ppapi/cpp/logging.h"
 
-namespace {
-
-const int64_t kArchiveReadDataError = -1;  // Negative value means error.
-
-std::string ArchiveError(const std::string& message, archive* archive_object) {
-  return message + archive_error_string(archive_object);
+namespace volume_archive_functions {
+void* CustomArchiveOpen(void* archive,
+                        const char* /* filename */,
+                        int /* mode */) {
+  return archive;
 }
 
-// Sets the libarchive internal error to a VolumeReader related error.
-// archive_error_string function must work on valid strings, but in case of
-// errors in the custom functions, libarchive API assumes the error is set by
-// us. If we don't set it, we will get a Segmentation Fault because
-// archive_error_string will work on invalid memory.
-void SetLibarchiveErrorToVolumeReaderError(archive* archive_object) {
-  archive_set_error(archive_object,
-                    EIO /* I/O error. */,
-                    "%s" /* Format string similar to printf. */,
-                    volume_archive_constants::kVolumeReaderError);
+int64_t DynamicCache(VolumeArchiveLibarchive* archive, int64_t unzip_size) {
+  int64_t offset = archive->reader()->offset();
+  if (archive->reader()->Seek(static_cast<int64_t>(offset),
+                              ZLIB_FILEFUNC_SEEK_SET) < 0) {
+    return -1 /* Error */;
+  }
+
+  int64_t bytes_to_read =
+      std::min(volume_archive_constants::kMaximumDataChunkSize,
+               archive->reader()->archive_size() - offset);
+  PP_DCHECK(bytes_to_read > 0);
+  int64_t left_length = bytes_to_read;
+  char* buffer_pointer = archive->dynamic_cache_;
+  const void* destination_buffer;
+
+  do {
+    int64_t read_bytes = archive->reader()->Read(left_length,
+                                                 &destination_buffer);
+    // End of the zip file.
+    if (read_bytes == 0)
+      break;
+    if (read_bytes < 0)
+      return -1 /* Error */;
+    memcpy(buffer_pointer, destination_buffer, read_bytes);
+    left_length -= read_bytes;
+    buffer_pointer += read_bytes;
+  } while (left_length > 0);
+
+  if (archive->reader()->Seek(static_cast<int64_t>(offset),
+                         ZLIB_FILEFUNC_SEEK_SET) < 0) {
+    return -1 /* Error */;
+  }
+  archive->dynamic_cache_size_ = bytes_to_read - left_length;
+  archive->dynamic_cache_offset_ = offset;
+
+  return unzip_size - left_length;
 }
 
-ssize_t CustomArchiveRead(archive* archive_object,
-                          void* client_data,
-                          const void** buffer) {
-  VolumeArchiveLibarchive* volume_archive =
-      static_cast<VolumeArchiveLibarchive*>(client_data);
+uLong CustomArchiveRead(void* archive,
+                        void* /* stream */,
+                        void* buffer,
+                        uLong size) {
+  VolumeArchiveLibarchive* archive_minizip =
+      static_cast<VolumeArchiveLibarchive*>(archive);
+  int64_t offset = archive_minizip->reader()->offset();
 
-  int64_t read_bytes = volume_archive->reader()->Read(
-      volume_archive->reader_data_size(), buffer);
-  if (read_bytes == ARCHIVE_FATAL)
-    SetLibarchiveErrorToVolumeReaderError(archive_object);
-  return read_bytes;
+  // When minizip requests a chunk in static_cache_.
+  if (offset >= archive_minizip->static_cache_offset_) {
+    // Relative offset in the central directory.
+    int64_t offset_in_cache = offset - archive_minizip->static_cache_offset_;
+    memcpy(buffer, archive_minizip->static_cache_ + offset_in_cache, size);
+    if (archive_minizip->reader()->Seek(static_cast<int64_t>(size),
+                                        ZLIB_FILEFUNC_SEEK_CUR) < 0) {
+      return -1 /* Error */;
+    }
+    return size;
+  }
+
+  char* unzip_buffer_pointer = static_cast<char*>(buffer);
+  int64_t left_length = static_cast<int64_t>(size);
+
+  do {
+    offset = archive_minizip->reader()->offset();
+    // If dynamic_cache_ is empty or it cannot be reused, update the cache so
+    // that it contains the chunk required by minizip.
+    if (archive_minizip->dynamic_cache_size_ == 0 ||
+        offset < archive_minizip->dynamic_cache_offset_ ||
+        archive_minizip->dynamic_cache_offset_ +
+        archive_minizip->dynamic_cache_size_ <
+        offset + size) {
+      volume_archive_functions::DynamicCache(archive_minizip, size);
+    }
+
+    // Just copy the required data from the cache.
+    int64_t offset_in_cache = offset - archive_minizip->dynamic_cache_offset_;
+    int64_t copy_length =
+        std::min(left_length,
+                 archive_minizip->dynamic_cache_size_ - offset_in_cache);
+    memcpy(unzip_buffer_pointer,
+           archive_minizip->dynamic_cache_ + offset_in_cache,
+           copy_length);
+    unzip_buffer_pointer += copy_length;
+    left_length -= copy_length;
+    if (archive_minizip->reader()->Seek(static_cast<int64_t>(copy_length),
+                                        ZLIB_FILEFUNC_SEEK_CUR) < 0) {
+      return -1 /* Error */;
+    }
+  } while (left_length > 0);
+
+  return size;
 }
 
-int64_t CustomArchiveSkip(archive* archive_object,
-                          void* client_data,
-                          int64_t request) {
-  VolumeArchiveLibarchive* volume_archive =
-      static_cast<VolumeArchiveLibarchive*>(client_data);
-  // VolumeReader::Skip returns 0 in case of failure and CustomArchiveRead is
-  // used instead, so there is no need to check for VolumeReader error.
-  return volume_archive->reader()->Skip(request);
+uLong CustomArchiveWrite(void* /*archive*/,
+                         void* /*stream*/,
+                         const void* /*buffer*/,
+                         uLong /*length*/) {
+  return 0 /* Success */;
 }
 
-int64_t CustomArchiveSeek(archive* archive_object,
-                          void* client_data,
-                          int64_t offset,
-                          int whence) {
-  VolumeArchiveLibarchive* volume_archive =
-      static_cast<VolumeArchiveLibarchive*>(client_data);
-
-  int64_t new_offset = volume_archive->reader()->Seek(offset, whence);
-  if (new_offset == ARCHIVE_FATAL)
-    SetLibarchiveErrorToVolumeReaderError(archive_object);
-
-  return new_offset;
+long CustomArchiveTell(void* archive, void* /*stream*/) {
+  VolumeArchiveLibarchive* archive_minizip =
+      static_cast<VolumeArchiveLibarchive*>(archive);
+  return static_cast<long>(archive_minizip->reader()->offset());
 }
 
-int CustomArchiveClose(archive* archive_object, void* client_data) {
-  return ARCHIVE_OK;
+long CustomArchiveSeek(void* archive,
+                       void* /*stream*/,
+                       uLong offset,
+                       int origin) {
+  VolumeArchiveLibarchive* archive_minizip =
+      static_cast<VolumeArchiveLibarchive*>(archive);
+
+  long return_value = static_cast<long>(archive_minizip->reader()->Seek(
+      static_cast<int64_t>(offset), static_cast<int64_t>(origin)));
+  if (return_value >= 0)
+    return 0 /* Success */;
+  return -1 /* Error */;
 }
 
-const char* CustomArchivePassphrase(
-    archive* archive_object, void* client_data) {
-  VolumeArchiveLibarchive* volume_archive =
-      static_cast<VolumeArchiveLibarchive*>(client_data);
-
-  return volume_archive->reader()->Passphrase();
+int CustomArchiveClose(void* /*opaque*/, void* /*stream*/) {
+  return 0;
 }
 
-}  // namespace
+int CustomArchiveError(void* /*opaque*/, void* /*stream*/) {
+  return 0;
+}
+
+const char* GetPassphrase(VolumeArchiveLibarchive* archive_minizip) {
+  const char* password = archive_minizip->reader()->Passphrase();
+  return password;
+}
+
+}  // volume_archive_functions
 
 VolumeArchiveLibarchive::VolumeArchiveLibarchive(VolumeReader* reader)
     : VolumeArchive(reader),
       reader_data_size_(volume_archive_constants::kMinimumDataChunkSize),
-      archive_(NULL),
-      current_archive_entry_(NULL),
+      zip_file_(nullptr),
+      dynamic_cache_offset_(0),
+      dynamic_cache_size_(0),
+      static_cache_offset_(0),
+      static_cache_size_(0),
       last_read_data_offset_(0),
       last_read_data_length_(0),
-      decompressed_data_(NULL),
+      decompressed_data_(nullptr),
       decompressed_data_size_(0),
-      decompressed_error_(false) {
-}
+      decompressed_error_(false) {}
 
 VolumeArchiveLibarchive::~VolumeArchiveLibarchive() {
   Cleanup();
 }
 
 bool VolumeArchiveLibarchive::Init(const std::string& encoding) {
-  archive_ = archive_read_new();
-  if (!archive_) {
-    set_error_message(volume_archive_constants::kArchiveReadNewError);
-    return false;
+  // Set up minizip object.
+  zlib_filefunc_def zip_funcs;
+  zip_funcs.zopen_file = volume_archive_functions::CustomArchiveOpen;
+  zip_funcs.zread_file = volume_archive_functions::CustomArchiveRead;
+  zip_funcs.zwrite_file = volume_archive_functions::CustomArchiveWrite;
+  zip_funcs.ztell_file = volume_archive_functions::CustomArchiveTell;
+  zip_funcs.zseek_file = volume_archive_functions::CustomArchiveSeek;
+  zip_funcs.zclose_file = volume_archive_functions::CustomArchiveClose;
+  zip_funcs.zerror_file = volume_archive_functions::CustomArchiveError;
+  zip_funcs.opaque = static_cast<void*>(this);
+
+  // Load maximum static_cache_size_ bytes from the end of the archive to
+  // static_cache_.
+  static_cache_size_ =
+      std::min(volume_archive_constants::kStaticCacheSize,
+               reader()->archive_size());
+  int64_t previous_offset = reader()->offset();
+  char* buffer_pointer = static_cache_;
+  int64_t left_length = static_cache_size_;
+  static_cache_offset_ =
+      std::max(reader()->archive_size() - static_cache_size_, 0LL);
+  if (reader()->Seek(static_cache_offset_, ZLIB_FILEFUNC_SEEK_SET) < 0) {
+    set_error_message(volume_archive_constants::kArchiveOpenError);
+    return false /* Error */;
+  }
+  do {
+    const void* destination_buffer;
+    int64_t read_bytes = reader()->Read(left_length, &destination_buffer);
+    memcpy(buffer_pointer, destination_buffer, read_bytes);
+    left_length -= read_bytes;
+    buffer_pointer += read_bytes;
+  } while (left_length > 0);
+
+  // Set the offset to the original position.
+  if (reader()->Seek(previous_offset, ZLIB_FILEFUNC_SEEK_SET) < 0) {
+    set_error_message(volume_archive_constants::kArchiveOpenError);
+    return false /* Error */;
   }
 
-  // TODO(cmihail): Once the bug mentioned at
-  // https://github.com/libarchive/libarchive/issues/373 is resolved
-  // add RAR file handler to manifest.json.
-  if (archive_read_support_format_rar(archive_) != ARCHIVE_OK ||
-      archive_read_support_format_zip_seekable(archive_) != ARCHIVE_OK) {
-    set_error_message(ArchiveError(
-        volume_archive_constants::kArchiveSupportErrorPrefix, archive_));
-    return false;
-  }
-
-  // Default encoding for file names in headers. Note, that another one may be
-  // used if specified in the archive.
-  std::string options = std::string("hdrcharset=") + encoding;
-  if (!encoding.empty() &&
-      archive_read_set_options(archive_, options.c_str()) != ARCHIVE_OK) {
-    set_error_message(ArchiveError(
-        volume_archive_constants::kArchiveSupportErrorPrefix, archive_));
-    return false;
-  }
-
-  // Set callbacks for processing the archive's data and open the archive.
-  // The callback data is the VolumeArchive itself.
-  int ok = ARCHIVE_OK;
-  if (archive_read_set_read_callback(archive_, CustomArchiveRead) != ok ||
-      archive_read_set_skip_callback(archive_, CustomArchiveSkip) != ok ||
-      archive_read_set_seek_callback(archive_, CustomArchiveSeek) != ok ||
-      archive_read_set_close_callback(archive_, CustomArchiveClose) != ok ||
-      archive_read_set_passphrase_callback(
-          archive_, this, CustomArchivePassphrase) != ok ||
-      archive_read_set_callback_data(archive_, this) != ok ||
-      archive_read_open1(archive_) != ok) {
-    set_error_message(ArchiveError(
-        volume_archive_constants::kArchiveOpenErrorPrefix, archive_));
+  zip_file_ = unzOpen2(nullptr /* filename */, &zip_funcs);
+  if (!zip_file_) {
+    set_error_message(volume_archive_constants::kArchiveOpenError);
     return false;
   }
 
   return true;
 }
 
-VolumeArchive::Result VolumeArchiveLibarchive::GetNextHeader() {
+VolumeArchive::Result VolumeArchiveLibarchive::GetCurrentFileInfo(
+    std::string* pathname,
+    int64_t* size,
+    bool* is_directory,
+    time_t* modification_time) {
+
   // Headers are being read from the central directory (in the ZIP format), so
   // use a large block size to save on IPC calls. The headers in EOCD are
   // grouped one by one.
@@ -154,45 +237,115 @@
   last_read_data_offset_ = 0;
   decompressed_data_size_ = 0;
 
-  // Archive data is skipped automatically by next call to
-  // archive_read_next_header.
-  switch (archive_read_next_header(archive_, &current_archive_entry_)) {
-    case ARCHIVE_EOF:
-      return RESULT_EOF;
-    case ARCHIVE_OK:
-      return RESULT_SUCCESS;
-    default:
-      set_error_message(ArchiveError(
-          volume_archive_constants::kArchiveNextHeaderErrorPrefix, archive_));
-      return RESULT_FAIL;
-  }
-}
-
-VolumeArchive::Result VolumeArchiveLibarchive::GetNextHeader(
-    const char** pathname,
-    int64_t* size,
-    bool* is_directory,
-    time_t* modification_time) {
-  Result ret = GetNextHeader();
-
-  if (ret == RESULT_SUCCESS) {
-    *pathname = archive_entry_pathname(current_archive_entry_);
-    *size = archive_entry_size(current_archive_entry_);
-    *modification_time = archive_entry_mtime(current_archive_entry_);
-    *is_directory = archive_entry_filetype(current_archive_entry_) == AE_IFDIR;
+  unz_file_pos position = {};
+  if (unzGetFilePos(zip_file_, &position) != UNZ_OK) {
+    set_error_message(volume_archive_constants::kArchiveNextHeaderError);
+    return VolumeArchive::RESULT_FAIL;
   }
 
-  return ret;
+  // Get the information of the opened file.
+  unz_file_info raw_file_info = {};
+  char raw_file_name_in_zip[volume_archive_constants::kZipMaxPath] = {};
+  const int result = unzGetCurrentFileInfo(zip_file_,
+                                           &raw_file_info,
+                                           raw_file_name_in_zip,
+                                           sizeof(raw_file_name_in_zip) - 1,
+                                           nullptr,  // extraField.
+                                           0,     // extraFieldBufferSize.
+                                           nullptr,  // szComment.
+                                           0);    // commentBufferSize.
+
+  if (result != UNZ_OK || raw_file_name_in_zip[0] == '\0') {
+    set_error_message(volume_archive_constants::kArchiveNextHeaderError);
+    return VolumeArchive::RESULT_FAIL;
+  }
+
+  *pathname = std::string(raw_file_name_in_zip);
+  *size = raw_file_info.uncompressed_size;
+  // Directory entries in zip files end with "/".
+  *is_directory = base::EndsWith(raw_file_name_in_zip, "/",
+                                 base::CompareCase::INSENSITIVE_ASCII);
+
+  // Construct the last modified time. The timezone info is not present in
+  // zip files. By default, the time is set as local time in zip format.
+  base::Time::Exploded exploded_time = {};  // Zero-clear.
+  exploded_time.year = raw_file_info.tmu_date.tm_year;
+  // The month in zip file is 0-based, whereas ours is 1-based.
+  exploded_time.month = raw_file_info.tmu_date.tm_mon + 1;
+  exploded_time.day_of_month = raw_file_info.tmu_date.tm_mday;
+  exploded_time.hour = raw_file_info.tmu_date.tm_hour;
+  exploded_time.minute = raw_file_info.tmu_date.tm_min;
+  exploded_time.second = raw_file_info.tmu_date.tm_sec;
+  exploded_time.millisecond = 0;
+
+  base::Time local_time;
+  // If the modification time is not available, we set the value to the current
+  // local time.
+  if (!base::Time::FromLocalExploded(exploded_time, &local_time))
+    local_time = base::Time::UnixEpoch();
+  *modification_time = local_time.ToTimeT();
+
+  return VolumeArchive::RESULT_SUCCESS;
 }
 
-bool VolumeArchiveLibarchive::SeekHeader(int64_t index) {
+VolumeArchive::Result VolumeArchiveLibarchive::GoToNextFile() {
+  int return_value = unzGoToNextFile(zip_file_);
+  if (return_value == UNZ_END_OF_LIST_OF_FILE) {
+    return VolumeArchive::RESULT_EOF;
+  }
+  if (return_value == UNZ_OK)
+    return VolumeArchive::RESULT_SUCCESS;
+
+  set_error_message(volume_archive_constants::kArchiveNextHeaderError);
+  return VolumeArchive::RESULT_FAIL;
+}
+
+bool VolumeArchiveLibarchive::SeekHeader(const std::string& path_name) {
   // Reset to 0 for new VolumeArchive::ReadData operation.
   last_read_data_offset_ = 0;
   decompressed_data_size_ = 0;
 
-  if (archive_read_seek_header(archive_, index) != ARCHIVE_OK) {
-    set_error_message(ArchiveError(
-        volume_archive_constants::kArchiveNextHeaderErrorPrefix, archive_));
+  const int kDefaultCaseSensivityOfOS = 0;
+  if (unzLocateFile(zip_file_, path_name.c_str(), kDefaultCaseSensivityOfOS) !=
+      UNZ_OK) {
+    set_error_message(volume_archive_constants::kArchiveNextHeaderError);
+    return false;
+  }
+
+  unz_file_info raw_file_info = {};
+  char raw_file_name_in_zip[volume_archive_constants::kZipMaxPath] = {};
+  if (unzGetCurrentFileInfo(zip_file_,
+                            &raw_file_info,
+                            raw_file_name_in_zip,
+                            sizeof(raw_file_name_in_zip) - 1,
+                            nullptr,  // extraField.
+                            0,     // extraFieldBufferSize.
+                            nullptr,  // szComment.
+                            0) != UNZ_OK) {
+    set_error_message(volume_archive_constants::kArchiveNextHeaderError);
+    return false;
+  }
+
+  // Directory entries in zip files end with "/".
+  bool is_directory = base::EndsWith(raw_file_name_in_zip, "/",
+                                     base::CompareCase::INSENSITIVE_ASCII);
+
+  int open_result = UNZ_OK;
+  // If the archive is encrypted, the lowest bit of raw_file_info.flag is set.
+  // Directories cannot be encrypted with the basic zip encrytion algorithm.
+  if (((raw_file_info.flag & 1) != 0) && !is_directory) {
+    // Currently minizip in third_party doesn't support decryption, so we just
+    // take encrypted zip files as unsupported.
+    set_error_message(volume_archive_constants::kArchiveNextHeaderError);
+    return false;
+    // const char* password = volume_archive_functions::GetPassphrase(this);
+    // open_result = unzOpenCurrentFilePassword(zip_file_, password);
+  } else {
+    open_result = unzOpenCurrentFile(zip_file_);
+  }
+
+  if (open_result != UNZ_OK) {
+    set_error_message(volume_archive_constants::kArchiveNextHeaderError);
     return false;
   }
 
@@ -208,8 +361,7 @@
   // Requests with offset smaller than last read offset are not supported.
   if (offset < last_read_data_offset_) {
     set_error_message(
-        std::string(volume_archive_constants::kArchiveReadDataErrorPrefix) +
-        "Reading backwards is not supported.");
+        std::string(volume_archive_constants::kArchiveReadDataError));
     decompressed_error_ = true;
     return;
   }
@@ -233,16 +385,14 @@
     // archive_read_data receives size_t as length parameter, but we limit it to
     // volume_archive_constants::kDummyBufferSize which is positive and less
     // than size_t maximum. So conversion from int64_t to size_t is safe here.
-    size =
-        archive_read_data(archive_,
-                          dummy_buffer_,
-                          std::min(offset - last_read_data_offset_,
-                                   volume_archive_constants::kDummyBufferSize));
+    size = unzReadCurrentFile(
+        zip_file_, dummy_buffer_,
+        std::min(offset - last_read_data_offset_,
+                 volume_archive_constants::kDummyBufferSize));
     PP_DCHECK(size != 0);  // The actual read is done below. We shouldn't get to
                            // end of file here.
     if (size < 0) {        // Error.
-      set_error_message(ArchiveError(
-          volume_archive_constants::kArchiveReadDataErrorPrefix, archive_));
+      set_error_message(volume_archive_constants::kArchiveReadDataError);
       decompressed_error_ = true;
       return;
     }
@@ -270,11 +420,11 @@
     // volume_archive_constants::kMinimumDataChunkSize (see left_length
     // initialization), which is positive and less than size_t maximum.
     // So conversion from int64_t to size_t is safe here.
-    size = archive_read_data(
-        archive_, decompressed_data_buffer_ + bytes_read, left_length);
+    size = unzReadCurrentFile(zip_file_,
+                              decompressed_data_buffer_ + bytes_read,
+                              left_length);
     if (size < 0) {  // Error.
-      set_error_message(ArchiveError(
-          volume_archive_constants::kArchiveReadDataErrorPrefix, archive_));
+      set_error_message(volume_archive_constants::kArchiveReadDataError);
       decompressed_error_ = true;
       return;
     }
@@ -292,13 +442,13 @@
 
 bool VolumeArchiveLibarchive::Cleanup() {
   bool returnValue = true;
-  if (archive_ && archive_read_free(archive_) != ARCHIVE_OK) {
-    set_error_message(ArchiveError(
-        volume_archive_constants::kArchiveReadFreeErrorPrefix, archive_));
-    returnValue = false;  // Cleanup should release all resources even
-                          // in case of failures.
+  if (zip_file_) {
+    if (unzClose(zip_file_) != UNZ_OK) {
+      set_error_message(volume_archive_constants::kArchiveReadFreeError);
+      returnValue = false;
+    }
   }
-  archive_ = NULL;
+  zip_file_ = nullptr;
 
   CleanupReader();
 
@@ -312,12 +462,6 @@
   PP_DCHECK(current_archive_entry_);  // Check that GetNextHeader was called at
                                       // least once. In case it wasn't, this is
                                       // a programmer error.
-
-  // End of archive.
-  if (archive_entry_size_is_set(current_archive_entry_) &&
-      archive_entry_size(current_archive_entry_) <= offset)
-    return 0;
-
   // In case of first read or no more available data in the internal buffer or
   // offset is different from the last_read_data_offset_, then force
   // VolumeArchiveLibarchive::DecompressData as the decompressed data is
@@ -327,8 +471,10 @@
     DecompressData(offset, length);
 
   // Decompressed failed.
-  if (decompressed_error_)
-    return kArchiveReadDataError;
+  if (decompressed_error_) {
+    set_error_message(volume_archive_constants::kArchiveReadDataError);
+    return -1 /* Error */;
+  }
 
   last_read_data_length_ = length;  // Used for decompress ahead.
 
diff --git a/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.h b/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.h
index fde019a..368a4a97 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.h
+++ b/ui/file_manager/zip_archiver/cpp/volume_archive_libarchive.h
@@ -7,7 +7,8 @@
 
 #include <string>
 
-#include "archive.h"
+#include "third_party/zlib/contrib/minizip/unzip.h"
+#include "third_party/zlib/contrib/minizip/zip.h"
 
 #include "volume_archive.h"
 
@@ -17,12 +18,11 @@
 const char kArchiveReadNewError[] = "Could not allocate archive.";
 const char kFileNotFound[] = "File not found for read data request.";
 const char kVolumeReaderError[] = "VolumeReader failed to retrieve data.";
-const char kArchiveSupportErrorPrefix[] = "Error at support rar/zip format: ";
-const char kArchiveOpenErrorPrefix[] = "Error at open archive: ";
-const char kArchiveNextHeaderErrorPrefix[] =
-    "Error at reading next header for metadata: ";
-const char kArchiveReadDataErrorPrefix[] = "Error at reading data: ";
-const char kArchiveReadFreeErrorPrefix[] = "Error at archive free: ";
+const char kArchiveOpenError[] = "Failed to open archive.";
+const char kArchiveNextHeaderError[] =
+    "Failed to open current file in archive.";
+const char kArchiveReadDataError[] = "Failed to read archive data.";
+const char kArchiveReadFreeError[] = "Failed to close archive.";
 
 // The size of the buffer used to skip unnecessary data.
 // Should be positive and less than size_t maximum.
@@ -40,8 +40,38 @@
 // Should be positive.
 const int64_t kMinimumDataChunkSize = 32 * 1024;  // 16 KB.
 
+// Maximum length of filename in zip archive.
+const int kZipMaxPath = 256;
+
+// The size of the static cache. We need at least 64KB to cache whole
+// 'end of central directory' data.
+const int64_t kStaticCacheSize = 128 * 1024;
+
 }  // namespace volume_archive_constants
 
+class VolumeArchiveLibarchive;
+
+// A namespace with custom functions passed to minizip.
+namespace volume_archive_functions {
+
+  int64_t DynamicCache(VolumeArchiveLibarchive* archive, int64_t unz_size);
+
+  uLong CustomArchiveRead(void* archive, void* stream, void* buf, uLong size);
+
+  // Returns the offset from the beginning of the data.
+  long CustomArchiveTell(void* archive, void* stream);
+
+  // Moves the current offset to the specified position.
+  long CustomArchiveSeek(void* archive,
+                         void* stream,
+                         uLong offset,
+                         int origin);
+
+}  // compressor_archive_functions
+
+
+class VolumeArchiveLibarchive;
+
 // Defines an implementation of VolumeArchive that wraps all libarchive
 // operations.
 class VolumeArchiveLibarchive : public VolumeArchive {
@@ -54,19 +84,18 @@
   virtual bool Init(const std::string& encoding);
 
   // See volume_archive_interface.h.
-  virtual Result GetNextHeader();
-  virtual Result GetNextHeader(const char** path_name,
-                               int64_t* size,
-                               bool* is_directory,
-                               time_t* modification_time);
+  virtual VolumeArchive::Result GetCurrentFileInfo(std::string* path_name,
+                                                   int64_t* size,
+                                                   bool* is_directory,
+                                                   time_t* modification_time);
+
+  virtual VolumeArchive::Result GoToNextFile();
 
   // See volume_archive_interface.h.
-  virtual bool SeekHeader(int64_t index);
+  virtual bool SeekHeader(const std::string& path_name);
 
   // See volume_archive_interface.h.
-  virtual int64_t ReadData(int64_t offset,
-                           int64_t length,
-                           const char** buffer);
+  virtual int64_t ReadData(int64_t offset, int64_t length, const char** buffer);
 
   // See volume_archive_interface.h.
   virtual void MaybeDecompressAhead();
@@ -76,6 +105,20 @@
 
   int64_t reader_data_size() const { return reader_data_size_; }
 
+  // Custom functions need to access private variables of
+  // CompressorArchiveLibarchive frequently.
+  friend int64_t volume_archive_functions::DynamicCache(
+      VolumeArchiveLibarchive* va, int64_t unz_size);
+
+  friend uLong volume_archive_functions::CustomArchiveRead(
+      void* archive, void* stream, void* buf, uLong size);
+
+  friend long volume_archive_functions::CustomArchiveTell(
+      void* archive, void* stream);
+
+  friend long volume_archive_functions::CustomArchiveSeek(
+      void* archive, void* stream, uLong offset, int origin);
+
  private:
   // Decompress length bytes of data starting from offset.
   void DecompressData(int64_t offset, int64_t length);
@@ -83,11 +126,39 @@
   // The size of the requested data from VolumeReader.
   int64_t reader_data_size_;
 
-  // The libarchive correspondent archive object.
-  archive* archive_;
+  // The minizip correspondent archive object.
+  zipFile zip_file_;
 
-  // The last reached entry with VolumeArchiveLibarchive::GetNextHeader.
-  archive_entry* current_archive_entry_;
+  // We use two kinds of cache strategies here: dynamic and static.
+  // Dynamic cache is a common cache strategy used in most of IO streams such as
+  // fread. When a file chunk is requested and if the size of the requested
+  // chunk is small, we load larger size of bytes from the archive and cache
+  // them in dynamic_cache_. If the range of the next requested chunk is within
+  // the cache, we don't read the archive and just return the data in the cache.
+  char dynamic_cache_[volume_archive_constants::kMaximumDataChunkSize];
+
+  // The offset from which dynamic_cache_ has the data of the archive.
+  int64_t dynamic_cache_offset_;
+
+  // The size of the data in dynamic_cache_.
+  int64_t dynamic_cache_size_;
+
+  // Although dynamic cache works in most situations, it doesn't work when
+  // MiniZip is looking for the front index of the central directory. Since
+  // MiniZip reads the data little by little backwards from the end to find the
+  // index, dynamic_cache will be reloaded every time. To avoid this, we first
+  // cache a certain length of data from the end into static_cache_. The data
+  // in this buffer is also used when the data in the central directory is
+  // requested by MiniZip later.
+  char static_cache_[volume_archive_constants::kStaticCacheSize];
+
+  // The offset from which static_cache_ has the data of the archive.
+  int64_t static_cache_offset_;
+
+  // The size of the data in static_cache_. The End Of Central Directory header
+  // is guaranteed to be in the last 64(global comment) + 1(other fields) of the
+  // file. This cache is used to store the header.
+  int64_t static_cache_size_;
 
   // The data offset, which will be offset + length after last read
   // operation, where offset and length are method parameters for
diff --git a/ui/file_manager/zip_archiver/cpp/volume_reader.h b/ui/file_manager/zip_archiver/cpp/volume_reader.h
index 269caf1b0..a308400 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_reader.h
+++ b/ui/file_manager/zip_archiver/cpp/volume_reader.h
@@ -7,8 +7,6 @@
 
 #include <string>
 
-#include "archive.h"
-
 // Defines a reader for archive volumes. This class is used by libarchive
 // for custom reads: https://github.com/libarchive/libarchive/wiki/Examples
 class VolumeReader {
@@ -23,25 +21,22 @@
   // The operation must be synchronous (libarchive requirement), so it
   // should NOT be done on the main thread. bytes_to_read should be > 0.
   //
-  // Returns the actual number of read bytes or ARCHIVE_FATAL in case of
-  // failure.
+  // Returns the actual number of read bytes or -1 in case of failure.
   virtual int64_t Read(int64_t bytes_to_read,
                        const void** destination_buffer) = 0;
 
-  // Tries to skip bytes_to_skip number of bytes. Returns the actual number of
-  // skipped bytes or 0 if none were skipped. In case of failure
-  // VolumeReader::Skip returns 0 bytes and VolumeReader::Read can be used
-  // to skip those bytes by discarding them.
-  virtual int64_t Skip(int64_t bytes_to_skip) = 0;
-
   // Tries to seek to offset from whence. Returns the resulting offset location
-  // or ARCHIVE_FATAL in case of errors. Similar to
+  // or -1 in case of errors. Similar to
   // http://www.cplusplus.com/reference/cstdio/fseek/
   virtual int64_t Seek(int64_t offset, int whence) = 0;
 
   // Fetches a passphrase for reading. If the passphrase is not available it
-  // returns NULL.
+  // returns nullptr.
   virtual const char* Passphrase() = 0;
+
+  virtual int64_t offset() = 0;
+
+  virtual int64_t archive_size() = 0;
 };
 
 #endif  // VOLUME_READER_H_
diff --git a/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.cc b/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.cc
index 75a8ef6..23c37259 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.cc
+++ b/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.cc
@@ -7,7 +7,8 @@
 #include <algorithm>
 #include <limits>
 
-#include "archive.h"
+#include "third_party/zlib/contrib/minizip/unzip.h"
+
 #include "ppapi/cpp/logging.h"
 
 VolumeReaderJavaScriptStream::VolumeReaderJavaScriptStream(
@@ -23,9 +24,9 @@
                                      request from JavaScript as offset
                                      parameter is 0. */,
       read_ahead_array_buffer_ptr_(&first_array_buffer_) {
-  pthread_mutex_init(&shared_state_lock_, NULL);
-  pthread_cond_init(&available_data_cond_, NULL);
-  pthread_cond_init(&available_passphrase_cond_, NULL);
+  pthread_mutex_init(&shared_state_lock_, nullptr);
+  pthread_cond_init(&available_data_cond_, nullptr);
+  pthread_cond_init(&available_passphrase_cond_, nullptr);
 
   // Dummy Map the second buffer as first buffer is used for read ahead by
   // read_ahead_array_buffer_ptr_. This operation is required in order for Unmap
@@ -120,7 +121,7 @@
   }
 
   // Call in case of first read or read after Seek and Skip.
-  if (last_read_chunk_offset_ != offset_)
+  if (last_read_chunk_offset_ != offset_ || !available_data_)
     RequestChunk(bytes_to_read);
 
   if (!available_data_) {
@@ -129,7 +130,7 @@
                                 // was done outside guarded zone.
       if (read_error_) {
         pthread_mutex_unlock(&shared_state_lock_);
-        return ARCHIVE_FATAL;
+        return -1;
       }
       pthread_cond_wait(&available_data_cond_, &shared_state_lock_);
     }
@@ -137,7 +138,7 @@
 
   if (read_error_) {  // Read ahead failed.
     pthread_mutex_unlock(&shared_state_lock_);
-    return ARCHIVE_FATAL;
+    return -1;
   }
 
   // Make data available for libarchive custom read. No need to lock this part.
@@ -187,24 +188,24 @@
 
   int64_t new_offset = offset_;
   switch (whence) {
-    case SEEK_SET:
+    case ZLIB_FILEFUNC_SEEK_SET:
       new_offset = offset;
       break;
-    case SEEK_CUR:
+    case ZLIB_FILEFUNC_SEEK_CUR:
       new_offset += offset;
       break;
-    case SEEK_END:
+    case ZLIB_FILEFUNC_SEEK_END:
       new_offset = archive_size_ + offset;
       break;
     default:
       PP_NOTREACHED();
       pthread_mutex_unlock(&shared_state_lock_);
-      return ARCHIVE_FATAL;
+      return -1;
   }
 
-  if (new_offset < 0 || new_offset > archive_size_) {
+  if (new_offset < 0) {
     pthread_mutex_unlock(&shared_state_lock_);
-    return ARCHIVE_FATAL;
+    return -1;
   }
 
   offset_ = new_offset;
@@ -213,24 +214,6 @@
   return new_offset;
 }
 
-int64_t VolumeReaderJavaScriptStream::Skip(int64_t bytes_to_skip) {
-  pthread_mutex_lock(&shared_state_lock_);
-  // Invalid bytes_to_skip. This "if" can be triggered for corrupted archives.
-  // We return 0 instead of ARCHIVE_FATAL in order for libarchive to use normal
-  // Read and return the correct error. In case we return ARCHIVE_FATAL here
-  // then libarchive just stops without telling us why it wasn't able to
-  // process the archive.
-  if (archive_size_ - offset_ < bytes_to_skip || bytes_to_skip < 0) {
-    pthread_mutex_unlock(&shared_state_lock_);
-    return 0;
-  }
-
-  offset_ += bytes_to_skip;
-  pthread_mutex_unlock(&shared_state_lock_);
-
-  return bytes_to_skip;
-}
-
 void VolumeReaderJavaScriptStream::SetRequestId(const std::string& request_id) {
   // No lock necessary, as request_id is used by one thread only.
   request_id_ = request_id;
@@ -243,7 +226,7 @@
   pthread_mutex_lock(&shared_state_lock_);
   if (passphrase_error_) {
     pthread_mutex_unlock(&shared_state_lock_);
-    return NULL;
+    return nullptr;
   }
   pthread_mutex_unlock(&shared_state_lock_);
 
@@ -253,7 +236,7 @@
   pthread_mutex_lock(&shared_state_lock_);
   // Wait for the passphrase from JavaScript.
   pthread_cond_wait(&available_passphrase_cond_, &shared_state_lock_);
-  const char* result = NULL;
+  const char* result = nullptr;
   if (!passphrase_error_)
     result = strdup(available_passphrase_.c_str());
   pthread_mutex_unlock(&shared_state_lock_);
diff --git a/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.h b/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.h
index 54b68953..0b9ff64 100644
--- a/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.h
+++ b/ui/file_manager/zip_archiver/cpp/volume_reader_javascript_stream.h
@@ -7,7 +7,6 @@
 
 #include <pthread.h>
 
-#include "archive.h"
 #include "ppapi/cpp/var_array_buffer.h"
 
 #include "javascript_requestor_interface.h"
@@ -60,9 +59,6 @@
   virtual int64_t Read(int64_t bytes_to_read, const void** destination_buffer);
 
   // See volume_reader.h for description.
-  virtual int64_t Skip(int64_t bytes_to_skip);
-
-  // See volume_reader.h for description.
   virtual int64_t Seek(int64_t offset, int whence);
 
   // Sets the request Id to be used by the reader.
@@ -73,16 +69,18 @@
   // another thread.
   virtual const char* Passphrase();
 
-  int64_t offset() const { return offset_; }
+  virtual int64_t offset() { return offset_; }
+
+  int64_t archive_size() { return archive_size_; }
 
  private:
   // Request a chunk of length number of bytes from JavaScript starting from
   // offset_ member. Should be run within a lock.
   void RequestChunk(int64_t length);
 
-  std::string request_id_;  // The request id for which the reader was
-                                  // created.
-  const int64_t archive_size_;    // The archive size.
+  std::string request_id_;      // The request id for which the reader was
+                                // created.
+  const int64_t archive_size_;  // The archive size.
 
   // A requestor that makes calls to JavaScript to obtain file chunks.
   JavaScriptRequestorInterface* requestor_;
diff --git a/ui/file_manager/zip_archiver/html/passphrase-dialog.html b/ui/file_manager/zip_archiver/html/passphrase-dialog.html
index 9ff5389..0b0a82ca 100644
--- a/ui/file_manager/zip_archiver/html/passphrase-dialog.html
+++ b/ui/file_manager/zip_archiver/html/passphrase-dialog.html
@@ -1,24 +1,31 @@
 <link rel="import" href="../third-party/polymer.html">
 
-<polymer-element name="passphrase-dialog">
+<dom-module id="passphrase-dialog">
   <template>
     <link rel="stylesheet" href="../css/passphrase-dialog.css">
-    <h3>{{ 'passphraseTitle' | i18n }}</h3>
-    <paper-input-decorator label="{{ 'passphraseInputLabel' | i18n }}">
+    <!-- TODO(takise): Translation -->
+    <h3>This file is password protected</h3>
+    <paper-input-decorator>
+      <!-- TODO(takise): Translation -->
+      Password
       <input is="core-input" type="password" id="input" autofocus>
     </paper-input-decorator>
     <div id="bar">
-      <paper-checkbox id="remember"
-          label="{{ 'passphraseRemember' | i18n }}"></paper-checkbox>
+      <paper-checkbox id="remember">
+        <!-- TODO(takise): Translation -->
+          Remember
+      </paper-checkbox>
       <div id="buttons">
-        <paper-button on-click="{{cancel}}" id="cancelButton">
-            {{ 'passphraseCancel' | i18n }}
+        <paper-button on-click="cancel" id="cancelButton">
+          <!-- TODO(takise): Translation -->
+            Cancel
         </paper-button>
-        <paper-button on-click="{{accept}}" id="acceptButton">
-            {{ 'passphraseAccept' | i18n }}
+        <paper-button on-click="accept" id="acceptButton">
+          <!-- TODO(takise): Translation --> 
+            Accept
         </paper-button>
       </div>
     </div>
   </template>
   <script src="../js/passphrase-dialog.js"></script>
-</polymer-element>
+</dom-module>
diff --git a/ui/file_manager/zip_archiver/js/app.js b/ui/file_manager/zip_archiver/js/app.js
index 21182a1..f27cf13b 100644
--- a/ui/file_manager/zip_archiver/js/app.js
+++ b/ui/file_manager/zip_archiver/js/app.js
@@ -30,9 +30,10 @@
   /**
    * The default filename for .nmf file.
    * This value must not be const because it is overwritten in tests.
+   * Since .nmf file is not available in .grd, we use .txt instead.
    * @type {string}
    */
-  DEFAULT_MODULE_NMF: 'module.nmf',
+  DEFAULT_MODULE_NMF: 'module.nmf.txt',
 
   /**
    * The default MIME type for .nmf file.
diff --git a/ui/file_manager/zip_archiver/js/background.js b/ui/file_manager/zip_archiver/js/background.js
index 96d0491..a0fa86eb0 100644
--- a/ui/file_manager/zip_archiver/js/background.js
+++ b/ui/file_manager/zip_archiver/js/background.js
@@ -26,4 +26,4 @@
     unpacker.app.onReadFileRequested);
 
 // Load the PNaCl module.
-unpacker.app.loadNaclModule('module.nmf', 'application/x-pnacl');
+unpacker.app.loadNaclModule('module.nmf.txt', 'application/x-pnacl');
diff --git a/ui/file_manager/zip_archiver/js/compressor.js b/ui/file_manager/zip_archiver/js/compressor.js
index a96fd4db..a48f514d 100644
--- a/ui/file_manager/zip_archiver/js/compressor.js
+++ b/ui/file_manager/zip_archiver/js/compressor.js
@@ -289,15 +289,13 @@
   if (fullPath.length && fullPath[0] == '/')
     fullPath = fullPath.substring(1);
 
-  // Modification time is sent as string in a format: 'mm/dd/yy hh:mm:ss'.
-  var mt = this.metadata_[entryId].modificationTime;
-  var formattedTime = (mt.getMonth() + 1) + '/' + mt.getDate() + '/' +
-                      mt.getFullYear() + ' ' + mt.getHours() + ':' +
-                      mt.getMinutes() + ':' + mt.getSeconds();
+  // Modification time is set to the archive in local time.
+  var utc = this.metadata_[entryId].modificationTime;
+  var modificationTime = utc.getTime() - (utc.getTimezoneOffset() * 60000);
 
   var request = unpacker.request.createAddToArchiveRequest(
       this.compressorId_, entryId, fullPath,
-      this.metadata_[entryId].size, formattedTime,
+      this.metadata_[entryId].size, modificationTime,
       this.entries_[entryId].isDirectory);
   this.naclModule_.postMessage(request);
 }
@@ -395,13 +393,15 @@
  * @private
  */
 unpacker.Compressor.prototype.onWriteChunk_ = function(data) {
+  var offset = Number(data[unpacker.request.Key.OFFSET]);
   var length = Number(data[unpacker.request.Key.LENGTH]);
   var buffer = data[unpacker.request.Key.CHUNK_BUFFER];
-  this.writeChunk_(length, buffer, this.sendWriteChunkDone_.bind(this));
+  this.writeChunk_(offset, length, buffer, this.sendWriteChunkDone_.bind(this));
 }
 
 /**
  * Writes buffer into the archive file (window.archiveFileEntry).
+ * @param {number} offset The offset from which date is written.
  * @param {number} length The number of bytes in the buffer to write.
  * @param {!ArrayBuffer} buffer The buffer to write in the archive.
  * @param {function(number)} callback Callback to execute at the end of the
@@ -410,7 +410,7 @@
  *     a negative value must be assigned to this argument.
  * @private
  */
-unpacker.Compressor.prototype.writeChunk_ = function(length, buffer,
+unpacker.Compressor.prototype.writeChunk_ = function(offset, length, buffer,
     callback) {
   // TODO(takise): Use the same instance of FileWriter over multiple calls of
   // this function instead of creating new ones.
@@ -430,7 +430,7 @@
 
     // Create a new Blob and append it to the archive file.
     var blob = new Blob([buffer], {});
-    fileWriter.seek(fileWriter.length);
+    fileWriter.seek(offset);
     fileWriter.write(blob);
   }, function(event) {
     console.error('Failed to create writer for ' + this.archiveFileEntry_ +
diff --git a/ui/file_manager/zip_archiver/js/passphrase-dialog.js b/ui/file_manager/zip_archiver/js/passphrase-dialog.js
index 74dbcd8..cb229a4e 100644
--- a/ui/file_manager/zip_archiver/js/passphrase-dialog.js
+++ b/ui/file_manager/zip_archiver/js/passphrase-dialog.js
@@ -8,6 +8,7 @@
  */
 
 Polymer({
+  is: "passphrase-dialog",
   i18n: function(name) {
     // For tests, chrome.i18n API is not available.
     return chrome.i18n ? chrome.i18n.getMessage(name) : name;
diff --git a/ui/file_manager/zip_archiver/js/request.js b/ui/file_manager/zip_archiver/js/request.js
index b0dcb00..8718cfe 100644
--- a/ui/file_manager/zip_archiver/js/request.js
+++ b/ui/file_manager/zip_archiver/js/request.js
@@ -32,6 +32,10 @@
     READ_FILE_DATA: 'read_file_data',       // Should be an ArrayBuffer.
     HAS_MORE_DATA: 'has_more_data',         // Should be a boolean.
     PASSPHRASE: 'passphrase',               // Should be a string.
+    SRC_FILE: 'src_file',                // Should be a string.
+    SRC_LINE: 'src_line',                // Should be a int.
+    SRC_FUNC: 'src_func',                // Should be a string.
+    MESSAGE: 'message',                  // Should be a string.
 
     // Mandatory keys for all packing operations.
     COMPRESSOR_ID: 'compressor_id',         // Should be an int.
@@ -51,11 +55,7 @@
     ERROR: 'error',                // Should be a string.
     CHUNK_BUFFER: 'chunk_buffer',  // Should be an ArrayBuffer.
     OFFSET: 'offset',      // Should be a string. Same reason as ARCHIVE_SIZE.
-    LENGTH: 'length',      // Should be a string. Same reason as ARCHIVE_SIZE.
-    SRC_FILE: 'src_file',                // Should be a string.
-    SRC_LINE: 'src_line',                // Should be a int.
-    SRC_FUNC: 'src_func',                // Should be a string.
-    MESSAGE: 'message',                  // Should be a string.
+    LENGTH: 'length'       // Should be a string. Same reason as ARCHIVE_SIZE.
   },
 
   /**
@@ -67,7 +67,6 @@
    * @enum {number}
    */
   Operation: {
-    READ_METADATA: 0,
     READ_METADATA_DONE: 1,
     READ_CHUNK: 2,
     READ_CHUNK_DONE: 3,
diff --git a/ui/file_manager/zip_archiver/js/volume.js b/ui/file_manager/zip_archiver/js/volume.js
index 64fae35..53b2922 100644
--- a/ui/file_manager/zip_archiver/js/volume.js
+++ b/ui/file_manager/zip_archiver/js/volume.js
@@ -6,11 +6,14 @@
 
 /**
  * Converts a c/c++ time_t variable to Date.
+ * The time we get from the archive is in local time.
  * @param {number} timestamp A c/c++ time_t variable.
  * @return {!Date}
  */
 function DateFromTimeT(timestamp) {
-  return new Date(1000 * timestamp);
+  var local = new Date(1000 * timestamp);
+  console.info(local.getHours())
+  return new Date( local.getTime() + (local.getTimezoneOffset() * 60000));
 }
 
 /**
diff --git a/ui/file_manager/zip_archiver/module.nmf.txt b/ui/file_manager/zip_archiver/module.nmf.txt
new file mode 100644
index 0000000..04c5b63
--- /dev/null
+++ b/ui/file_manager/zip_archiver/module.nmf.txt
@@ -0,0 +1,9 @@
+{
+  "program": {
+    "portable": {
+      "pnacl-translate": {
+        "url": "zip_archiver_pnacl.pexe.js"
+      }
+    }
+  }
+}