content: Replace base::Optional and friends with absl counterparts

This replaces:
- base::Optional -> absl::optional
- include "base/optional.h"
  ->
  include "third_party/abseil-cpp/absl/types/optional.h"
- base::nullopt -> absl::nullopt
- base::make_optional -> absl::make_optional

Bug: 1202909
Change-Id: Ie9f37bcbf6115632a19f4d063387d07b3723926f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2897246
Commit-Queue: Peter Kasting <[email protected]>
Reviewed-by: Peter Kasting <[email protected]>
Owners-Override: Peter Kasting <[email protected]>
Cr-Commit-Position: refs/heads/master@{#883270}
diff --git a/content/app/android/content_child_process_service_delegate.cc b/content/app/android/content_child_process_service_delegate.cc
index 99bdd561..e89b4436 100644
--- a/content/app/android/content_child_process_service_delegate.cc
+++ b/content/app/android/content_child_process_service_delegate.cc
@@ -161,7 +161,7 @@
   std::vector<int> ids;
   std::vector<std::string> keys;
   if (!file_switch_value.empty()) {
-    base::Optional<std::map<int, std::string>> ids_to_keys_from_command_line =
+    absl::optional<std::map<int, std::string>> ids_to_keys_from_command_line =
         ParseSharedFileSwitchValue(file_switch_value);
     if (ids_to_keys_from_command_line) {
       for (auto iter : *ids_to_keys_from_command_line) {
diff --git a/content/app/content_main.cc b/content/app/content_main.cc
index 2aba28d..2c2619b 100644
--- a/content/app/content_main.cc
+++ b/content/app/content_main.cc
@@ -15,7 +15,6 @@
 #include "base/logging.h"
 #include "base/memory/shared_memory_hooks.h"
 #include "base/message_loop/message_pump_type.h"
-#include "base/optional.h"
 #include "base/process/launch.h"
 #include "base/process/memory.h"
 #include "base/process/process.h"
@@ -42,6 +41,7 @@
 #include "mojo/public/cpp/platform/platform_channel.h"
 #include "mojo/public/cpp/system/dynamic_library_support.h"
 #include "sandbox/policy/sandbox_type.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/base/ui_base_paths.h"
 #include "ui/base/ui_base_switches.h"
 
@@ -115,7 +115,7 @@
   if (shared_file_param.empty())
     return;
 
-  base::Optional<std::map<int, std::string>> shared_file_descriptors =
+  absl::optional<std::map<int, std::string>> shared_file_descriptors =
       ParseSharedFileSwitchValue(shared_file_param);
   if (!shared_file_descriptors)
     return;
diff --git a/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.h b/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.h
index 28c199f..f8c1eba 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.h
+++ b/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.h
@@ -67,7 +67,7 @@
   void ShowDictionaryOverlay(ui::mojom::AttributedStringPtr attributed_string,
                              const gfx::Point& baseline_point) override;
   void LockKeyboard(
-      const base::Optional<std::vector<uint32_t>>& uint_dom_codes) override;
+      const absl::optional<std::vector<uint32_t>>& uint_dom_codes) override;
   void UnlockKeyboard() override;
   void ShowSharingServicePicker(
       const std::string& title,
diff --git a/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.mm b/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.mm
index 013974d0..3e0cf1dd 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_ns_view_bridge.mm
@@ -257,8 +257,8 @@
 }
 
 void RenderWidgetHostNSViewBridge::LockKeyboard(
-    const base::Optional<std::vector<uint32_t>>& uint_dom_codes) {
-  base::Optional<base::flat_set<ui::DomCode>> dom_codes;
+    const absl::optional<std::vector<uint32_t>>& uint_dom_codes) {
+  absl::optional<base::flat_set<ui::DomCode>> dom_codes;
   if (uint_dom_codes) {
     dom_codes.emplace();
     for (const auto& uint_dom_code : *uint_dom_codes)
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h
index 4de62bf..e09a417 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.h
@@ -12,10 +12,10 @@
 
 #include "base/containers/flat_set.h"
 #include "base/mac/scoped_nsobject.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/input/mouse_wheel_rails_filter_mac.h"
 #include "content/common/render_widget_host_ns_view.mojom.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/input/input_handler.mojom-shared.h"
 #import "ui/base/cocoa/command_dispatcher.h"
 #import "ui/base/cocoa/tool_tip_base_view.h"
@@ -259,7 +259,7 @@
 - (void)setCompositionRange:(gfx::Range)range;
 
 // KeyboardLock methods.
-- (void)lockKeyboard:(base::Optional<base::flat_set<ui::DomCode>>)keysToLock;
+- (void)lockKeyboard:(absl::optional<base::flat_set<ui::DomCode>>)keysToLock;
 - (void)unlockKeyboard;
 
 // Cursorlock methods.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index c239f9f..b383a90 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -164,7 +164,7 @@
 // Private methods:
 @interface RenderWidgetHostViewCocoa () {
   bool _keyboardLockActive;
-  base::Optional<base::flat_set<ui::DomCode>> _lockedKeys;
+  absl::optional<base::flat_set<ui::DomCode>> _lockedKeys;
 
   API_AVAILABLE(macos(10.12.2))
   base::scoped_nsobject<NSCandidateListTouchBarItem> _candidateListTouchBarItem;
@@ -846,7 +846,7 @@
   }
 }
 
-- (void)lockKeyboard:(base::Optional<base::flat_set<ui::DomCode>>)keysToLock {
+- (void)lockKeyboard:(absl::optional<base::flat_set<ui::DomCode>>)keysToLock {
   // TODO(joedow): Integrate System-level keyboard hook into this method.
   _lockedKeys = std::move(keysToLock);
   _keyboardLockActive = true;
diff --git a/content/app_shim_remote_cocoa/web_drag_source_mac.mm b/content/app_shim_remote_cocoa/web_drag_source_mac.mm
index a0d2d5e..4fa9ab3 100644
--- a/content/app_shim_remote_cocoa/web_drag_source_mac.mm
+++ b/content/app_shim_remote_cocoa/web_drag_source_mac.mm
@@ -283,7 +283,7 @@
     // TODO(https://crbug.com/898608): The |downloadFileName_| and
     // |downloadURL_| values should be computed by the caller.
     if (_dropData->download_metadata.empty()) {
-      base::Optional<base::FilePath> suggestedFilename =
+      absl::optional<base::FilePath> suggestedFilename =
           _dropData->GetSafeFilenameForImageFileContents();
       if (suggestedFilename) {
         _downloadFileName = std::move(*suggestedFilename);
diff --git a/content/browser/accessibility/accessibility_scripts_mac_browsertest.mm b/content/browser/accessibility/accessibility_scripts_mac_browsertest.mm
index aec27e0..3101501 100644
--- a/content/browser/accessibility/accessibility_scripts_mac_browsertest.mm
+++ b/content/browser/accessibility/accessibility_scripts_mac_browsertest.mm
@@ -142,7 +142,7 @@
   base::FilePath expectation_file =
       helper_.GetExpectationFilePath(test_file_path_);
   EXPECT_FALSE(expectation_file.empty());
-  base::Optional<std::vector<std::string>> expected_lines =
+  absl::optional<std::vector<std::string>> expected_lines =
       helper_.LoadExpectationFile(expectation_file);
   EXPECT_TRUE(expected_lines.has_value());
 
diff --git a/content/browser/accessibility/accessibility_tree_formatter_blink.cc b/content/browser/accessibility/accessibility_tree_formatter_blink.cc
index d62410f..2c9bad4 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_blink.cc
+++ b/content/browser/accessibility/accessibility_tree_formatter_blink.cc
@@ -9,7 +9,6 @@
 
 #include <utility>
 
-#include "base/optional.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/string_util.h"
 #include "base/strings/stringprintf.h"
@@ -17,6 +16,7 @@
 #include "base/values.h"
 #include "content/browser/accessibility/browser_accessibility.h"
 #include "content/browser/accessibility/browser_accessibility_manager.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/accessibility/ax_enums.mojom.h"
 #include "ui/accessibility/ax_node_data.h"
 #include "ui/accessibility/ax_tree_manager_map.h"
@@ -28,7 +28,7 @@
 namespace content {
 namespace {
 
-base::Optional<std::string> GetStringAttribute(
+absl::optional<std::string> GetStringAttribute(
     const ui::AXNode& node,
     ax::mojom::StringAttribute attr) {
   // Language is different from other string attributes as it inherits and has
@@ -36,7 +36,7 @@
   if (attr == ax::mojom::StringAttribute::kLanguage) {
     std::string value = node.GetLanguage();
     if (value.empty()) {
-      return base::nullopt;
+      return absl::nullopt;
     }
     return value;
   }
@@ -45,7 +45,7 @@
   if (attr == ax::mojom::StringAttribute::kFontFamily) {
     std::string value = node.GetInheritedStringAttribute(attr);
     if (value.empty()) {
-      return base::nullopt;
+      return absl::nullopt;
     }
     return value;
   }
@@ -56,7 +56,7 @@
   if (node.GetStringAttribute(attr, &value)) {
     return value;
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 std::string FormatColor(int argb) {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h
index 293c7aa..8bec0dc 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.h
@@ -34,7 +34,7 @@
     ui::AXTreeIndexer<GetDOMId, NSArray*, ChildrenOf, NodeComparator>;
 
 // Implements stateful id values. Can be either id or be in
-// error or not applciable state. Similar to base::Optional, but tri-state
+// error or not applciable state. Similar to absl::optional, but tri-state
 // allowing nullable values.
 class CONTENT_EXPORT OptionalNSObject final {
  public:
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
index 0210ba2..754d25d7 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
@@ -191,7 +191,7 @@
 // NSNumber. Format: integer.
 NSNumber* AttributeInvoker::PropertyNodeToInt(
     const AXPropertyNode& intnode) const {
-  base::Optional<int> param = intnode.AsInt();
+  absl::optional<int> param = intnode.AsInt();
   if (!param) {
     INT_FAIL(intnode, "not a number")
   }
@@ -208,7 +208,7 @@
   NSMutableArray* array =
       [[NSMutableArray alloc] initWithCapacity:arraynode.parameters.size()];
   for (const auto& paramnode : arraynode.parameters) {
-    base::Optional<int> param = paramnode.AsInt();
+    absl::optional<int> param = paramnode.AsInt();
     if (!param) {
       INTARRAY_FAIL(arraynode, paramnode.name_or_value + " is not a number")
     }
@@ -224,12 +224,12 @@
     NSRANGE_FAIL(dictnode, "dictionary is expected")
   }
 
-  base::Optional<int> loc = dictnode.FindIntKey("loc");
+  absl::optional<int> loc = dictnode.FindIntKey("loc");
   if (!loc) {
     NSRANGE_FAIL(dictnode, "no loc or loc is not a number")
   }
 
-  base::Optional<int> len = dictnode.FindIntKey("len");
+  absl::optional<int> len = dictnode.FindIntKey("len");
   if (!len) {
     NSRANGE_FAIL(dictnode, "no len or len is not a number")
   }
@@ -264,7 +264,7 @@
     TEXTMARKER_FAIL(dictnode, "1st argument: wrong anchor")
   }
 
-  base::Optional<int> offset = dictnode.parameters[1].AsInt();
+  absl::optional<int> offset = dictnode.parameters[1].AsInt();
   if (!offset) {
     TEXTMARKER_FAIL(dictnode, "2nd argument: wrong offset")
   }
diff --git a/content/browser/accessibility/browser_accessibility.cc b/content/browser/accessibility/browser_accessibility.cc
index ac97282..394b756 100644
--- a/content/browser/accessibility/browser_accessibility.cc
+++ b/content/browser/accessibility/browser_accessibility.cc
@@ -1347,7 +1347,7 @@
   return result;
 }
 
-base::Optional<int> BrowserAccessibility::FindTextBoundary(
+absl::optional<int> BrowserAccessibility::FindTextBoundary(
     ax::mojom::TextBoundary boundary,
     int offset,
     ax::mojom::MoveDirection direction,
@@ -1732,27 +1732,27 @@
   return node()->IsTable();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableRowCount() const {
+absl::optional<int> BrowserAccessibility::GetTableRowCount() const {
   return node()->GetTableRowCount();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableColCount() const {
+absl::optional<int> BrowserAccessibility::GetTableColCount() const {
   return node()->GetTableColCount();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableAriaColCount() const {
+absl::optional<int> BrowserAccessibility::GetTableAriaColCount() const {
   return node()->GetTableAriaColCount();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableAriaRowCount() const {
+absl::optional<int> BrowserAccessibility::GetTableAriaRowCount() const {
   return node()->GetTableAriaRowCount();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellCount() const {
+absl::optional<int> BrowserAccessibility::GetTableCellCount() const {
   return node()->GetTableCellCount();
 }
 
-base::Optional<bool> BrowserAccessibility::GetTableHasColumnOrRowHeaderNode()
+absl::optional<bool> BrowserAccessibility::GetTableHasColumnOrRowHeaderNode()
     const {
   return node()->GetTableHasColumnOrRowHeaderNode();
 }
@@ -1788,7 +1788,7 @@
   return node()->IsTableRow();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableRowRowIndex() const {
+absl::optional<int> BrowserAccessibility::GetTableRowRowIndex() const {
   return node()->GetTableRowRowIndex();
 }
 
@@ -1796,47 +1796,47 @@
   return node()->IsTableCellOrHeader();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellColIndex() const {
+absl::optional<int> BrowserAccessibility::GetTableCellColIndex() const {
   return node()->GetTableCellColIndex();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellRowIndex() const {
+absl::optional<int> BrowserAccessibility::GetTableCellRowIndex() const {
   return node()->GetTableCellRowIndex();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellColSpan() const {
+absl::optional<int> BrowserAccessibility::GetTableCellColSpan() const {
   return node()->GetTableCellColSpan();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellRowSpan() const {
+absl::optional<int> BrowserAccessibility::GetTableCellRowSpan() const {
   return node()->GetTableCellRowSpan();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellAriaColIndex() const {
+absl::optional<int> BrowserAccessibility::GetTableCellAriaColIndex() const {
   return node()->GetTableCellAriaColIndex();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellAriaRowIndex() const {
+absl::optional<int> BrowserAccessibility::GetTableCellAriaRowIndex() const {
   return node()->GetTableCellAriaRowIndex();
 }
 
-base::Optional<int32_t> BrowserAccessibility::GetCellId(int row_index,
+absl::optional<int32_t> BrowserAccessibility::GetCellId(int row_index,
                                                         int col_index) const {
   ui::AXNode* cell = node()->GetTableCellFromCoords(row_index, col_index);
   if (!cell)
-    return base::nullopt;
+    return absl::nullopt;
   return cell->id();
 }
 
-base::Optional<int> BrowserAccessibility::GetTableCellIndex() const {
+absl::optional<int> BrowserAccessibility::GetTableCellIndex() const {
   return node()->GetTableCellIndex();
 }
 
-base::Optional<int32_t> BrowserAccessibility::CellIndexToId(
+absl::optional<int32_t> BrowserAccessibility::CellIndexToId(
     int cell_index) const {
   ui::AXNode* cell = node()->GetTableCellFromIndex(cell_index);
   if (!cell)
-    return base::nullopt;
+    return absl::nullopt;
   return cell->id();
 }
 
@@ -2149,11 +2149,11 @@
   return node()->IsOrderedSet();
 }
 
-base::Optional<int> BrowserAccessibility::GetPosInSet() const {
+absl::optional<int> BrowserAccessibility::GetPosInSet() const {
   return node()->GetPosInSet();
 }
 
-base::Optional<int> BrowserAccessibility::GetSetSize() const {
+absl::optional<int> BrowserAccessibility::GetSetSize() const {
   return node()->GetSetSize();
 }
 
diff --git a/content/browser/accessibility/browser_accessibility.h b/content/browser/accessibility/browser_accessibility.h
index e58441e..8cce0607 100644
--- a/content/browser/accessibility/browser_accessibility.h
+++ b/content/browser/accessibility/browser_accessibility.h
@@ -16,10 +16,10 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/strings/string_split.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/web/web_ax_enums.h"
 #include "ui/accessibility/ax_enums.mojom-forward.h"
 #include "ui/accessibility/ax_node.h"
@@ -447,7 +447,7 @@
   int GetIndexInParent() override;
   gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override;
 
-  base::Optional<int> FindTextBoundary(
+  absl::optional<int> FindTextBoundary(
       ax::mojom::TextBoundary boundary,
       int offset,
       ax::mojom::MoveDirection direction,
@@ -459,12 +459,12 @@
   std::string GetLanguage() const override;
 
   bool IsTable() const override;
-  base::Optional<int> GetTableColCount() const override;
-  base::Optional<int> GetTableRowCount() const override;
-  base::Optional<int> GetTableAriaColCount() const override;
-  base::Optional<int> GetTableAriaRowCount() const override;
-  base::Optional<int> GetTableCellCount() const override;
-  base::Optional<bool> GetTableHasColumnOrRowHeaderNode() const override;
+  absl::optional<int> GetTableColCount() const override;
+  absl::optional<int> GetTableRowCount() const override;
+  absl::optional<int> GetTableAriaColCount() const override;
+  absl::optional<int> GetTableAriaRowCount() const override;
+  absl::optional<int> GetTableCellCount() const override;
+  absl::optional<bool> GetTableHasColumnOrRowHeaderNode() const override;
   std::vector<ui::AXNodeID> GetColHeaderNodeIds() const override;
   std::vector<ui::AXNodeID> GetColHeaderNodeIds(int col_index) const override;
   std::vector<ui::AXNodeID> GetRowHeaderNodeIds() const override;
@@ -472,19 +472,19 @@
   ui::AXPlatformNode* GetTableCaption() const override;
 
   bool IsTableRow() const override;
-  base::Optional<int> GetTableRowRowIndex() const override;
+  absl::optional<int> GetTableRowRowIndex() const override;
 
   bool IsTableCellOrHeader() const override;
-  base::Optional<int> GetTableCellIndex() const override;
-  base::Optional<int> GetTableCellColIndex() const override;
-  base::Optional<int> GetTableCellRowIndex() const override;
-  base::Optional<int> GetTableCellColSpan() const override;
-  base::Optional<int> GetTableCellRowSpan() const override;
-  base::Optional<int> GetTableCellAriaColIndex() const override;
-  base::Optional<int> GetTableCellAriaRowIndex() const override;
-  base::Optional<int32_t> GetCellId(int row_index,
+  absl::optional<int> GetTableCellIndex() const override;
+  absl::optional<int> GetTableCellColIndex() const override;
+  absl::optional<int> GetTableCellRowIndex() const override;
+  absl::optional<int> GetTableCellColSpan() const override;
+  absl::optional<int> GetTableCellRowSpan() const override;
+  absl::optional<int> GetTableCellAriaColIndex() const override;
+  absl::optional<int> GetTableCellAriaRowIndex() const override;
+  absl::optional<int32_t> GetCellId(int row_index,
                                     int col_index) const override;
-  base::Optional<int32_t> CellIndexToId(int cell_index) const override;
+  absl::optional<int32_t> CellIndexToId(int cell_index) const override;
 
   bool IsCellOrHeaderOfARIATable() const override;
   bool IsCellOrHeaderOfARIAGrid() const override;
@@ -515,8 +515,8 @@
       ax::mojom::IntListAttribute attr) override;
   bool IsOrderedSetItem() const override;
   bool IsOrderedSet() const override;
-  base::Optional<int> GetPosInSet() const override;
-  base::Optional<int> GetSetSize() const override;
+  absl::optional<int> GetPosInSet() const override;
+  absl::optional<int> GetSetSize() const override;
   SkColor GetColor() const override;
   SkColor GetBackgroundColor() const override;
 
diff --git a/content/browser/accessibility/browser_accessibility_android.cc b/content/browser/accessibility/browser_accessibility_android.cc
index cd7df47..13e390be 100644
--- a/content/browser/accessibility/browser_accessibility_android.cc
+++ b/content/browser/accessibility/browser_accessibility_android.cc
@@ -1642,7 +1642,7 @@
     if (max > min && value >= min && value <= max)
       index = static_cast<int>(((value - min)) * 100 / (max - min));
   } else {
-    base::Optional<int> pos_in_set = node()->GetPosInSet();
+    absl::optional<int> pos_in_set = node()->GetPosInSet();
     if (pos_in_set && *pos_in_set > 0)
       index = *pos_in_set - 1;
   }
@@ -2022,7 +2022,7 @@
 }
 
 int BrowserAccessibilityAndroid::RowIndex() const {
-  base::Optional<int> pos_in_set = node()->GetPosInSet();
+  absl::optional<int> pos_in_set = node()->GetPosInSet();
   if (pos_in_set && pos_in_set > 0)
     return *pos_in_set - 1;
   return node()->GetTableCellRowIndex().value_or(0);
diff --git a/content/browser/accessibility/browser_accessibility_auralinux_unittest.cc b/content/browser/accessibility/browser_accessibility_auralinux_unittest.cc
index 742e917..c2a3eb1 100644
--- a/content/browser/accessibility/browser_accessibility_auralinux_unittest.cc
+++ b/content/browser/accessibility/browser_accessibility_auralinux_unittest.cc
@@ -363,7 +363,7 @@
        TestTextAttributesInContentEditables) {
   auto has_attribute = [](AtkAttributeSet* attributes,
                           AtkTextAttribute text_attribute,
-                          base::Optional<const char*> expected_value) {
+                          absl::optional<const char*> expected_value) {
     const char* name = atk_text_attribute_get_name(text_attribute);
     while (attributes) {
       const AtkAttribute* attribute =
@@ -525,8 +525,8 @@
     ASSERT_TRUE(
         has_attribute(attributes, ATK_TEXT_ATTR_FAMILY_NAME, "Helvetica"));
     ASSERT_FALSE(
-        has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, base::nullopt));
-    ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_STYLE, base::nullopt));
+        has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, absl::nullopt));
+    ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_STYLE, absl::nullopt));
     ASSERT_TRUE(has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, "single"));
     ASSERT_TRUE(has_attribute(attributes, ATK_TEXT_ATTR_LANGUAGE, "fr"));
 
@@ -549,12 +549,12 @@
     ASSERT_TRUE(
         has_attribute(attributes, ATK_TEXT_ATTR_FAMILY_NAME, "Helvetica"));
     ASSERT_FALSE(
-        has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, base::nullopt));
-    ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_STYLE, base::nullopt));
+        has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, absl::nullopt));
+    ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_STYLE, absl::nullopt));
     ASSERT_FALSE(
-        has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, base::nullopt));
+        has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, absl::nullopt));
     ASSERT_FALSE(
-        has_attribute(attributes, ATK_TEXT_ATTR_INVALID, base::nullopt));
+        has_attribute(attributes, ATK_TEXT_ATTR_INVALID, absl::nullopt));
 
     atk_attribute_set_free(attributes);
   }
@@ -572,8 +572,8 @@
   ASSERT_TRUE(has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, "700"));
   ASSERT_TRUE(has_attribute(attributes, ATK_TEXT_ATTR_STYLE, "italic"));
   ASSERT_FALSE(
-      has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, base::nullopt));
-  ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_INVALID, base::nullopt));
+      has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, absl::nullopt));
+  ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_INVALID, absl::nullopt));
   atk_attribute_set_free(attributes);
 
   AtkObject* ax_after_atk_object =
@@ -584,10 +584,10 @@
   EXPECT_EQ(7, end_offset);
   ASSERT_TRUE(
       has_attribute(attributes, ATK_TEXT_ATTR_FAMILY_NAME, "Helvetica"));
-  ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, base::nullopt));
+  ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_WEIGHT, absl::nullopt));
   ASSERT_FALSE(has_attribute(attributes, ATK_TEXT_ATTR_STYLE, "italic"));
   ASSERT_FALSE(
-      has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, base::nullopt));
+      has_attribute(attributes, ATK_TEXT_ATTR_UNDERLINE, absl::nullopt));
   atk_attribute_set_free(attributes);
 
   manager.reset();
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 381eaf1..7f10021c 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -17,7 +17,6 @@
 
 #include "base/mac/foundation_util.h"
 #include "base/mac/scoped_cftyperef.h"
-#include "base/optional.h"
 #include "base/strings/string_split.h"
 #include "base/strings/string_util.h"
 #include "base/strings/sys_string_conversions.h"
@@ -30,6 +29,7 @@
 #include "content/browser/accessibility/one_shot_accessibility_tree_search.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/use_zoom_for_dsf_policy.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/strings/grit/blink_strings.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/accessibility/ax_enum_util.h"
@@ -949,7 +949,7 @@
 - (NSNumber*)ariaColumnCount {
   if (![self instanceActive])
     return nil;
-  base::Optional<int> aria_col_count = _owner->node()->GetTableAriaColCount();
+  absl::optional<int> aria_col_count = _owner->node()->GetTableAriaColCount();
   if (!aria_col_count)
     return nil;
   return @(*aria_col_count);
@@ -958,7 +958,7 @@
 - (NSNumber*)ariaColumnIndex {
   if (![self instanceActive])
     return nil;
-  base::Optional<int> ariaColIndex = _owner->node()->GetTableCellAriaColIndex();
+  absl::optional<int> ariaColIndex = _owner->node()->GetTableCellAriaColIndex();
   if (!ariaColIndex)
     return nil;
   return @(*ariaColIndex);
@@ -1004,7 +1004,7 @@
 - (NSNumber*)ariaPosInSet {
   if (![self instanceActive])
     return nil;
-  base::Optional<int> posInSet = _owner->node()->GetPosInSet();
+  absl::optional<int> posInSet = _owner->node()->GetPosInSet();
   if (!posInSet)
     return nil;
   return @(*posInSet);
@@ -1020,7 +1020,7 @@
 - (NSNumber*)ariaRowCount {
   if (![self instanceActive])
     return nil;
-  base::Optional<int> ariaRowCount = _owner->node()->GetTableAriaRowCount();
+  absl::optional<int> ariaRowCount = _owner->node()->GetTableAriaRowCount();
   if (!ariaRowCount)
     return nil;
   return @(*ariaRowCount);
@@ -1029,7 +1029,7 @@
 - (NSNumber*)ariaRowIndex {
   if (![self instanceActive])
     return nil;
-  base::Optional<int> ariaRowIndex = _owner->node()->GetTableCellAriaRowIndex();
+  absl::optional<int> ariaRowIndex = _owner->node()->GetTableCellAriaRowIndex();
   if (!ariaRowIndex)
     return nil;
   return @(*ariaRowIndex);
@@ -1038,7 +1038,7 @@
 - (NSNumber*)ariaSetSize {
   if (![self instanceActive])
     return nil;
-  base::Optional<int> setSize = _owner->node()->GetSetSize();
+  absl::optional<int> setSize = _owner->node()->GetSetSize();
   if (!setSize)
     return nil;
   return @(*setSize);
@@ -1142,7 +1142,7 @@
     }
   } else {
     // Otherwise this is a cell, return the column headers for this cell.
-    base::Optional<int> column = _owner->GetTableCellColIndex();
+    absl::optional<int> column = _owner->GetTableCellColIndex();
     if (!column)
       return nil;
 
@@ -1161,8 +1161,8 @@
   if (![self instanceActive])
     return nil;
 
-  base::Optional<int> column = _owner->node()->GetTableCellColIndex();
-  base::Optional<int> colspan = _owner->node()->GetTableCellColSpan();
+  absl::optional<int> column = _owner->node()->GetTableCellColIndex();
+  absl::optional<int> colspan = _owner->node()->GetTableCellColSpan();
   if (column && colspan)
     return [NSValue valueWithRange:NSMakeRange(*column, *colspan)];
   return nil;
@@ -1519,12 +1519,12 @@
     return [self treeItemRowIndex];
   } else if ([self internalRole] == ax::mojom::Role::kColumn) {
     DCHECK(_owner->node());
-    base::Optional<int> col_index = *_owner->node()->GetTableColColIndex();
+    absl::optional<int> col_index = *_owner->node()->GetTableColColIndex();
     if (col_index)
       return @(*col_index);
   } else if ([self internalRole] == ax::mojom::Role::kRow) {
     DCHECK(_owner->node());
-    base::Optional<int> row_index = _owner->node()->GetTableRowRowIndex();
+    absl::optional<int> row_index = _owner->node()->GetTableRowRowIndex();
     if (row_index)
       return @(*row_index);
   }
@@ -2205,8 +2205,8 @@
   if (![self instanceActive])
     return nil;
 
-  base::Optional<int> row = _owner->node()->GetTableCellRowIndex();
-  base::Optional<int> rowspan = _owner->node()->GetTableCellRowSpan();
+  absl::optional<int> row = _owner->node()->GetTableCellRowIndex();
+  absl::optional<int> rowspan = _owner->node()->GetTableCellRowSpan();
   if (row && rowspan)
     return [NSValue valueWithRange:NSMakeRange(*row, *rowspan)];
   return nil;
diff --git a/content/browser/accessibility/browser_accessibility_manager.cc b/content/browser/accessibility/browser_accessibility_manager.cc
index 51838ae..e9b52f1 100644
--- a/content/browser/accessibility/browser_accessibility_manager.cc
+++ b/content/browser/accessibility/browser_accessibility_manager.cc
@@ -251,10 +251,10 @@
     false;
 
 // static
-base::Optional<int32_t> BrowserAccessibilityManager::last_focused_node_id_ = {};
+absl::optional<int32_t> BrowserAccessibilityManager::last_focused_node_id_ = {};
 
 // static
-base::Optional<ui::AXTreeID>
+absl::optional<ui::AXTreeID>
     BrowserAccessibilityManager::last_focused_node_tree_id_ = {};
 
 // static
diff --git a/content/browser/accessibility/browser_accessibility_manager.h b/content/browser/accessibility/browser_accessibility_manager.h
index cbf9187..0c29d23 100644
--- a/content/browser/accessibility/browser_accessibility_manager.h
+++ b/content/browser/accessibility/browser_accessibility_manager.h
@@ -600,8 +600,8 @@
   //
   // NOTE: Don't use or modify these properties directly, use the
   // SetLastFocusedNode and GetLastFocusedNode methods instead.
-  static base::Optional<int32_t> last_focused_node_id_;
-  static base::Optional<ui::AXTreeID> last_focused_node_tree_id_;
+  static absl::optional<int32_t> last_focused_node_id_;
+  static absl::optional<ui::AXTreeID> last_focused_node_tree_id_;
 
   // For debug only: True when handling OnAccessibilityEvents.
 #if DCHECK_IS_ON()
diff --git a/content/browser/accessibility/dump_accessibility_browsertest_base.cc b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
index 79b1f43..9b6f48c 100644
--- a/content/browser/accessibility/dump_accessibility_browsertest_base.cc
+++ b/content/browser/accessibility/dump_accessibility_browsertest_base.cc
@@ -176,7 +176,7 @@
     return;
   }
 
-  base::Optional<std::vector<std::string>> expected_lines =
+  absl::optional<std::vector<std::string>> expected_lines =
       test_helper_.LoadExpectationFile(expected_file);
   if (!expected_lines) {
     LOG(INFO) << "Skipping this test on this platform.";
diff --git a/content/browser/android/battery_metrics.cc b/content/browser/android/battery_metrics.cc
index 1eedcb33..abc53fb7 100644
--- a/content/browser/android/battery_metrics.cc
+++ b/content/browser/android/battery_metrics.cc
@@ -10,11 +10,11 @@
 #include "base/logging.h"
 #include "base/metrics/histogram.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/power_monitor/power_monitor.h"
 #include "base/trace_event/trace_event.h"
 #include "net/android/network_library.h"
 #include "net/android/traffic_stats.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 const base::Feature kForegroundRadioStateCountWakeups{
     "ForegroundRadioStateCountWakeups", base::FEATURE_DISABLED_BY_DEFAULT};
@@ -28,7 +28,7 @@
 
   if (base::android::RadioUtils::GetConnectionType() ==
       base::android::RadioConnectionType::kWifi) {
-    base::Optional<int32_t> maybe_level = net::android::GetWifiSignalLevel();
+    absl::optional<int32_t> maybe_level = net::android::GetWifiSignalLevel();
     if (!maybe_level.has_value())
       return;
 
@@ -47,7 +47,7 @@
         "Power.ForegroundRadio.ReceivedKiB.Wifi.30Seconds", wifi_level,
         rx_bytes, 1024);
   } else {
-    base::Optional<base::android::RadioSignalLevel> maybe_level =
+    absl::optional<base::android::RadioSignalLevel> maybe_level =
         base::android::RadioUtils::GetCellSignalLevel();
     if (!maybe_level.has_value())
       return;
diff --git a/content/browser/android/content_url_loader_factory.cc b/content/browser/android/content_url_loader_factory.cc
index f31ee2c..c6c31bd 100644
--- a/content/browser/android/content_url_loader_factory.cc
+++ b/content/browser/android/content_url_loader_factory.cc
@@ -115,7 +115,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {}
+      const absl::optional<GURL>& new_url) override {}
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override {}
   void PauseReadingBodyFromNet() override {}
diff --git a/content/browser/android/synchronous_compositor_host.cc b/content/browser/android/synchronous_compositor_host.cc
index cc113dd..f2078bc 100644
--- a/content/browser/android/synchronous_compositor_host.cc
+++ b/content/browser/android/synchronous_compositor_host.cc
@@ -105,9 +105,9 @@
   void ReturnFrame(
       uint32_t layer_tree_frame_sink_id,
       uint32_t metadata_version,
-      const base::Optional<viz::LocalSurfaceId>& local_surface_id,
-      base::Optional<viz::CompositorFrame> frame,
-      base::Optional<viz::HitTestRegionList> hit_test_region_list) override {
+      const absl::optional<viz::LocalSurfaceId>& local_surface_id,
+      absl::optional<viz::CompositorFrame> frame,
+      absl::optional<viz::HitTestRegionList> hit_test_region_list) override {
     if (frame && (!local_surface_id || !local_surface_id->is_valid())) {
       bad_message::ReceivedBadMessage(
           process_id_, bad_message::SYNC_COMPOSITOR_NO_LOCAL_SURFACE_ID);
@@ -239,9 +239,9 @@
 
   uint32_t layer_tree_frame_sink_id;
   uint32_t metadata_version = 0u;
-  base::Optional<viz::LocalSurfaceId> local_surface_id;
-  base::Optional<viz::CompositorFrame> compositor_frame;
-  base::Optional<viz::HitTestRegionList> hit_test_region_list;
+  absl::optional<viz::LocalSurfaceId> local_surface_id;
+  absl::optional<viz::CompositorFrame> compositor_frame;
+  absl::optional<viz::HitTestRegionList> hit_test_region_list;
   blink::mojom::SyncCompositorCommonRendererParamsPtr common_renderer_params;
 
   {
@@ -316,7 +316,7 @@
   base::ScopedAllowBaseSyncPrimitivesOutsideBlockingScope
       allow_base_sync_primitives;
   blink::mojom::SyncCompositorCommonRendererParamsPtr common_renderer_params;
-  base::Optional<viz::CompositorFrameMetadata> metadata;
+  absl::optional<viz::CompositorFrameMetadata> metadata;
   ScopedSetSkCanvas set_sk_canvas(canvas);
   blink::mojom::SyncCompositorDemandDrawSwParamsPtr params =
       blink::mojom::SyncCompositorDemandDrawSwParams::New();  // Unused.
@@ -384,7 +384,7 @@
   if (!software_draw_shm_)
     return false;
 
-  base::Optional<viz::CompositorFrameMetadata> metadata;
+  absl::optional<viz::CompositorFrameMetadata> metadata;
   uint32_t metadata_version = 0u;
   blink::mojom::SyncCompositorCommonRendererParamsPtr common_renderer_params;
   {
diff --git a/content/browser/android/synchronous_compositor_sync_call_bridge.cc b/content/browser/android/synchronous_compositor_sync_call_bridge.cc
index b9eecc1..0775001 100644
--- a/content/browser/android/synchronous_compositor_sync_call_bridge.cc
+++ b/content/browser/android/synchronous_compositor_sync_call_bridge.cc
@@ -42,9 +42,9 @@
 bool SynchronousCompositorSyncCallBridge::ReceiveFrameOnIOThread(
     int layer_tree_frame_sink_id,
     uint32_t metadata_version,
-    base::Optional<viz::LocalSurfaceId> local_surface_id,
-    base::Optional<viz::CompositorFrame> compositor_frame,
-    base::Optional<viz::HitTestRegionList> hit_test_region_list) {
+    absl::optional<viz::LocalSurfaceId> local_surface_id,
+    absl::optional<viz::CompositorFrame> compositor_frame,
+    absl::optional<viz::HitTestRegionList> hit_test_region_list) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   base::AutoLock lock(lock_);
   if (remote_state_ != RemoteState::READY || frame_futures_.empty())
diff --git a/content/browser/android/synchronous_compositor_sync_call_bridge.h b/content/browser/android/synchronous_compositor_sync_call_bridge.h
index b32d156..0514c90 100644
--- a/content/browser/android/synchronous_compositor_sync_call_bridge.h
+++ b/content/browser/android/synchronous_compositor_sync_call_bridge.h
@@ -83,9 +83,9 @@
   bool ReceiveFrameOnIOThread(
       int frame_sink_id,
       uint32_t metadata_version,
-      base::Optional<viz::LocalSurfaceId> local_surface_id,
-      base::Optional<viz::CompositorFrame>,
-      base::Optional<viz::HitTestRegionList> hit_test_region_list);
+      absl::optional<viz::LocalSurfaceId> local_surface_id,
+      absl::optional<viz::CompositorFrame>,
+      absl::optional<viz::HitTestRegionList> hit_test_region_list);
 
   // Receive a BeginFrameResponse. Returns true if handling the response was
   // successful or not.
diff --git a/content/browser/android/web_contents_observer_proxy.cc b/content/browser/android/web_contents_observer_proxy.cc
index 8ffb8f1..81675aa 100644
--- a/content/browser/android/web_contents_observer_proxy.cc
+++ b/content/browser/android/web_contents_observer_proxy.cc
@@ -9,7 +9,6 @@
 #include "base/android/jni_android.h"
 #include "base/android/jni_string.h"
 #include "base/android/scoped_java_ref.h"
-#include "base/optional.h"
 #include "base/stl_util.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/trace_event/trace_event.h"
@@ -22,6 +21,7 @@
 #include "content/public/browser/navigation_details.h"
 #include "content/public/browser/navigation_entry.h"
 #include "content/public/browser/navigation_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/android/gurl_android.h"
 
 using base::android::AttachCurrentThread;
diff --git a/content/browser/appcache/appcache_backfillers.cc b/content/browser/appcache/appcache_backfillers.cc
index fbe0b5de..d97367e 100644
--- a/content/browser/appcache/appcache_backfillers.cc
+++ b/content/browser/appcache/appcache_backfillers.cc
@@ -45,7 +45,7 @@
 
 bool AppCacheBackfillerVersion8::BackfillPaddingSizes() {
   return ForEachCache(db_, [&](int64_t cache_id, int64_t group_id) -> bool {
-    base::Optional<std::string> manifest_url = GetManifestUrlForGroup(group_id);
+    absl::optional<std::string> manifest_url = GetManifestUrlForGroup(group_id);
     if (!manifest_url.has_value())
       return false;
 
@@ -81,14 +81,14 @@
   return true;
 }
 
-base::Optional<std::string> AppCacheBackfillerVersion8::GetManifestUrlForGroup(
+absl::optional<std::string> AppCacheBackfillerVersion8::GetManifestUrlForGroup(
     int64_t group_id) {
   static const char kSql[] =
       "SELECT manifest_url, group_id FROM Groups WHERE group_id = ?";
   sql::Statement statement(db_->GetUniqueStatement(kSql));
   statement.BindInt64(0, group_id);
   if (!statement.Step())
-    return base::nullopt;
+    return absl::nullopt;
   return statement.ColumnString(0);
 }
 
@@ -116,7 +116,7 @@
 
 bool AppCacheBackfillerVersion9::BackfillManifestParserVersionAndScope() {
   return ForEachCache(db_, [&](int64_t cache_id, int64_t group_id) -> bool {
-    base::Optional<std::string> manifest_url = GetManifestUrlForGroup(group_id);
+    absl::optional<std::string> manifest_url = GetManifestUrlForGroup(group_id);
     if (!manifest_url.has_value())
       return false;
 
@@ -159,14 +159,14 @@
   return statement.Run();
 }
 
-base::Optional<std::string> AppCacheBackfillerVersion9::GetManifestUrlForGroup(
+absl::optional<std::string> AppCacheBackfillerVersion9::GetManifestUrlForGroup(
     int64_t group_id) {
   static const char kSql[] =
       "SELECT manifest_url, group_id FROM Groups WHERE group_id = ?";
   sql::Statement statement(db_->GetUniqueStatement(kSql));
   statement.BindInt64(0, group_id);
   if (!statement.Step())
-    return base::nullopt;
+    return absl::nullopt;
   return statement.ColumnString(0);
 }
 
diff --git a/content/browser/appcache/appcache_backfillers.h b/content/browser/appcache/appcache_backfillers.h
index 9373ec95..81dd4b53 100644
--- a/content/browser/appcache/appcache_backfillers.h
+++ b/content/browser/appcache/appcache_backfillers.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "sql/database.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -33,9 +33,9 @@
   template <typename ForEachCallable>
   bool ForEachEntry(int64_t cache_id, const ForEachCallable& callable);
 
-  // Gets the manifest URL of a group. Returns base::nullopt if the database
+  // Gets the manifest URL of a group. Returns absl::nullopt if the database
   // query failed.
-  base::Optional<std::string> GetManifestUrlForGroup(int64_t group_id);
+  absl::optional<std::string> GetManifestUrlForGroup(int64_t group_id);
 
   // Updates the padding size of the Entry record identified by |response_id|.
   // Returns whether the database statement succeeded.
@@ -74,7 +74,7 @@
   bool UpdateCacheManifestScope(int64_t cache_id,
                                 const std::string& manifest_scope);
 
-  base::Optional<std::string> GetManifestUrlForGroup(int64_t group_id);
+  absl::optional<std::string> GetManifestUrlForGroup(int64_t group_id);
 
   // The AppCacheDatabase instance being backfilled.
   sql::Database* const db_;
diff --git a/content/browser/appcache/appcache_browsertest.cc b/content/browser/appcache/appcache_browsertest.cc
index 903d2b4c..27c68984 100644
--- a/content/browser/appcache/appcache_browsertest.cc
+++ b/content/browser/appcache/appcache_browsertest.cc
@@ -208,7 +208,7 @@
       int render_process_id,
       URLLoaderFactoryType type,
       const url::Origin& request_initiator,
-      base::Optional<int64_t> navigation_id,
+      absl::optional<int64_t> navigation_id,
       ukm::SourceIdObj ukm_source_id,
       mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
       mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
diff --git a/content/browser/appcache/appcache_host.cc b/content/browser/appcache/appcache_host.cc
index d8840a9..67b5d05 100644
--- a/content/browser/appcache/appcache_host.cc
+++ b/content/browser/appcache/appcache_host.cc
@@ -661,7 +661,7 @@
     GetContentClient()->browser()->WillCreateURLLoaderFactory(
         rfh->GetProcess()->GetBrowserContext(), rfh, process_id_,
         ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
-        origin_for_url_loader_factory_, base::nullopt /* navigation_id */,
+        origin_for_url_loader_factory_, absl::nullopt /* navigation_id */,
         ukm::SourceIdObj::FromInt64(rfh->GetPageUkmSourceId()),
         &factory_receiver, nullptr /* header_client */,
         nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
diff --git a/content/browser/appcache/appcache_host.h b/content/browser/appcache/appcache_host.h
index 1b33a65..529299c 100644
--- a/content/browser/appcache/appcache_host.h
+++ b/content/browser/appcache/appcache_host.h
@@ -17,7 +17,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "content/browser/appcache/appcache_group.h"
 #include "content/browser/appcache/appcache_service_impl.h"
 #include "content/browser/appcache/appcache_storage.h"
@@ -29,6 +28,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/appcache/appcache.mojom.h"
 #include "third_party/blink/public/mojom/appcache/appcache_info.mojom-forward.h"
 #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
@@ -233,7 +233,7 @@
     site_for_cookies_initialized_ = true;
   }
 
-  const base::Optional<url::Origin>& top_frame_origin() const {
+  const absl::optional<url::Origin>& top_frame_origin() const {
     return top_frame_origin_;
   }
 
@@ -421,7 +421,7 @@
   // To be used in policy checks.
   net::SiteForCookies site_for_cookies_;
   bool site_for_cookies_initialized_ = false;
-  base::Optional<url::Origin> top_frame_origin_;
+  absl::optional<url::Origin> top_frame_origin_;
 
   bool is_origin_trial_required_ = false;
 
diff --git a/content/browser/appcache/appcache_policy.h b/content/browser/appcache/appcache_policy.h
index 93ce034..3b0435c6 100644
--- a/content/browser/appcache/appcache_policy.h
+++ b/content/browser/appcache/appcache_policy.h
@@ -5,7 +5,7 @@
 #ifndef CONTENT_BROWSER_APPCACHE_APPCACHE_POLICY_H_
 #define CONTENT_BROWSER_APPCACHE_APPCACHE_POLICY_H_
 
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class GURL;
 
@@ -26,14 +26,14 @@
       const GURL& manifest_url,
 
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) = 0;
+      const absl::optional<url::Origin>& top_frame_origin) = 0;
 
   // Called prior to creating a new appcache. Returns true if allowed.
   virtual bool CanCreateAppCache(
       const GURL& manifest_url,
 
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) = 0;
+      const absl::optional<url::Origin>& top_frame_origin) = 0;
 
   // Returns true if origin trial tokens are required in order to fetch or
   // update manifests, as well as load any resources from such a manifest.
diff --git a/content/browser/appcache/appcache_request.cc b/content/browser/appcache/appcache_request.cc
index 25a6739..a300855 100644
--- a/content/browser/appcache/appcache_request.cc
+++ b/content/browser/appcache/appcache_request.cc
@@ -31,10 +31,10 @@
   return 0;
 }
 
-base::Optional<url::Origin> AppCacheRequest::GetTopFrameOrigin() const {
+absl::optional<url::Origin> AppCacheRequest::GetTopFrameOrigin() const {
   return request_.trusted_params
              ? request_.trusted_params->isolation_info.top_frame_origin()
-             : base::nullopt;
+             : absl::nullopt;
 }
 
 std::string AppCacheRequest::GetResponseHeaderByName(
@@ -50,8 +50,8 @@
   bool not_used_clear_body;
   net::RedirectUtil::UpdateHttpRequest(
       request_.url, request_.method, redirect_info,
-      base::nullopt /* removed_request_headers */,
-      base::nullopt /* modified_request_headers */, &request_.headers,
+      absl::nullopt /* removed_request_headers */,
+      absl::nullopt /* modified_request_headers */, &request_.headers,
       &not_used_clear_body);
   request_.url = redirect_info.new_url;
   request_.method = redirect_info.new_method;
diff --git a/content/browser/appcache/appcache_request.h b/content/browser/appcache/appcache_request.h
index b4d5ab7..7d9f5ccf 100644
--- a/content/browser/appcache/appcache_request.h
+++ b/content/browser/appcache/appcache_request.h
@@ -8,11 +8,11 @@
 #include <string>
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "content/common/content_export.h"
 #include "services/network/public/cpp/resource_request.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace net {
@@ -50,7 +50,7 @@
   }
 
   // Used for cookie policy.
-  base::Optional<url::Origin> GetTopFrameOrigin() const;
+  absl::optional<url::Origin> GetTopFrameOrigin() const;
 
   // The referrer for this request.
   const GURL GetReferrer() const { return request_.referrer; }
diff --git a/content/browser/appcache/appcache_request_handler.cc b/content/browser/appcache/appcache_request_handler.cc
index 92060461..dc86684b 100644
--- a/content/browser/appcache/appcache_request_handler.cc
+++ b/content/browser/appcache/appcache_request_handler.cc
@@ -644,10 +644,10 @@
   return true;
 }
 
-base::Optional<SubresourceLoaderParams>
+absl::optional<SubresourceLoaderParams>
 AppCacheRequestHandler::MaybeCreateSubresourceLoaderParams() {
   if (!should_create_subresource_loader_)
-    return base::nullopt;
+    return absl::nullopt;
 
   // The factory is destroyed when the renderer drops the connection.
   mojo::PendingRemote<network::mojom::URLLoaderFactory> factory_remote;
@@ -657,7 +657,7 @@
 
   SubresourceLoaderParams params;
   params.pending_appcache_loader_factory = std::move(factory_remote);
-  return base::Optional<SubresourceLoaderParams>(std::move(params));
+  return absl::optional<SubresourceLoaderParams>(std::move(params));
 }
 
 void AppCacheRequestHandler::MaybeCreateSubresourceLoader(
diff --git a/content/browser/appcache/appcache_request_handler.h b/content/browser/appcache/appcache_request_handler.h
index cd92744..b60e0cb0 100644
--- a/content/browser/appcache/appcache_request_handler.h
+++ b/content/browser/appcache/appcache_request_handler.h
@@ -77,7 +77,7 @@
       blink::ThrottlingURLLoader* url_loader,
       bool* skip_other_interceptors,
       bool* will_return_unsafe_redirect) override;
-  base::Optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams()
+  absl::optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams()
       override;
 
   // These methods are used for subresource loading by the
diff --git a/content/browser/appcache/appcache_storage_impl_unittest.cc b/content/browser/appcache/appcache_storage_impl_unittest.cc
index 6c5dccc8..ce53b46 100644
--- a/content/browser/appcache/appcache_storage_impl_unittest.cc
+++ b/content/browser/appcache/appcache_storage_impl_unittest.cc
@@ -1828,7 +1828,7 @@
   TestBrowserContext browser_context_;
   base::test::ScopedFeatureList appcache_require_origin_trial_feature_;
   // Delayed initialization to avoid data races with feature list.
-  base::Optional<base::WeakPtrFactory<StoragePartitionImpl>>
+  absl::optional<base::WeakPtrFactory<StoragePartitionImpl>>
       weak_partition_factory_;
 
   // Test data
diff --git a/content/browser/appcache/appcache_subresource_url_factory.cc b/content/browser/appcache/appcache_subresource_url_factory.cc
index f177fc0..9b51af2 100644
--- a/content/browser/appcache/appcache_subresource_url_factory.cc
+++ b/content/browser/appcache/appcache_subresource_url_factory.cc
@@ -131,14 +131,14 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {
+      const absl::optional<GURL>& new_url) override {
     DCHECK(modified_headers.IsEmpty() && modified_cors_exempt_headers.IsEmpty())
         << "Redirect with modified headers was not supported yet. "
            "crbug.com/845683";
     if (!handler_) {
       network_loader_->FollowRedirect(
           removed_headers, {} /* modified_headers */,
-          {} /* modified_cors_exempt_headers */, base::nullopt /* new_url */);
+          {} /* modified_cors_exempt_headers */, absl::nullopt /* new_url */);
       return;
     }
     DCHECK(network_loader_);
@@ -157,7 +157,7 @@
     } else {
       network_loader_->FollowRedirect(
           {} /* removed_headers */, {} /* modified_headers */,
-          {} /* modified_cors_exempt_headers */, base::nullopt /* new_url */);
+          {} /* modified_cors_exempt_headers */, absl::nullopt /* new_url */);
     }
   }
 
diff --git a/content/browser/appcache/appcache_update_url_loader_request.cc b/content/browser/appcache/appcache_update_url_loader_request.cc
index c116c42..df25d8a 100644
--- a/content/browser/appcache/appcache_update_url_loader_request.cc
+++ b/content/browser/appcache/appcache_update_url_loader_request.cc
@@ -93,7 +93,7 @@
 }
 
 void AppCacheUpdateJob::UpdateURLLoaderRequest::SetInitiator(
-    const base::Optional<url::Origin>& initiator) {
+    const absl::optional<url::Origin>& initiator) {
   request_.request_initiator = initiator;
 }
 
diff --git a/content/browser/appcache/appcache_update_url_loader_request.h b/content/browser/appcache/appcache_update_url_loader_request.h
index 68fcfea..66ad552 100644
--- a/content/browser/appcache/appcache_update_url_loader_request.h
+++ b/content/browser/appcache/appcache_update_url_loader_request.h
@@ -65,7 +65,7 @@
   void SetSiteForCookies(const GURL& site_for_cookies);
 
   // Sets the origin of the context which initiated the request.
-  void SetInitiator(const base::Optional<url::Origin>& initiator);
+  void SetInitiator(const absl::optional<url::Origin>& initiator);
 
   // Get all response headers, as a HttpResponseHeaders object.  See comments
   // in HttpResponseHeaders class as to the format of the data.
diff --git a/content/browser/appcache/appcache_url_loader.cc b/content/browser/appcache/appcache_url_loader.cc
index 191c1f1..d861070 100644
--- a/content/browser/appcache/appcache_url_loader.cc
+++ b/content/browser/appcache/appcache_url_loader.cc
@@ -145,7 +145,7 @@
     const std::vector<std::string>& modified_headers,
     const net::HttpRequestHeaders& removed_headers,
     const net::HttpRequestHeaders& removed_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   NOTREACHED() << "appcache never produces redirects";
 }
 
diff --git a/content/browser/appcache/appcache_url_loader.h b/content/browser/appcache/appcache_url_loader.h
index c24eae06..09aeddc4 100644
--- a/content/browser/appcache/appcache_url_loader.h
+++ b/content/browser/appcache/appcache_url_loader.h
@@ -131,7 +131,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc
index 17c8f938..84662218 100644
--- a/content/browser/appcache/chrome_appcache_service.cc
+++ b/content/browser/appcache/chrome_appcache_service.cc
@@ -59,7 +59,7 @@
 bool ChromeAppCacheService::CanLoadAppCache(
     const GURL& manifest_url,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   return GetContentClient()->browser()->AllowAppCache(
       manifest_url, site_for_cookies, top_frame_origin, browser_context_);
@@ -68,7 +68,7 @@
 bool ChromeAppCacheService::CanCreateAppCache(
     const GURL& manifest_url,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   return GetContentClient()->browser()->AllowAppCache(
       manifest_url, site_for_cookies, top_frame_origin, browser_context_);
diff --git a/content/browser/appcache/chrome_appcache_service.h b/content/browser/appcache/chrome_appcache_service.h
index e028d63..047b52a1 100644
--- a/content/browser/appcache/chrome_appcache_service.h
+++ b/content/browser/appcache/chrome_appcache_service.h
@@ -64,11 +64,11 @@
   bool CanLoadAppCache(
       const GURL& manifest_url,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) override;
+      const absl::optional<url::Origin>& top_frame_origin) override;
   bool CanCreateAppCache(
       const GURL& manifest_url,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) override;
+      const absl::optional<url::Origin>& top_frame_origin) override;
   bool IsOriginTrialRequiredForAppCache() override;
 
  protected:
diff --git a/content/browser/appcache/mock_appcache_policy.cc b/content/browser/appcache/mock_appcache_policy.cc
index c9fbcfa..8d53019 100644
--- a/content/browser/appcache/mock_appcache_policy.cc
+++ b/content/browser/appcache/mock_appcache_policy.cc
@@ -18,7 +18,7 @@
 bool MockAppCachePolicy::CanLoadAppCache(
     const GURL& manifest_url,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   requested_manifest_url_ = manifest_url;
   return can_load_return_value_;
 }
@@ -26,7 +26,7 @@
 bool MockAppCachePolicy::CanCreateAppCache(
     const GURL& manifest_url,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   requested_manifest_url_ = manifest_url;
   return can_create_return_value_;
 }
diff --git a/content/browser/appcache/mock_appcache_policy.h b/content/browser/appcache/mock_appcache_policy.h
index 747315ee..ec1b40e 100644
--- a/content/browser/appcache/mock_appcache_policy.h
+++ b/content/browser/appcache/mock_appcache_policy.h
@@ -19,11 +19,11 @@
   bool CanLoadAppCache(
       const GURL& manifest_url,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) override;
+      const absl::optional<url::Origin>& top_frame_origin) override;
   bool CanCreateAppCache(
       const GURL& manifest_url,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) override;
+      const absl::optional<url::Origin>& top_frame_origin) override;
   bool IsOriginTrialRequiredForAppCache() override;
 
   bool can_load_return_value_;
diff --git a/content/browser/audio/audio_service.cc b/content/browser/audio/audio_service.cc
index 41dc4a8..659d904a 100644
--- a/content/browser/audio/audio_service.cc
+++ b/content/browser/audio/audio_service.cc
@@ -8,7 +8,6 @@
 #include "base/deferred_sequenced_task_runner.h"
 #include "base/metrics/field_trial_params.h"
 #include "base/no_destructor.h"
-#include "base/optional.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/threading/sequence_local_storage_slot.h"
 #include "base/time/time.h"
@@ -28,37 +27,38 @@
 #include "services/audio/public/cpp/audio_system_to_service_adapter.h"
 #include "services/audio/service.h"
 #include "services/audio/service_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
 namespace {
 
-base::Optional<base::TimeDelta> GetFieldTrialIdleTimeout() {
+absl::optional<base::TimeDelta> GetFieldTrialIdleTimeout() {
   std::string timeout_str =
       base::GetFieldTrialParamValue("AudioService", "teardown_timeout_s");
   int timeout_s = 0;
   if (!base::StringToInt(timeout_str, &timeout_s))
-    return base::nullopt;
+    return absl::nullopt;
   return base::TimeDelta::FromSeconds(timeout_s);
 }
 
-base::Optional<base::TimeDelta> GetCommandLineIdleTimeout() {
+absl::optional<base::TimeDelta> GetCommandLineIdleTimeout() {
   const base::CommandLine& command_line =
       *base::CommandLine::ForCurrentProcess();
   std::string timeout_str =
       command_line.GetSwitchValueASCII(switches::kAudioServiceQuitTimeoutMs);
   int timeout_ms = 0;
   if (!base::StringToInt(timeout_str, &timeout_ms))
-    return base::nullopt;
+    return absl::nullopt;
   return base::TimeDelta::FromMilliseconds(timeout_ms);
 }
 
-base::Optional<base::TimeDelta> GetAudioServiceProcessIdleTimeout() {
-  base::Optional<base::TimeDelta> timeout = GetCommandLineIdleTimeout();
+absl::optional<base::TimeDelta> GetAudioServiceProcessIdleTimeout() {
+  absl::optional<base::TimeDelta> timeout = GetCommandLineIdleTimeout();
   if (!timeout)
     timeout = GetFieldTrialIdleTimeout();
   if (timeout && *timeout < base::TimeDelta())
-    return base::nullopt;
+    return absl::nullopt;
   return timeout;
 }
 
diff --git a/content/browser/back_forward_cache_browsertest.cc b/content/browser/back_forward_cache_browsertest.cc
index 9b0c14e..3a88ff2 100644
--- a/content/browser/back_forward_cache_browsertest.cc
+++ b/content/browser/back_forward_cache_browsertest.cc
@@ -10,7 +10,6 @@
 #include "base/hash/hash.h"
 #include "base/location.h"
 #include "base/metrics/metrics_hashes.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece_forward.h"
 #include "base/strings/stringprintf.h"
@@ -91,6 +90,7 @@
 #include "services/device/public/mojom/vibration_manager.mojom.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/common/scheduler/web_scheduler_tracked_feature.h"
@@ -7304,7 +7304,7 @@
   WaitForFirstVisuallyNonEmptyPaint(web_contents());
   ASSERT_FALSE(delete_observer_rfh_a.deleted());
   EXPECT_TRUE(rfh_a->IsInBackForwardCache());
-  EXPECT_EQ(web_contents()->GetThemeColor(), base::nullopt);
+  EXPECT_EQ(web_contents()->GetThemeColor(), absl::nullopt);
 
   ThemeColorObserver observer(web_contents());
   web_contents()->GetController().GoBack();
diff --git a/content/browser/background_fetch/background_fetch_context.cc b/content/browser/background_fetch/background_fetch_context.cc
index 3af383ac..389919f 100644
--- a/content/browser/background_fetch/background_fetch_context.cc
+++ b/content/browser/background_fetch/background_fetch_context.cc
@@ -239,8 +239,8 @@
 
 void BackgroundFetchContext::UpdateUI(
     const BackgroundFetchRegistrationId& registration_id,
-    const base::Optional<std::string>& title,
-    const base::Optional<SkBitmap>& icon,
+    const absl::optional<std::string>& title,
+    const absl::optional<SkBitmap>& icon,
     blink::mojom::BackgroundFetchRegistrationService::UpdateUICallback
         callback) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
diff --git a/content/browser/background_fetch/background_fetch_context.h b/content/browser/background_fetch/background_fetch_context.h
index 2ab5895..02ef995d 100644
--- a/content/browser/background_fetch/background_fetch_context.h
+++ b/content/browser/background_fetch/background_fetch_context.h
@@ -13,13 +13,13 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted_delete_on_sequence.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/background_fetch/background_fetch_delegate_proxy.h"
 #include "content/browser/background_fetch/background_fetch_event_dispatcher.h"
 #include "content/browser/background_fetch/storage/get_initialization_data_task.h"
 #include "content/browser/devtools/devtools_background_services_context_impl.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
 
 namespace storage {
@@ -123,8 +123,8 @@
   // internal |icon| is guarnteed to be not null.
   void UpdateUI(
       const BackgroundFetchRegistrationId& registration_id,
-      const base::Optional<std::string>& title,
-      const base::Optional<SkBitmap>& icon,
+      const absl::optional<std::string>& title,
+      const absl::optional<SkBitmap>& icon,
       blink::mojom::BackgroundFetchRegistrationService::UpdateUICallback
           callback);
 
diff --git a/content/browser/background_fetch/background_fetch_data_manager.h b/content/browser/background_fetch/background_fetch_data_manager.h
index 32eec55c5..ad9f003c 100644
--- a/content/browser/background_fetch/background_fetch_data_manager.h
+++ b/content/browser/background_fetch/background_fetch_data_manager.h
@@ -18,13 +18,13 @@
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "content/browser/background_fetch/background_fetch.pb.h"
 #include "content/browser/background_fetch/background_fetch_registration_id.h"
 #include "content/browser/background_fetch/background_fetch_scheduler.h"
 #include "content/browser/background_fetch/storage/database_task.h"
 #include "content/browser/background_fetch/storage/get_initialization_data_task.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
 #include "url/origin.h"
 
diff --git a/content/browser/background_fetch/background_fetch_data_manager_observer.h b/content/browser/background_fetch/background_fetch_data_manager_observer.h
index ca4a0aa..3fb231c5 100644
--- a/content/browser/background_fetch/background_fetch_data_manager_observer.h
+++ b/content/browser/background_fetch/background_fetch_data_manager_observer.h
@@ -9,7 +9,7 @@
 #include <vector>
 
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
 
 class SkBitmap;
diff --git a/content/browser/background_fetch/background_fetch_delegate_proxy.cc b/content/browser/background_fetch/background_fetch_delegate_proxy.cc
index 93d6c1d..72a5ffd 100644
--- a/content/browser/background_fetch/background_fetch_delegate_proxy.cc
+++ b/content/browser/background_fetch/background_fetch_delegate_proxy.cc
@@ -201,8 +201,8 @@
   }
 
   void UpdateUI(const std::string& job_unique_id,
-                const base::Optional<std::string>& title,
-                const base::Optional<SkBitmap>& icon) {
+                const absl::optional<std::string>& title,
+                const absl::optional<SkBitmap>& icon) {
     DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
     if (auto* delegate = browser_context_->GetBackgroundFetchDelegate())
@@ -405,8 +405,8 @@
 
 void BackgroundFetchDelegateProxy::UpdateUI(
     const std::string& job_unique_id,
-    const base::Optional<std::string>& title,
-    const base::Optional<SkBitmap>& icon,
+    const absl::optional<std::string>& title,
+    const absl::optional<SkBitmap>& icon,
     blink::mojom::BackgroundFetchRegistrationService::UpdateUICallback
         update_ui_callback) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
diff --git a/content/browser/background_fetch/background_fetch_delegate_proxy.h b/content/browser/background_fetch/background_fetch_delegate_proxy.h
index fcd3cf6..e2dc8741 100644
--- a/content/browser/background_fetch/background_fetch_delegate_proxy.h
+++ b/content/browser/background_fetch/background_fetch_delegate_proxy.h
@@ -14,12 +14,12 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/background_fetch/background_fetch_request_info.h"
 #include "content/public/browser/background_fetch_delegate.h"
 #include "content/public/browser/background_fetch_description.h"
 #include "content/public/browser/background_fetch_response.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
 
 class SkBitmap;
@@ -116,8 +116,8 @@
   // Called from the Controller (on the service worker core thread).
   void UpdateUI(
       const std::string& job_unique_id,
-      const base::Optional<std::string>& title,
-      const base::Optional<SkBitmap>& icon,
+      const absl::optional<std::string>& title,
+      const absl::optional<SkBitmap>& icon,
       blink::mojom::BackgroundFetchRegistrationService::UpdateUICallback
           update_ui_callback);
 
diff --git a/content/browser/background_fetch/background_fetch_delegate_proxy_unittest.cc b/content/browser/background_fetch/background_fetch_delegate_proxy_unittest.cc
index 966812b..95cb3e69 100644
--- a/content/browser/background_fetch/background_fetch_delegate_proxy_unittest.cc
+++ b/content/browser/background_fetch/background_fetch_delegate_proxy_unittest.cc
@@ -81,8 +81,8 @@
   void MarkJobComplete(const std::string& job_unique_id) override {}
 
   void UpdateUI(const std::string& job_unique_id,
-                const base::Optional<std::string>& title,
-                const base::Optional<SkBitmap>& icon) override {
+                const absl::optional<std::string>& title,
+                const absl::optional<SkBitmap>& icon) override {
     ++ui_update_count_;
   }
 
@@ -109,7 +109,7 @@
         job_unique_id, guid,
         std::make_unique<BackgroundFetchResult>(
             std::move(response), base::Time::Now(), base::FilePath(),
-            base::nullopt /* blob_handle */, 10u));
+            absl::nullopt /* blob_handle */, 10u));
     download_guid_to_url_map_.erase(guid);
   }
 
@@ -330,7 +330,7 @@
   EXPECT_TRUE(controller.request_started_);
   EXPECT_TRUE(controller.request_completed_);
 
-  delegate_proxy_.UpdateUI(kExampleUniqueId, "Job 1 Complete!", base::nullopt,
+  delegate_proxy_.UpdateUI(kExampleUniqueId, "Job 1 Complete!", absl::nullopt,
                            base::DoNothing());
   base::RunLoop().RunUntilIdle();
   EXPECT_EQ(delegate_->ui_update_count_, 1);
diff --git a/content/browser/background_fetch/background_fetch_job_controller.h b/content/browser/background_fetch/background_fetch_job_controller.h
index e635c86..0d041d2 100644
--- a/content/browser/background_fetch/background_fetch_job_controller.h
+++ b/content/browser/background_fetch/background_fetch_job_controller.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/background_fetch/background_fetch_delegate_proxy.h"
 #include "content/browser/background_fetch/background_fetch_registration_id.h"
 #include "content/browser/background_fetch/background_fetch_request_info.h"
@@ -22,6 +21,7 @@
 #include "content/common/background_fetch/background_fetch_types.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 
 namespace content {
diff --git a/content/browser/background_fetch/background_fetch_registration_service_impl.cc b/content/browser/background_fetch/background_fetch_registration_service_impl.cc
index d33a6b4c..325f3bc 100644
--- a/content/browser/background_fetch/background_fetch_registration_service_impl.cc
+++ b/content/browser/background_fetch/background_fetch_registration_service_impl.cc
@@ -10,7 +10,6 @@
 #include "base/callback_helpers.h"
 #include "base/guid.h"
 #include "base/memory/ptr_util.h"
-#include "base/optional.h"
 #include "base/task/post_task.h"
 #include "content/browser/background_fetch/background_fetch_context.h"
 #include "content/browser/background_fetch/background_fetch_metrics.h"
@@ -23,6 +22,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/render_process_host.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
 
 namespace content {
@@ -85,7 +85,7 @@
 }
 
 void BackgroundFetchRegistrationServiceImpl::UpdateUI(
-    const base::Optional<std::string>& title,
+    const absl::optional<std::string>& title,
     const SkBitmap& icon,
     UpdateUICallback callback) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
@@ -103,7 +103,7 @@
 
   // Wrap the icon in an optional for clarity.
   auto optional_icon =
-      icon.isNull() ? base::nullopt : base::Optional<SkBitmap>(icon);
+      icon.isNull() ? absl::nullopt : absl::optional<SkBitmap>(icon);
 
   background_fetch_context_->UpdateUI(registration_id_, title, optional_icon,
                                       std::move(callback));
diff --git a/content/browser/background_fetch/background_fetch_registration_service_impl.h b/content/browser/background_fetch/background_fetch_registration_service_impl.h
index 4644f01..e5ea1db 100644
--- a/content/browser/background_fetch/background_fetch_registration_service_impl.h
+++ b/content/browser/background_fetch/background_fetch_registration_service_impl.h
@@ -27,7 +27,7 @@
                      blink::mojom::CacheQueryOptionsPtr cache_query_options,
                      bool match_all,
                      MatchRequestsCallback callback) override;
-  void UpdateUI(const base::Optional<std::string>& title,
+  void UpdateUI(const absl::optional<std::string>& title,
                 const SkBitmap& icon,
                 UpdateUICallback callback) override;
   void Abort(AbortCallback callback) override;
diff --git a/content/browser/background_fetch/background_fetch_request_info.h b/content/browser/background_fetch/background_fetch_request_info.h
index 8306cd3..ebd0bd6 100644
--- a/content/browser/background_fetch/background_fetch_request_info.h
+++ b/content/browser/background_fetch/background_fetch_request_info.h
@@ -12,7 +12,6 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted_delete_on_sequence.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/time/time.h"
 #include "components/download/public/common/download_item.h"
@@ -20,6 +19,7 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/background_fetch_response.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
 #include "url/gurl.h"
 
diff --git a/content/browser/background_fetch/background_fetch_request_match_params.h b/content/browser/background_fetch/background_fetch_request_match_params.h
index 26bcc64..00da877 100644
--- a/content/browser/background_fetch/background_fetch_request_match_params.h
+++ b/content/browser/background_fetch/background_fetch_request_match_params.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_REQUEST_MATCH_PARAMS_H_
 #define CONTENT_BROWSER_BACKGROUND_FETCH_BACKGROUND_FETCH_REQUEST_MATCH_PARAMS_H_
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h"
 
 namespace content {
diff --git a/content/browser/background_fetch/background_fetch_service_impl.cc b/content/browser/background_fetch/background_fetch_service_impl.cc
index a6e1c57..b07aae88 100644
--- a/content/browser/background_fetch/background_fetch_service_impl.cc
+++ b/content/browser/background_fetch/background_fetch_service_impl.cc
@@ -9,7 +9,6 @@
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/guid.h"
-#include "base/optional.h"
 #include "base/task/post_task.h"
 #include "content/browser/background_fetch/background_fetch_context.h"
 #include "content/browser/background_fetch/background_fetch_metrics.h"
@@ -24,6 +23,7 @@
 #include "content/public/browser/service_worker_version_base_info.h"
 #include "content/public/browser/web_contents.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
 
 namespace content {
diff --git a/content/browser/background_fetch/background_fetch_test_service_worker.h b/content/browser/background_fetch/background_fetch_test_service_worker.h
index f172c13..02295c5 100644
--- a/content/browser/background_fetch/background_fetch_test_service_worker.h
+++ b/content/browser/background_fetch/background_fetch_test_service_worker.h
@@ -11,8 +11,8 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/browser/service_worker/embedded_worker_test_helper.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/background_fetch/mock_background_fetch_delegate.cc b/content/browser/background_fetch/mock_background_fetch_delegate.cc
index 4906675..b2a10a2 100644
--- a/content/browser/background_fetch/mock_background_fetch_delegate.cc
+++ b/content/browser/background_fetch/mock_background_fetch_delegate.cc
@@ -160,7 +160,7 @@
                 std::make_unique<BackgroundFetchResponse>(
                     std::vector<GURL>({url}), test_response->headers),
                 base::Time::Now(), response_path,
-                /* blob_handle= */ base::nullopt, test_response->data.size())));
+                /* blob_handle= */ absl::nullopt, test_response->data.size())));
   } else {
     auto response = std::make_unique<BackgroundFetchResponse>(
         std::vector<GURL>({url}), test_response->headers);
@@ -188,8 +188,8 @@
 
 void MockBackgroundFetchDelegate::UpdateUI(
     const std::string& job_unique_id,
-    const base::Optional<std::string>& title,
-    const base::Optional<SkBitmap>& icon) {
+    const absl::optional<std::string>& title,
+    const absl::optional<SkBitmap>& icon) {
   job_id_to_client_map_[job_unique_id]->OnUIUpdated(job_unique_id);
 }
 
diff --git a/content/browser/background_fetch/mock_background_fetch_delegate.h b/content/browser/background_fetch/mock_background_fetch_delegate.h
index dae4c2be..20bb662d4 100644
--- a/content/browser/background_fetch/mock_background_fetch_delegate.h
+++ b/content/browser/background_fetch/mock_background_fetch_delegate.h
@@ -12,8 +12,8 @@
 #include <vector>
 
 #include "base/files/scoped_temp_dir.h"
-#include "base/optional.h"
 #include "content/public/browser/background_fetch_delegate.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "url/gurl.h"
 
@@ -83,8 +83,8 @@
   void Abort(const std::string& job_unique_id) override;
   void MarkJobComplete(const std::string& job_unique_id) override;
   void UpdateUI(const std::string& job_unique_id,
-                const base::Optional<std::string>& title,
-                const base::Optional<SkBitmap>& icon) override;
+                const absl::optional<std::string>& title,
+                const absl::optional<SkBitmap>& icon) override;
 
   void RegisterResponse(const GURL& url,
                         std::unique_ptr<TestResponse> response);
diff --git a/content/browser/bluetooth/bluetooth_allowed_devices.cc b/content/browser/bluetooth/bluetooth_allowed_devices.cc
index 0f69a5f..234744e 100644
--- a/content/browser/bluetooth/bluetooth_allowed_devices.cc
+++ b/content/browser/bluetooth/bluetooth_allowed_devices.cc
@@ -9,9 +9,9 @@
 
 #include "base/containers/contains.h"
 #include "base/logging.h"
-#include "base/optional.h"
 #include "base/strings/string_util.h"
 #include "content/browser/bluetooth/bluetooth_blocklist.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 using device::BluetoothUUID;
 
diff --git a/content/browser/bluetooth/bluetooth_allowed_devices.h b/content/browser/bluetooth/bluetooth_allowed_devices.h
index 9eb01622..6e3917e 100644
--- a/content/browser/bluetooth/bluetooth_allowed_devices.h
+++ b/content/browser/bluetooth/bluetooth_allowed_devices.h
@@ -12,8 +12,8 @@
 #include <vector>
 
 #include "base/containers/flat_set.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
 
diff --git a/content/browser/bluetooth/bluetooth_blocklist.cc b/content/browser/bluetooth/bluetooth_blocklist.cc
index df73f68..acc12ef 100644
--- a/content/browser/bluetooth/bluetooth_blocklist.cc
+++ b/content/browser/bluetooth/bluetooth_blocklist.cc
@@ -6,10 +6,10 @@
 
 #include "base/check.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/strings/string_split.h"
 #include "content/public/browser/content_browser_client.h"
 #include "content/public/common/content_client.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 using device::BluetoothUUID;
 
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
index 55bbd27..9dc6575 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
@@ -196,7 +196,7 @@
     const std::string* device_name,
     const UUIDSet& device_uuids,
     const ManufacturerDataMap& device_manufacturer_data,
-    const base::Optional<
+    const absl::optional<
         std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>>& filters) {
   DCHECK(HasValidFilter(filters));
   for (const auto& filter : filters.value()) {
@@ -338,13 +338,13 @@
 
 void BluetoothDeviceChooserController::AddFilteredDevice(
     const device::BluetoothDevice& device) {
-  base::Optional<std::string> device_name = device.GetName();
+  absl::optional<std::string> device_name = device.GetName();
   if (chooser_.get()) {
     if (options_->accept_all_devices ||
         MatchesFilters(device_name ? &device_name.value() : nullptr,
                        device.GetUUIDs(), device.GetManufacturerData(),
                        options_->filters)) {
-      base::Optional<int8_t> rssi = device.GetInquiryRSSI();
+      absl::optional<int8_t> rssi = device.GetInquiryRSSI();
       std::string device_id = device.GetAddress();
       device_ids_.insert(device_id);
       chooser_->AddOrUpdateDevice(
@@ -534,7 +534,7 @@
 // static
 std::unique_ptr<device::BluetoothDiscoveryFilter>
 BluetoothDeviceChooserController::ComputeScanFilter(
-    const base::Optional<
+    const absl::optional<
         std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>>& filters) {
   // There isn't much support for GATT over BR/EDR from neither platforms nor
   // devices so performing a Dual scan will find devices that the API is not
diff --git a/content/browser/bluetooth/bluetooth_device_chooser_controller.h b/content/browser/bluetooth/bluetooth_device_chooser_controller.h
index 6931155..3c193825 100644
--- a/content/browser/bluetooth/bluetooth_device_chooser_controller.h
+++ b/content/browser/bluetooth/bluetooth_device_chooser_controller.h
@@ -9,10 +9,10 @@
 #include <unordered_set>
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/bluetooth_chooser.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
 
 namespace device {
@@ -94,7 +94,7 @@
           TestScanDurationSetting::IMMEDIATE_TIMEOUT);
 
   static std::unique_ptr<device::BluetoothDiscoveryFilter> ComputeScanFilter(
-      const base::Optional<
+      const absl::optional<
           std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>>& filters);
 
  private:
diff --git a/content/browser/bluetooth/bluetooth_metrics.cc b/content/browser/bluetooth/bluetooth_metrics.cc
index 922cf78..0b26b6b6 100644
--- a/content/browser/bluetooth/bluetooth_metrics.cc
+++ b/content/browser/bluetooth/bluetooth_metrics.cc
@@ -37,7 +37,7 @@
   return static_cast<int>(data & 0x7fffffff);
 }
 
-int HashUUID(const base::Optional<BluetoothUUID>& uuid) {
+int HashUUID(const absl::optional<BluetoothUUID>& uuid) {
   return uuid ? HashUUID(uuid->canonical_value()) : 0;
 }
 
@@ -126,7 +126,7 @@
 
 void RecordGetPrimaryServicesServices(
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<BluetoothUUID>& service) {
+    const absl::optional<BluetoothUUID>& service) {
   // TODO(ortuno): Use a macro to histogram strings.
   // http://crbug.com/520284
   switch (quantity) {
@@ -143,7 +143,7 @@
 
 void RecordGetCharacteristicsCharacteristic(
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<BluetoothUUID>& characteristic) {
+    const absl::optional<BluetoothUUID>& characteristic) {
   switch (quantity) {
     case blink::mojom::WebBluetoothGATTQueryQuantity::SINGLE:
       base::UmaHistogramSparse("Bluetooth.Web.GetCharacteristic.Characteristic",
diff --git a/content/browser/bluetooth/bluetooth_metrics.h b/content/browser/bluetooth/bluetooth_metrics.h
index 4a3cba9a..9b8976c 100644
--- a/content/browser/bluetooth/bluetooth_metrics.h
+++ b/content/browser/bluetooth/bluetooth_metrics.h
@@ -104,7 +104,7 @@
 // Records the UUID of the service used when calling getPrimaryService.
 void RecordGetPrimaryServicesServices(
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<device::BluetoothUUID>& service);
+    const absl::optional<device::BluetoothUUID>& service);
 
 // getCharacteristic() and getCharacteristics() Metrics
 
@@ -154,7 +154,7 @@
 // Records the UUID of the characteristic used when calling getCharacteristic.
 void RecordGetCharacteristicsCharacteristic(
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<device::BluetoothUUID>& characteristic);
+    const absl::optional<device::BluetoothUUID>& characteristic);
 
 // Records the outcome of the cache query for getDescriptors. Should only be
 // called if QueryCacheForService fails.
diff --git a/content/browser/bluetooth/bluetooth_util_unittest.cc b/content/browser/bluetooth/bluetooth_util_unittest.cc
index 7545c8a..a16b7ea 100644
--- a/content/browser/bluetooth/bluetooth_util_unittest.cc
+++ b/content/browser/bluetooth/bluetooth_util_unittest.cc
@@ -44,7 +44,7 @@
 };
 
 TEST_F(BluetoothUtilTest, SameFilters) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -67,135 +67,135 @@
 }
 
 TEST_F(BluetoothUtilTest, BothNoName) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, /*name=*/base::nullopt, "a",
-      /*manufacturer_data=*/base::nullopt);
+      services, /*name=*/absl::nullopt, "a",
+      /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, /*name=*/base::nullopt, "a",
-      /*manufacturer_data=*/base::nullopt);
+      services, /*name=*/absl::nullopt, "a",
+      /*manufacturer_data=*/absl::nullopt);
   EXPECT_TRUE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, OnlyOneHasName) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "a", /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, /*name=*/base::nullopt, "a",
-      /*manufacturer_data=*/base::nullopt);
+      services, /*name=*/absl::nullopt, "a",
+      /*manufacturer_data=*/absl::nullopt);
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, DifferentName) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "a", /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "cd", "a", /*manufacturer_data=*/base::nullopt);
+      services, "cd", "a", /*manufacturer_data=*/absl::nullopt);
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, BothNoNamePrefix) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", /*name_prefix=*/base::nullopt,
-      /*manufacturer_data=*/base::nullopt);
+      services, "ab", /*name_prefix=*/absl::nullopt,
+      /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", /*name_prefix=*/base::nullopt,
-      /*manufacturer_data=*/base::nullopt);
+      services, "ab", /*name_prefix=*/absl::nullopt,
+      /*manufacturer_data=*/absl::nullopt);
   EXPECT_TRUE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, OnlyOneHasNamePrefix) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "a", /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", /*name_prefix=*/base::nullopt,
-      /*manufacturer_data=*/base::nullopt);
+      services, "ab", /*name_prefix=*/absl::nullopt,
+      /*manufacturer_data=*/absl::nullopt);
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, DifferentNamePrefix) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "a", /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "ab", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "ab", /*manufacturer_data=*/absl::nullopt);
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, BothNoServicesUUID) {
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      /*services=*/base::nullopt, "ab", "a",
-      /*manufacturer_data=*/base::nullopt);
+      /*services=*/absl::nullopt, "ab", "a",
+      /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      /*services=*/base::nullopt, "ab", "a",
-      /*manufacturer_data=*/base::nullopt);
+      /*services=*/absl::nullopt, "ab", "a",
+      /*manufacturer_data=*/absl::nullopt);
   EXPECT_TRUE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, OnlyOneHasServicesUUID) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "a", /*manufacturer_data=*/absl::nullopt);
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      /*services=*/base::nullopt, "ab", "ab",
-      /*manufacturer_data=*/base::nullopt);
+      /*services=*/absl::nullopt, "ab", "ab",
+      /*manufacturer_data=*/absl::nullopt);
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, DifferentServicesUUID) {
-  base::Optional<std::vector<device::BluetoothUUID>> services_1;
+  absl::optional<std::vector<device::BluetoothUUID>> services_1;
   services_1.emplace();
   services_1->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services_1, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services_1, "ab", "a", /*manufacturer_data=*/absl::nullopt);
 
-  base::Optional<std::vector<device::BluetoothUUID>> services_2;
+  absl::optional<std::vector<device::BluetoothUUID>> services_2;
   services_2.emplace();
   services_2->push_back(device::BluetoothUUID(kCyclingPowerUUIDString));
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services_2, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services_2, "ab", "a", /*manufacturer_data=*/absl::nullopt);
 
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, SameServicesUUIDButDifferentOrder) {
-  base::Optional<std::vector<device::BluetoothUUID>> services_1;
+  absl::optional<std::vector<device::BluetoothUUID>> services_1;
   services_1.emplace();
   services_1->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   services_1->push_back(device::BluetoothUUID(kCyclingPowerUUIDString));
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services_1, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services_1, "ab", "a", /*manufacturer_data=*/absl::nullopt);
 
-  base::Optional<std::vector<device::BluetoothUUID>> services_2;
+  absl::optional<std::vector<device::BluetoothUUID>> services_2;
   services_2.emplace();
   services_2->push_back(device::BluetoothUUID(kCyclingPowerUUIDString));
   services_2->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services_2, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services_2, "ab", "a", /*manufacturer_data=*/absl::nullopt);
 
   EXPECT_TRUE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, BothNoManufacturerData) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -210,7 +210,7 @@
 }
 
 TEST_F(BluetoothUtilTest, OnlyOneHasManufacturerData) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -219,12 +219,12 @@
   auto filter_1 = blink::mojom::WebBluetoothLeScanFilter::New(
       services, "ab", "a", std::move(manufacturer_data));
   auto filter_2 = blink::mojom::WebBluetoothLeScanFilter::New(
-      services, "ab", "a", /*manufacturer_data=*/base::nullopt);
+      services, "ab", "a", /*manufacturer_data=*/absl::nullopt);
   EXPECT_FALSE(AreScanFiltersSame(*filter_1, *filter_2));
 }
 
 TEST_F(BluetoothUtilTest, DifferentManufacturerDataSize) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -246,7 +246,7 @@
 }
 
 TEST_F(BluetoothUtilTest, DifferentManufacturerDataCompanyIdentifier) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -266,7 +266,7 @@
 }
 
 TEST_F(BluetoothUtilTest, DifferentManufacturerDataFilterSize) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -290,7 +290,7 @@
 }
 
 TEST_F(BluetoothUtilTest, DifferentManufacturerData) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
@@ -314,7 +314,7 @@
 }
 
 TEST_F(BluetoothUtilTest, DifferentManufacturerDataMask) {
-  base::Optional<std::vector<device::BluetoothUUID>> services;
+  absl::optional<std::vector<device::BluetoothUUID>> services;
   services.emplace();
   services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
 
diff --git a/content/browser/bluetooth/frame_connected_bluetooth_devices.cc b/content/browser/bluetooth/frame_connected_bluetooth_devices.cc
index f6ff072..80fb998 100644
--- a/content/browser/bluetooth/frame_connected_bluetooth_devices.cc
+++ b/content/browser/bluetooth/frame_connected_bluetooth_devices.cc
@@ -5,12 +5,12 @@
 #include "content/browser/bluetooth/frame_connected_bluetooth_devices.h"
 
 #include "base/containers/contains.h"
-#include "base/optional.h"
 #include "base/strings/string_util.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/browser/web_contents.h"
 #include "device/bluetooth/bluetooth_gatt_connection.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
 
@@ -87,12 +87,12 @@
   DecrementDevicesConnectedCount();
 }
 
-base::Optional<blink::WebBluetoothDeviceId>
+absl::optional<blink::WebBluetoothDeviceId>
 FrameConnectedBluetoothDevices::CloseConnectionToDeviceWithAddress(
     const std::string& device_address) {
   auto device_address_iter = device_address_to_id_map_.find(device_address);
   if (device_address_iter == device_address_to_id_map_.end()) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   blink::WebBluetoothDeviceId device_id = device_address_iter->second;
   auto device_id_iter = device_id_to_connection_map_.find(device_id);
@@ -101,7 +101,7 @@
   CHECK(device_address_to_id_map_.erase(device_address));
   device_id_to_connection_map_.erase(device_id);
   DecrementDevicesConnectedCount();
-  return base::make_optional(device_id);
+  return absl::make_optional(device_id);
 }
 
 void FrameConnectedBluetoothDevices::CloseConnectionsToDevicesNotInList(
diff --git a/content/browser/bluetooth/frame_connected_bluetooth_devices.h b/content/browser/bluetooth/frame_connected_bluetooth_devices.h
index 736bbca..8e9c210 100644
--- a/content/browser/bluetooth/frame_connected_bluetooth_devices.h
+++ b/content/browser/bluetooth/frame_connected_bluetooth_devices.h
@@ -9,9 +9,9 @@
 #include <string>
 #include <unordered_map>
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
 #include "url/origin.h"
@@ -58,7 +58,7 @@
   // WebContents count of connected devices if |device_address| had a
   // connection. Returns the device_id of the device associated with the
   // connection.
-  base::Optional<blink::WebBluetoothDeviceId>
+  absl::optional<blink::WebBluetoothDeviceId>
   CloseConnectionToDeviceWithAddress(const std::string& device_address);
 
   // Deletes all connections that are NOT in the list of |permitted_ids| and
diff --git a/content/browser/bluetooth/web_bluetooth_pairing_manager.cc b/content/browser/bluetooth/web_bluetooth_pairing_manager.cc
index ab9136dd..de857c7 100644
--- a/content/browser/bluetooth/web_bluetooth_pairing_manager.cc
+++ b/content/browser/bluetooth/web_bluetooth_pairing_manager.cc
@@ -40,7 +40,7 @@
     std::move(read_callback)
         .Run(WebBluetoothServiceImpl::TranslateConnectErrorAndRecord(
                  BluetoothDevice::ConnectErrorCode::ERROR_UNKNOWN),
-             /*value=*/base::nullopt);
+             /*value=*/absl::nullopt);
     return;
   }
 
@@ -78,7 +78,7 @@
 
   std::move(read_callback)
       .Run(WebBluetoothServiceImpl::TranslateConnectErrorAndRecord(error_code),
-           /*value=*/base::nullopt);
+           /*value=*/absl::nullopt);
 }
 
 void WebBluetoothPairingManager::RequestPinCode(BluetoothDevice* device) {
diff --git a/content/browser/bluetooth/web_bluetooth_pairing_manager_unittest.cc b/content/browser/bluetooth/web_bluetooth_pairing_manager_unittest.cc
index 628679e2..438278a4 100644
--- a/content/browser/bluetooth/web_bluetooth_pairing_manager_unittest.cc
+++ b/content/browser/bluetooth/web_bluetooth_pairing_manager_unittest.cc
@@ -8,12 +8,12 @@
 #include <utility>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/test/bind.h"
 #include "base/test/task_environment.h"
 #include "content/browser/bluetooth/web_bluetooth_pairing_manager.h"
 #include "content/browser/bluetooth/web_bluetooth_pairing_manager_delegate.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 using blink::WebBluetoothDeviceId;
 using blink::mojom::WebBluetoothResult;
@@ -103,7 +103,7 @@
     }
 
     std::move(callback).Run(WebBluetoothResult::CONNECT_AUTH_REJECTED,
-                            base::nullopt);
+                            absl::nullopt);
   }
 
   const std::string& characteristic_instance_id() const {
@@ -142,7 +142,7 @@
       characteristic_instance_id(), kStartingPairAttemptCount,
       base::BindLambdaForTesting(
           [&loop](WebBluetoothResult result,
-                  const base::Optional<std::vector<uint8_t>>& value) {
+                  const absl::optional<std::vector<uint8_t>>& value) {
             EXPECT_EQ(WebBluetoothResult::SUCCESS, result);
             EXPECT_EQ(value, kTestValue) << "Incorrect characteristic value";
             loop.Quit();
@@ -161,7 +161,7 @@
       characteristic_instance_id(), kStartingPairAttemptCount,
       base::BindLambdaForTesting(
           [&loop](WebBluetoothResult result,
-                  const base::Optional<std::vector<uint8_t>>& value) {
+                  const absl::optional<std::vector<uint8_t>>& value) {
             EXPECT_EQ(WebBluetoothResult::SUCCESS, result);
             EXPECT_EQ(value, kTestValue) << "Incorrect characteristic value";
             loop.Quit();
@@ -180,7 +180,7 @@
       characteristic_instance_id(), kStartingPairAttemptCount,
       base::BindLambdaForTesting(
           [&loop](WebBluetoothResult result,
-                  const base::Optional<std::vector<uint8_t>>& value) {
+                  const absl::optional<std::vector<uint8_t>>& value) {
             EXPECT_EQ(WebBluetoothResult::CONNECT_AUTH_REJECTED, result);
             loop.Quit();
           }));
@@ -198,7 +198,7 @@
       invalid_characteristic_instance_id(), kStartingPairAttemptCount,
       base::BindLambdaForTesting(
           [&loop](WebBluetoothResult result,
-                  const base::Optional<std::vector<uint8_t>>& value) {
+                  const absl::optional<std::vector<uint8_t>>& value) {
             EXPECT_EQ(WebBluetoothResult::CONNECT_UNKNOWN_ERROR, result);
             loop.Quit();
           }));
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.cc b/content/browser/bluetooth/web_bluetooth_service_impl.cc
index 12836e99b..51f41b0 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.cc
@@ -377,7 +377,7 @@
  private:
   void AddFilteredDeviceToPrompt(
       const std::string& device_id,
-      const base::Optional<std::string>& device_name) {
+      const absl::optional<std::string>& device_name) {
     bool should_update_name = device_name.has_value();
     std::u16string device_name_for_display =
         base::UTF8ToUTF16(device_name.value_or(""));
@@ -392,7 +392,7 @@
 };
 
 bool HasValidFilter(
-    const base::Optional<
+    const absl::optional<
         std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>>& filters) {
   if (!filters) {
     return false;
@@ -656,7 +656,7 @@
   }
 
   if (!device->IsGattConnected()) {
-    base::Optional<blink::WebBluetoothDeviceId> device_id =
+    absl::optional<blink::WebBluetoothDeviceId> device_id =
         connected_devices_->CloseConnectionToDeviceWithAddress(
             device->GetAddress());
 
@@ -668,11 +668,11 @@
 
 void WebBluetoothServiceImpl::DeviceAdvertisementReceived(
     const std::string& device_address,
-    const base::Optional<std::string>& device_name,
-    const base::Optional<std::string>& advertisement_name,
-    base::Optional<int8_t> rssi,
-    base::Optional<int8_t> tx_power,
-    base::Optional<uint16_t> appearance,
+    const absl::optional<std::string>& device_name,
+    const absl::optional<std::string>& advertisement_name,
+    absl::optional<int8_t> rssi,
+    absl::optional<int8_t> tx_power,
+    absl::optional<uint16_t> appearance,
     const BluetoothDevice::UUIDList& advertised_uuids,
     const BluetoothDevice::ServiceDataMap& service_data_map,
     const BluetoothDevice::ManufacturerDataMap& manufacturer_data_map) {
@@ -935,7 +935,7 @@
 void WebBluetoothServiceImpl::RemoteServerGetPrimaryServices(
     const blink::WebBluetoothDeviceId& device_id,
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<BluetoothUUID>& services_uuid,
+    const absl::optional<BluetoothUUID>& services_uuid,
     RemoteServerGetPrimaryServicesCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   RecordGetPrimaryServicesServices(quantity, services_uuid);
@@ -943,7 +943,7 @@
   if (!IsAllowedToAccessAtLeastOneService(device_id)) {
     std::move(callback).Run(
         blink::mojom::WebBluetoothResult::NOT_ALLOWED_TO_ACCESS_ANY_SERVICE,
-        /*service=*/base::nullopt);
+        /*service=*/absl::nullopt);
     return;
   }
 
@@ -951,7 +951,7 @@
       !IsAllowedToAccessService(device_id, services_uuid.value())) {
     std::move(callback).Run(
         blink::mojom::WebBluetoothResult::NOT_ALLOWED_TO_ACCESS_SERVICE,
-        /*service=*/base::nullopt);
+        /*service=*/absl::nullopt);
     return;
   }
 
@@ -964,7 +964,7 @@
   if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
     RecordGetPrimaryServicesOutcome(quantity, query_result.outcome);
     std::move(callback).Run(query_result.GetWebResult(),
-                            base::nullopt /* service */);
+                            absl::nullopt /* service */);
     return;
   }
 
@@ -989,7 +989,7 @@
 void WebBluetoothServiceImpl::RemoteServiceGetCharacteristics(
     const std::string& service_instance_id,
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<BluetoothUUID>& characteristics_uuid,
+    const absl::optional<BluetoothUUID>& characteristics_uuid,
     RemoteServiceGetCharacteristicsCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
@@ -999,7 +999,7 @@
       BluetoothBlocklist::Get().IsExcluded(characteristics_uuid.value())) {
     std::move(callback).Run(
         blink::mojom::WebBluetoothResult::BLOCKLISTED_CHARACTERISTIC_UUID,
-        base::nullopt /* characteristics */);
+        absl::nullopt /* characteristics */);
     return;
   }
 
@@ -1012,7 +1012,7 @@
 
   if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
     std::move(callback).Run(query_result.GetWebResult(),
-                            base::nullopt /* characteristics */);
+                            absl::nullopt /* characteristics */);
     return;
   }
 
@@ -1057,13 +1057,13 @@
       characteristics_uuid
           ? blink::mojom::WebBluetoothResult::CHARACTERISTIC_NOT_FOUND
           : blink::mojom::WebBluetoothResult::NO_CHARACTERISTICS_FOUND,
-      base::nullopt /* characteristics */);
+      absl::nullopt /* characteristics */);
 }
 
 void WebBluetoothServiceImpl::RemoteCharacteristicGetDescriptors(
     const std::string& characteristic_instance_id,
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<BluetoothUUID>& descriptors_uuid,
+    const absl::optional<BluetoothUUID>& descriptors_uuid,
     RemoteCharacteristicGetDescriptorsCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
@@ -1071,7 +1071,7 @@
       BluetoothBlocklist::Get().IsExcluded(descriptors_uuid.value())) {
     std::move(callback).Run(
         blink::mojom::WebBluetoothResult::BLOCKLISTED_DESCRIPTOR_UUID,
-        base::nullopt /* descriptor */);
+        absl::nullopt /* descriptor */);
     return;
   }
 
@@ -1084,7 +1084,7 @@
 
   if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
     std::move(callback).Run(query_result.GetWebResult(),
-                            base::nullopt /* descriptor */);
+                            absl::nullopt /* descriptor */);
     return;
   }
 
@@ -1124,7 +1124,7 @@
   std::move(callback).Run(
       descriptors_uuid ? blink::mojom::WebBluetoothResult::DESCRIPTOR_NOT_FOUND
                        : blink::mojom::WebBluetoothResult::NO_DESCRIPTORS_FOUND,
-      base::nullopt /* descriptors */);
+      absl::nullopt /* descriptors */);
 }
 
 void WebBluetoothServiceImpl::RemoteCharacteristicReadValue(
@@ -1141,14 +1141,14 @@
 
   if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
     std::move(callback).Run(query_result.GetWebResult(),
-                            base::nullopt /* value */);
+                            absl::nullopt /* value */);
     return;
   }
 
   if (BluetoothBlocklist::Get().IsExcludedFromReads(
           query_result.characteristic->GetUUID())) {
     std::move(callback).Run(blink::mojom::WebBluetoothResult::BLOCKLISTED_READ,
-                            base::nullopt /* value */);
+                            absl::nullopt /* value */);
     return;
   }
 
@@ -1316,14 +1316,14 @@
 
   if (query_result.outcome != CacheQueryOutcome::SUCCESS) {
     std::move(callback).Run(query_result.GetWebResult(),
-                            base::nullopt /* value */);
+                            absl::nullopt /* value */);
     return;
   }
 
   if (BluetoothBlocklist::Get().IsExcludedFromReads(
           query_result.descriptor->GetUUID())) {
     std::move(callback).Run(blink::mojom::WebBluetoothResult::BLOCKLISTED_READ,
-                            base::nullopt /* value */);
+                            absl::nullopt /* value */);
     return;
   }
 
@@ -1756,7 +1756,7 @@
 void WebBluetoothServiceImpl::RemoteServerGetPrimaryServicesImpl(
     const blink::WebBluetoothDeviceId& device_id,
     blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-    const base::Optional<BluetoothUUID>& services_uuid,
+    const absl::optional<BluetoothUUID>& services_uuid,
     RemoteServerGetPrimaryServicesCallback callback,
     BluetoothDevice* device) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -1768,7 +1768,7 @@
     RecordGetPrimaryServicesOutcome(
         quantity, UMAGetPrimaryServiceOutcome::DEVICE_DISCONNECTED);
     std::move(callback).Run(blink::mojom::WebBluetoothResult::NO_SERVICES_FOUND,
-                            base::nullopt /* services */);
+                            absl::nullopt /* services */);
     return;
   }
 
@@ -1818,7 +1818,7 @@
   std::move(callback).Run(
       services_uuid ? blink::mojom::WebBluetoothResult::SERVICE_NOT_FOUND
                     : blink::mojom::WebBluetoothResult::NO_SERVICES_FOUND,
-      base::nullopt /* services */);
+      absl::nullopt /* services */);
 }
 
 void WebBluetoothServiceImpl::OnGetDevice(
@@ -1900,12 +1900,12 @@
 
 void WebBluetoothServiceImpl::OnCharacteristicReadValue(
     RemoteCharacteristicReadValueCallback callback,
-    base::Optional<BluetoothGattService::GattErrorCode> error_code,
+    absl::optional<BluetoothGattService::GattErrorCode> error_code,
     const std::vector<uint8_t>& value) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (error_code.has_value()) {
     std::move(callback).Run(TranslateGATTError(error_code.value()),
-                            /*value=*/base::nullopt);
+                            /*value=*/absl::nullopt);
     return;
   }
   std::move(callback).Run(blink::mojom::WebBluetoothResult::SUCCESS, value);
@@ -1960,12 +1960,12 @@
 
 void WebBluetoothServiceImpl::OnDescriptorReadValue(
     RemoteDescriptorReadValueCallback callback,
-    base::Optional<BluetoothGattService::GattErrorCode> error_code,
+    absl::optional<BluetoothGattService::GattErrorCode> error_code,
     const std::vector<uint8_t>& value) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (error_code.has_value()) {
     std::move(callback).Run(TranslateGATTError(error_code.value()),
-                            /*value=*/base::nullopt);
+                            /*value=*/absl::nullopt);
     return;
   }
   std::move(callback).Run(blink::mojom::WebBluetoothResult::SUCCESS, value);
@@ -2176,7 +2176,7 @@
 }
 
 bool WebBluetoothServiceImpl::AreScanFiltersAllowed(
-    const base::Optional<ScanFilters>& filters) const {
+    const absl::optional<ScanFilters>& filters) const {
   if (accept_all_advertisements_) {
     // Previously allowed accepting all advertisements and no filters. In this
     // case since filtered advertisements are a subset of all advertisements,
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h
index 54ed5b53..5517212 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.h
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -13,7 +13,6 @@
 #include "base/callback.h"
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/scoped_observation.h"
 #include "content/browser/bad_message.h"
 #include "content/browser/bluetooth/bluetooth_allowed_devices.h"
@@ -34,6 +33,7 @@
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
 
 namespace url {
@@ -51,7 +51,7 @@
 class RenderProcessHost;
 
 bool HasValidFilter(
-    const base::Optional<
+    const absl::optional<
         std::vector<blink::mojom::WebBluetoothLeScanFilterPtr>>& filters);
 
 // Implementation of Mojo WebBluetoothService located in
@@ -149,11 +149,11 @@
                      device::BluetoothDevice* device) override;
   void DeviceAdvertisementReceived(
       const std::string& device_address,
-      const base::Optional<std::string>& device_name,
-      const base::Optional<std::string>& advertisement_name,
-      base::Optional<int8_t> rssi,
-      base::Optional<int8_t> tx_power,
-      base::Optional<uint16_t> appearance,
+      const absl::optional<std::string>& device_name,
+      const absl::optional<std::string>& advertisement_name,
+      absl::optional<int8_t> rssi,
+      absl::optional<int8_t> tx_power,
+      absl::optional<uint16_t> appearance,
       const device::BluetoothDevice::UUIDList& advertised_uuids,
       const device::BluetoothDevice::ServiceDataMap& service_data_map,
       const device::BluetoothDevice::ManufacturerDataMap& manufacturer_data_map)
@@ -187,12 +187,12 @@
   void RemoteServerGetPrimaryServices(
       const blink::WebBluetoothDeviceId& device_id,
       blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-      const base::Optional<device::BluetoothUUID>& services_uuid,
+      const absl::optional<device::BluetoothUUID>& services_uuid,
       RemoteServerGetPrimaryServicesCallback callback) override;
   void RemoteServiceGetCharacteristics(
       const std::string& service_instance_id,
       blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-      const base::Optional<device::BluetoothUUID>& characteristics_uuid,
+      const absl::optional<device::BluetoothUUID>& characteristics_uuid,
       RemoteServiceGetCharacteristicsCallback callback) override;
   void RemoteCharacteristicReadValue(
       const std::string& characteristic_instance_id,
@@ -213,7 +213,7 @@
   void RemoteCharacteristicGetDescriptors(
       const std::string& service_instance_id,
       blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-      const base::Optional<device::BluetoothUUID>& characteristics_uuid,
+      const absl::optional<device::BluetoothUUID>& characteristics_uuid,
       RemoteCharacteristicGetDescriptorsCallback callback) override;
   void RemoteDescriptorReadValue(
       const std::string& characteristic_instance_id,
@@ -279,7 +279,7 @@
   void RemoteServerGetPrimaryServicesImpl(
       const blink::WebBluetoothDeviceId& device_id,
       blink::mojom::WebBluetoothGATTQueryQuantity quantity,
-      const base::Optional<device::BluetoothUUID>& services_uuid,
+      const absl::optional<device::BluetoothUUID>& services_uuid,
       RemoteServerGetPrimaryServicesCallback callback,
       device::BluetoothDevice* device);
 
@@ -304,7 +304,7 @@
   // Callbacks for BluetoothRemoteGattCharacteristic::ReadRemoteCharacteristic.
   void OnCharacteristicReadValue(
       RemoteCharacteristicReadValueCallback callback,
-      base::Optional<device::BluetoothGattService::GattErrorCode> error_code,
+      absl::optional<device::BluetoothGattService::GattErrorCode> error_code,
       const std::vector<uint8_t>& value);
 
   // Callbacks for BluetoothRemoteGattCharacteristic::WriteRemoteCharacteristic.
@@ -332,7 +332,7 @@
   // Callbacks for BluetoothRemoteGattDescriptor::ReadRemoteDescriptor.
   void OnDescriptorReadValue(
       RemoteDescriptorReadValueCallback callback,
-      base::Optional<device::BluetoothGattService::GattErrorCode> error_code,
+      absl::optional<device::BluetoothGattService::GattErrorCode> error_code,
       const std::vector<uint8_t>& value);
 
   // Callbacks for BluetoothRemoteGattDescriptor::WriteRemoteDescriptor.
@@ -380,7 +380,7 @@
 
   void StoreAllowedScanOptions(
       const blink::mojom::WebBluetoothRequestLEScanOptions& options);
-  bool AreScanFiltersAllowed(const base::Optional<ScanFilters>& filters) const;
+  bool AreScanFiltersAllowed(const absl::optional<ScanFilters>& filters) const;
 
   // Clears all state (maps, sets, etc).
   void ClearState();
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl_unittest.cc b/content/browser/bluetooth/web_bluetooth_service_impl_unittest.cc
index 5ca9d40..db95df1 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl_unittest.cc
+++ b/content/browser/bluetooth/web_bluetooth_service_impl_unittest.cc
@@ -256,11 +256,11 @@
   blink::mojom::WebBluetoothLeScanFilterPtr CreateScanFilter(
       const std::string& name,
       const std::string& name_prefix) {
-    base::Optional<std::vector<device::BluetoothUUID>> services;
+    absl::optional<std::vector<device::BluetoothUUID>> services;
     services.emplace();
     services->push_back(device::BluetoothUUID(kBatteryServiceUUIDString));
     return blink::mojom::WebBluetoothLeScanFilter::New(
-        services, name, name_prefix, /*manufacturer_data=*/base::nullopt);
+        services, name, name_prefix, /*manufacturer_data=*/absl::nullopt);
   }
 
   blink::mojom::WebBluetoothResult RequestScanningStartAndSimulatePromptEvent(
@@ -274,7 +274,7 @@
     options->filters.emplace();
     auto filter_ptr = blink::mojom::WebBluetoothLeScanFilter::New(
         filter.services, filter.name, filter.name_prefix,
-        /*manufacturer_data=*/base::nullopt);
+        /*manufacturer_data=*/absl::nullopt);
     options->filters->push_back(std::move(filter_ptr));
 
     // Use two RunLoops to guarantee the order of operations for this test.
@@ -328,7 +328,7 @@
 
 TEST_F(WebBluetoothServiceImplTest, PermissionAllowed) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter = CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters;
   filters.emplace();
   filters->push_back(filter.Clone());
   EXPECT_FALSE(service_->AreScanFiltersAllowed(filters));
@@ -344,7 +344,7 @@
 
 TEST_F(WebBluetoothServiceImplTest, ClearStateDuringRequestScanningStart) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter = CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters;
 
   FakeWebBluetoothAdvertisementClientImpl client_impl;
   mojo::PendingAssociatedRemote<blink::mojom::WebBluetoothAdvertisementClient>
@@ -386,7 +386,7 @@
 
 TEST_F(WebBluetoothServiceImplTest, PermissionPromptCanceled) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter = CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters;
   filters.emplace();
   filters->push_back(filter.Clone());
   EXPECT_FALSE(service_->AreScanFiltersAllowed(filters));
@@ -404,7 +404,7 @@
 TEST_F(WebBluetoothServiceImplTest,
        BluetoothScanningPermissionRevokedWhenTabHidden) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter = CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters;
   filters.emplace();
   filters->push_back(filter.Clone());
   FakeWebBluetoothAdvertisementClientImpl client_impl;
@@ -423,7 +423,7 @@
 TEST_F(WebBluetoothServiceImplTest,
        BluetoothScanningPermissionRevokedWhenTabOccluded) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter = CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters;
   filters.emplace();
   filters->push_back(filter.Clone());
   FakeWebBluetoothAdvertisementClientImpl client_impl;
@@ -440,7 +440,7 @@
 TEST_F(WebBluetoothServiceImplTest,
        BluetoothScanningPermissionRevokedWhenFocusIsLost) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter = CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters;
   filters.emplace();
   filters->push_back(filter.Clone());
   FakeWebBluetoothAdvertisementClientImpl client_impl;
@@ -458,7 +458,7 @@
        BluetoothScanningPermissionRevokedWhenBlocked) {
   blink::mojom::WebBluetoothLeScanFilterPtr filter_1 =
       CreateScanFilter("a", "b");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters_1;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters_1;
   filters_1.emplace();
   filters_1->push_back(filter_1.Clone());
   FakeWebBluetoothAdvertisementClientImpl client_impl_1;
@@ -471,7 +471,7 @@
 
   blink::mojom::WebBluetoothLeScanFilterPtr filter_2 =
       CreateScanFilter("c", "d");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters_2;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters_2;
   filters_2.emplace();
   filters_2->push_back(filter_2.Clone());
   FakeWebBluetoothAdvertisementClientImpl client_impl_2;
@@ -484,7 +484,7 @@
 
   blink::mojom::WebBluetoothLeScanFilterPtr filter_3 =
       CreateScanFilter("e", "f");
-  base::Optional<WebBluetoothServiceImpl::ScanFilters> filters_3;
+  absl::optional<WebBluetoothServiceImpl::ScanFilters> filters_3;
   filters_3.emplace();
   filters_3->push_back(filter_3.Clone());
   FakeWebBluetoothAdvertisementClientImpl client_impl_3;
@@ -521,7 +521,7 @@
       base::BindLambdaForTesting(
           [&callback_called](
               blink::mojom::WebBluetoothResult result,
-              const base::Optional<std::vector<uint8_t>>& value) {
+              const absl::optional<std::vector<uint8_t>>& value) {
             callback_called = true;
             EXPECT_EQ(
                 blink::mojom::WebBluetoothResult::GATT_OPERATION_IN_PROGRESS,
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index db4cbf2c..cd27590 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -725,7 +725,7 @@
                      client_process,
                  memory_instrumentation::mojom::ProcessType process_type,
                  base::ProcessId process_id,
-                 base::Optional<std::string> service_name) {
+                 absl::optional<std::string> service_name) {
                 GetMemoryInstrumentationRegistry()->RegisterClientProcess(
                     std::move(receiver), std::move(client_process),
                     process_type, process_id, std::move(service_name));
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc
index 1818eb6..11b8a3d 100644
--- a/content/browser/browser_context.cc
+++ b/content/browser/browser_context.cc
@@ -219,7 +219,7 @@
     const GURL& origin,
     int64_t service_worker_registration_id,
     const std::string& message_id,
-    base::Optional<std::string> payload,
+    absl::optional<std::string> payload,
     base::OnceCallback<void(blink::mojom::PushEventStatus)> callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   PushMessagingRouter::DeliverMessage(
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
index 391e178..f7c844f4 100644
--- a/content/browser/browser_main_loop.h
+++ b/content/browser/browser_main_loop.h
@@ -301,7 +301,7 @@
   //
   // TODO(fdoray): Move this to a more elaborate class that prevents BEST_EFFORT
   // tasks from running when resources are needed to respond to user actions.
-  base::Optional<base::ThreadPoolInstance::ScopedBestEffortExecutionFence>
+  absl::optional<base::ThreadPoolInstance::ScopedBestEffortExecutionFence>
       scoped_best_effort_execution_fence_;
 
   // Unregister UI thread from hang watching on destruction.
diff --git a/content/browser/browser_thread_impl.h b/content/browser/browser_thread_impl.h
index c7b5b5ad..29c6c06 100644
--- a/content/browser/browser_thread_impl.h
+++ b/content/browser/browser_thread_impl.h
@@ -13,7 +13,7 @@
 
 #if defined(OS_POSIX)
 #include "base/files/file_descriptor_watcher_posix.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #endif
 
 namespace content {
@@ -71,7 +71,7 @@
 
 #if defined(OS_POSIX)
   // Allows usage of the FileDescriptorWatcher API on the UI thread.
-  base::Optional<base::FileDescriptorWatcher> file_descriptor_watcher_;
+  absl::optional<base::FileDescriptorWatcher> file_descriptor_watcher_;
 #endif
 };
 
diff --git a/content/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc b/content/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc
index 466f086d..e495623 100644
--- a/content/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc
+++ b/content/browser/browsing_data/browsing_data_filter_builder_impl_unittest.cc
@@ -10,12 +10,12 @@
 #include <vector>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "net/cookies/canonical_cookie.h"
 #include "net/cookies/cookie_deletion_info.h"
 #include "services/network/cookie_manager.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -63,7 +63,7 @@
   EXPECT_TRUE(test_url.is_valid()) << test_case.url;
   std::unique_ptr<net::CanonicalCookie> cookie =
       net::CanonicalCookie::Create(test_url, cookie_line, base::Time::Now(),
-                                   base::nullopt /* server_time */);
+                                   absl::nullopt /* server_time */);
   EXPECT_TRUE(cookie) << cookie_line << " from " << test_case.url
                       << " is not a valid cookie";
   if (cookie) {
@@ -79,7 +79,7 @@
   cookie_line = std::string("A=2;domain=") + test_url.host();
   cookie =
       net::CanonicalCookie::Create(test_url, cookie_line, base::Time::Now(),
-                                   base::nullopt /* server_time */);
+                                   absl::nullopt /* server_time */);
   if (cookie) {
     EXPECT_EQ(test_case.should_match,
               delete_info.Matches(
@@ -93,7 +93,7 @@
   cookie_line = std::string("A=2; HttpOnly;") + test_url.host();
   cookie =
       net::CanonicalCookie::Create(test_url, cookie_line, base::Time::Now(),
-                                   base::nullopt /* server_time */);
+                                   absl::nullopt /* server_time */);
   if (cookie) {
     EXPECT_EQ(test_case.should_match,
               delete_info.Matches(
@@ -107,7 +107,7 @@
   cookie_line = std::string("A=2; HttpOnly; Secure;") + test_url.host();
   cookie =
       net::CanonicalCookie::Create(test_url, cookie_line, base::Time::Now(),
-                                   base::nullopt /* server_time */);
+                                   absl::nullopt /* server_time */);
   if (cookie) {
     EXPECT_EQ(test_case.should_match,
               delete_info.Matches(
diff --git a/content/browser/browsing_data/clear_site_data_handler_browsertest.cc b/content/browser/browsing_data/clear_site_data_handler_browsertest.cc
index c49cdfb..1a62a4e 100644
--- a/content/browser/browsing_data/clear_site_data_handler_browsertest.cc
+++ b/content/browser/browsing_data/clear_site_data_handler_browsertest.cc
@@ -170,7 +170,7 @@
         storage_partition()->GetCookieManagerForBrowserProcess();
 
     std::unique_ptr<net::CanonicalCookie> cookie(net::CanonicalCookie::Create(
-        url, "A=1", base::Time::Now(), base::nullopt /* server_time */));
+        url, "A=1", base::Time::Now(), absl::nullopt /* server_time */));
 
     base::RunLoop run_loop;
     cookie_manager->SetCanonicalCookie(
diff --git a/content/browser/cache_storage/cache_storage_cache_entry_handler.cc b/content/browser/cache_storage/cache_storage_cache_entry_handler.cc
index ac64f658..55fa12e7 100644
--- a/content/browser/cache_storage/cache_storage_cache_entry_handler.cc
+++ b/content/browser/cache_storage/cache_storage_cache_entry_handler.cc
@@ -6,7 +6,6 @@
 
 #include "base/callback_helpers.h"
 #include "base/guid.h"
-#include "base/optional.h"
 #include "components/services/storage/public/mojom/blob_storage_context.mojom.h"
 #include "content/browser/cache_storage/background_fetch_cache_entry_handler_impl.h"
 #include "content/browser/cache_storage/cache_storage_manager.h"
@@ -18,6 +17,7 @@
 #include "storage/browser/blob/blob_data_builder.h"
 #include "storage/browser/blob/blob_impl.h"
 #include "storage/browser/blob/blob_storage_context.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/blob/blob_utils.h"
 
 namespace content {
@@ -214,7 +214,7 @@
 
 void CacheStorageCacheEntryHandler::DiskCacheBlobEntry::Invalidate() {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  cache_handle_ = base::nullopt;
+  cache_handle_ = absl::nullopt;
   entry_handler_ = nullptr;
   disk_cache_entry_ = nullptr;
 }
diff --git a/content/browser/cache_storage/cache_storage_cache_entry_handler.h b/content/browser/cache_storage/cache_storage_cache_entry_handler.h
index b339787..16b57a9 100644
--- a/content/browser/cache_storage/cache_storage_cache_entry_handler.h
+++ b/content/browser/cache_storage/cache_storage_cache_entry_handler.h
@@ -94,7 +94,7 @@
     ~DiskCacheBlobEntry();
 
     base::WeakPtr<CacheStorageCacheEntryHandler> entry_handler_;
-    base::Optional<CacheStorageCacheHandle> cache_handle_;
+    absl::optional<CacheStorageCacheHandle> cache_handle_;
     disk_cache::ScopedEntryPtr disk_cache_entry_;
 
     SEQUENCE_CHECKER(sequence_checker_);
diff --git a/content/browser/cache_storage/cache_storage_cache_unittest.cc b/content/browser/cache_storage/cache_storage_cache_unittest.cc
index 2a750b5..5736282 100644
--- a/content/browser/cache_storage/cache_storage_cache_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_cache_unittest.cc
@@ -360,7 +360,7 @@
   std::string output;
   base::RunLoop loop;
   actual_blob->ReadSideData(base::BindLambdaForTesting(
-      [&](const base::Optional<mojo_base::BigBuffer> data) {
+      [&](const absl::optional<mojo_base::BigBuffer> data) {
         if (data)
           output.append(data->data(), data->data() + data->size());
         loop.Quit();
@@ -669,7 +669,7 @@
         network::mojom::FetchResponseSource::kUnspecified,
         base::flat_map<std::string, std::string>(kHeaders.cbegin(),
                                                  kHeaders.cend()),
-        /*mime_type=*/base::nullopt, net::HttpRequestHeaders::kGetMethod,
+        /*mime_type=*/absl::nullopt, net::HttpRequestHeaders::kGetMethod,
         /*blob=*/nullptr, blink::mojom::ServiceWorkerResponseError::kUnknown,
         response_time_, /*cache_storage_cache_name=*/std::string(),
         /*cors_exposed_header_names=*/std::vector<std::string>(),
@@ -679,7 +679,7 @@
         net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN,
         /*alpn_negotiated_protocol=*/"unknown",
         /*was_fetched_via_spdy=*/false, /*has_range_requested=*/false,
-        /*auth_challenge_info=*/base::nullopt);
+        /*auth_challenge_info=*/absl::nullopt);
   }
 
   void CopySideDataToResponse(const std::string& uuid,
@@ -907,7 +907,7 @@
   }
 
   void ErrorTypeCallback(base::RunLoop* run_loop, CacheStorageError error) {
-    callback_message_ = base::nullopt;
+    callback_message_ = absl::nullopt;
     callback_error_ = error;
     if (run_loop)
       run_loop->Quit();
@@ -1018,7 +1018,7 @@
   std::string expected_blob_data_;
 
   CacheStorageError callback_error_ = CacheStorageError::kSuccess;
-  base::Optional<std::string> callback_message_ = base::nullopt;
+  absl::optional<std::string> callback_message_ = absl::nullopt;
   blink::mojom::FetchAPIResponsePtr callback_response_;
   std::vector<std::string> callback_strings_;
   std::string bad_message_reason_;
diff --git a/content/browser/cache_storage/cache_storage_control_wrapper.h b/content/browser/cache_storage/cache_storage_control_wrapper.h
index 4f5351e7..a4eb3c9 100644
--- a/content/browser/cache_storage/cache_storage_control_wrapper.h
+++ b/content/browser/cache_storage/cache_storage_control_wrapper.h
@@ -61,7 +61,7 @@
  private:
   SEQUENCE_CHECKER(sequence_checker_);
 
-  base::Optional<storage::StoragePolicyObserver> storage_policy_observer_;
+  absl::optional<storage::StoragePolicyObserver> storage_policy_observer_;
 
   base::SequenceBound<CacheStorageContextImpl> cache_storage_context_;
   mojo::Remote<storage::mojom::CacheStorageControl> cache_storage_control_;
diff --git a/content/browser/cache_storage/cache_storage_dispatcher_host.cc b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
index 350e16b..23680a8 100644
--- a/content/browser/cache_storage/cache_storage_dispatcher_host.cc
+++ b/content/browser/cache_storage/cache_storage_dispatcher_host.cc
@@ -140,7 +140,7 @@
   if (response->response_type != FetchResponseType::kOpaque)
     return false;
 
-  base::Optional<std::string> corp_header_value;
+  absl::optional<std::string> corp_header_value;
   auto corp_header =
       response->headers.find(network::CrossOriginResourcePolicy::kHeaderName);
   if (corp_header != response->headers.end())
@@ -559,7 +559,7 @@
     content::CacheStorageCache* cache = cache_handle_.value();
     if (!cache) {
       std::move(cb).Run(CacheStorageVerboseError::New(
-          CacheStorageError::kErrorNotFound, base::nullopt));
+          CacheStorageError::kErrorNotFound, absl::nullopt));
       return;
     }
 
diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc
index 7540dd1..cd9edb2 100644
--- a/content/browser/cache_storage/cache_storage_manager_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -640,7 +640,7 @@
     auto response = blink::mojom::FetchAPIResponse::New(
         std::vector<GURL>({request->url}), status_code, "OK", response_type,
         padding, network::mojom::FetchResponseSource::kUnspecified,
-        response_headers, /*mime_type=*/base::nullopt,
+        response_headers, /*mime_type=*/absl::nullopt,
         net::HttpRequestHeaders::kGetMethod, std::move(blob),
         blink::mojom::ServiceWorkerResponseError::kUnknown, base::Time(),
         /*cache_storage_cache_name=*/std::string(),
@@ -651,7 +651,7 @@
         net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN,
         /*alpn_negotiated_protocol=*/"unknown",
         /*was_fetched_via_spdy=*/false, /*has_range_requested=*/false,
-        /*auth_challenge_info=*/base::nullopt);
+        /*auth_challenge_info=*/absl::nullopt);
 
     blink::mojom::BatchOperationPtr operation =
         blink::mojom::BatchOperation::New();
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc b/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc
index 0fdf290..e501092 100644
--- a/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage_cache.cc
@@ -424,11 +424,11 @@
           ? metadata.response().alpn_negotiated_protocol()
           : "unknown";
 
-  base::Optional<std::string> mime_type;
+  absl::optional<std::string> mime_type;
   if (metadata.response().has_mime_type())
     mime_type = metadata.response().mime_type();
 
-  base::Optional<std::string> request_method;
+  absl::optional<std::string> request_method;
   if (metadata.response().has_request_method())
     request_method = metadata.response().request_method();
 
@@ -463,7 +463,7 @@
       static_cast<net::HttpResponseInfo::ConnectionInfo>(
           metadata.response().connection_info()),
       alpn_negotiated_protocol, metadata.response().was_fetched_via_spdy(),
-      /*has_range_requested=*/false, /*auth_challenge_info=*/base::nullopt);
+      /*has_range_requested=*/false, /*auth_challenge_info=*/absl::nullopt);
 }
 
 int64_t CalculateSideDataPadding(
@@ -700,7 +700,7 @@
   // This method may produce a warning message that should be returned in the
   // final VerboseErrorCallback.  A message may be present in both the failure
   // and success paths.
-  base::Optional<std::string> message;
+  absl::optional<std::string> message;
 
   if (backend_state_ == BACKEND_CLOSED) {
     scheduler_task_runner_->PostTask(
@@ -794,7 +794,7 @@
     int64_t trace_id,
     VerboseErrorCallback callback,
     BadMessageCallback bad_message_callback,
-    base::Optional<std::string> message,
+    absl::optional<std::string> message,
     uint64_t space_required,
     uint64_t side_data_size,
     blink::mojom::QuotaStatusCode status_code,
@@ -883,7 +883,7 @@
 void LegacyCacheStorageCache::BatchDidOneOperation(
     base::OnceClosure completion_closure,
     VerboseErrorCallback error_callback,
-    base::Optional<std::string> message,
+    absl::optional<std::string> message,
     int64_t trace_id,
     CacheStorageError error) {
   TRACE_EVENT_WITH_FLOW0("CacheStorage",
@@ -902,7 +902,7 @@
 
 void LegacyCacheStorageCache::BatchDidAllOperations(
     VerboseErrorCallback callback,
-    base::Optional<std::string> message,
+    absl::optional<std::string> message,
     int64_t trace_id) {
   TRACE_EVENT_WITH_FLOW0("CacheStorage",
                          "LegacyCacheStorageCache::BatchDidAllOperations",
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage_cache.h b/content/browser/cache_storage/legacy/legacy_cache_storage_cache.h
index dd477c6..1f942f3 100644
--- a/content/browser/cache_storage/legacy/legacy_cache_storage_cache.h
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage_cache.h
@@ -16,7 +16,6 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
 #include "content/browser/cache_storage/blob_storage_context_wrapper.h"
 #include "content/browser/cache_storage/cache_storage_cache.h"
@@ -26,6 +25,7 @@
 #include "net/base/completion_once_callback.h"
 #include "net/base/io_buffer.h"
 #include "net/disk_cache/disk_cache.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/origin.h"
@@ -108,7 +108,7 @@
       int64_t trace_id,
       VerboseErrorCallback callback,
       BadMessageCallback bad_message_callback,
-      base::Optional<std::string> message,
+      absl::optional<std::string> message,
       uint64_t space_required,
       uint64_t side_data_size,
       blink::mojom::QuotaStatusCode status_code,
@@ -119,13 +119,13 @@
   // completion.
   void BatchDidOneOperation(base::OnceClosure completion_closure,
                             VerboseErrorCallback error_callback,
-                            base::Optional<std::string> message,
+                            absl::optional<std::string> message,
                             int64_t trace_id,
                             blink::mojom::CacheStorageError error);
   // Callback invoked once all BatchDidOneOperation() calls have run.
   // Invokes |error_callback|.
   void BatchDidAllOperations(VerboseErrorCallback error_callback,
-                             base::Optional<std::string> message,
+                             absl::optional<std::string> message,
                              int64_t trace_id);
 
   void Keys(blink::mojom::FetchAPIRequestPtr request,
diff --git a/content/browser/child_process_launcher_helper.h b/content/browser/child_process_launcher_helper.h
index 532b80e..5b6aee9 100644
--- a/content/browser/child_process_launcher_helper.h
+++ b/content/browser/child_process_launcher_helper.h
@@ -11,7 +11,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/process/kill.h"
 #include "base/process/process.h"
 #include "base/sequenced_task_runner.h"
@@ -20,6 +19,7 @@
 #include "content/public/common/zygote/zygote_buildflags.h"
 #include "mojo/public/cpp/platform/platform_channel.h"
 #include "mojo/public/cpp/system/invitation.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if !defined(OS_FUCHSIA)
 #include "mojo/public/cpp/platform/named_platform_channel.h"
@@ -115,9 +115,9 @@
 
 #if !defined(OS_FUCHSIA)
   // Called to give implementors a chance at creating a server pipe. Platform-
-  // specific. Returns |base::nullopt| if the helper should initialize
+  // specific. Returns |absl::nullopt| if the helper should initialize
   // a regular PlatformChannel for communication instead.
-  base::Optional<mojo::NamedPlatformChannel>
+  absl::optional<mojo::NamedPlatformChannel>
   CreateNamedPlatformChannelOnClientThread();
 #endif
 
@@ -224,13 +224,13 @@
   // child process in most cases. Only used if the platform's helper
   // implementation doesn't return a server endpoint from
   // |CreateNamedPlatformChannelOnClientThread()|.
-  base::Optional<mojo::PlatformChannel> mojo_channel_;
+  absl::optional<mojo::PlatformChannel> mojo_channel_;
 
 #if !defined(OS_FUCHSIA)
   // May be used in exclusion to the above if the platform helper implementation
   // returns a valid server endpoint from
   // |CreateNamedPlatformChannelOnClientThread()|.
-  base::Optional<mojo::NamedPlatformChannel> mojo_named_channel_;
+  absl::optional<mojo::NamedPlatformChannel> mojo_named_channel_;
 #endif
 
   bool terminate_on_shutdown_;
diff --git a/content/browser/child_process_launcher_helper_android.cc b/content/browser/child_process_launcher_helper_android.cc
index b1747f9..6ec7ad1 100644
--- a/content/browser/child_process_launcher_helper_android.cc
+++ b/content/browser/child_process_launcher_helper_android.cc
@@ -61,9 +61,9 @@
          !command_line()->HasSwitch(sandbox::policy::switches::kNoSandbox));
 }
 
-base::Optional<mojo::NamedPlatformChannel>
+absl::optional<mojo::NamedPlatformChannel>
 ChildProcessLauncherHelper::CreateNamedPlatformChannelOnClientThread() {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 std::unique_ptr<PosixFileDescriptorInfo>
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index f3d40b62..bbc1d4d 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -25,10 +25,10 @@
 namespace content {
 namespace internal {
 
-base::Optional<mojo::NamedPlatformChannel>
+absl::optional<mojo::NamedPlatformChannel>
 ChildProcessLauncherHelper::CreateNamedPlatformChannelOnClientThread() {
   DCHECK(client_task_runner_->RunsTasksInCurrentSequence());
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 void ChildProcessLauncherHelper::BeforeLaunchOnClientThread() {
diff --git a/content/browser/child_process_launcher_helper_mac.cc b/content/browser/child_process_launcher_helper_mac.cc
index f53e7a0..f00d8364 100644
--- a/content/browser/child_process_launcher_helper_mac.cc
+++ b/content/browser/child_process_launcher_helper_mac.cc
@@ -28,10 +28,10 @@
 namespace content {
 namespace internal {
 
-base::Optional<mojo::NamedPlatformChannel>
+absl::optional<mojo::NamedPlatformChannel>
 ChildProcessLauncherHelper::CreateNamedPlatformChannelOnClientThread() {
   DCHECK(client_task_runner_->RunsTasksInCurrentSequence());
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 void ChildProcessLauncherHelper::BeforeLaunchOnClientThread() {
diff --git a/content/browser/child_process_launcher_helper_win.cc b/content/browser/child_process_launcher_helper_win.cc
index fe25214..a89da8e 100644
--- a/content/browser/child_process_launcher_helper_win.cc
+++ b/content/browser/child_process_launcher_helper_win.cc
@@ -26,12 +26,12 @@
   DCHECK(client_task_runner_->RunsTasksInCurrentSequence());
 }
 
-base::Optional<mojo::NamedPlatformChannel>
+absl::optional<mojo::NamedPlatformChannel>
 ChildProcessLauncherHelper::CreateNamedPlatformChannelOnClientThread() {
   DCHECK(client_task_runner_->RunsTasksInCurrentSequence());
 
   if (!delegate_->ShouldLaunchElevated())
-    return base::nullopt;
+    return absl::nullopt;
 
   mojo::NamedPlatformChannel::Options options;
   mojo::NamedPlatformChannel named_channel(options);
diff --git a/content/browser/child_process_security_policy_impl.cc b/content/browser/child_process_security_policy_impl.cc
index f487751..dda4cd01 100644
--- a/content/browser/child_process_security_policy_impl.cc
+++ b/content/browser/child_process_security_policy_impl.cc
@@ -2063,7 +2063,7 @@
 }
 
 std::vector<url::Origin> ChildProcessSecurityPolicyImpl::GetIsolatedOrigins(
-    base::Optional<IsolatedOriginSource> source,
+    absl::optional<IsolatedOriginSource> source,
     BrowserContext* browser_context) {
   std::vector<url::Origin> origins;
   base::AutoLock isolated_origins_lock(isolated_origins_lock_);
diff --git a/content/browser/child_process_security_policy_impl.h b/content/browser/child_process_security_policy_impl.h
index 9c729f0c..f197319 100644
--- a/content/browser/child_process_security_policy_impl.h
+++ b/content/browser/child_process_security_policy_impl.h
@@ -184,7 +184,7 @@
   // TODO(creis): Consider tracking multiple compatible SiteInfos in ProcessLock
   // (e.g., multiple extensions). This can better restrict what the process has
   // access to in cases that we don't currently use a ProcessLock.
-  base::Optional<SiteInfo> site_info_;
+  absl::optional<SiteInfo> site_info_;
 };
 
 CONTENT_EXPORT std::ostream& operator<<(std::ostream& out,
@@ -324,7 +324,7 @@
       BrowserContext* browser_context = nullptr) override;
   bool IsGloballyIsolatedOriginForTesting(const url::Origin& origin) override;
   std::vector<url::Origin> GetIsolatedOrigins(
-      base::Optional<IsolatedOriginSource> source = base::nullopt,
+      absl::optional<IsolatedOriginSource> source = absl::nullopt,
       BrowserContext* browser_context = nullptr) override;
   bool IsIsolatedSiteFromSource(const url::Origin& origin,
                                 IsolatedOriginSource source) override;
diff --git a/content/browser/client_hints/client_hints.cc b/content/browser/client_hints/client_hints.cc
index b9f9fb4..61337d3 100644
--- a/content/browser/client_hints/client_hints.cc
+++ b/content/browser/client_hints/client_hints.cc
@@ -11,7 +11,6 @@
 #include "base/feature_list.h"
 #include "base/metrics/field_trial_params.h"
 #include "base/numerics/safe_conversions.h"
-#include "base/optional.h"
 #include "base/rand_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/time/time.h"
@@ -34,6 +33,7 @@
 #include "net/nqe/network_quality_estimator_params.h"
 #include "services/network/public/cpp/client_hints.h"
 #include "services/network/public/cpp/network_quality_tracker.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/client_hints/client_hints.h"
 #include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
 #include "third_party/blink/public/common/page/page_zoom.h"
@@ -76,7 +76,7 @@
 }
 
 unsigned long RoundRtt(const std::string& host,
-                       const base::Optional<base::TimeDelta>& rtt) {
+                       const absl::optional<base::TimeDelta>& rtt) {
   if (!rtt.has_value()) {
     // RTT is unavailable. So, return the fastest value.
     return 0;
@@ -95,7 +95,7 @@
 }
 
 double RoundKbpsToMbps(const std::string& host,
-                       const base::Optional<int32_t>& downlink_kbps) {
+                       const absl::optional<int32_t>& downlink_kbps) {
   // Limit the size of the buckets and the maximum reported value to reduce
   // fingerprinting.
   static const size_t kGranularityKbps = 50;
@@ -173,23 +173,23 @@
 
 // Return the effective connection type value overridden for web APIs.
 // If no override value has been set, a null value is returned.
-base::Optional<net::EffectiveConnectionType>
+absl::optional<net::EffectiveConnectionType>
 GetWebHoldbackEffectiveConnectionType() {
   if (!base::FeatureList::IsEnabled(
           features::kNetworkQualityEstimatorWebHoldback)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   std::string effective_connection_type_param =
       base::GetFieldTrialParamValueByFeature(
           features::kNetworkQualityEstimatorWebHoldback,
           "web_effective_connection_type_override");
 
-  base::Optional<net::EffectiveConnectionType> effective_connection_type =
+  absl::optional<net::EffectiveConnectionType> effective_connection_type =
       net::GetEffectiveConnectionTypeForName(effective_connection_type_param);
   DCHECK(effective_connection_type_param.empty() || effective_connection_type);
 
   if (!effective_connection_type)
-    return base::nullopt;
+    return absl::nullopt;
   DCHECK_NE(net::EFFECTIVE_CONNECTION_TYPE_UNKNOWN,
             effective_connection_type.value());
   return effective_connection_type;
@@ -276,7 +276,7 @@
                   const GURL& url) {
   DCHECK(headers);
 
-  base::Optional<net::EffectiveConnectionType> web_holdback_ect =
+  absl::optional<net::EffectiveConnectionType> web_holdback_ect =
       GetWebHoldbackEffectiveConnectionType();
 
   base::TimeDelta http_rtt;
@@ -297,7 +297,7 @@
                        network::NetworkQualityTracker* network_quality_tracker,
                        const GURL& url) {
   DCHECK(headers);
-  base::Optional<net::EffectiveConnectionType> web_holdback_ect =
+  absl::optional<net::EffectiveConnectionType> web_holdback_ect =
       GetWebHoldbackEffectiveConnectionType();
 
   int32_t downlink_throughput_kbps;
@@ -328,7 +328,7 @@
   DCHECK_EQ(blink::kWebEffectiveConnectionTypeMappingCount,
             static_cast<size_t>(net::EFFECTIVE_CONNECTION_TYPE_LAST));
 
-  base::Optional<net::EffectiveConnectionType> web_holdback_ect =
+  absl::optional<net::EffectiveConnectionType> web_holdback_ect =
       GetWebHoldbackEffectiveConnectionType();
 
   int effective_connection_type;
@@ -462,14 +462,14 @@
     FrameTreeNode* frame_tree_node,
     ClientUaHeaderCallType call_type,
     net::HttpRequestHeaders* headers) {
-  base::Optional<blink::UserAgentMetadata> ua_metadata;
+  absl::optional<blink::UserAgentMetadata> ua_metadata;
   bool disable_due_to_custom_ua = false;
   if (override_ua) {
     NavigatorDelegate* nav_delegate =
         frame_tree_node ? frame_tree_node->navigator().GetDelegate() : nullptr;
     ua_metadata =
         nav_delegate ? nav_delegate->GetUserAgentOverride().ua_metadata_override
-                     : base::nullopt;
+                     : absl::nullopt;
     // If a custom UA override is set, but no value is provided for UA client
     // hints, disable them.
     disable_due_to_custom_ua = !ua_metadata.has_value();
@@ -570,12 +570,12 @@
 }
 
 unsigned long RoundRttForTesting(const std::string& host,
-                                 const base::Optional<base::TimeDelta>& rtt) {
+                                 const absl::optional<base::TimeDelta>& rtt) {
   return RoundRtt(host, rtt);
 }
 
 double RoundKbpsToMbpsForTesting(const std::string& host,
-                                 const base::Optional<int32_t>& downlink_kbps) {
+                                 const absl::optional<int32_t>& downlink_kbps) {
   return RoundKbpsToMbps(host, downlink_kbps);
 }
 
@@ -717,7 +717,7 @@
                                container_policy);
 }
 
-base::Optional<std::vector<network::mojom::WebClientHintsType>>
+absl::optional<std::vector<network::mojom::WebClientHintsType>>
 ParseAndPersistAcceptCHForNagivation(
     const GURL& url,
     const ::network::mojom::ParsedHeadersPtr& headers,
@@ -729,10 +729,10 @@
   DCHECK(headers);
 
   if (!headers->accept_ch)
-    return base::nullopt;
+    return absl::nullopt;
 
   if (!IsValidURLForClientHints(url))
-    return base::nullopt;
+    return absl::nullopt;
 
   // Client hints should only be enabled when JavaScript is enabled. Platforms
   // which enable/disable JavaScript on a per-origin basis should implement
@@ -741,18 +741,18 @@
   // WebPreferences setting.
   if (!delegate->IsJavaScriptAllowed(url) ||
       !IsJavascriptEnabled(frame_tree_node)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   // Only the main frame should parse accept-CH.
   if (!frame_tree_node->IsMainFrame())
-    return base::nullopt;
+    return absl::nullopt;
 
-  base::Optional<std::vector<network::mojom::WebClientHintsType>> parsed =
+  absl::optional<std::vector<network::mojom::WebClientHintsType>> parsed =
       blink::FilterAcceptCH(headers->accept_ch.value(), LangClientHintEnabled(),
                             delegate->UserAgentClientHintEnabled());
   if (!parsed.has_value())
-    return base::nullopt;
+    return absl::nullopt;
 
   base::TimeDelta persist_duration;
   if (IsPermissionsPolicyForClientHintsEnabled()) {
diff --git a/content/browser/client_hints/client_hints.h b/content/browser/client_hints/client_hints.h
index 0093b10..13f1a2d 100644
--- a/content/browser/client_hints/client_hints.h
+++ b/content/browser/client_hints/client_hints.h
@@ -29,14 +29,14 @@
 // per the NetInfo spec to improve privacy.
 CONTENT_EXPORT unsigned long RoundRttForTesting(
     const std::string& host,
-    const base::Optional<base::TimeDelta>& rtt);
+    const absl::optional<base::TimeDelta>& rtt);
 
 // Returns downlink (in Mbps) after adding host-specific random noise to
 // |downlink_kbps| (which is in Kbps), and rounding it as per the NetInfo spec
 // to improve privacy.
 CONTENT_EXPORT double RoundKbpsToMbpsForTesting(
     const std::string& host,
-    const base::Optional<int32_t>& downlink_kbps);
+    const absl::optional<int32_t>& downlink_kbps);
 
 // Returns true if there is a hint in |critical_hints| that would be sent (i.e.
 // not blocked by browser or origin level preferences like disabled JavaScript
@@ -82,7 +82,7 @@
 // persisted. The distinction is relevant in legacy case where permissions
 // policy is off and there is no valid Accept-CH-Lifetime, where the header
 // still applies locally within frame.
-CONTENT_EXPORT base::Optional<std::vector<network::mojom::WebClientHintsType>>
+CONTENT_EXPORT absl::optional<std::vector<network::mojom::WebClientHintsType>>
 ParseAndPersistAcceptCHForNagivation(
     const GURL& url,
     const ::network::mojom::ParsedHeadersPtr& headers,
diff --git a/content/browser/contacts/contacts_manager_impl.cc b/content/browser/contacts/contacts_manager_impl.cc
index 6289914..d1308d962 100644
--- a/content/browser/contacts/contacts_manager_impl.cc
+++ b/content/browser/contacts/contacts_manager_impl.cc
@@ -38,10 +38,10 @@
 void OnContactsSelected(
     blink::mojom::ContactsManager::SelectCallback callback,
     ukm::SourceId source_id,
-    base::Optional<std::vector<blink::mojom::ContactInfoPtr>> contacts,
+    absl::optional<std::vector<blink::mojom::ContactInfoPtr>> contacts,
     int percentage_shared,
     ContactsPickerPropertiesRequested properties_requested) {
-  if (contacts != base::nullopt) {
+  if (contacts != absl::nullopt) {
     int select_count = contacts.value().size();
     ukm::builders::ContactsPicker_ShareStatistics(source_id)
         .SetSelectCount(ukm::GetExponentialBucketMinForCounts1000(select_count))
@@ -83,7 +83,7 @@
         base::BindOnce(&OnContactsSelected, std::move(mojom_callback),
                        source_id_));
   } else {
-    std::move(mojom_callback).Run(base::nullopt);
+    std::move(mojom_callback).Run(absl::nullopt);
   }
 }
 
diff --git a/content/browser/contacts/contacts_provider.h b/content/browser/contacts/contacts_provider.h
index 0c5632f2..5cffccfe 100644
--- a/content/browser/contacts/contacts_provider.h
+++ b/content/browser/contacts/contacts_provider.h
@@ -13,7 +13,7 @@
 class ContactsProvider {
  public:
   using ContactsSelectedCallback = base::OnceCallback<void(
-      base::Optional<std::vector<blink::mojom::ContactInfoPtr>> contacts,
+      absl::optional<std::vector<blink::mojom::ContactInfoPtr>> contacts,
       int percentage_shared,
       ContactsPickerPropertiesRequested properties_requested)>;
 
diff --git a/content/browser/contacts/contacts_provider_android.cc b/content/browser/contacts/contacts_provider_android.cc
index 088b797..d953c2c 100644
--- a/content/browser/contacts/contacts_provider_android.cc
+++ b/content/browser/contacts/contacts_provider_android.cc
@@ -70,7 +70,7 @@
                                      bool include_icons,
                                      ContactsSelectedCallback callback) {
   if (!dialog_) {
-    std::move(callback).Run(base::nullopt, /*percentage_shared=*/-1,
+    std::move(callback).Run(absl::nullopt, /*percentage_shared=*/-1,
                             PROPERTIES_NONE);
     return;
   }
@@ -93,28 +93,28 @@
     const base::android::JavaParamRef<jobjectArray>& icons_java) {
   DCHECK(callback_);
 
-  base::Optional<std::vector<std::string>> names;
+  absl::optional<std::vector<std::string>> names;
   if (names_java) {
     std::vector<std::string> names_vector;
     AppendJavaStringArrayToStringVector(env, names_java, &names_vector);
     names = std::move(names_vector);
   }
 
-  base::Optional<std::vector<std::string>> emails;
+  absl::optional<std::vector<std::string>> emails;
   if (emails_java) {
     std::vector<std::string> emails_vector;
     AppendJavaStringArrayToStringVector(env, emails_java, &emails_vector);
     emails = std::move(emails_vector);
   }
 
-  base::Optional<std::vector<std::string>> tel;
+  absl::optional<std::vector<std::string>> tel;
   if (tel_java) {
     std::vector<std::string> tel_vector;
     AppendJavaStringArrayToStringVector(env, tel_java, &tel_vector);
     tel = std::move(tel_vector);
   }
 
-  base::Optional<std::vector<payments::mojom::PaymentAddressPtr>> addresses;
+  absl::optional<std::vector<payments::mojom::PaymentAddressPtr>> addresses;
   if (addresses_java) {
     std::vector<payments::mojom::PaymentAddressPtr> addresses_vector;
 
@@ -133,7 +133,7 @@
     addresses = std::move(addresses_vector);
   }
 
-  base::Optional<std::vector<blink::mojom::ContactIconBlobPtr>> icons;
+  absl::optional<std::vector<blink::mojom::ContactIconBlobPtr>> icons;
   if (icons_java) {
     std::vector<blink::mojom::ContactIconBlobPtr> icons_vector;
 
@@ -169,7 +169,7 @@
 
 void ContactsProviderAndroid::EndWithPermissionDenied(JNIEnv* env) {
   DCHECK(callback_);
-  std::move(callback_).Run(base::nullopt, /*percentage_shared=*/-1,
+  std::move(callback_).Run(absl::nullopt, /*percentage_shared=*/-1,
                            PROPERTIES_NONE);
 }
 
diff --git a/content/browser/content_index/content_index_database.cc b/content/browser/content_index/content_index_database.cc
index 2ce59c4..b03bbc2 100644
--- a/content/browser/content_index/content_index_database.cc
+++ b/content/browser/content_index/content_index_database.cc
@@ -9,7 +9,6 @@
 
 #include "base/barrier_closure.h"
 #include "base/memory/ptr_util.h"
-#include "base/optional.h"
 #include "base/stl_util.h"
 #include "base/time/time.h"
 #include "content/browser/background_fetch/storage/image_helpers.h"
@@ -18,6 +17,7 @@
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -102,16 +102,16 @@
   return result;
 }
 
-base::Optional<ContentIndexEntry> EntryFromSerializedProto(
+absl::optional<ContentIndexEntry> EntryFromSerializedProto(
     int64_t service_worker_registration_id,
     const std::string& serialized_proto) {
   proto::ContentEntry entry_proto;
   if (!entry_proto.ParseFromString(serialized_proto))
-    return base::nullopt;
+    return absl::nullopt;
 
   GURL launch_url(entry_proto.launch_url());
   if (!launch_url.is_valid())
-    return base::nullopt;
+    return absl::nullopt;
 
   auto description = DescriptionFromProto(entry_proto.description());
   base::Time registration_time = base::Time::FromDeltaSinceWindowsEpoch(
@@ -575,7 +575,7 @@
 
   auto wrapped_callback = base::BindOnce(
       [](ContentIndexContext::GetEntryCallback callback,
-         base::Optional<ContentIndexEntry> entry) {
+         absl::optional<ContentIndexEntry> entry) {
         GetUIThreadTaskRunner({})->PostTask(
             FROM_HERE, base::BindOnce(std::move(callback), std::move(entry)));
       },
@@ -610,7 +610,7 @@
   content_index::RecordDatabaseOperationStatus("GetEntry", status);
 
   if (status != blink::ServiceWorkerStatusCode::kOk) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
 
diff --git a/content/browser/content_index/content_index_database_unittest.cc b/content/browser/content_index/content_index_database_unittest.cc
index 2f4d5dd..339fda2 100644
--- a/content/browser/content_index/content_index_database_unittest.cc
+++ b/content/browser/content_index/content_index_database_unittest.cc
@@ -205,7 +205,7 @@
     std::unique_ptr<ContentIndexEntry> out_entry;
     database_->GetEntry(service_worker_registration_id_, description_id,
                         base::BindLambdaForTesting(
-                            [&](base::Optional<ContentIndexEntry> entry) {
+                            [&](absl::optional<ContentIndexEntry> entry) {
                               if (entry)
                                 out_entry = std::make_unique<ContentIndexEntry>(
                                     std::move(*entry));
diff --git a/content/browser/conversions/conversion_host.cc b/content/browser/conversions/conversion_host.cc
index 47c1a7e..957feeb 100644
--- a/content/browser/conversions/conversion_host.cc
+++ b/content/browser/conversions/conversion_host.cc
@@ -216,7 +216,7 @@
       impression_time,
       policy.GetExpiryTimeForImpression(impression.expiry, impression_time),
       source_type, impression.priority,
-      /*impression_id=*/base::nullopt);
+      /*impression_id=*/absl::nullopt);
 
   conversion_manager.HandleImpression(storable_impression);
 }
diff --git a/content/browser/conversions/conversion_host_unittest.cc b/content/browser/conversions/conversion_host_unittest.cc
index 3196415..3d5464c 100644
--- a/content/browser/conversions/conversion_host_unittest.cc
+++ b/content/browser/conversions/conversion_host_unittest.cc
@@ -167,10 +167,10 @@
       SetBrowserClientForTesting(&browser_client);
 
   browser_client.BlockConversionMeasurementInContext(
-      base::nullopt /* impression_origin */,
-      base::make_optional(
+      absl::nullopt /* impression_origin */,
+      absl::make_optional(
           url::Origin::Create(GURL("https://blocked-top.example"))),
-      base::make_optional(
+      absl::make_optional(
           url::Origin::Create(GURL("https://blocked-reporting.example"))));
 
   struct {
@@ -296,9 +296,9 @@
       SetBrowserClientForTesting(&browser_client);
 
   browser_client.BlockConversionMeasurementInContext(
-      base::nullopt /* impression_origin */,
-      base::make_optional(url::Origin::Create(GURL("https://top.example"))),
-      base::make_optional(
+      absl::nullopt /* impression_origin */,
+      absl::make_optional(url::Origin::Create(GURL("https://top.example"))),
+      absl::make_optional(
           url::Origin::Create(GURL("https://embedded.example"))));
 
   struct {
@@ -338,9 +338,9 @@
       SetBrowserClientForTesting(&browser_client);
 
   browser_client.BlockConversionMeasurementInContext(
-      base::make_optional(url::Origin::Create(GURL("https://top.example"))),
-      base::nullopt /* conversion_origin */,
-      base::make_optional(
+      absl::make_optional(url::Origin::Create(GURL("https://top.example"))),
+      absl::nullopt /* conversion_origin */,
+      absl::make_optional(
           url::Origin::Create(GURL("https://embedded.example"))));
 
   struct {
diff --git a/content/browser/conversions/conversion_internals_browsertest.cc b/content/browser/conversions/conversion_internals_browsertest.cc
index 76e743e..2c4b51f 100644
--- a/content/browser/conversions/conversion_internals_browsertest.cc
+++ b/content/browser/conversions/conversion_internals_browsertest.cc
@@ -4,7 +4,6 @@
 
 #include "content/browser/conversions/conversion_internals_ui.h"
 
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
 #include "content/browser/conversions/conversion_manager.h"
@@ -20,6 +19,7 @@
 #include "content/public/test/content_browser_test.h"
 #include "content/public/test/content_browser_test_utils.h"
 #include "content/shell/browser/shell.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/conversions/conversion_manager_impl_unittest.cc b/content/browser/conversions/conversion_manager_impl_unittest.cc
index 94df30a..cc3a932e 100644
--- a/content/browser/conversions/conversion_manager_impl_unittest.cc
+++ b/content/browser/conversions/conversion_manager_impl_unittest.cc
@@ -213,7 +213,7 @@
       impression, conversion.conversion_data(),
       /*conversion_time=*/clock().Now(),
       /*report_time=*/clock().Now() + kFirstReportingWindow,
-      base::nullopt /* conversion_id */);
+      absl::nullopt /* conversion_id */);
 
   base::RunLoop run_loop;
   auto reports_callback =
diff --git a/content/browser/conversions/conversion_policy.cc b/content/browser/conversions/conversion_policy.cc
index 59aecba..0cd686b 100644
--- a/content/browser/conversions/conversion_policy.cc
+++ b/content/browser/conversions/conversion_policy.cc
@@ -70,7 +70,7 @@
 }
 
 base::Time ConversionPolicy::GetExpiryTimeForImpression(
-    const base::Optional<base::TimeDelta>& declared_expiry,
+    const absl::optional<base::TimeDelta>& declared_expiry,
     base::Time impression_time) const {
   static constexpr base::TimeDelta kDefaultImpressionExpiry =
       base::TimeDelta::FromDays(30);
diff --git a/content/browser/conversions/conversion_policy.h b/content/browser/conversions/conversion_policy.h
index c7c2f62..b528ad3 100644
--- a/content/browser/conversions/conversion_policy.h
+++ b/content/browser/conversions/conversion_policy.h
@@ -10,9 +10,9 @@
 #include <string>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -56,7 +56,7 @@
   // Returns the expiry time for an impression that is clamped to a maximum
   // value of 30 days from |impression_time|.
   virtual base::Time GetExpiryTimeForImpression(
-      const base::Optional<base::TimeDelta>& declared_expiry,
+      const absl::optional<base::TimeDelta>& declared_expiry,
       base::Time impression_time) const;
 
   // Delays reports that should have been sent while the browser was not open by
diff --git a/content/browser/conversions/conversion_policy_unittest.cc b/content/browser/conversions/conversion_policy_unittest.cc
index 27625ff..a84ac54 100644
--- a/content/browser/conversions/conversion_policy_unittest.cc
+++ b/content/browser/conversions/conversion_policy_unittest.cc
@@ -87,7 +87,7 @@
   base::Time impression_time = base::Time::Now();
   EXPECT_EQ(impression_time + base::TimeDelta::FromDays(30),
             ConversionPolicy().GetExpiryTimeForImpression(
-                /*declared_expiry=*/base::nullopt, impression_time));
+                /*declared_expiry=*/absl::nullopt, impression_time));
 }
 
 TEST_F(ConversionPolicyTest, LargeImpressionExpirySpecified_ClampedTo30Days) {
diff --git a/content/browser/conversions/conversion_report.cc b/content/browser/conversions/conversion_report.cc
index f6c233f..2cefade 100644
--- a/content/browser/conversions/conversion_report.cc
+++ b/content/browser/conversions/conversion_report.cc
@@ -12,7 +12,7 @@
                                    const std::string& conversion_data,
                                    base::Time conversion_time,
                                    base::Time report_time,
-                                   const base::Optional<int64_t>& conversion_id)
+                                   const absl::optional<int64_t>& conversion_id)
     : impression(impression),
       conversion_data(conversion_data),
       conversion_time(conversion_time),
diff --git a/content/browser/conversions/conversion_report.h b/content/browser/conversions/conversion_report.h
index 644e187d..4cdc79d 100644
--- a/content/browser/conversions/conversion_report.h
+++ b/content/browser/conversions/conversion_report.h
@@ -9,10 +9,10 @@
 #include <string>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/conversions/storable_impression.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -25,7 +25,7 @@
                    const std::string& conversion_data,
                    base::Time conversion_time,
                    base::Time report_time,
-                   const base::Optional<int64_t>& conversion_id);
+                   const absl::optional<int64_t>& conversion_id);
   ConversionReport(const ConversionReport& other);
   ~ConversionReport();
 
@@ -48,7 +48,7 @@
 
   // Id assigned by storage to uniquely identify a completed conversion. If
   // null, an ID has not been assigned yet.
-  const base::Optional<int64_t> conversion_id;
+  const absl::optional<int64_t> conversion_id;
 };
 
 // Only used for logging.
diff --git a/content/browser/conversions/conversion_reporter_impl_unittest.cc b/content/browser/conversions/conversion_reporter_impl_unittest.cc
index de195b97..c4c4efc 100644
--- a/content/browser/conversions/conversion_reporter_impl_unittest.cc
+++ b/content/browser/conversions/conversion_reporter_impl_unittest.cc
@@ -235,11 +235,11 @@
       SetBrowserClientForTesting(&browser_client);
 
   browser_client.BlockConversionMeasurementInContext(
-      base::make_optional(
+      absl::make_optional(
           url::Origin::Create(GURL("https://impression.example"))),
-      base::make_optional(
+      absl::make_optional(
           url::Origin::Create(GURL("https://conversion.example"))),
-      base::make_optional(
+      absl::make_optional(
           url::Origin::Create(GURL("https://reporting.example"))));
 
   struct {
diff --git a/content/browser/conversions/conversion_storage_delegate_impl_unittest.cc b/content/browser/conversions/conversion_storage_delegate_impl_unittest.cc
index 1571072..c947136 100644
--- a/content/browser/conversions/conversion_storage_delegate_impl_unittest.cc
+++ b/content/browser/conversions/conversion_storage_delegate_impl_unittest.cc
@@ -6,12 +6,12 @@
 
 #include <vector>
 
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/conversions/conversion_report.h"
 #include "content/browser/conversions/conversion_test_utils.h"
 #include "content/browser/conversions/storable_impression.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -31,7 +31,7 @@
                               .Build(),
                           /*conversion_data=*/"123", conversion_time,
                           report_time,
-                          /*conversion_id=*/base::nullopt);
+                          /*conversion_id=*/absl::nullopt);
 }
 
 }  // namespace
diff --git a/content/browser/conversions/conversion_storage_sql.cc b/content/browser/conversions/conversion_storage_sql.cc
index d16bf51..736c9d9 100644
--- a/content/browser/conversions/conversion_storage_sql.cc
+++ b/content/browser/conversions/conversion_storage_sql.cc
@@ -16,7 +16,6 @@
 #include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/time/default_clock.h"
 #include "base/time/time.h"
 #include "content/browser/conversions/conversion_storage_sql_migrations.h"
@@ -24,6 +23,7 @@
 #include "sql/recovery.h"
 #include "sql/statement.h"
 #include "sql/transaction.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 #include "url/url_constants.h"
@@ -264,7 +264,7 @@
   ConversionReport report(impression_to_attribute, conversion.conversion_data(),
                           /*conversion_time=*/current_time,
                           /*report_time=*/current_time,
-                          /*conversion_id=*/base::nullopt);
+                          /*conversion_id=*/absl::nullopt);
 
   // Allow the delegate to make arbitrary changes to the new conversion report
   // before we add it storage.
diff --git a/content/browser/conversions/conversion_storage_sql.h b/content/browser/conversions/conversion_storage_sql.h
index 00d691a..9c884b25 100644
--- a/content/browser/conversions/conversion_storage_sql.h
+++ b/content/browser/conversions/conversion_storage_sql.h
@@ -118,7 +118,7 @@
   // at for lazy initialization, and used as a signal for if the database is
   // closed. This is initialized in the first call to LazyInit() to avoid doing
   // additional work in the constructor, see https://crbug.com/1121307.
-  base::Optional<DbStatus> db_init_status_;
+  absl::optional<DbStatus> db_init_status_;
 
   // May be null if the database:
   //  - could not be opened
diff --git a/content/browser/conversions/conversion_storage_unittest.cc b/content/browser/conversions/conversion_storage_unittest.cc
index 1035bf0..63d959e 100644
--- a/content/browser/conversions/conversion_storage_unittest.cc
+++ b/content/browser/conversions/conversion_storage_unittest.cc
@@ -66,7 +66,7 @@
                             /*conversion_time=*/clock_.Now(),
                             /*report_time=*/clock_.Now() +
                                 base::TimeDelta::FromMilliseconds(kReportTime),
-                            base::nullopt /* conversion_id */);
+                            absl::nullopt /* conversion_id */);
     return report;
   }
 
diff --git a/content/browser/conversions/conversion_test_utils.cc b/content/browser/conversions/conversion_test_utils.cc
index 7a56467..3e6e66a9 100644
--- a/content/browser/conversions/conversion_test_utils.cc
+++ b/content/browser/conversions/conversion_test_utils.cc
@@ -79,9 +79,9 @@
 
 void ConfigurableConversionTestBrowserClient::
     BlockConversionMeasurementInContext(
-        base::Optional<url::Origin> impression_origin,
-        base::Optional<url::Origin> conversion_origin,
-        base::Optional<url::Origin> reporting_origin) {
+        absl::optional<url::Origin> impression_origin,
+        absl::optional<url::Origin> conversion_origin,
+        absl::optional<url::Origin> reporting_origin) {
   blocked_impression_origin_ = impression_origin;
   blocked_conversion_origin_ = conversion_origin;
   blocked_reporting_origin_ = reporting_origin;
@@ -244,7 +244,7 @@
 }
 
 ImpressionBuilder& ImpressionBuilder::SetImpressionId(
-    base::Optional<int64_t> impression_id) {
+    absl::optional<int64_t> impression_id) {
   impression_id_ = impression_id;
   return *this;
 }
diff --git a/content/browser/conversions/conversion_test_utils.h b/content/browser/conversions/conversion_test_utils.h
index 1ab3c29..02840f6 100644
--- a/content/browser/conversions/conversion_test_utils.h
+++ b/content/browser/conversions/conversion_test_utils.h
@@ -62,14 +62,14 @@
   // an operation if all origins match in
   // `AllowConversionMeasurementOperation()`.
   void BlockConversionMeasurementInContext(
-      base::Optional<url::Origin> impression_origin,
-      base::Optional<url::Origin> conversion_origin,
-      base::Optional<url::Origin> reporting_origin);
+      absl::optional<url::Origin> impression_origin,
+      absl::optional<url::Origin> conversion_origin,
+      absl::optional<url::Origin> reporting_origin);
 
  private:
-  base::Optional<url::Origin> blocked_impression_origin_;
-  base::Optional<url::Origin> blocked_conversion_origin_;
-  base::Optional<url::Origin> blocked_reporting_origin_;
+  absl::optional<url::Origin> blocked_impression_origin_;
+  absl::optional<url::Origin> blocked_conversion_origin_;
+  absl::optional<url::Origin> blocked_reporting_origin_;
 };
 
 class ConfigurableStorageDelegate : public ConversionStorage::Delegate {
@@ -168,25 +168,25 @@
     return last_conversion_destination_;
   }
 
-  const base::Optional<StorableImpression::SourceType>&
+  const absl::optional<StorableImpression::SourceType>&
   last_impression_source_type() {
     return last_impression_source_type_;
   }
 
-  const base::Optional<url::Origin>& last_impression_origin() {
+  const absl::optional<url::Origin>& last_impression_origin() {
     return last_impression_origin_;
   }
 
-  const base::Optional<int64_t> last_attribution_source_priority() {
+  const absl::optional<int64_t> last_attribution_source_priority() {
     return last_attribution_source_priority_;
   }
 
  private:
   ConversionPolicy policy_;
   net::SchemefulSite last_conversion_destination_;
-  base::Optional<StorableImpression::SourceType> last_impression_source_type_;
-  base::Optional<url::Origin> last_impression_origin_;
-  base::Optional<int64_t> last_attribution_source_priority_;
+  absl::optional<StorableImpression::SourceType> last_impression_source_type_;
+  absl::optional<url::Origin> last_impression_origin_;
+  absl::optional<int64_t> last_attribution_source_priority_;
   size_t num_impressions_ = 0;
   size_t num_conversions_ = 0;
 
@@ -216,7 +216,7 @@
 
   ImpressionBuilder& SetPriority(int64_t priority);
 
-  ImpressionBuilder& SetImpressionId(base::Optional<int64_t> impression_id);
+  ImpressionBuilder& SetImpressionId(absl::optional<int64_t> impression_id);
 
   StorableImpression Build() const;
 
@@ -229,7 +229,7 @@
   url::Origin reporting_origin_;
   StorableImpression::SourceType source_type_;
   int64_t priority_;
-  base::Optional<int64_t> impression_id_;
+  absl::optional<int64_t> impression_id_;
 };
 
 // Returns a StorableConversion with default data which matches the default
diff --git a/content/browser/conversions/impression_declaration_browsertest.cc b/content/browser/conversions/impression_declaration_browsertest.cc
index 29b9670..2bdc45d 100644
--- a/content/browser/conversions/impression_declaration_browsertest.cc
+++ b/content/browser/conversions/impression_declaration_browsertest.cc
@@ -82,7 +82,7 @@
  private:
   size_t num_impressions_ = 0u;
   const size_t expected_num_impressions_ = 0u;
-  base::Optional<blink::Impression> last_impression_;
+  absl::optional<blink::Impression> last_impression_;
   bool waiting_for_null_impression_ = false;
   base::RunLoop impression_loop_;
 };
diff --git a/content/browser/conversions/rate_limit_table_unittest.cc b/content/browser/conversions/rate_limit_table_unittest.cc
index 101dc273..c6fda0c 100644
--- a/content/browser/conversions/rate_limit_table_unittest.cc
+++ b/content/browser/conversions/rate_limit_table_unittest.cc
@@ -41,7 +41,7 @@
                             /*conversion_data=*/"",
                             /*conversion_time=*/clock()->Now(),
                             /*report_time=*/clock()->Now(),
-                            /*conversion_id=*/base::nullopt);
+                            /*conversion_id=*/absl::nullopt);
   }
 
   size_t GetRateLimitRows(sql::Database* db) {
diff --git a/content/browser/conversions/storable_impression.cc b/content/browser/conversions/storable_impression.cc
index 5abdc1e9..4810bcb6 100644
--- a/content/browser/conversions/storable_impression.cc
+++ b/content/browser/conversions/storable_impression.cc
@@ -17,7 +17,7 @@
     base::Time expiry_time,
     SourceType source_type,
     int64_t priority,
-    const base::Optional<int64_t>& impression_id)
+    const absl::optional<int64_t>& impression_id)
     : impression_data_(impression_data),
       impression_origin_(impression_origin),
       conversion_origin_(conversion_origin),
diff --git a/content/browser/conversions/storable_impression.h b/content/browser/conversions/storable_impression.h
index 92aa6208..80350c0 100644
--- a/content/browser/conversions/storable_impression.h
+++ b/content/browser/conversions/storable_impression.h
@@ -8,10 +8,10 @@
 #include <stdint.h>
 #include <string>
 
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "net/base/schemeful_site.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
@@ -42,7 +42,7 @@
                      base::Time expiry_time,
                      SourceType source_type,
                      int64_t priority,
-                     const base::Optional<int64_t>& impression_id);
+                     const absl::optional<int64_t>& impression_id);
   StorableImpression(const StorableImpression& other);
   StorableImpression& operator=(const StorableImpression& other) = delete;
   ~StorableImpression();
@@ -59,7 +59,7 @@
 
   base::Time expiry_time() const { return expiry_time_; }
 
-  base::Optional<int64_t> impression_id() const { return impression_id_; }
+  absl::optional<int64_t> impression_id() const { return impression_id_; }
 
   SourceType source_type() const { return source_type_; }
 
@@ -83,7 +83,7 @@
   int64_t priority_;
 
   // If null, an ID has not been assigned yet.
-  base::Optional<int64_t> impression_id_;
+  absl::optional<int64_t> impression_id_;
 
   // When adding new members, the ImpressionsEqual() testing utility in
   // conversion_test_utils.h should also be updated.
diff --git a/content/browser/cookie_store/cookie_change_subscription.h b/content/browser/cookie_store/cookie_change_subscription.h
index b80acb6..b9c84f4 100644
--- a/content/browser/cookie_store/cookie_change_subscription.h
+++ b/content/browser/cookie_store/cookie_change_subscription.h
@@ -10,7 +10,7 @@
 
 #include "base/containers/linked_list.h"
 #include "base/macros.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/cookie_store/cookie_store.mojom.h"
 #include "url/gurl.h"
 
diff --git a/content/browser/cookie_store/cookie_store_manager.cc b/content/browser/cookie_store/cookie_store_manager.cc
index ab5ec2a..0ff2c90 100644
--- a/content/browser/cookie_store/cookie_store_manager.cc
+++ b/content/browser/cookie_store/cookie_store_manager.cc
@@ -9,7 +9,6 @@
 
 #include "base/bind.h"
 #include "base/callback_helpers.h"
-#include "base/optional.h"
 #include "content/browser/cookie_store/cookie_change_subscriptions.pb.h"
 #include "content/browser/service_worker/embedded_worker_status.h"
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
@@ -19,6 +18,7 @@
 #include "content/public/browser/browser_context.h"
 #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
 #include "services/network/public/cpp/is_potentially_trustworthy.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_scope_match.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom.h"
diff --git a/content/browser/cookie_store/cookie_store_manager_unittest.cc b/content/browser/cookie_store/cookie_store_manager_unittest.cc
index 6298e59..2715d4b 100644
--- a/content/browser/cookie_store/cookie_store_manager_unittest.cc
+++ b/content/browser/cookie_store/cookie_store_manager_unittest.cc
@@ -76,9 +76,9 @@
     return success;
   }
 
-  base::Optional<Subscriptions> GetSubscriptions(
+  absl::optional<Subscriptions> GetSubscriptions(
       int64_t service_worker_registration_id) {
-    base::Optional<Subscriptions> result;
+    absl::optional<Subscriptions> result;
     base::RunLoop run_loop;
     cookie_store_service_->GetSubscriptions(
         service_worker_registration_id,
@@ -452,7 +452,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   EXPECT_EQ(0u, all_subscriptions_opt.value().size());
@@ -470,7 +470,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   EXPECT_EQ(0u, all_subscriptions_opt.value().size());
@@ -494,7 +494,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -526,7 +526,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   EXPECT_EQ(0u, all_subscriptions_opt.value().size());
@@ -556,7 +556,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   EXPECT_EQ(0u, all_subscriptions_opt.value().size());
@@ -586,7 +586,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       google_service_->GetSubscriptions(google_registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   EXPECT_EQ(0u, all_subscriptions_opt.value().size());
@@ -633,7 +633,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> example_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> example_subscriptions_opt =
       example_service_->GetSubscriptions(example_registration_id);
   ASSERT_TRUE(example_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions example_subscriptions =
@@ -644,7 +644,7 @@
             example_subscriptions[0]->match_type);
   EXPECT_EQ(GURL(kExampleScope), example_subscriptions[0]->url);
 
-  base::Optional<CookieStoreSync::Subscriptions> google_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> google_subscriptions_opt =
       google_service_->GetSubscriptions(google_registration_id);
   ASSERT_TRUE(google_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions google_subscriptions =
@@ -693,7 +693,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -758,7 +758,7 @@
                                                    std::move(subscriptions)));
   }
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -804,7 +804,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -843,7 +843,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -878,7 +878,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -917,7 +917,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -979,7 +979,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> example_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> example_subscriptions_opt =
       example_service_->GetSubscriptions(example_registration_id);
   ASSERT_TRUE(example_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions example_subscriptions =
@@ -990,7 +990,7 @@
             example_subscriptions[0]->match_type);
   EXPECT_EQ(GURL(kExampleScope), example_subscriptions[0]->url);
 
-  base::Optional<CookieStoreSync::Subscriptions> google_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> google_subscriptions_opt =
       google_service_->GetSubscriptions(google_registration_id);
   ASSERT_TRUE(google_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions google_subscriptions =
@@ -1049,14 +1049,14 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> example_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> example_subscriptions_opt =
       example_service_->GetSubscriptions(example_registration_id);
   ASSERT_TRUE(example_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions example_subscriptions =
       std::move(example_subscriptions_opt).value();
   EXPECT_EQ(0u, example_subscriptions.size());
 
-  base::Optional<CookieStoreSync::Subscriptions> google_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> google_subscriptions_opt =
       google_service_->GetSubscriptions(google_registration_id);
   ASSERT_TRUE(google_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions google_subscriptions =
@@ -1117,7 +1117,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -1186,7 +1186,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   CookieStoreSync::Subscriptions all_subscriptions =
@@ -1217,7 +1217,7 @@
   if (reset_context_during_test())
     ResetServiceWorkerContext();
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1255,7 +1255,7 @@
 
   EXPECT_TRUE(legacy_service_->AddSubscriptions(registration_id,
                                                 std::move(subscriptions)));
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       legacy_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1293,7 +1293,7 @@
 
   EXPECT_TRUE(example_service_->AddSubscriptions(registration_id,
                                                  std::move(subscriptions)));
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1358,7 +1358,7 @@
   EXPECT_TRUE(legacy_service_->AddSubscriptions(registration_id,
                                                 std::move(subscriptions)));
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       legacy_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1419,7 +1419,7 @@
 
   EXPECT_TRUE(example_service_->AddSubscriptions(registration_id,
                                                  std::move(subscriptions)));
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1489,7 +1489,7 @@
   EXPECT_TRUE(legacy_service_->AddSubscriptions(registration_id,
                                                 std::move(subscriptions)));
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       legacy_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1555,7 +1555,7 @@
 
   EXPECT_TRUE(example_service_->AddSubscriptions(registration_id,
                                                  std::move(subscriptions)));
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1612,7 +1612,7 @@
   EXPECT_TRUE(legacy_service_->AddSubscriptions(registration_id,
                                                 std::move(subscriptions)));
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       legacy_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1671,7 +1671,7 @@
   EXPECT_TRUE(example_service_->AddSubscriptions(registration_id,
                                                  std::move(subscriptions)));
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1710,7 +1710,7 @@
   EXPECT_TRUE(example_service_->AddSubscriptions(registration_id,
                                                  std::move(subscriptions)));
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   ASSERT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1745,7 +1745,7 @@
   EXPECT_TRUE(example_service_->AddSubscriptions(example_registration_id,
                                                  std::move(subscriptions)));
 
-  base::Optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> all_subscriptions_opt =
       example_service_->GetSubscriptions(example_registration_id);
   ASSERT_TRUE(all_subscriptions_opt.has_value());
   EXPECT_EQ(1u, all_subscriptions_opt.value().size());
@@ -1754,7 +1754,7 @@
     ResetServiceWorkerContext();
 
   mojo::test::BadMessageObserver bad_mesage_observer;
-  base::Optional<CookieStoreSync::Subscriptions> wrong_subscriptions_opt =
+  absl::optional<CookieStoreSync::Subscriptions> wrong_subscriptions_opt =
       google_service_->GetSubscriptions(example_registration_id);
   EXPECT_FALSE(wrong_subscriptions_opt.has_value());
   EXPECT_EQ("Invalid service worker", bad_mesage_observer.WaitForBadMessage());
diff --git a/content/browser/cross_origin_opener_policy_browsertest.cc b/content/browser/cross_origin_opener_policy_browsertest.cc
index 9266656..e14bd7c 100644
--- a/content/browser/cross_origin_opener_policy_browsertest.cc
+++ b/content/browser/cross_origin_opener_policy_browsertest.cc
@@ -2775,8 +2775,8 @@
   EXPECT_TRUE(NavigateToURL(shell(), OriginTrialURL()));
   network::CrossOriginOpenerPolicy coop =
       current_frame_host()->cross_origin_opener_policy();
-  EXPECT_EQ(coop.reporting_endpoint, base::nullopt);
-  EXPECT_EQ(coop.report_only_reporting_endpoint, base::nullopt);
+  EXPECT_EQ(coop.reporting_endpoint, absl::nullopt);
+  EXPECT_EQ(coop.report_only_reporting_endpoint, absl::nullopt);
   EXPECT_EQ(coop.value,
             network::mojom::CrossOriginOpenerPolicyValue::kSameOriginPlusCoep);
   EXPECT_EQ(coop.report_only_value,
diff --git a/content/browser/data_decoder_browsertest.cc b/content/browser/data_decoder_browsertest.cc
index d7031e13..f7e0b7e 100644
--- a/content/browser/data_decoder_browsertest.cc
+++ b/content/browser/data_decoder_browsertest.cc
@@ -39,7 +39,7 @@
   }
 
  private:
-  base::Optional<base::RunLoop> launch_wait_loop_;
+  absl::optional<base::RunLoop> launch_wait_loop_;
   int instances_started_ = 0;
 
   DISALLOW_COPY_AND_ASSIGN(ServiceProcessObserver);
diff --git a/content/browser/devtools/devtools_agent_host_impl.cc b/content/browser/devtools/devtools_agent_host_impl.cc
index c3e61b9..82f9504 100644
--- a/content/browser/devtools/devtools_agent_host_impl.cc
+++ b/content/browser/devtools/devtools_agent_host_impl.cc
@@ -419,14 +419,14 @@
   return nullptr;
 }
 
-base::Optional<network::CrossOriginEmbedderPolicy>
+absl::optional<network::CrossOriginEmbedderPolicy>
 DevToolsAgentHostImpl::cross_origin_embedder_policy(const std::string& id) {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
-base::Optional<network::CrossOriginOpenerPolicy>
+absl::optional<network::CrossOriginOpenerPolicy>
 DevToolsAgentHostImpl::cross_origin_opener_policy(const std::string& id) {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace content
diff --git a/content/browser/devtools/devtools_agent_host_impl.h b/content/browser/devtools/devtools_agent_host_impl.h
index 88afb5506..c03b2ead 100644
--- a/content/browser/devtools/devtools_agent_host_impl.h
+++ b/content/browser/devtools/devtools_agent_host_impl.h
@@ -91,9 +91,9 @@
     return result;
   }
 
-  virtual base::Optional<network::CrossOriginEmbedderPolicy>
+  virtual absl::optional<network::CrossOriginEmbedderPolicy>
   cross_origin_embedder_policy(const std::string& id);
-  virtual base::Optional<network::CrossOriginOpenerPolicy>
+  virtual absl::optional<network::CrossOriginOpenerPolicy>
   cross_origin_opener_policy(const std::string& id);
 
  protected:
diff --git a/content/browser/devtools/devtools_instrumentation.cc b/content/browser/devtools/devtools_instrumentation.cc
index 4cbfa40..4517cca 100644
--- a/content/browser/devtools/devtools_instrumentation.cc
+++ b/content/browser/devtools/devtools_instrumentation.cc
@@ -310,12 +310,12 @@
 
 void OnSignedExchangeReceived(
     FrameTreeNode* frame_tree_node,
-    base::Optional<const base::UnguessableToken> devtools_navigation_token,
+    absl::optional<const base::UnguessableToken> devtools_navigation_token,
     const GURL& outer_request_url,
     const network::mojom::URLResponseHead& outer_response,
-    const base::Optional<SignedExchangeEnvelope>& envelope,
+    const absl::optional<SignedExchangeEnvelope>& envelope,
     const scoped_refptr<net::X509Certificate>& certificate,
-    const base::Optional<net::SSLInfo>& ssl_info,
+    const absl::optional<net::SSLInfo>& ssl_info,
     const std::vector<SignedExchangeError>& errors) {
   DispatchToAgents(frame_tree_node,
                    &protocol::NetworkHandler::OnSignedExchangeReceived,
@@ -434,7 +434,7 @@
     FrameTreeNode* frame_tree_node,
     mojom::BeginNavigationParams* begin_params,
     bool* report_raw_headers,
-    base::Optional<std::vector<net::SourceStream::SourceType>>*
+    absl::optional<std::vector<net::SourceStream::SourceType>>*
         devtools_accepted_stream_types) {
   bool disable_cache = false;
   DevToolsAgentHostImpl* agent_host =
@@ -466,7 +466,7 @@
 
 bool ApplyUserAgentMetadataOverrides(
     FrameTreeNode* frame_tree_node,
-    base::Optional<blink::UserAgentMetadata>* override_out) {
+    absl::optional<blink::UserAgentMetadata>* override_out) {
   DevToolsAgentHostImpl* agent_host =
       RenderFrameDevToolsAgentHost::GetFor(frame_tree_node);
   if (!agent_host)
@@ -865,7 +865,7 @@
     const GURL& url,
     const net::SiteForCookies& site_for_cookies,
     blink::mojom::SameSiteCookieOperation operation,
-    const base::Optional<std::string>& devtools_request_id) {
+    const absl::optional<std::string>& devtools_request_id) {
   std::unique_ptr<protocol::Audits::AffectedRequest> affected_request;
   if (devtools_request_id) {
     // We can report the url here, because if devtools_request_id is set, the
@@ -965,7 +965,7 @@
 void OnWebTransportHandshakeFailed(
     RenderFrameHostImpl* frame,
     const GURL& url,
-    const base::Optional<net::WebTransportError>& error) {
+    const absl::optional<net::WebTransportError>& error) {
   FrameTreeNode* ftn = frame->frame_tree_node();
   if (!ftn)
     return;
diff --git a/content/browser/devtools/devtools_instrumentation.h b/content/browser/devtools/devtools_instrumentation.h
index cc024ed..7edfd5d 100644
--- a/content/browser/devtools/devtools_instrumentation.h
+++ b/content/browser/devtools/devtools_instrumentation.h
@@ -11,13 +11,13 @@
 
 #include <vector>
 
-#include "base/optional.h"
 #include "content/common/navigation_params.mojom.h"
 #include "content/public/browser/certificate_request_result_type.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "services/network/public/mojom/network_service.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-forward.h"
 #include "third_party/blink/public/mojom/page/widget.mojom.h"
 #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h"
@@ -70,7 +70,7 @@
     FrameTreeNode* frame_tree_node,
     mojom::BeginNavigationParams* begin_params,
     bool* report_raw_headers,
-    base::Optional<std::vector<net::SourceStream::SourceType>>*
+    absl::optional<std::vector<net::SourceStream::SourceType>>*
         devtools_accepted_stream_types);
 
 // Returns true if devtools want |*override_out| to be used.
@@ -79,7 +79,7 @@
 //  the behavior).
 bool ApplyUserAgentMetadataOverrides(
     FrameTreeNode* frame_tree_node,
-    base::Optional<blink::UserAgentMetadata>* override_out);
+    absl::optional<blink::UserAgentMetadata>* override_out);
 
 bool WillCreateURLLoaderFactory(
     RenderFrameHostImpl* rfh,
@@ -126,12 +126,12 @@
 
 void OnSignedExchangeReceived(
     FrameTreeNode* frame_tree_node,
-    base::Optional<const base::UnguessableToken> devtools_navigation_token,
+    absl::optional<const base::UnguessableToken> devtools_navigation_token,
     const GURL& outer_request_url,
     const network::mojom::URLResponseHead& outer_response,
-    const base::Optional<SignedExchangeEnvelope>& header,
+    const absl::optional<SignedExchangeEnvelope>& header,
     const scoped_refptr<net::X509Certificate>& certificate,
-    const base::Optional<net::SSLInfo>& ssl_info,
+    const absl::optional<net::SSLInfo>& ssl_info,
     const std::vector<SignedExchangeError>& errors);
 void OnSignedExchangeCertificateRequestSent(
     FrameTreeNode* frame_tree_node,
@@ -179,7 +179,7 @@
     const GURL& url,
     const net::SiteForCookies& site_for_cookies,
     blink::mojom::SameSiteCookieOperation operation,
-    const base::Optional<std::string>& devtools_request_id);
+    const absl::optional<std::string>& devtools_request_id);
 
 // This function works similar to RenderFrameHostImpl::AddInspectorIssue, in
 // that it reports an InspectorIssue to DevTools clients. The difference is that
@@ -209,7 +209,7 @@
 void OnWebTransportHandshakeFailed(
     RenderFrameHostImpl* frame_host,
     const GURL& url,
-    const base::Optional<net::WebTransportError>& error);
+    const absl::optional<net::WebTransportError>& error);
 
 // Adds a debug error message from a worklet to the devtools console.
 void LogWorkletError(RenderFrameHostImpl* frame_host, const std::string& error);
diff --git a/content/browser/devtools/devtools_session.h b/content/browser/devtools/devtools_session.h
index 6b4bbf6..6b4eb27 100644
--- a/content/browser/devtools/devtools_session.h
+++ b/content/browser/devtools/devtools_session.h
@@ -13,13 +13,13 @@
 #include "base/containers/flat_map.h"
 #include "base/containers/span.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/devtools/protocol/forward.h"
 #include "content/public/browser/devtools_agent_host_client_channel.h"
 #include "content/public/browser/devtools_external_agent_proxy.h"
 #include "mojo/public/cpp/bindings/associated_receiver.h"
 #include "mojo/public/cpp/bindings/associated_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/devtools/devtools_agent.mojom.h"
 
 namespace content {
diff --git a/content/browser/devtools/devtools_trust_token_browsertest.cc b/content/browser/devtools/devtools_trust_token_browsertest.cc
index 26c7706..58a553ae4 100644
--- a/content/browser/devtools/devtools_trust_token_browsertest.cc
+++ b/content/browser/devtools/devtools_trust_token_browsertest.cc
@@ -48,7 +48,7 @@
     for (const auto& token : tokens) {
       const std::string* issuer = token.FindStringKey("issuerOrigin");
       if (*issuer == issuerOrigin) {
-        const base::Optional<int> actualCount = token.FindIntPath("count");
+        const absl::optional<int> actualCount = token.FindIntPath("count");
         EXPECT_THAT(actualCount, ::testing::Optional(expectedCount));
         return;
       }
diff --git a/content/browser/devtools/devtools_url_loader_interceptor.cc b/content/browser/devtools/devtools_url_loader_interceptor.cc
index 0268221..82d8838 100644
--- a/content/browser/devtools/devtools_url_loader_interceptor.cc
+++ b/content/browser/devtools/devtools_url_loader_interceptor.cc
@@ -94,7 +94,7 @@
       modified_headers(std::move(modified_headers)) {}
 
 DevToolsURLLoaderInterceptor::Modifications::Modifications(
-    base::Optional<net::Error> error_reason,
+    absl::optional<net::Error> error_reason,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     scoped_refptr<base::RefCountedMemory> response_body,
     size_t body_offset,
@@ -269,7 +269,7 @@
       const std::string& id,
       const base::UnguessableToken& frame_token,
       int32_t process_id,
-      const base::Optional<std::string>& renderer_request_id,
+      const absl::optional<std::string>& renderer_request_id,
       std::unique_ptr<CreateLoaderParameters> create_loader_params,
       bool is_download,
       mojo::PendingReceiver<network::mojom::URLLoader> loader_receiver,
@@ -346,7 +346,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
@@ -416,12 +416,12 @@
   std::unique_ptr<ResponseMetadata> response_metadata_;
   bool registered_in_global_request_map_;
 
-  base::Optional<std::pair<net::RequestPriority, int32_t>> priority_;
+  absl::optional<std::pair<net::RequestPriority, int32_t>> priority_;
   DevToolsURLLoaderInterceptor::HandleAuthRequestCallback
       pending_auth_callback_;
   TakeResponseBodyPipeCallback pending_response_body_pipe_callback_;
 
-  const base::Optional<std::string> renderer_request_id_;
+  const absl::optional<std::string> renderer_request_id_;
 
   // List of URLs that have been redirected through. The last member is the
   // current request URL. Tracked for the purpose of computing the proper
@@ -435,7 +435,7 @@
     const base::UnguessableToken& frame_token,
     int32_t process_id,
     bool is_download,
-    const base::Optional<std::string>& renderer_request_id,
+    const absl::optional<std::string>& renderer_request_id,
     std::unique_ptr<CreateLoaderParameters> create_params,
     mojo::PendingReceiver<network::mojom::URLLoader> loader_receiver,
     mojo::PendingRemote<network::mojom::URLLoaderClient> client,
@@ -594,7 +594,7 @@
   if (auto* job = InterceptionJob::FindByRequestId(req_id))
     job->OnAuthRequest(auth_info, std::move(callback));
   else
-    std::move(callback).Run(true, base::nullopt);
+    std::move(callback).Run(true, absl::nullopt);
 }
 
 DevToolsURLLoaderInterceptor::DevToolsURLLoaderInterceptor(
@@ -684,7 +684,7 @@
     const std::string& id,
     const base::UnguessableToken& frame_token,
     int process_id,
-    const base::Optional<std::string>& renderer_request_id,
+    const absl::optional<std::string>& renderer_request_id,
     std::unique_ptr<CreateLoaderParameters> create_loader_params,
     bool is_download,
     mojo::PendingReceiver<network::mojom::URLLoader> loader_receiver,
@@ -851,7 +851,7 @@
   if (state_ == State::kAuthRequired) {
     state_ = State::kRequestSent;
     waiting_for_resolution_ = false;
-    std::move(pending_auth_callback_).Run(true, base::nullopt);
+    std::move(pending_auth_callback_).Run(true, absl::nullopt);
     return;
   }
   InnerContinueRequest(std::make_unique<Modifications>());
@@ -904,7 +904,7 @@
     } else {
       // TODO(caseq): report error if other modifications are present.
       state_ = State::kRequestSent;
-      loader_->FollowRedirect({}, {}, {}, base::nullopt);
+      loader_->FollowRedirect({}, {}, {}, absl::nullopt);
       return Response::Success();
     }
   }
@@ -996,10 +996,10 @@
   DCHECK_EQ(kAuthRequired, state_);
   switch (response.response_type) {
     case DevToolsURLLoaderInterceptor::AuthChallengeResponse::kDefault:
-      std::move(pending_auth_callback_).Run(true, base::nullopt);
+      std::move(pending_auth_callback_).Run(true, absl::nullopt);
       break;
     case DevToolsURLLoaderInterceptor::AuthChallengeResponse::kCancelAuth:
-      std::move(pending_auth_callback_).Run(false, base::nullopt);
+      std::move(pending_auth_callback_).Run(false, absl::nullopt);
       break;
     case DevToolsURLLoaderInterceptor::AuthChallengeResponse::
         kProvideCredentials:
@@ -1093,9 +1093,9 @@
 
   std::vector<std::unique_ptr<net::CanonicalCookie>> cookies;
   base::Time response_date;
-  base::Optional<base::Time> server_time = base::nullopt;
+  absl::optional<base::Time> server_time = absl::nullopt;
   if (headers.GetDateValue(&response_date))
-    server_time = base::make_optional(response_date);
+    server_time = absl::make_optional(response_date);
   base::Time now = base::Time::Now();
 
   const base::StringPiece name("Set-Cookie");
@@ -1319,7 +1319,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   DCHECK(!new_url.has_value()) << "Redirect with modified url was not "
                                   "supported yet. crbug.com/845683";
   DCHECK(!waiting_for_resolution_);
@@ -1371,7 +1371,7 @@
     state_ = State::kRequestSent;
     loader_->FollowRedirect(removed_headers, modified_headers,
                             modified_cors_exempt_headers,
-                            base::nullopt /* new_url */);
+                            absl::nullopt /* new_url */);
     return;
   }
 
@@ -1523,7 +1523,7 @@
 
   if (!(stage_ & InterceptionStage::REQUEST) || !interceptor_ ||
       !interceptor_->handle_auth_) {
-    std::move(callback).Run(true, base::nullopt);
+    std::move(callback).Run(true, absl::nullopt);
     return;
   }
   state_ = State::kAuthRequired;
diff --git a/content/browser/devtools/devtools_url_loader_interceptor.h b/content/browser/devtools/devtools_url_loader_interceptor.h
index 5b28332..969415a 100644
--- a/content/browser/devtools/devtools_url_loader_interceptor.h
+++ b/content/browser/devtools/devtools_url_loader_interceptor.h
@@ -8,7 +8,6 @@
 #include "base/callback.h"
 #include "base/containers/flat_set.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/devtools/protocol/network.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
@@ -19,6 +18,7 @@
 #include "net/base/net_errors.h"
 #include "services/network/public/mojom/cookie_manager.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
 
 namespace net {
@@ -99,7 +99,7 @@
                   protocol::Maybe<protocol::Binary> modified_post_data,
                   std::unique_ptr<HeadersVector> modified_headers);
     Modifications(
-        base::Optional<net::Error> error_reason,
+        absl::optional<net::Error> error_reason,
         scoped_refptr<net::HttpResponseHeaders> response_headers,
         scoped_refptr<base::RefCountedMemory> response_body,
         size_t body_offset,
@@ -112,7 +112,7 @@
 
     // If none of the following are set then the request will be allowed to
     // continue unchanged.
-    base::Optional<net::Error> error_reason;  // Finish with error.
+    absl::optional<net::Error> error_reason;  // Finish with error.
     // If either of the below fields is set, complete the request by
     // responding with the provided headers and body.
     scoped_refptr<net::HttpResponseHeaders> response_headers;
@@ -169,7 +169,7 @@
 
   using HandleAuthRequestCallback =
       base::OnceCallback<void(bool use_fallback,
-                              const base::Optional<net::AuthCredentials>&)>;
+                              const absl::optional<net::AuthCredentials>&)>;
   // Can only be called on the IO thread.
   static void HandleAuthRequest(int32_t process_id,
                                 int32_t routing_id,
@@ -207,7 +207,7 @@
       const base::UnguessableToken& frame_token,
       int32_t process_id,
       bool is_download,
-      const base::Optional<std::string>& renderer_request_id,
+      const absl::optional<std::string>& renderer_request_id,
       std::unique_ptr<CreateLoaderParameters> create_params,
       mojo::PendingReceiver<network::mojom::URLLoader> loader_receiver,
       mojo::PendingRemote<network::mojom::URLLoaderClient> client,
diff --git a/content/browser/devtools/devtools_video_consumer.cc b/content/browser/devtools/devtools_video_consumer.cc
index 32095bf..cb705b0d 100644
--- a/content/browser/devtools/devtools_video_consumer.cc
+++ b/content/browser/devtools/devtools_video_consumer.cc
@@ -8,7 +8,6 @@
 
 #include "base/bind.h"
 #include "base/memory/shared_memory_mapping.h"
-#include "base/optional.h"
 #include "cc/paint/skia_paint_canvas.h"
 #include "components/viz/common/surfaces/subtree_capture_id.h"
 #include "components/viz/host/host_frame_sink_manager.h"
@@ -16,6 +15,7 @@
 #include "media/base/limits.h"
 #include "media/capture/mojom/video_capture_types.mojom.h"
 #include "media/renderers/paint_canvas_video_renderer.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -88,8 +88,8 @@
   if (capturer_) {
     capturer_->ChangeTarget(
         frame_sink_id_.is_valid()
-            ? base::make_optional<viz::FrameSinkId>(frame_sink_id_)
-            : base::nullopt,
+            ? absl::make_optional<viz::FrameSinkId>(frame_sink_id_)
+            : absl::nullopt,
         viz::SubtreeCaptureId());
   }
 }
diff --git a/content/browser/devtools/devtools_video_consumer_unittest.cc b/content/browser/devtools/devtools_video_consumer_unittest.cc
index 859a5e1..60e6884 100644
--- a/content/browser/devtools/devtools_video_consumer_unittest.cc
+++ b/content/browser/devtools/devtools_video_consumer_unittest.cc
@@ -80,7 +80,7 @@
                     bool use_fixed_aspect_ratio));
   // This is never called.
   MOCK_METHOD1(SetAutoThrottlingEnabled, void(bool));
-  void ChangeTarget(const base::Optional<viz::FrameSinkId>& frame_sink_id,
+  void ChangeTarget(const absl::optional<viz::FrameSinkId>& frame_sink_id,
                     const viz::SubtreeCaptureId& subtree_capture_id) final {
     frame_sink_id_ = frame_sink_id ? *frame_sink_id : viz::FrameSinkId();
     MockChangeTarget(frame_sink_id_);
diff --git a/content/browser/devtools/network_service_devtools_observer.cc b/content/browser/devtools/network_service_devtools_observer.cc
index bd1ba3f1..5791453 100644
--- a/content/browser/devtools/network_service_devtools_observer.cc
+++ b/content/browser/devtools/network_service_devtools_observer.cc
@@ -65,7 +65,7 @@
     const std::string& devtools_request_id,
     const net::CookieAndLineAccessResultList& response_cookie_list,
     std::vector<network::mojom::HttpRawHeaderPairPtr> response_headers,
-    const base::Optional<std::string>& response_headers_text,
+    const absl::optional<std::string>& response_headers_text,
     network::mojom::IPAddressSpace resource_address_space) {
   auto* host = GetDevToolsAgentHost();
   if (!host)
@@ -86,7 +86,7 @@
 }
 
 void NetworkServiceDevToolsObserver::OnPrivateNetworkRequest(
-    const base::Optional<std::string>& devtools_request_id,
+    const absl::optional<std::string>& devtools_request_id,
     const GURL& url,
     bool is_warning,
     network::mojom::IPAddressSpace resource_address_space,
@@ -177,8 +177,8 @@
 }
 
 void NetworkServiceDevToolsObserver::OnCorsError(
-    const base::Optional<std::string>& devtools_request_id,
-    const base::Optional<::url::Origin>& initiator_origin,
+    const absl::optional<std::string>& devtools_request_id,
+    const absl::optional<::url::Origin>& initiator_origin,
     const GURL& url,
     const network::CorsErrorStatus& cors_error_status) {
   if (frame_tree_node_id_ == FrameTreeNode::kFrameTreeNodeInvalidId)
diff --git a/content/browser/devtools/network_service_devtools_observer.h b/content/browser/devtools/network_service_devtools_observer.h
index c6d6439..b270917 100644
--- a/content/browser/devtools/network_service_devtools_observer.h
+++ b/content/browser/devtools/network_service_devtools_observer.h
@@ -44,13 +44,13 @@
       const std::string& devtools_request_id,
       const net::CookieAndLineAccessResultList& response_cookie_list,
       std::vector<network::mojom::HttpRawHeaderPairPtr> response_headers,
-      const base::Optional<std::string>& response_headers_text,
+      const absl::optional<std::string>& response_headers_text,
       network::mojom::IPAddressSpace resource_address_space) override;
   void OnTrustTokenOperationDone(
       const std::string& devtools_request_id,
       network::mojom::TrustTokenOperationResultPtr result) override;
   void OnPrivateNetworkRequest(
-      const base::Optional<std::string>& devtools_request_id,
+      const absl::optional<std::string>& devtools_request_id,
       const GURL& url,
       bool is_warning,
       network::mojom::IPAddressSpace resource_address_space,
@@ -67,8 +67,8 @@
   void OnCorsPreflightRequestCompleted(
       const base::UnguessableToken& devtools_request_id,
       const network::URLLoaderCompletionStatus& status) override;
-  void OnCorsError(const base::Optional<std::string>& devtool_request_id,
-                   const base::Optional<::url::Origin>& initiator_origin,
+  void OnCorsError(const absl::optional<std::string>& devtool_request_id,
+                   const absl::optional<::url::Origin>& initiator_origin,
                    const GURL& url,
                    const network::CorsErrorStatus& status) override;
   void Clone(mojo::PendingReceiver<network::mojom::DevToolsObserver> listener)
diff --git a/content/browser/devtools/protocol/browser_handler.cc b/content/browser/devtools/protocol/browser_handler.cc
index 66b7e45c..1e79e2b 100644
--- a/content/browser/devtools/protocol/browser_handler.cc
+++ b/content/browser/devtools/protocol/browser_handler.cc
@@ -373,7 +373,7 @@
   PermissionControllerImpl* permission_controller =
       PermissionControllerImpl::FromBrowserContext(browser_context);
 
-  base::Optional<url::Origin> overridden_origin;
+  absl::optional<url::Origin> overridden_origin;
   if (origin.isJust()) {
     overridden_origin = url::Origin::Create(GURL(origin.fromJust()));
     if (overridden_origin->opaque())
@@ -414,7 +414,7 @@
 
   PermissionControllerImpl* permission_controller =
       PermissionControllerImpl::FromBrowserContext(browser_context);
-  base::Optional<url::Origin> overridden_origin;
+  absl::optional<url::Origin> overridden_origin;
   if (origin.isJust()) {
     overridden_origin = url::Origin::Create(GURL(origin.fromJust()));
     if (overridden_origin->opaque())
diff --git a/content/browser/devtools/protocol/devtools_download_manager_delegate.cc b/content/browser/devtools/protocol/devtools_download_manager_delegate.cc
index ec138e4d..b56d4ec 100644
--- a/content/browser/devtools/protocol/devtools_download_manager_delegate.cc
+++ b/content/browser/devtools/protocol/devtools_download_manager_delegate.cc
@@ -79,7 +79,7 @@
         empty_path, download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
         download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
         download::DownloadItem::MixedContentStatus::UNKNOWN, empty_path,
-        base::nullopt /*download_schedule*/,
+        absl::nullopt /*download_schedule*/,
         download::DOWNLOAD_INTERRUPT_REASON_USER_CANCELED);
     return true;
   }
@@ -161,7 +161,7 @@
       download::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT,
       download::DownloadItem::MixedContentStatus::UNKNOWN,
       suggested_path.AddExtension(FILE_PATH_LITERAL(".crdownload")),
-      base::nullopt /*download_schedule*/,
+      absl::nullopt /*download_schedule*/,
       download::DOWNLOAD_INTERRUPT_REASON_NONE);
 }
 
diff --git a/content/browser/devtools/protocol/devtools_network_resource_loader_browsertest.cc b/content/browser/devtools/protocol/devtools_network_resource_loader_browsertest.cc
index a0db963..2bb049bc 100644
--- a/content/browser/devtools/protocol/devtools_network_resource_loader_browsertest.cc
+++ b/content/browser/devtools/protocol/devtools_network_resource_loader_browsertest.cc
@@ -183,7 +183,7 @@
       source_map_url, protocol::DevToolsNetworkResourceLoader::Caching::kBypass,
       base::BindOnce(CheckSuccess, this, &run_loop));
   run_loop.Run();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(source_map_url);
   EXPECT_TRUE(request->load_flags & net::LOAD_BYPASS_CACHE);
 }
@@ -283,7 +283,7 @@
                    base::BindOnce(CheckSuccess, this, &run_loop));
   run_loop.Run();
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(source_map_url);
   EXPECT_TRUE(
       frame->ComputeSiteForCookies().IsEquivalent(request->site_for_cookies));
diff --git a/content/browser/devtools/protocol/emulation_handler.cc b/content/browser/devtools/protocol/emulation_handler.cc
index e9ea19e..973cb6d 100644
--- a/content/browser/devtools/protocol/emulation_handler.cc
+++ b/content/browser/devtools/protocol/emulation_handler.cc
@@ -42,13 +42,13 @@
   return blink::mojom::ScreenOrientation::kUndefined;
 }
 
-base::Optional<content::DisplayFeature::Orientation>
+absl::optional<content::DisplayFeature::Orientation>
 DisplayFeatureOrientationTypeFromString(const std::string& type) {
   if (type == Emulation::DisplayFeature::OrientationEnum::Vertical)
     return content::DisplayFeature::Orientation::kVertical;
   if (type == Emulation::DisplayFeature::OrientationEnum::Horizontal)
     return content::DisplayFeature::Orientation::kHorizontal;
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 ui::GestureProviderConfigType TouchEmulationConfigurationToType(
@@ -267,11 +267,11 @@
     }
   }
 
-  base::Optional<content::DisplayFeature> display_feature = base::nullopt;
+  absl::optional<content::DisplayFeature> display_feature = absl::nullopt;
   if (displayFeature.isJust()) {
     protocol::Emulation::DisplayFeature* emu_display_feature =
         displayFeature.fromJust();
-    base::Optional<content::DisplayFeature::Orientation> disp_orientation =
+    absl::optional<content::DisplayFeature::Orientation> disp_orientation =
         DisplayFeatureOrientationTypeFromString(
             emu_display_feature->GetOrientation());
     if (!disp_orientation) {
@@ -413,7 +413,7 @@
   user_agent_ = user_agent;
   accept_language_ = accept_lang;
 
-  user_agent_metadata_ = base::nullopt;
+  user_agent_metadata_ = absl::nullopt;
   if (!ua_metadata_override.isJust())
     return Response::FallThrough();
 
@@ -586,7 +586,7 @@
 }
 
 bool EmulationHandler::ApplyUserAgentMetadataOverrides(
-    base::Optional<blink::UserAgentMetadata>* override_out) {
+    absl::optional<blink::UserAgentMetadata>* override_out) {
   // This is conditional on basic user agent override being on; this helps us
   // emulate a device not sending any UA client hints.
   if (user_agent_.empty())
diff --git a/content/browser/devtools/protocol/emulation_handler.h b/content/browser/devtools/protocol/emulation_handler.h
index 08c6842..965b9e4 100644
--- a/content/browser/devtools/protocol/emulation_handler.h
+++ b/content/browser/devtools/protocol/emulation_handler.h
@@ -86,7 +86,7 @@
 
   void ApplyOverrides(net::HttpRequestHeaders* headers);
   bool ApplyUserAgentMetadataOverrides(
-      base::Optional<blink::UserAgentMetadata>* override_out);
+      absl::optional<blink::UserAgentMetadata>* override_out);
 
  private:
   WebContentsImpl* GetWebContents();
@@ -105,7 +105,7 @@
   // |user_agent_metadata_| is meaningful if |user_agent_| is non-empty.
   // In that case nullopt will disable sending of client hints, and a
   // non-nullopt value will be sent.
-  base::Optional<blink::UserAgentMetadata> user_agent_metadata_;
+  absl::optional<blink::UserAgentMetadata> user_agent_metadata_;
   std::string accept_language_;
 
   RenderFrameHostImpl* host_;
diff --git a/content/browser/devtools/protocol/fetch_handler.h b/content/browser/devtools/protocol/fetch_handler.h
index 79284a7..ca0e8d6 100644
--- a/content/browser/devtools/protocol/fetch_handler.h
+++ b/content/browser/devtools/protocol/fetch_handler.h
@@ -7,11 +7,11 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/devtools/protocol/devtools_domain_handler.h"
 #include "content/browser/devtools/protocol/fetch.h"
 #include "services/network/public/mojom/network_service.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace network {
 namespace mojom {
diff --git a/content/browser/devtools/protocol/input_handler.cc b/content/browser/devtools/protocol/input_handler.cc
index b61c98c..db2b991 100644
--- a/content/browser/devtools/protocol/input_handler.cc
+++ b/content/browser/devtools/protocol/input_handler.cc
@@ -340,7 +340,7 @@
   }
 
   blink::mojom::DragDataPtr mojo_data =
-      blink::mojom::DragData::New(std::move(items), base::nullopt,
+      blink::mojom::DragData::New(std::move(items), absl::nullopt,
                                   network::mojom::ReferrerPolicy::kDefault);
   return DragDataToDropData(*mojo_data);
 }
@@ -843,7 +843,7 @@
     Maybe<int> modifiers,
     std::unique_ptr<DispatchDragEventCallback> callback,
     base::WeakPtr<RenderWidgetHostViewBase> target,
-    base::Optional<gfx::PointF> maybe_point) {
+    absl::optional<gfx::PointF> maybe_point) {
   if (!target || !maybe_point.has_value()) {
     callback->sendFailure(Response::InternalError());
     return;
@@ -958,7 +958,7 @@
     std::unique_ptr<blink::WebMouseEvent> mouse_event,
     blink::WebMouseWheelEvent* wheel_event,
     base::WeakPtr<RenderWidgetHostViewBase> target,
-    base::Optional<gfx::PointF> point) {
+    absl::optional<gfx::PointF> point) {
   if (!target || !point.has_value()) {
     callback->sendFailure(Response::InternalError());
     return;
@@ -1151,7 +1151,7 @@
     std::unique_ptr<DispatchTouchEventCallback> callback,
     std::vector<blink::WebTouchEvent> events,
     base::WeakPtr<RenderWidgetHostViewBase> target,
-    base::Optional<gfx::PointF> transformed) {
+    absl::optional<gfx::PointF> transformed) {
   if (!target || !transformed.has_value()) {
     callback->sendFailure(Response::InternalError());
     return;
diff --git a/content/browser/devtools/protocol/input_handler.h b/content/browser/devtools/protocol/input_handler.h
index 3721fa714..931990d 100644
--- a/content/browser/devtools/protocol/input_handler.h
+++ b/content/browser/devtools/protocol/input_handler.h
@@ -172,7 +172,7 @@
       std::unique_ptr<blink::WebMouseEvent> mouse_event,
       blink::WebMouseWheelEvent* wheel_event,
       base::WeakPtr<RenderWidgetHostViewBase> target,
-      base::Optional<gfx::PointF> point);
+      absl::optional<gfx::PointF> point);
 
   void OnWidgetForDispatchDragEvent(
       const std::string& event_type,
@@ -182,13 +182,13 @@
       Maybe<int> modifiers,
       std::unique_ptr<DispatchDragEventCallback> callback,
       base::WeakPtr<RenderWidgetHostViewBase> target,
-      base::Optional<gfx::PointF> point);
+      absl::optional<gfx::PointF> point);
 
   void OnWidgetForDispatchWebTouchEvent(
       std::unique_ptr<DispatchTouchEventCallback> callback,
       std::vector<blink::WebTouchEvent> events,
       base::WeakPtr<RenderWidgetHostViewBase> target,
-      base::Optional<gfx::PointF> point);
+      absl::optional<gfx::PointF> point);
 
   SyntheticPointerActionParams PrepareSyntheticPointerActionParams(
       SyntheticPointerActionParams::PointerActionType pointer_action_type,
diff --git a/content/browser/devtools/protocol/network_handler.cc b/content/browser/devtools/protocol/network_handler.cc
index 6740f71f7..adb55f9 100644
--- a/content/browser/devtools/protocol/network_handler.cc
+++ b/content/browser/devtools/protocol/network_handler.cc
@@ -149,7 +149,7 @@
       return Network::CookieSourceSchemeEnum::Secure;
   }
 }
-base::Optional<Network::CookieSameSite> BuildCookieSameSite(
+absl::optional<Network::CookieSameSite> BuildCookieSameSite(
     net::CookieSameSite same_site) {
   switch (same_site) {
     case net::CookieSameSite::STRICT_MODE:
@@ -159,7 +159,7 @@
     case net::CookieSameSite::NO_RESTRICTION:
       return Network::CookieSameSiteEnum::None;
     case net::CookieSameSite::UNSPECIFIED:
-      return base::nullopt;
+      return absl::nullopt;
   }
 }
 }  // namespace
@@ -185,7 +185,7 @@
           .SetSourcePort(cookie.SourcePort())
           .Build();
 
-  base::Optional<Network::CookieSourceScheme> maybe_same_site =
+  absl::optional<Network::CookieSourceScheme> maybe_same_site =
       BuildCookieSameSite(cookie.SameSite());
   if (maybe_same_site) {
     devtools_cookie->SetSameSite(*maybe_same_site);
@@ -885,7 +885,7 @@
 
 using SourceTypeEnum = net::SourceStream::SourceType;
 namespace ContentEncodingEnum = protocol::Network::ContentEncodingEnum;
-base::Optional<SourceTypeEnum> SourceTypeFromProtocol(
+absl::optional<SourceTypeEnum> SourceTypeFromProtocol(
     const protocol::Network::ContentEncoding& encoding) {
   if (ContentEncodingEnum::Gzip == encoding)
     return SourceTypeEnum::TYPE_GZIP;
@@ -893,7 +893,7 @@
     return SourceTypeEnum::TYPE_BROTLI;
   if (ContentEncodingEnum::Deflate == encoding)
     return SourceTypeEnum::TYPE_DEFLATE;
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace
@@ -1262,7 +1262,7 @@
 }
 
 Response NetworkHandler::ClearAcceptedEncodingsOverride() {
-  accepted_stream_types_ = base::nullopt;
+  accepted_stream_types_ = absl::nullopt;
   return Response::FallThrough();
 }
 
@@ -1918,7 +1918,7 @@
   request->SetMixedContentType(Security::MixedContentTypeEnum::None);
 
   std::unique_ptr<Network::Initiator> initiator;
-  const base::Optional<base::Value>& initiator_optional =
+  const absl::optional<base::Value>& initiator_optional =
       nav_request.begin_params().devtools_initiator;
   if (initiator_optional.has_value()) {
     initiator = protocol::ValueTypeConverter<Network::Initiator>::FromValue(
@@ -1953,7 +1953,7 @@
     const std::string& loader_id,
     const network::ResourceRequest& request,
     const char* initiator_type,
-    const base::Optional<GURL>& initiator_url,
+    const absl::optional<GURL>& initiator_url,
     const std::string& initiator_devtools_request_id,
     base::TimeTicks timestamp) {
   if (!enabled_)
@@ -2125,12 +2125,12 @@
 }
 
 void NetworkHandler::OnSignedExchangeReceived(
-    base::Optional<const base::UnguessableToken> devtools_navigation_token,
+    absl::optional<const base::UnguessableToken> devtools_navigation_token,
     const GURL& outer_request_url,
     const network::mojom::URLResponseHead& outer_response,
-    const base::Optional<SignedExchangeEnvelope>& envelope,
+    const absl::optional<SignedExchangeEnvelope>& envelope,
     const scoped_refptr<net::X509Certificate>& certificate,
-    const base::Optional<net::SSLInfo>& ssl_info,
+    const absl::optional<net::SSLInfo>& ssl_info,
     const std::vector<SignedExchangeError>& errors) {
   if (!enabled_)
     return;
@@ -2276,7 +2276,7 @@
     body_offset = header_size;
   }
 
-  base::Optional<net::Error> error;
+  absl::optional<net::Error> error;
   if (error_reason.isJust()) {
     bool ok;
     error = NetErrorFromString(error_reason.fromJust(), &ok);
@@ -2460,7 +2460,7 @@
     net::HttpRequestHeaders* headers,
     bool* skip_service_worker,
     bool* disable_cache,
-    base::Optional<std::vector<net::SourceStream::SourceType>>*
+    absl::optional<std::vector<net::SourceStream::SourceType>>*
         accepted_stream_types) {
   for (auto& entry : extra_headers_)
     headers->SetHeader(entry.first, entry.second);
@@ -2633,7 +2633,7 @@
     const std::string& devtools_request_id,
     const net::CookieAndLineAccessResultList& response_cookie_list,
     const std::vector<network::mojom::HttpRawHeaderPairPtr>& response_headers,
-    const base::Optional<std::string>& response_headers_text,
+    const absl::optional<std::string>& response_headers_text,
     network::mojom::IPAddressSpace resource_address_space) {
   if (!enabled_)
     return;
diff --git a/content/browser/devtools/protocol/network_handler.h b/content/browser/devtools/protocol/network_handler.h
index 397fc81..c319852 100644
--- a/content/browser/devtools/protocol/network_handler.h
+++ b/content/browser/devtools/protocol/network_handler.h
@@ -13,7 +13,6 @@
 #include "base/containers/unique_ptr_adapters.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/devtools/protocol/devtools_domain_handler.h"
 #include "content/browser/devtools/protocol/network.h"
@@ -22,6 +21,7 @@
 #include "net/cookies/canonical_cookie.h"
 #include "services/network/public/mojom/network_service.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h"
 
 namespace net {
@@ -179,7 +179,7 @@
       net::HttpRequestHeaders* headers,
       bool* skip_service_worker,
       bool* disable_cache,
-      base::Optional<std::vector<net::SourceStream::SourceType>>*
+      absl::optional<std::vector<net::SourceStream::SourceType>>*
           accepted_stream_types);
   void NavigationRequestWillBeSent(const NavigationRequest& nav_request,
                                    base::TimeTicks timestamp);
@@ -187,7 +187,7 @@
                    const std::string& loader_id,
                    const network::ResourceRequest& request,
                    const char* initiator_type,
-                   const base::Optional<GURL>& initiator_url,
+                   const absl::optional<GURL>& initiator_url,
                    const std::string& initiator_devtools_request_id,
                    base::TimeTicks timestamp);
   void ResponseReceived(const std::string& request_id,
@@ -202,12 +202,12 @@
       const network::URLLoaderCompletionStatus& completion_status);
 
   void OnSignedExchangeReceived(
-      base::Optional<const base::UnguessableToken> devtools_navigation_token,
+      absl::optional<const base::UnguessableToken> devtools_navigation_token,
       const GURL& outer_request_url,
       const network::mojom::URLResponseHead& outer_response,
-      const base::Optional<SignedExchangeEnvelope>& header,
+      const absl::optional<SignedExchangeEnvelope>& header,
       const scoped_refptr<net::X509Certificate>& certificate,
-      const base::Optional<net::SSLInfo>& ssl_info,
+      const absl::optional<net::SSLInfo>& ssl_info,
       const std::vector<SignedExchangeError>& errors);
 
   DispatchResponse GetSecurityIsolationStatus(
@@ -224,7 +224,7 @@
       const std::string& devtools_request_id,
       const net::CookieAndLineAccessResultList& response_cookie_list,
       const std::vector<network::mojom::HttpRawHeaderPairPtr>& response_headers,
-      const base::Optional<std::string>& response_headers_text,
+      const absl::optional<std::string>& response_headers_text,
       network::mojom::IPAddressSpace resource_address_space);
   void OnTrustTokenOperationDone(
       const std::string& devtools_request_id,
@@ -292,7 +292,7 @@
            std::unique_ptr<LoadNetworkResourceCallback>,
            base::UniquePtrComparator>
       loaders_;
-  base::Optional<std::set<net::SourceStream::SourceType>>
+  absl::optional<std::set<net::SourceStream::SourceType>>
       accepted_stream_types_;
   base::WeakPtrFactory<NetworkHandler> weak_factory_{this};
 
diff --git a/content/browser/devtools/protocol/page_handler.cc b/content/browser/devtools/protocol/page_handler.cc
index d4094db9..e008215 100644
--- a/content/browser/devtools/protocol/page_handler.cc
+++ b/content/browser/devtools/protocol/page_handler.cc
@@ -15,7 +15,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/ref_counted_memory.h"
 #include "base/numerics/safe_conversions.h"
-#include "base/optional.h"
 #include "base/process/process_handle.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_number_conversions.h"
@@ -54,6 +53,7 @@
 #include "content/public/common/result_codes.h"
 #include "content/public/common/use_zoom_for_dsf_policy.h"
 #include "net/base/filename_util.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/base/page_transition_types.h"
 #include "ui/gfx/codec/jpeg_codec.h"
@@ -742,7 +742,7 @@
                        weak_factory_.GetWeakPtr(), std::move(callback),
                        screenshot_format, screenshot_quality, gfx::Size(),
                        gfx::Size(), blink::DeviceEmulationParams(),
-                       base::nullopt),
+                       absl::nullopt),
         false);
     return;
   }
@@ -805,7 +805,7 @@
     }
   }
 
-  base::Optional<blink::web_pref::WebPreferences> maybe_original_web_prefs;
+  absl::optional<blink::web_pref::WebPreferences> maybe_original_web_prefs;
   if (capture_beyond_viewport.fromMaybe(false)) {
     blink::web_pref::WebPreferences original_web_prefs =
         host_->GetRenderViewHost()->GetDelegate()->GetOrCreateWebPreferences();
@@ -1164,7 +1164,7 @@
     const gfx::Size& original_view_size,
     const gfx::Size& requested_image_size,
     const blink::DeviceEmulationParams& original_emulation_params,
-    const base::Optional<blink::web_pref::WebPreferences>&
+    const absl::optional<blink::web_pref::WebPreferences>&
         maybe_original_web_prefs,
     const gfx::Image& image) {
   if (original_view_size.width()) {
diff --git a/content/browser/devtools/protocol/page_handler.h b/content/browser/devtools/protocol/page_handler.h
index d6558fa..0fd8a046 100644
--- a/content/browser/devtools/protocol/page_handler.h
+++ b/content/browser/devtools/protocol/page_handler.h
@@ -199,7 +199,7 @@
       const gfx::Size& original_view_size,
       const gfx::Size& requested_image_size,
       const blink::DeviceEmulationParams& original_params,
-      const base::Optional<blink::web_pref::WebPreferences>& original_web_prefs,
+      const absl::optional<blink::web_pref::WebPreferences>& original_web_prefs,
       const gfx::Image& image);
 
   void GotManifest(std::unique_ptr<GetAppManifestCallback> callback,
@@ -226,7 +226,7 @@
   int screencast_max_height_;
   int capture_every_nth_frame_;
   int capture_retry_count_;
-  base::Optional<cc::RenderFrameMetadata> frame_metadata_;
+  absl::optional<cc::RenderFrameMetadata> frame_metadata_;
   int session_id_;
   int frame_counter_;
   int frames_in_flight_;
diff --git a/content/browser/devtools/protocol/service_worker_handler.cc b/content/browser/devtools/protocol/service_worker_handler.cc
index 9d8b5ed..fea9dba 100644
--- a/content/browser/devtools/protocol/service_worker_handler.cc
+++ b/content/browser/devtools/protocol/service_worker_handler.cc
@@ -348,7 +348,7 @@
   int64_t id = 0;
   if (!base::StringToInt64(registration_id, &id))
     return CreateInvalidVersionIdErrorResponse();
-  base::Optional<std::string> payload;
+  absl::optional<std::string> payload;
   if (data.size() > 0)
     payload = data;
   browser_context_->DeliverPushMessage(GURL(origin), id,
diff --git a/content/browser/devtools/protocol/storage_handler.cc b/content/browser/devtools/protocol/storage_handler.cc
index 839a38c9..38fb775 100644
--- a/content/browser/devtools/protocol/storage_handler.cc
+++ b/content/browser/devtools/protocol/storage_handler.cc
@@ -10,7 +10,6 @@
 #include <vector>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/strings/string_split.h"
 #include "base/strings/utf_string_conversions.h"
 #include "components/services/storage/public/mojom/cache_storage_control.mojom.h"
@@ -27,6 +26,7 @@
 #include "storage/browser/quota/quota_manager.h"
 #include "storage/browser/quota/quota_manager_proxy.h"
 #include "storage/browser/quota/quota_override_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -431,8 +431,8 @@
 
   quota_override_handle_->OverrideQuotaForOrigin(
       origin,
-      quota_size.isJust() ? base::make_optional(quota_size.fromJust())
-                          : base::nullopt,
+      quota_size.isJust() ? absl::make_optional(quota_size.fromJust())
+                          : absl::nullopt,
       base::BindOnce(&OverrideQuotaForOriginCallback::sendSuccess,
                      std::move(callback)));
 }
diff --git a/content/browser/devtools/protocol/target_handler.cc b/content/browser/devtools/protocol/target_handler.cc
index d6961592..711f815d 100644
--- a/content/browser/devtools/protocol/target_handler.cc
+++ b/content/browser/devtools/protocol/target_handler.cc
@@ -429,7 +429,7 @@
     DCHECK(!flatten_protocol_);
 
     if (throttle_) {
-      base::Optional<base::Value> value =
+      absl::optional<base::Value> value =
           base::JSONReader::Read(base::StringPiece(
               reinterpret_cast<const char*>(message.data()), message.size()));
       const std::string* method;
diff --git a/content/browser/devtools/protocol/target_handler.h b/content/browser/devtools/protocol/target_handler.h
index 7cc3b67..9a04f29 100644
--- a/content/browser/devtools/protocol/target_handler.h
+++ b/content/browser/devtools/protocol/target_handler.h
@@ -158,7 +158,7 @@
   std::string owner_target_id_;
   DevToolsSession* root_session_;
   base::flat_set<Throttle*> throttles_;
-  base::Optional<net::ProxyConfig> pending_proxy_config_;
+  absl::optional<net::ProxyConfig> pending_proxy_config_;
   base::WeakPtrFactory<TargetHandler> weak_factory_{this};
 
   DISALLOW_COPY_AND_ASSIGN(TargetHandler);
diff --git a/content/browser/devtools/protocol/tracing_handler.cc b/content/browser/devtools/protocol/tracing_handler.cc
index bf5ab42..cf6287b 100644
--- a/content/browser/devtools/protocol/tracing_handler.cc
+++ b/content/browser/devtools/protocol/tracing_handler.cc
@@ -16,7 +16,6 @@
 #include "base/format_macros.h"
 #include "base/json/json_writer.h"
 #include "base/memory/ref_counted_memory.h"
-#include "base/optional.h"
 #include "base/strings/strcat.h"
 #include "base/strings/string_split.h"
 #include "base/strings/stringprintf.h"
@@ -51,6 +50,7 @@
 #include "services/tracing/public/cpp/perfetto/trace_packet_tokenizer.h"
 #include "services/tracing/public/cpp/tracing_features.h"
 #include "services/tracing/public/mojom/constants.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/inspector_protocol/crdtp/json.h"
 
 #ifdef OS_ANDROID
@@ -213,7 +213,7 @@
   }
 }
 
-base::Optional<base::trace_event::MemoryDumpLevelOfDetail>
+absl::optional<base::trace_event::MemoryDumpLevelOfDetail>
 StringToMemoryDumpLevelOfDetail(const std::string& str) {
   if (str == Tracing::MemoryDumpLevelOfDetailEnum::Detailed)
     return {base::trace_event::MemoryDumpLevelOfDetail::DETAILED};
@@ -240,7 +240,7 @@
   }
 }
 
-base::Optional<perfetto::BackendType> GetBackendTypeFromParameters(
+absl::optional<perfetto::BackendType> GetBackendTypeFromParameters(
     const std::string& tracing_backend,
     perfetto::TraceConfig& perfetto_config) {
   if (tracing_backend == Tracing::TracingBackendEnum::Chrome)
@@ -257,7 +257,7 @@
     }
     return perfetto::BackendType::kCustomBackend;
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 // We currently don't support concurrent tracing sessions, but are planning to.
@@ -745,7 +745,7 @@
                                                proto_format);
   }
 
-  base::Optional<perfetto::BackendType> backend = GetBackendTypeFromParameters(
+  absl::optional<perfetto::BackendType> backend = GetBackendTypeFromParameters(
       tracing_backend.fromMaybe(Tracing::TracingBackendEnum::Auto),
       trace_config);
 
@@ -1021,7 +1021,7 @@
     return;
   }
 
-  base::Optional<base::trace_event::MemoryDumpLevelOfDetail> memory_detail =
+  absl::optional<base::trace_event::MemoryDumpLevelOfDetail> memory_detail =
       StringToMemoryDumpLevelOfDetail(level_of_detail.fromMaybe(
           Tracing::MemoryDumpLevelOfDetailEnum::Detailed));
 
diff --git a/content/browser/devtools/protocol/webauthn_handler.cc b/content/browser/devtools/protocol/webauthn_handler.cc
index e09d203..7391b76 100644
--- a/content/browser/devtools/protocol/webauthn_handler.cc
+++ b/content/browser/devtools/protocol/webauthn_handler.cc
@@ -75,7 +75,7 @@
       const GetCredentialCallbackAggregator&) = delete;
 
   void OnLargeBlob(std::unique_ptr<WebAuthn::Credential> credential,
-                   const base::Optional<std::vector<uint8_t>>& blob) {
+                   const absl::optional<std::vector<uint8_t>>& blob) {
     if (blob) {
       credential->SetLargeBlob(Binary::fromVector(*blob));
     }
@@ -101,13 +101,13 @@
   return device::ProtocolVersion::kUnknown;
 }
 
-base::Optional<device::Ctap2Version> ConvertToCtap2Version(
+absl::optional<device::Ctap2Version> ConvertToCtap2Version(
     base::StringPiece version) {
   if (version == WebAuthn::Ctap2VersionEnum::Ctap2_0)
     return device::Ctap2Version::kCtap2_0;
   if (version == WebAuthn::Ctap2VersionEnum::Ctap2_1)
     return device::Ctap2Version::kCtap2_1;
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 std::vector<uint8_t> CopyBinaryToVector(const Binary& binary) {
@@ -371,7 +371,7 @@
       base::BindOnce(
           [](std::unique_ptr<WebAuthn::Credential> registration,
              std::unique_ptr<GetCredentialCallback> callback,
-             const base::Optional<std::vector<uint8_t>>& blob) {
+             const absl::optional<std::vector<uint8_t>>& blob) {
             if (blob) {
               registration->SetLargeBlob(Binary::fromVector(*blob));
             }
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.cc b/content/browser/devtools/render_frame_devtools_agent_host.cc
index c1bc41af..d122d49 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.cc
+++ b/content/browser/devtools/render_frame_devtools_agent_host.cc
@@ -685,7 +685,7 @@
 std::string RenderFrameDevToolsAgentHost::GetOpenerFrameId() {
   if (!frame_tree_node_)
     return std::string();
-  const base::Optional<base::UnguessableToken>& opener_devtools_frame_token =
+  const absl::optional<base::UnguessableToken>& opener_devtools_frame_token =
       frame_tree_node_->opener_devtools_frame_token();
   return opener_devtools_frame_token ? opener_devtools_frame_token->ToString()
                                      : std::string();
@@ -887,27 +887,27 @@
   }
 }
 
-base::Optional<network::CrossOriginEmbedderPolicy>
+absl::optional<network::CrossOriginEmbedderPolicy>
 RenderFrameDevToolsAgentHost::cross_origin_embedder_policy(
     const std::string& id) {
   FrameTreeNode* frame_tree_node =
       protocol::FrameTreeNodeFromDevToolsFrameToken(
           frame_host_->frame_tree_node(), id);
   if (!frame_tree_node) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   RenderFrameHostImpl* rfhi = frame_tree_node->current_frame_host();
   return rfhi->cross_origin_embedder_policy();
 }
 
-base::Optional<network::CrossOriginOpenerPolicy>
+absl::optional<network::CrossOriginOpenerPolicy>
 RenderFrameDevToolsAgentHost::cross_origin_opener_policy(
     const std::string& id) {
   FrameTreeNode* frame_tree_node =
       protocol::FrameTreeNodeFromDevToolsFrameToken(
           frame_host_->frame_tree_node(), id);
   if (!frame_tree_node) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   RenderFrameHostImpl* rfhi = frame_tree_node->current_frame_host();
   return rfhi->cross_origin_opener_policy();
diff --git a/content/browser/devtools/render_frame_devtools_agent_host.h b/content/browser/devtools/render_frame_devtools_agent_host.h
index bd51ddc..1e0d07c 100644
--- a/content/browser/devtools/render_frame_devtools_agent_host.h
+++ b/content/browser/devtools/render_frame_devtools_agent_host.h
@@ -13,13 +13,13 @@
 #include "base/containers/flat_map.h"
 #include "base/containers/flat_set.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/browser/devtools/devtools_agent_host_impl.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/render_process_host_observer.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "net/base/net_errors.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if defined(OS_ANDROID)
 #include "mojo/public/cpp/bindings/remote.h"
@@ -104,9 +104,9 @@
   bool Close() override;
   base::TimeTicks GetLastActivityTime() override;
 
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
   cross_origin_embedder_policy(const std::string& id) override;
-  base::Optional<network::CrossOriginOpenerPolicy> cross_origin_opener_policy(
+  absl::optional<network::CrossOriginOpenerPolicy> cross_origin_opener_policy(
       const std::string& id) override;
 
   RenderFrameHostImpl* GetFrameHostForTesting() { return frame_host_; }
diff --git a/content/browser/devtools/service_worker_devtools_agent_host.cc b/content/browser/devtools/service_worker_devtools_agent_host.cc
index 61fab50..c018250 100644
--- a/content/browser/devtools/service_worker_devtools_agent_host.cc
+++ b/content/browser/devtools/service_worker_devtools_agent_host.cc
@@ -57,7 +57,7 @@
     const GURL& url,
     const GURL& scope,
     bool is_installed_version,
-    base::Optional<network::CrossOriginEmbedderPolicy>
+    absl::optional<network::CrossOriginEmbedderPolicy>
         cross_origin_embedder_policy,
     mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
         coep_reporter,
@@ -283,7 +283,7 @@
   return RenderProcessHost::FromID(worker_process_id_);
 }
 
-base::Optional<network::CrossOriginEmbedderPolicy>
+absl::optional<network::CrossOriginEmbedderPolicy>
 ServiceWorkerDevToolsAgentHost::cross_origin_embedder_policy(
     const std::string&) {
   return cross_origin_embedder_policy_;
diff --git a/content/browser/devtools/service_worker_devtools_agent_host.h b/content/browser/devtools/service_worker_devtools_agent_host.h
index 2e2e7900..8c6a541 100644
--- a/content/browser/devtools/service_worker_devtools_agent_host.h
+++ b/content/browser/devtools/service_worker_devtools_agent_host.h
@@ -40,7 +40,7 @@
       const GURL& url,
       const GURL& scope,
       bool is_installed_version,
-      base::Optional<network::CrossOriginEmbedderPolicy>
+      absl::optional<network::CrossOriginEmbedderPolicy>
           cross_origin_embedder_policy,
       mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
           coep_reporter,
@@ -57,7 +57,7 @@
   NetworkLoaderFactoryParamsAndInfo CreateNetworkFactoryParamsForDevTools()
       override;
   RenderProcessHost* GetProcessHost() override;
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
   cross_origin_embedder_policy(const std::string& id) override;
 
   void WorkerRestarted(int worker_process_id, int worker_route_id);
@@ -119,7 +119,7 @@
   GURL scope_;
   base::Time version_installed_time_;
   base::Time version_doomed_time_;
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
       cross_origin_embedder_policy_;
   mojo::Remote<network::mojom::CrossOriginEmbedderPolicyReporter>
       coep_reporter_;
diff --git a/content/browser/devtools/service_worker_devtools_manager.cc b/content/browser/devtools/service_worker_devtools_manager.cc
index fd1c524..aabe0312 100644
--- a/content/browser/devtools/service_worker_devtools_manager.cc
+++ b/content/browser/devtools/service_worker_devtools_manager.cc
@@ -52,7 +52,7 @@
     const GURL& url,
     const GURL& scope,
     bool is_installed_version,
-    base::Optional<network::CrossOriginEmbedderPolicy>
+    absl::optional<network::CrossOriginEmbedderPolicy>
         cross_origin_embedder_policy,
     mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
         coep_reporter,
@@ -216,7 +216,7 @@
        protocol::NetworkHandler::ForAgentHost(it->second.get())) {
     network->RequestSent(request_id, std::string(), request,
                          protocol::Network::Initiator::TypeEnum::Preload,
-                         /*initiator_url=*/base::nullopt,
+                         /*initiator_url=*/absl::nullopt,
                          /*initiator_devtools_request_id=*/"", timestamp);
   }
 }
diff --git a/content/browser/devtools/service_worker_devtools_manager.h b/content/browser/devtools/service_worker_devtools_manager.h
index 412fcb9..04700a2 100644
--- a/content/browser/devtools/service_worker_devtools_manager.h
+++ b/content/browser/devtools/service_worker_devtools_manager.h
@@ -66,7 +66,7 @@
       const GURL& url,
       const GURL& scope,
       bool is_installed_version,
-      base::Optional<network::CrossOriginEmbedderPolicy>
+      absl::optional<network::CrossOriginEmbedderPolicy>
           cross_origin_embedder_policy,
       mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
           coep_reporter,
diff --git a/content/browser/devtools/worker_devtools_agent_host.cc b/content/browser/devtools/worker_devtools_agent_host.cc
index e546a536..bb485db 100644
--- a/content/browser/devtools/worker_devtools_agent_host.cc
+++ b/content/browser/devtools/worker_devtools_agent_host.cc
@@ -110,11 +110,11 @@
       blink::DedicatedWorkerToken(devtools_worker_token_));
 }
 
-base::Optional<network::CrossOriginEmbedderPolicy>
+absl::optional<network::CrossOriginEmbedderPolicy>
 WorkerDevToolsAgentHost::cross_origin_embedder_policy(const std::string&) {
   DedicatedWorkerHost* host = GetDedicatedWorkerHost();
   if (!host) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   return host->cross_origin_embedder_policy();
 }
diff --git a/content/browser/devtools/worker_devtools_agent_host.h b/content/browser/devtools/worker_devtools_agent_host.h
index 5931b4a..9397dd7 100644
--- a/content/browser/devtools/worker_devtools_agent_host.h
+++ b/content/browser/devtools/worker_devtools_agent_host.h
@@ -42,7 +42,7 @@
   bool Activate() override;
   void Reload() override;
   bool Close() override;
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
   cross_origin_embedder_policy(const std::string& id) override;
 
  private:
diff --git a/content/browser/direct_sockets/direct_sockets_open_browsertest.cc b/content/browser/direct_sockets/direct_sockets_open_browsertest.cc
index 35192221..e2a2fa4 100644
--- a/content/browser/direct_sockets/direct_sockets_open_browsertest.cc
+++ b/content/browser/direct_sockets/direct_sockets_open_browsertest.cc
@@ -5,7 +5,6 @@
 #include <map>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/strcat.h"
 #include "base/strings/stringprintf.h"
@@ -36,6 +35,7 @@
 #include "services/network/public/mojom/tcp_socket.mojom.h"
 #include "services/network/test/test_network_context.h"
 #include "testing/gmock/include/gmock/gmock-matchers.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 // The tests in this file use a mock implementation of NetworkContext, to test
@@ -152,7 +152,7 @@
         host, network_isolation_key,
         net::NetLogWithSource::Make(net::NetLog::Get(),
                                     net::NetLogSourceType::NONE),
-        base::nullopt);
+        absl::nullopt);
     mojo::Remote<network::mojom::ResolveHostClient> response_client(
         std::move(pending_response_client));
 
@@ -203,7 +203,7 @@
 
   // network::TestNetworkContext:
   void CreateTCPConnectedSocket(
-      const base::Optional<net::IPEndPoint>& local_addr,
+      const absl::optional<net::IPEndPoint>& local_addr,
       const net::AddressList& remote_addr_list,
       network::mojom::TCPConnectedSocketOptionsPtr tcp_connected_socket_options,
       const net::MutableNetworkTrafficAnnotationTag& traffic_annotation,
@@ -227,14 +227,14 @@
   }
 
   void CreateHostResolver(
-      const base::Optional<net::DnsConfigOverrides>& config_overrides,
+      const absl::optional<net::DnsConfigOverrides>& config_overrides,
       mojo::PendingReceiver<network::mojom::HostResolver> receiver) override {
     DCHECK(!config_overrides.has_value());
     DCHECK(!internal_resolver_);
     DCHECK(!host_resolver_);
 
     internal_resolver_ = net::HostResolver::CreateStandaloneResolver(
-        net::NetLog::Get(), /*options=*/base::nullopt, host_mapping_rules_,
+        net::NetLog::Get(), /*options=*/absl::nullopt, host_mapping_rules_,
         /*enable_caching=*/false);
     host_resolver_ = std::make_unique<MockHostResolver>(
         std::move(receiver), internal_resolver_.get());
diff --git a/content/browser/direct_sockets/direct_sockets_service_impl.cc b/content/browser/direct_sockets/direct_sockets_service_impl.cc
index 2977f51..884e4e7 100644
--- a/content/browser/direct_sockets/direct_sockets_service_impl.cc
+++ b/content/browser/direct_sockets/direct_sockets_service_impl.cc
@@ -9,7 +9,6 @@
 #include "base/bind.h"
 #include "base/feature_list.h"
 #include "base/metrics/histogram_functions.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/browser/renderer_host/frame_tree_node.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
@@ -23,6 +22,7 @@
 #include "net/net_buildflags.h"
 #include "services/network/public/cpp/resolve_host_client_base.h"
 #include "services/network/public/mojom/network_context.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if defined(OS_WIN) || defined(OS_MAC)
 #include "base/enterprise_util.h"
@@ -34,7 +34,7 @@
 
 namespace {
 
-base::Optional<bool> g_is_enterprise_managed_for_testing;
+absl::optional<bool> g_is_enterprise_managed_for_testing;
 
 constexpr int32_t kMaxBufferSize = 32 * 1024 * 1024;
 
@@ -54,9 +54,9 @@
 }
 
 // Get local ip address from options.
-base::Optional<net::IPEndPoint> GetLocalAddr(
+absl::optional<net::IPEndPoint> GetLocalAddr(
     const blink::mojom::DirectSocketOptions& options) {
-  base::Optional<net::IPEndPoint> local_addr = base::nullopt;
+  absl::optional<net::IPEndPoint> local_addr = absl::nullopt;
   if (!options.local_hostname)
     return local_addr;
 
@@ -161,7 +161,7 @@
 
     mojo::PendingRemote<network::mojom::HostResolver> pending_host_resolver;
     network_context_->CreateHostResolver(
-        base::nullopt, pending_host_resolver.InitWithNewPipeAndPassReceiver());
+        absl::nullopt, pending_host_resolver.InitWithNewPipeAndPassReceiver());
     resolver_.Bind(std::move(pending_host_resolver));
 
     network::mojom::ResolveHostParametersPtr parameters =
@@ -179,7 +179,7 @@
     receiver_.set_disconnect_handler(
         base::BindOnce(&ResolveHostAndOpenSocket::OnComplete,
                        base::Unretained(this), net::ERR_NAME_NOT_RESOLVED,
-                       net::ResolveErrorInfo(net::ERR_FAILED), base::nullopt));
+                       net::ResolveErrorInfo(net::ERR_FAILED), absl::nullopt));
   }
 
  private:
@@ -187,7 +187,7 @@
   void OnComplete(
       int result,
       const net::ResolveErrorInfo& resolve_error_info,
-      const base::Optional<net::AddressList>& resolved_addresses) override {
+      const absl::optional<net::AddressList>& resolved_addresses) override {
     // Reject hostnames that resolve to non-public exception unless a raw IP
     // address or a *.local hostname is entered by the user.
     if (!is_raw_address_ && !is_mdns_name_ && resolved_addresses &&
@@ -202,10 +202,10 @@
 
   void OpenTCPSocket(
       int result,
-      const base::Optional<net::AddressList>& resolved_addresses) {
+      const absl::optional<net::AddressList>& resolved_addresses) {
     if (result != net::OK) {
       std::move(tcp_callback_)
-          .Run(result, base::nullopt, base::nullopt,
+          .Run(result, absl::nullopt, absl::nullopt,
                mojo::ScopedDataPipeConsumerHandle(),
                mojo::ScopedDataPipeProducerHandle());
       delete this;
@@ -213,7 +213,7 @@
     }
 
     DCHECK(resolved_addresses && !resolved_addresses->empty());
-    const base::Optional<net::IPEndPoint> local_addr = GetLocalAddr(*options_);
+    const absl::optional<net::IPEndPoint> local_addr = GetLocalAddr(*options_);
 
     network::mojom::TCPConnectedSocketOptionsPtr tcp_connected_socket_options =
         network::mojom::TCPConnectedSocketOptions::New();
@@ -242,15 +242,15 @@
 
   void OpenUDPSocket(
       int result,
-      const base::Optional<net::AddressList>& resolved_addresses) {
+      const absl::optional<net::AddressList>& resolved_addresses) {
     if (result != net::OK) {
-      std::move(udp_callback_).Run(result, base::nullopt, base::nullopt);
+      std::move(udp_callback_).Run(result, absl::nullopt, absl::nullopt);
       delete this;
       return;
     }
 
     DCHECK(resolved_addresses && !resolved_addresses->empty());
-    base::Optional<net::IPEndPoint> local_addr = GetLocalAddr(*options_);
+    absl::optional<net::IPEndPoint> local_addr = GetLocalAddr(*options_);
 
     // TODO(crbug.com/1119620): network_context_->CreateUDPSocket
     // TODO(crbug.com/1119620): Connect(remote_addr, udp_socket_options)
@@ -303,7 +303,7 @@
   // TODO(crbug.com/1119681): Collect metrics for usage and permission checks
 
   if (result != net::OK) {
-    std::move(callback).Run(result, base::nullopt, base::nullopt,
+    std::move(callback).Run(result, absl::nullopt, absl::nullopt,
                             mojo::ScopedDataPipeConsumerHandle(),
                             mojo::ScopedDataPipeProducerHandle());
     return;
@@ -334,7 +334,7 @@
   const net::Error result = ValidateOptions(*options);
 
   if (result != net::OK) {
-    std::move(callback).Run(result, base::nullopt, base::nullopt);
+    std::move(callback).Run(result, absl::nullopt, absl::nullopt);
     return;
   }
 
@@ -365,7 +365,7 @@
 }
 
 // static
-base::Optional<net::IPEndPoint>
+absl::optional<net::IPEndPoint>
 DirectSocketsServiceImpl::GetLocalAddrForTesting(
     const blink::mojom::DirectSocketOptions& options) {
   return GetLocalAddr(options);
diff --git a/content/browser/direct_sockets/direct_sockets_service_impl.h b/content/browser/direct_sockets/direct_sockets_service_impl.h
index e96de5de..4b8f1975 100644
--- a/content/browser/direct_sockets/direct_sockets_service_impl.h
+++ b/content/browser/direct_sockets/direct_sockets_service_impl.h
@@ -78,7 +78,7 @@
 
   static void SetNetworkContextForTesting(network::mojom::NetworkContext*);
 
-  static base::Optional<net::IPEndPoint> GetLocalAddrForTesting(
+  static absl::optional<net::IPEndPoint> GetLocalAddrForTesting(
       const blink::mojom::DirectSocketOptions& options);
 
  private:
diff --git a/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc b/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc
index 4292bd3..745323f 100644
--- a/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc
+++ b/content/browser/direct_sockets/direct_sockets_tcp_browsertest.cc
@@ -5,7 +5,6 @@
 #include <map>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/strcat.h"
 #include "base/strings/stringprintf.h"
@@ -36,6 +35,7 @@
 #include "services/network/public/mojom/network_context.mojom.h"
 #include "services/network/public/mojom/tcp_socket.mojom.h"
 #include "testing/gmock/include/gmock/gmock-matchers.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 // The tests in this file use the Network Service implementation of
@@ -72,7 +72,7 @@
  private:
   void OnAccept(
       int result,
-      const base::Optional<net::IPEndPoint>& remote_addr,
+      const absl::optional<net::IPEndPoint>& remote_addr,
       mojo::PendingRemote<network::mojom::TCPConnectedSocket> accepted_socket,
       mojo::ScopedDataPipeConsumerHandle consumer_handle,
       mojo::ScopedDataPipeProducerHandle producer_handle) {
@@ -254,7 +254,7 @@
         base::BindLambdaForTesting(
             [&local_addr, &run_loop](
                 int32_t result,
-                const base::Optional<net::IPEndPoint>& local_addr_out) {
+                const absl::optional<net::IPEndPoint>& local_addr_out) {
               DCHECK_EQ(result, net::OK);
               DCHECK(local_addr_out.has_value());
               local_addr = *local_addr_out;
diff --git a/content/browser/direct_sockets/direct_sockets_unittest.cc b/content/browser/direct_sockets/direct_sockets_unittest.cc
index c0cb61a..dcdaa38 100644
--- a/content/browser/direct_sockets/direct_sockets_unittest.cc
+++ b/content/browser/direct_sockets/direct_sockets_unittest.cc
@@ -43,7 +43,7 @@
     return direct_sockets_service().ValidateOptions(options);
   }
 
-  base::Optional<net::IPEndPoint> GetLocalAddr(
+  absl::optional<net::IPEndPoint> GetLocalAddr(
       const blink::mojom::DirectSocketOptions& options) {
     return DirectSocketsServiceImpl::GetLocalAddrForTesting(options);
   }
@@ -89,8 +89,8 @@
   blink::mojom::DirectSocketOptions options;
 
   // Test for default condition.
-  base::Optional<net::IPEndPoint> local_addr = GetLocalAddr(options);
-  EXPECT_EQ(local_addr, base::nullopt);
+  absl::optional<net::IPEndPoint> local_addr = GetLocalAddr(options);
+  EXPECT_EQ(local_addr, absl::nullopt);
 
   // Test with IPv4 address and default port(0) provided.
   options.local_hostname = "12.34.56.78";
diff --git a/content/browser/display_cutout/display_cutout_browsertest.cc b/content/browser/display_cutout/display_cutout_browsertest.cc
index 53b9d3b..cf399656 100644
--- a/content/browser/display_cutout/display_cutout_browsertest.cc
+++ b/content/browser/display_cutout/display_cutout_browsertest.cc
@@ -81,7 +81,7 @@
 
  private:
   base::RunLoop run_loop_;
-  base::Optional<blink::mojom::ViewportFit> value_;
+  absl::optional<blink::mojom::ViewportFit> value_;
   blink::mojom::ViewportFit wanted_value_ = blink::mojom::ViewportFit::kAuto;
 
   DISALLOW_COPY_AND_ASSIGN(TestWebContentsObserver);
diff --git a/content/browser/dom_storage/dom_storage_context_wrapper.h b/content/browser/dom_storage/dom_storage_context_wrapper.h
index d6d11e8..6a17812 100644
--- a/content/browser/dom_storage/dom_storage_context_wrapper.h
+++ b/content/browser/dom_storage/dom_storage_context_wrapper.h
@@ -170,7 +170,7 @@
   mojo::Remote<storage::mojom::SessionStorageControl> session_storage_control_;
   mojo::Remote<storage::mojom::LocalStorageControl> local_storage_control_;
 
-  base::Optional<storage::StoragePolicyObserver> storage_policy_observer_;
+  absl::optional<storage::StoragePolicyObserver> storage_policy_observer_;
 
   DISALLOW_IMPLICIT_CONSTRUCTORS(DOMStorageContextWrapper);
 };
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 86081010..b54c252 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -23,7 +23,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/field_trial_params.h"
-#include "base/optional.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -79,6 +78,7 @@
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/common/input/web_mouse_event.h"
 #include "third_party/blink/public/common/switches.h"
@@ -134,7 +134,7 @@
   std::move(function).Run();
   monitor.WaitForUrls();
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(request_url);
   ASSERT_TRUE(request->trusted_params.has_value());
   EXPECT_TRUE(expected_isolation_info.IsEqualForTesting(
diff --git a/content/browser/download/download_manager_impl.cc b/content/browser/download/download_manager_impl.cc
index 1358ed15..804de20 100644
--- a/content/browser/download/download_manager_impl.cc
+++ b/content/browser/download/download_manager_impl.cc
@@ -174,7 +174,7 @@
       const GURL& site_url,
       const GURL& tab_url,
       const GURL& tab_refererr_url,
-      const base::Optional<url::Origin>& request_initiator,
+      const absl::optional<url::Origin>& request_initiator,
       const std::string& mime_type,
       const std::string& original_mime_type,
       base::Time start_time,
@@ -203,7 +203,7 @@
         last_modified, received_bytes, total_bytes, auto_resume_count, hash,
         state, danger_type, interrupt_reason, false /* paused */,
         false /* allow_metered */, opened, last_access_time, transient,
-        received_slices, base::nullopt /*download_schedule*/,
+        received_slices, absl::nullopt /*download_schedule*/,
         nullptr /* download_entry */);
   }
 
@@ -263,7 +263,7 @@
         rfh->GetSiteInstance()->GetBrowserContext(), rfh,
         rfh->GetProcess()->GetID(),
         ContentBrowserClient::URLLoaderFactoryType::kDownload, url::Origin(),
-        base::nullopt /* navigation_id */, ukm::kInvalidSourceIdObj,
+        absl::nullopt /* navigation_id */, ukm::kInvalidSourceIdObj,
         &maybe_proxy_factory_receiver, nullptr /* header_client */,
         nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
         nullptr /* factory_override */);
@@ -427,7 +427,7 @@
         target_path, download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
         download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
         download::DownloadItem::MixedContentStatus::UNKNOWN, target_path,
-        base::nullopt /*download_schedule*/,
+        absl::nullopt /*download_schedule*/,
         download::DOWNLOAD_INTERRUPT_REASON_NONE);
   }
 }
@@ -871,7 +871,7 @@
 
   const GURL& url = resource_request->url;
   const std::string& method = resource_request->method;
-  base::Optional<url::Origin> request_initiator =
+  absl::optional<url::Origin> request_initiator =
       resource_request->request_initiator;
 
   WebContents::Getter web_contents_getter =
@@ -964,7 +964,7 @@
     const GURL& site_url,
     const GURL& tab_url,
     const GURL& tab_refererr_url,
-    const base::Optional<url::Origin>& request_initiator,
+    const absl::optional<url::Origin>& request_initiator,
     const std::string& mime_type,
     const std::string& original_mime_type,
     base::Time start_time,
@@ -1385,7 +1385,7 @@
         WebContents::FromFrameTreeNodeId, rfh->GetFrameTreeNodeId());
     const GURL& url = params->url();
     const std::string& method = params->method();
-    base::Optional<url::Origin> initiator = params->initiator();
+    absl::optional<url::Origin> initiator = params->initiator();
     base::OnceCallback<void(bool /* download allowed */)>
         on_can_download_checks_done = base::BindOnce(
             &DownloadManagerImpl::BeginResourceDownloadOnChecksComplete,
diff --git a/content/browser/download/download_manager_impl.h b/content/browser/download/download_manager_impl.h
index 69fcf9a..b7e0163 100644
--- a/content/browser/download/download_manager_impl.h
+++ b/content/browser/download/download_manager_impl.h
@@ -17,7 +17,6 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/sequenced_task_runner_helpers.h"
 #include "base/synchronization/lock.h"
 #include "build/build_config.h"
@@ -35,6 +34,7 @@
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace download {
@@ -116,7 +116,7 @@
       const GURL& site_url,
       const GURL& tab_url,
       const GURL& tab_refererr_url,
-      const base::Optional<url::Origin>& request_initiator,
+      const absl::optional<url::Origin>& request_initiator,
       const std::string& mime_type,
       const std::string& original_mime_type,
       base::Time start_time,
diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc
index a289f01..6b7912d 100644
--- a/content/browser/download/download_manager_impl_unittest.cc
+++ b/content/browser/download/download_manager_impl_unittest.cc
@@ -20,7 +20,6 @@
 #include "base/guid.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
@@ -46,6 +45,7 @@
 #include "content/public/test/test_browser_context.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 using base::test::RunOnceCallback;
@@ -142,7 +142,7 @@
       const GURL& site_url,
       const GURL& tab_url,
       const GURL& tab_referrer_url,
-      const base::Optional<url::Origin>& request_initiator,
+      const absl::optional<url::Origin>& request_initiator,
       const std::string& mime_type,
       const std::string& original_mime_type,
       base::Time start_time,
@@ -222,7 +222,7 @@
     const GURL& site_url,
     const GURL& tab_url,
     const GURL& tab_referrer_url,
-    const base::Optional<url::Origin>& request_initiator,
+    const absl::optional<url::Origin>& request_initiator,
     const std::string& mime_type,
     const std::string& original_mime_type,
     base::Time start_time,
@@ -531,7 +531,7 @@
       download::DownloadDangerType danger_type,
       download::DownloadItem::MixedContentStatus mixed_content_status,
       const base::FilePath& intermediate_path,
-      base::Optional<download::DownloadSchedule> download_schedule,
+      absl::optional<download::DownloadSchedule> download_schedule,
       download::DownloadInterruptReason interrupt_reason) {
     callback_called_ = true;
     target_path_ = target_path;
@@ -575,7 +575,7 @@
   download::DownloadItem::TargetDisposition target_disposition_;
   download::DownloadDangerType danger_type_;
   base::FilePath intermediate_path_;
-  base::Optional<download::DownloadSchedule> download_schedule_;
+  absl::optional<download::DownloadSchedule> download_schedule_;
   download::DownloadInterruptReason interrupt_reason_;
 
   std::vector<GURL> download_urls_;
@@ -783,7 +783,7 @@
       download::DOWNLOAD_INTERRUPT_REASON_SERVER_FAILED, false, false, false,
       base::Time::Now(), true,
       std::vector<download::DownloadItem::ReceivedSlice>(),
-      base::nullopt /*download_schedule*/, nullptr /* download_entry */);
+      absl::nullopt /*download_schedule*/, nullptr /* download_entry */);
   in_progress_manager->AddDownloadItem(std::move(in_progress_item));
   SetInProgressDownloadManager(std::move(in_progress_manager));
   EXPECT_CALL(GetMockObserver(), OnDownloadCreated(download_manager_.get(), _))
diff --git a/content/browser/download/mhtml_generation_browsertest.cc b/content/browser/download/mhtml_generation_browsertest.cc
index 2dc8df6..db34fe7a 100644
--- a/content/browser/download/mhtml_generation_browsertest.cc
+++ b/content/browser/download/mhtml_generation_browsertest.cc
@@ -280,7 +280,7 @@
   MHTMLGenerationTest()
       : has_mhtml_callback_run_(false),
         file_size_(0),
-        file_digest_(base::nullopt),
+        file_digest_(absl::nullopt),
         well_formedness_check_(true) {}
 
   enum TaskOrder { WriteThenRespond, RespondThenWrite };
@@ -340,8 +340,8 @@
 
     // TODO(crbug.com/997408): Add tests which will let MHTMLGeneration manager
     // fail during file write operation. This will allow us to actually test if
-    // we receive a bogus hash instead of a base::nullopt.
-    EXPECT_EQ(base::nullopt, file_digest());
+    // we receive a bogus hash instead of a absl::nullopt.
+    EXPECT_EQ(absl::nullopt, file_digest());
 
     // Skip well formedness check if explicitly disabled or there was a
     // generation error.
@@ -466,7 +466,7 @@
 
   bool has_mhtml_callback_run() const { return has_mhtml_callback_run_; }
   int64_t file_size() const { return file_size_; }
-  base::Optional<std::string> file_digest() const { return file_digest_; }
+  absl::optional<std::string> file_digest() const { return file_digest_; }
   base::HistogramTester* histogram_tester() { return histogram_tester_.get(); }
 
   base::ScopedTempDir temp_dir_;
@@ -487,7 +487,7 @@
 
   bool has_mhtml_callback_run_;
   int64_t file_size_;
-  base::Optional<std::string> file_digest_;
+  absl::optional<std::string> file_digest_;
   bool well_formedness_check_;
   std::unique_ptr<base::HistogramTester> histogram_tester_;
 };
diff --git a/content/browser/download/mhtml_generation_manager.cc b/content/browser/download/mhtml_generation_manager.cc
index bd7b047d..d3b90d43d 100644
--- a/content/browser/download/mhtml_generation_manager.cc
+++ b/content/browser/download/mhtml_generation_manager.cc
@@ -59,12 +59,12 @@
                   std::string* digest)
       : save_status(status), file_size(size) {
     if (digest)
-      file_digest = base::Optional<std::string>(*digest);
+      file_digest = absl::optional<std::string>(*digest);
   }
 
   content::mojom::MhtmlSaveStatus save_status;
   int64_t file_size;
-  base::Optional<std::string> file_digest;
+  absl::optional<std::string> file_digest;
 
   content::MHTMLGenerationResult toMHTMLGenerationResult() const {
     return content::MHTMLGenerationResult(file_size,
diff --git a/content/browser/download/save_file.cc b/content/browser/download/save_file.cc
index 72331e6..6e0cf6e 100644
--- a/content/browser/download/save_file.cc
+++ b/content/browser/download/save_file.cc
@@ -7,9 +7,9 @@
 #include "base/bind.h"
 #include "base/check.h"
 #include "base/notreached.h"
-#include "base/optional.h"
 #include "components/download/public/common/download_item.h"
 #include "components/download/public/common/download_task_runner.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/download/save_package.cc b/content/browser/download/save_package.cc
index 558c90b..bc00d04a 100644
--- a/content/browser/download/save_package.cc
+++ b/content/browser/download/save_package.cc
@@ -1016,7 +1016,7 @@
           continue;
         }
 
-        base::Optional<blink::FrameToken> frame_token =
+        absl::optional<blink::FrameToken> frame_token =
             save_item_frame_tree_node->render_manager()
                 ->GetFrameTokenForSiteInstance(target->GetSiteInstance());
 
diff --git a/content/browser/file_system/file_system_manager_impl.cc b/content/browser/file_system/file_system_manager_impl.cc
index b0f79913..a88966f 100644
--- a/content/browser/file_system/file_system_manager_impl.cc
+++ b/content/browser/file_system/file_system_manager_impl.cc
@@ -234,7 +234,7 @@
                                        ResolveURLCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(filesystem_url));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(blink::mojom::FileSystemInfo::New(),
                             base::FilePath(), false, opt_error.value());
@@ -259,7 +259,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL src_url(context_->CrackURL(src_path));
   FileSystemURL dest_url(context_->CrackURL(dest_path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(src_url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(src_url);
   if (!opt_error)
     opt_error = ValidateFileSystemURL(dest_url);
   if (opt_error) {
@@ -287,7 +287,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL src_url(context_->CrackURL(src_path));
   FileSystemURL dest_url(context_->CrackURL(dest_path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(src_url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(src_url);
   if (!opt_error)
     opt_error = ValidateFileSystemURL(dest_url);
   if (opt_error) {
@@ -313,7 +313,7 @@
                                    RemoveCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(opt_error.value());
     return;
@@ -332,7 +332,7 @@
                                          ReadMetadataCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(base::File::Info(), opt_error.value());
     return;
@@ -359,7 +359,7 @@
                                    CreateCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(opt_error.value());
     return;
@@ -387,7 +387,7 @@
                                    ExistsCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(opt_error.value());
     return;
@@ -414,7 +414,7 @@
         pending_listener) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   mojo::Remote<blink::mojom::FileSystemOperationListener> listener(
       std::move(pending_listener));
   if (opt_error) {
@@ -437,7 +437,7 @@
     ReadDirectorySyncCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(std::vector<filesystem::mojom::DirectoryEntryPtr>(),
                             opt_error.value());
@@ -467,7 +467,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   FileSystemURL url(context_->CrackURL(file_path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   mojo::Remote<blink::mojom::FileSystemOperationListener> listener(
       std::move(pending_listener));
   if (opt_error) {
@@ -499,7 +499,7 @@
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   FileSystemURL url(context_->CrackURL(file_path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(0, opt_error.value());
     return;
@@ -526,7 +526,7 @@
     TruncateCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(file_path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(opt_error.value());
     return;
@@ -550,7 +550,7 @@
                                          TruncateSyncCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   FileSystemURL url(context_->CrackURL(file_path));
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(opt_error.value());
     return;
@@ -575,7 +575,7 @@
   // Make sure if this file can be read by the renderer as this is
   // called when the renderer is about to create a new File object
   // (for reading the file).
-  base::Optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
+  absl::optional<base::File::Error> opt_error = ValidateFileSystemURL(url);
   if (opt_error) {
     std::move(callback).Run(base::File::Info(), base::FilePath(),
                             opt_error.value(), mojo::NullRemote());
@@ -845,7 +845,7 @@
           std::move(file_system_manager), std::move(callback)));
 }
 
-base::Optional<base::File::Error> FileSystemManagerImpl::ValidateFileSystemURL(
+absl::optional<base::File::Error> FileSystemManagerImpl::ValidateFileSystemURL(
     const storage::FileSystemURL& url) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (!FileSystemURLIsValid(context_.get(), url))
@@ -857,7 +857,7 @@
   if (url.type() == storage::kFileSystemTypePluginPrivate)
     return base::File::FILE_ERROR_SECURITY;
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 FileSystemManagerImpl::OperationListenerID FileSystemManagerImpl::AddOpListener(
diff --git a/content/browser/file_system/file_system_manager_impl.h b/content/browser/file_system/file_system_manager_impl.h
index 73eecbc..0be1112 100644
--- a/content/browser/file_system/file_system_manager_impl.h
+++ b/content/browser/file_system/file_system_manager_impl.h
@@ -187,7 +187,7 @@
       base::WeakPtr<FileSystemManagerImpl> file_system_manager,
       GetPlatformPathCallback callback);
   // Returns an error if |url| is invalid.
-  base::Optional<base::File::Error> ValidateFileSystemURL(
+  absl::optional<base::File::Error> ValidateFileSystemURL(
       const storage::FileSystemURL& url);
 
   storage::FileSystemOperationRunner* operation_runner() {
diff --git a/content/browser/file_system/file_system_url_loader_factory.cc b/content/browser/file_system/file_system_url_loader_factory.cc
index a81aa82..91bd696 100644
--- a/content/browser/file_system/file_system_url_loader_factory.cc
+++ b/content/browser/file_system/file_system_url_loader_factory.cc
@@ -108,7 +108,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {}
+      const absl::optional<GURL>& new_url) override {}
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override {}
   void PauseReadingBodyFromNet() override {}
diff --git a/content/browser/file_system_access/file_system_access_directory_handle_impl.cc b/content/browser/file_system_access/file_system_access_directory_handle_impl.cc
index b386fe1..2f6daab9 100644
--- a/content/browser/file_system_access/file_system_access_directory_handle_impl.cc
+++ b/content/browser/file_system_access/file_system_access_directory_handle_impl.cc
@@ -216,7 +216,7 @@
     std::move(callback).Run(
         file_system_access_error::FromStatus(
             blink::mojom::FileSystemAccessStatus::kOperationFailed),
-        base::nullopt);
+        absl::nullopt);
     return;
   }
 
@@ -225,7 +225,7 @@
 
   // If two URLs are of a different type they are definitely not related.
   if (parent_url.type() != child_url.type()) {
-    std::move(callback).Run(file_system_access_error::Ok(), base::nullopt);
+    std::move(callback).Run(file_system_access_error::Ok(), absl::nullopt);
     return;
   }
 
@@ -238,8 +238,8 @@
     std::move(callback).Run(
         file_system_access_error::Ok(),
         possible_child->type() == HandleType::kDirectory
-            ? base::make_optional(std::vector<std::string>())
-            : base::nullopt);
+            ? absl::make_optional(std::vector<std::string>())
+            : absl::nullopt);
     return;
   }
 
@@ -250,7 +250,7 @@
     // case the child path is already the relative path.
     relative_path = child_path;
   } else if (!parent_path.AppendRelativePath(child_path, &relative_path)) {
-    std::move(callback).Run(file_system_access_error::Ok(), base::nullopt);
+    std::move(callback).Run(file_system_access_error::Ok(), absl::nullopt);
     return;
   }
 
diff --git a/content/browser/file_system_access/file_system_access_manager_impl.h b/content/browser/file_system_access/file_system_access_manager_impl.h
index 4c9303a..ec28b88 100644
--- a/content/browser/file_system_access/file_system_access_manager_impl.h
+++ b/content/browser/file_system_access/file_system_access_manager_impl.h
@@ -223,7 +223,7 @@
   }
 
   void SetFilePickerResultForTesting(
-      base::Optional<FileSystemChooser::ResultEntry> result_entry) {
+      absl::optional<FileSystemChooser::ResultEntry> result_entry) {
     auto_file_picker_result_for_test_ = result_entry;
   }
 
@@ -396,7 +396,7 @@
            std::unique_ptr<FileSystemAccessDataTransferTokenImpl>>
       data_transfer_tokens_;
 
-  base::Optional<FileSystemChooser::ResultEntry>
+  absl::optional<FileSystemChooser::ResultEntry>
       auto_file_picker_result_for_test_;
 
   base::WeakPtrFactory<FileSystemAccessManagerImpl> weak_factory_{this};
diff --git a/content/browser/file_system_access/file_system_chooser_test_helpers.cc b/content/browser/file_system_access/file_system_chooser_test_helpers.cc
index 86a393f9..afff25c 100644
--- a/content/browser/file_system_access/file_system_chooser_test_helpers.cc
+++ b/content/browser/file_system_access/file_system_chooser_test_helpers.cc
@@ -32,7 +32,7 @@
       if (file_types)
         out_params_->file_types = *file_types;
       else
-        out_params_->file_types = base::nullopt;
+        out_params_->file_types = absl::nullopt;
       out_params_->owning_window = owning_window;
       out_params_->file_type_index = file_type_index;
       out_params_->default_path = default_path;
@@ -75,7 +75,7 @@
       if (file_types)
         out_params_->file_types = *file_types;
       else
-        out_params_->file_types = base::nullopt;
+        out_params_->file_types = absl::nullopt;
       out_params_->owning_window = owning_window;
       out_params_->file_type_index = file_type_index;
       out_params_->default_path = default_path;
diff --git a/content/browser/file_system_access/file_system_chooser_test_helpers.h b/content/browser/file_system_access/file_system_chooser_test_helpers.h
index 5696b25..ff5976e 100644
--- a/content/browser/file_system_access/file_system_chooser_test_helpers.h
+++ b/content/browser/file_system_access/file_system_chooser_test_helpers.h
@@ -6,7 +6,7 @@
 #define CONTENT_BROWSER_FILE_SYSTEM_ACCESS_FILE_SYSTEM_CHOOSER_TEST_HELPERS_H_
 
 #include "base/files/file_path.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/gfx/native_widget_types.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
 #include "ui/shell_dialogs/select_file_dialog_factory.h"
@@ -21,7 +21,7 @@
   ~SelectFileDialogParams();
 
   ui::SelectFileDialog::Type type = ui::SelectFileDialog::SELECT_NONE;
-  base::Optional<ui::SelectFileDialog::FileTypeInfo> file_types;
+  absl::optional<ui::SelectFileDialog::FileTypeInfo> file_types;
   gfx::NativeWindow owning_window = {};
   int file_type_index = -1;
   base::FilePath default_path;
diff --git a/content/browser/font_access/font_enumeration_cache.h b/content/browser/font_access/font_enumeration_cache.h
index 3da511d6..bf1b9aa 100644
--- a/content/browser/font_access/font_enumeration_cache.h
+++ b/content/browser/font_access/font_enumeration_cache.h
@@ -7,11 +7,11 @@
 
 #include "base/deferred_sequenced_task_runner.h"
 #include "base/memory/read_only_shared_memory_region.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/synchronization/atomic_flag.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/font_access/font_enumeration_table.pb.h"
 #include "third_party/blink/public/mojom/font_access/font_access.mojom.h"
 
@@ -97,7 +97,7 @@
   blink::mojom::FontEnumerationStatus status_ =
       blink::mojom::FontEnumerationStatus::kOk;
 
-  base::Optional<std::string> locale_override_;
+  absl::optional<std::string> locale_override_;
 
   SEQUENCE_CHECKER(sequence_checker_);
 };
diff --git a/content/browser/font_access/font_enumeration_cache_win.cc b/content/browser/font_access/font_enumeration_cache_win.cc
index 39e0717..01efd801 100644
--- a/content/browser/font_access/font_enumeration_cache_win.cc
+++ b/content/browser/font_access/font_enumeration_cache_win.cc
@@ -28,11 +28,11 @@
 constexpr HRESULT kErrorNoFamilyName =
     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0xD104);
 
-base::Optional<std::string> GetNativeString(
+absl::optional<std::string> GetNativeString(
     Microsoft::WRL::ComPtr<IDWriteLocalizedStrings> names) {
   // Retrieve the native name. Try the "en-us" locale and if it's
   // not present, used the first available localized name.
-  base::Optional<std::string> native =
+  absl::optional<std::string> native =
       gfx::win::RetrieveLocalizedString(names.Get(), "en-us");
   if (!native) {
     native = gfx::win::RetrieveLocalizedString(names.Get(), "");
@@ -40,10 +40,10 @@
   return native;
 }
 
-base::Optional<std::string> GetLocalizedString(
+absl::optional<std::string> GetLocalizedString(
     Microsoft::WRL::ComPtr<IDWriteLocalizedStrings> names,
     const std::string& locale) {
-  base::Optional<std::string> localized_name =
+  absl::optional<std::string> localized_name =
       gfx::win::RetrieveLocalizedString(names.Get(), locale);
   return localized_name;
 }
@@ -115,7 +115,7 @@
     family_result->exit_hresult = hr;
     return family_result;
   }
-  base::Optional<std::string> native_family_name =
+  absl::optional<std::string> native_family_name =
       GetNativeString(family_names);
   if (!native_family_name) {
     family_result->exit_hresult = kErrorNoFamilyName;
@@ -171,7 +171,7 @@
       return family_result;
     }
 
-    base::Optional<std::string> native_postscript_name =
+    absl::optional<std::string> native_postscript_name =
         GetNativeString(postscript_name);
     if (!native_postscript_name) {
       family_result->exit_hresult = kErrorNoFullNameOrPostScriptName;
@@ -194,7 +194,7 @@
       return family_result;
     }
 
-    base::Optional<std::string> localized_full_name =
+    absl::optional<std::string> localized_full_name =
         GetLocalizedString(full_name, locale);
     if (!localized_full_name)
       localized_full_name = GetLocalizedString(full_name, "");
@@ -226,7 +226,7 @@
         return family_result;
       }
     }
-    base::Optional<std::string> native_style_name;
+    absl::optional<std::string> native_style_name;
     if (exists) {
       native_style_name = GetNativeString(style_name);
     }
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 37cf078..6f778baa 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -157,7 +157,7 @@
 
 void GpuDataManagerImpl::UpdateGpuInfo(
     const gpu::GPUInfo& gpu_info,
-    const base::Optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu) {
+    const absl::optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu) {
   base::AutoLock auto_lock(lock_);
   private_->UpdateGpuInfo(gpu_info, gpu_info_for_hardware_gpu);
 }
@@ -233,7 +233,7 @@
 
 void GpuDataManagerImpl::UpdateGpuFeatureInfo(
     const gpu::GpuFeatureInfo& gpu_feature_info,
-    const base::Optional<gpu::GpuFeatureInfo>&
+    const absl::optional<gpu::GpuFeatureInfo>&
         gpu_feature_info_for_hardware_gpu) {
   base::AutoLock auto_lock(lock_);
   private_->UpdateGpuFeatureInfo(gpu_feature_info,
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 89784e36..9b75a03 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -84,7 +84,7 @@
 
   void UpdateGpuInfo(
       const gpu::GPUInfo& gpu_info,
-      const base::Optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu);
+      const absl::optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu);
 #if defined(OS_WIN)
   void UpdateDxDiagNode(const gpu::DxDiagNode& dx_diagnostics);
   void UpdateDx12Info(uint32_t d3d12_feature_level);
@@ -106,7 +106,7 @@
   // Update the GPU feature info. This updates the blocklist and enabled status
   // of GPU rasterization. In the future this will be used for more features.
   void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
-                            const base::Optional<gpu::GpuFeatureInfo>&
+                            const absl::optional<gpu::GpuFeatureInfo>&
                                 gpu_feature_info_for_hardware_gpu);
   void UpdateGpuExtraInfo(const gfx::GpuExtraInfo& gpu_extra_info);
 
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 1e20caac..82c37883 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -575,7 +575,7 @@
     else
       gpu_feature_info.status_values[ii] = gpu::kGpuFeatureStatusEnabled;
   }
-  UpdateGpuFeatureInfo(gpu_feature_info, base::nullopt);
+  UpdateGpuFeatureInfo(gpu_feature_info, absl::nullopt);
   NotifyGpuInfoUpdate();
 }
 
@@ -879,7 +879,7 @@
 
 void GpuDataManagerImplPrivate::UpdateGpuInfo(
     const gpu::GPUInfo& gpu_info,
-    const base::Optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu) {
+    const absl::optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu) {
 #if defined(OS_WIN)
   // If GPU process crashes and launches again, GPUInfo will be sent back from
   // the new GPU process again, and may overwrite the DX12, Vulkan, DxDiagNode
@@ -1086,7 +1086,7 @@
 
 void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
     const gpu::GpuFeatureInfo& gpu_feature_info,
-    const base::Optional<gpu::GpuFeatureInfo>&
+    const absl::optional<gpu::GpuFeatureInfo>&
         gpu_feature_info_for_hardware_gpu) {
   gpu_feature_info_ = gpu_feature_info;
 #if !defined(OS_FUCHSIA)
@@ -1286,7 +1286,7 @@
 }
 
 void GpuDataManagerImplPrivate::OnGpuBlocked() {
-  base::Optional<gpu::GpuFeatureInfo> gpu_feature_info_for_hardware_gpu;
+  absl::optional<gpu::GpuFeatureInfo> gpu_feature_info_for_hardware_gpu;
   if (gpu_feature_info_.IsInitialized())
     gpu_feature_info_for_hardware_gpu = gpu_feature_info_;
   gpu::GpuFeatureInfo gpu_feature_info = gpu::ComputeGpuFeatureInfoWithNoGpu();
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index b024f38c..9fcaec43 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -60,7 +60,7 @@
 
   void UpdateGpuInfo(
       const gpu::GPUInfo& gpu_info,
-      const base::Optional<gpu::GPUInfo>& optional_gpu_info_for_hardware_gpu);
+      const absl::optional<gpu::GPUInfo>& optional_gpu_info_for_hardware_gpu);
 #if defined(OS_WIN)
   void UpdateDxDiagNode(const gpu::DxDiagNode& dx_diagnostics);
   void UpdateDx12Info(uint32_t d3d12_feature_level);
@@ -78,7 +78,7 @@
   void TerminateInfoCollectionGpuProcess();
 #endif
   void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
-                            const base::Optional<gpu::GpuFeatureInfo>&
+                            const absl::optional<gpu::GpuFeatureInfo>&
                                 gpu_feature_info_for_hardware_gpu);
   void UpdateGpuExtraInfo(const gfx::GpuExtraInfo& process_info);
 
diff --git a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
index ee706a41..64d68e8 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private_unittest.cc
@@ -145,7 +145,7 @@
   EXPECT_FALSE(observer.gpu_info_updated());
 
   gpu::GPUInfo gpu_info;
-  manager->UpdateGpuInfo(gpu_info, base::nullopt);
+  manager->UpdateGpuInfo(gpu_info, absl::nullopt);
   {
     base::RunLoop run_loop;
     run_loop.RunUntilIdle();
@@ -334,7 +334,7 @@
   // Simulate GPU process initialization completing with GL unavailable.
   gpu::GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfoWithOneDisabled(
       gpu::GpuFeatureType::GPU_FEATURE_TYPE_ACCELERATED_GL);
-  manager->UpdateGpuFeatureInfo(gpu_feature_info, base::nullopt);
+  manager->UpdateGpuFeatureInfo(gpu_feature_info, absl::nullopt);
 
   manager->FallBackToNextGpuMode();
   EXPECT_EQ(gpu::GpuMode::SWIFTSHADER, manager->GetGpuMode());
@@ -380,7 +380,7 @@
   // Simulate GPU process initialization completing with Vulkan unavailable.
   gpu::GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfoWithOneDisabled(
       gpu::GpuFeatureType::GPU_FEATURE_TYPE_VULKAN);
-  manager->UpdateGpuFeatureInfo(gpu_feature_info, base::nullopt);
+  manager->UpdateGpuFeatureInfo(gpu_feature_info, absl::nullopt);
 
   // GpuDataManager should update its mode to be GL.
   EXPECT_EQ(gpu::GpuMode::HARDWARE_GL, manager->GetGpuMode());
@@ -403,7 +403,7 @@
   // Simulate GPU process initialization completing with GL unavailable.
   gpu::GpuFeatureInfo gpu_feature_info = GetGpuFeatureInfoWithOneDisabled(
       gpu::GpuFeatureType::GPU_FEATURE_TYPE_ACCELERATED_GL);
-  manager->UpdateGpuFeatureInfo(gpu_feature_info, base::nullopt);
+  manager->UpdateGpuFeatureInfo(gpu_feature_info, absl::nullopt);
 
   manager->FallBackToNextGpuMode();
   EXPECT_EQ(gpu::GpuMode::SWIFTSHADER, manager->GetGpuMode());
diff --git a/content/browser/gpu/gpu_internals_ui.cc b/content/browser/gpu/gpu_internals_ui.cc
index b75e2c4..3db399d 100644
--- a/content/browser/gpu/gpu_internals_ui.cc
+++ b/content/browser/gpu/gpu_internals_ui.cc
@@ -504,7 +504,7 @@
 
 base::Value GetDevicePerfInfo() {
   auto list = base::Value(base::Value::Type::LIST);
-  const base::Optional<gpu::DevicePerfInfo> device_perf_info =
+  const absl::optional<gpu::DevicePerfInfo> device_perf_info =
       gpu::GetDevicePerfInfo();
   if (device_perf_info.has_value()) {
     list.Append(NewDescriptionValuePair(
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index a361e3a9..f0689a03 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -1015,8 +1015,8 @@
 void GpuProcessHost::DidInitialize(
     const gpu::GPUInfo& gpu_info,
     const gpu::GpuFeatureInfo& gpu_feature_info,
-    const base::Optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu,
-    const base::Optional<gpu::GpuFeatureInfo>&
+    const absl::optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu,
+    const absl::optional<gpu::GpuFeatureInfo>&
         gpu_feature_info_for_hardware_gpu,
     const gfx::GpuExtraInfo& gpu_extra_info) {
   if (GetGpuCrashCount() > 0) {
@@ -1069,7 +1069,7 @@
 }
 
 void GpuProcessHost::DidUpdateGPUInfo(const gpu::GPUInfo& gpu_info) {
-  GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info, base::nullopt);
+  GpuDataManagerImpl::GetInstance()->UpdateGpuInfo(gpu_info, absl::nullopt);
 }
 
 #if defined(OS_WIN)
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index 43a754b..99ff97a 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -156,8 +156,8 @@
   void DidInitialize(
       const gpu::GPUInfo& gpu_info,
       const gpu::GpuFeatureInfo& gpu_feature_info,
-      const base::Optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu,
-      const base::Optional<gpu::GpuFeatureInfo>&
+      const absl::optional<gpu::GPUInfo>& gpu_info_for_hardware_gpu,
+      const absl::optional<gpu::GpuFeatureInfo>&
           gpu_feature_info_for_hardware_gpu,
       const gfx::GpuExtraInfo& gpu_extra_info) override;
   void DidFailInitialize() override;
diff --git a/content/browser/gpu/viz_devtools_connector.cc b/content/browser/gpu/viz_devtools_connector.cc
index 37fec11..973416e 100644
--- a/content/browser/gpu/viz_devtools_connector.cc
+++ b/content/browser/gpu/viz_devtools_connector.cc
@@ -21,7 +21,7 @@
 
 void OnSocketCreated(base::OnceCallback<void(int, int)> callback,
                      int result,
-                     const base::Optional<net::IPEndPoint>& local_addr) {
+                     const absl::optional<net::IPEndPoint>& local_addr) {
   int port = 0;
   if (local_addr)
     port = local_addr->port();
diff --git a/content/browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc b/content/browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc
index c5bfc70..b9800e4 100644
--- a/content/browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc
+++ b/content/browser/handwriting/handwriting_recognition_service_impl_cros_unittest.cc
@@ -8,7 +8,6 @@
 #include <vector>
 
 #include "base/command_line.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/test/bind.h"
 #include "chromeos/services/machine_learning/public/cpp/fake_service_connection.h"
@@ -18,6 +17,7 @@
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/handwriting/handwriting.mojom.h"
 
 namespace content {
@@ -140,7 +140,7 @@
   recognizer_remote->GetPrediction(
       std::move(strokes), handwriting::mojom::HandwritingHints::New(),
       base::BindLambdaForTesting(
-          [&](base::Optional<std::vector<
+          [&](absl::optional<std::vector<
                   handwriting::mojom::HandwritingPredictionPtr>> result) {
             is_callback_called = true;
             ASSERT_TRUE(result.has_value());
diff --git a/content/browser/handwriting/handwriting_recognizer_impl.cc b/content/browser/handwriting/handwriting_recognizer_impl.cc
index 7fc6f4c..eab8d45 100644
--- a/content/browser/handwriting/handwriting_recognizer_impl.cc
+++ b/content/browser/handwriting/handwriting_recognizer_impl.cc
@@ -9,9 +9,9 @@
 #include <vector>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -32,7 +32,7 @@
     std::vector<handwriting::mojom::HandwritingStrokePtr> strokes,
     handwriting::mojom::HandwritingHintsPtr hints,
     GetPredictionCallback callback) {
-  std::move(callback).Run(base::nullopt);
+  std::move(callback).Run(absl::nullopt);
 }
 
 }  // namespace content
diff --git a/content/browser/handwriting/handwriting_recognizer_impl_cros.cc b/content/browser/handwriting/handwriting_recognizer_impl_cros.cc
index db47789..90897466 100644
--- a/content/browser/handwriting/handwriting_recognizer_impl_cros.cc
+++ b/content/browser/handwriting/handwriting_recognizer_impl_cros.cc
@@ -10,10 +10,10 @@
 
 #include "base/bind.h"
 #include "base/memory/ptr_util.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace {
 // Supported language tags. At the moment, CrOS only ships two models.
@@ -29,15 +29,15 @@
 }
 
 // Returns the model identifier (language in HandwritingRecognizerSpec) for
-// ml_service backend. Returns base::nullopt if language_tag isn't supported.
-base::Optional<std::string> GetModelIdentifier(base::StringPiece language_tag) {
+// ml_service backend. Returns absl::nullopt if language_tag isn't supported.
+absl::optional<std::string> GetModelIdentifier(base::StringPiece language_tag) {
   if (LanguageTagsAreMatching(language_tag, kLanguageTagEnglish))
     return "en";
 
   if (LanguageTagsAreMatching(language_tag, kLanguageTagGesture))
     return "gesture_in_context";
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace
@@ -68,11 +68,11 @@
 // The callback for `mojom::HandwritingRecognizer::Recognize` (CrOS).
 void OnRecognitionResult(
     CrOSHandwritingRecognizerImpl::GetPredictionCallback callback,
-    base::Optional<std::vector<chromeos::machine_learning::web_platform::mojom::
+    absl::optional<std::vector<chromeos::machine_learning::web_platform::mojom::
                                    HandwritingPredictionPtr>>
         result_from_mlservice) {
   if (!result_from_mlservice.has_value()) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   std::vector<handwriting::mojom::HandwritingPredictionPtr> result_to_blink;
@@ -117,7 +117,7 @@
     return;
   }
 
-  base::Optional<std::string> model_spec_language =
+  absl::optional<std::string> model_spec_language =
       GetModelIdentifier(constraint_blink->languages[0]);
   if (!model_spec_language) {
     std::move(callback).Run(
diff --git a/content/browser/indexed_db/file_stream_reader_to_data_pipe.h b/content/browser/indexed_db/file_stream_reader_to_data_pipe.h
index c3c7de7..dd34c76d 100644
--- a/content/browser/indexed_db/file_stream_reader_to_data_pipe.h
+++ b/content/browser/indexed_db/file_stream_reader_to_data_pipe.h
@@ -48,7 +48,7 @@
 
   scoped_refptr<network::NetToMojoPendingBuffer> pending_write_;
   // Optional so that its construction can be deferred.
-  base::Optional<mojo::SimpleWatcher> writable_handle_watcher_;
+  absl::optional<mojo::SimpleWatcher> writable_handle_watcher_;
 
   base::WeakPtrFactory<FileStreamReaderToDataPipe> weak_factory_{this};
 };
diff --git a/content/browser/indexed_db/indexed_db_backing_store.cc b/content/browser/indexed_db/indexed_db_backing_store.cc
index 8b86e51..71c6a4b 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store.cc
@@ -17,7 +17,6 @@
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/metrics/histogram_functions.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
@@ -60,6 +59,7 @@
 #include "storage/browser/file_system/local_file_stream_writer.h"
 #include "storage/common/database/database_identifier.h"
 #include "storage/common/file_system/file_system_mount_option.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/blob/blob_utils.h"
 #include "third_party/blink/public/common/indexeddb/indexeddb_key_range.h"
 #include "third_party/blink/public/common/indexeddb/web_idb_types.h"
@@ -406,7 +406,7 @@
 
 bool IsPathTooLong(storage::FilesystemProxy* filesystem,
                    const base::FilePath& leveldb_dir) {
-  base::Optional<int> limit =
+  absl::optional<int> limit =
       filesystem->GetMaximumPathComponentLength(leveldb_dir.DirName());
   if (!limit.has_value()) {
     DLOG(WARNING) << "GetMaximumPathComponentLength returned -1";
@@ -922,7 +922,7 @@
           base::FilePath path =
               GetBlobFileName(metadata.id, object.blob_number());
 
-          base::Optional<base::File::Info> info =
+          absl::optional<base::File::Info> info =
               filesystem_proxy_->GetFileInfo(path);
           if (!info.has_value()) {
             return leveldb::Status::Corruption(
@@ -1010,7 +1010,7 @@
 
           base::FilePath path =
               GetBlobFileName(metadata.id, object.blob_number());
-          base::Optional<base::File::Info> info =
+          absl::optional<base::File::Info> info =
               filesystem_proxy_->GetFileInfo(path);
           if (!info.has_value()) {
             return leveldb::Status::Corruption(
@@ -3592,11 +3592,11 @@
           // Android doesn't seem to consistently be able to set file
           // modification times. The timestamp is not checked during reading
           // on Android either. https://crbug.com/1045488
-          base::Optional<base::Time> last_modified;
+          absl::optional<base::Time> last_modified;
 #if !defined(OS_ANDROID)
           last_modified = entry.last_modified().is_null()
-                              ? base::nullopt
-                              : base::make_optional(entry.last_modified());
+                              ? absl::nullopt
+                              : absl::make_optional(entry.last_modified());
 #endif
           blob_storage_context->WriteBlobToFile(
               std::move(pending_blob),
diff --git a/content/browser/indexed_db/indexed_db_backing_store.h b/content/browser/indexed_db/indexed_db_backing_store.h
index d5a38539..273aa94 100644
--- a/content/browser/indexed_db/indexed_db_backing_store.h
+++ b/content/browser/indexed_db/indexed_db_backing_store.h
@@ -235,7 +235,7 @@
     // opposed to being ephemeral and owned by the WriteBlobToFile callbacks)
     // because the transaction needs to be able to cancel this operation in
     // Rollback().
-    base::Optional<BlobWriteState> write_state_
+    absl::optional<BlobWriteState> write_state_
         GUARDED_BY_CONTEXT(sequence_checker_);
 
     // Set to true between CommitPhaseOne and CommitPhaseTwo/Rollback, to
diff --git a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
index 576fe4a6..b19fb0c 100644
--- a/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_backing_store_unittest.cc
@@ -200,7 +200,7 @@
   void WriteBlobToFile(mojo::PendingRemote<::blink::mojom::Blob> blob,
                        const base::FilePath& path,
                        bool flush_on_write,
-                       base::Optional<base::Time> last_modified,
+                       absl::optional<base::Time> last_modified,
                        WriteBlobToFileCallback callback) override {
     writes_.emplace_back(std::move(blob), path);
 
diff --git a/content/browser/indexed_db/indexed_db_context_impl.cc b/content/browser/indexed_db/indexed_db_context_impl.cc
index e8e2b184..a853665 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.cc
+++ b/content/browser/indexed_db/indexed_db_context_impl.cc
@@ -743,7 +743,7 @@
   }
 
   base::FilePath idb_directory = GetLevelDBPath(origin);
-  base::Optional<base::File::Info> info =
+  absl::optional<base::File::Info> info =
       filesystem_proxy_->GetFileInfo(idb_directory);
   if (!info.has_value())
     return base::Time();
diff --git a/content/browser/indexed_db/indexed_db_context_impl.h b/content/browser/indexed_db/indexed_db_context_impl.h
index 2ddd0fd..4190d7a8 100644
--- a/content/browser/indexed_db/indexed_db_context_impl.h
+++ b/content/browser/indexed_db/indexed_db_context_impl.h
@@ -262,7 +262,7 @@
 
   mojo::ReceiverSet<storage::mojom::IndexedDBControl> receivers_;
   mojo::ReceiverSet<storage::mojom::IndexedDBControlTest> test_receivers_;
-  base::Optional<mojo::Receiver<storage::mojom::MockFailureInjector>>
+  absl::optional<mojo::Receiver<storage::mojom::MockFailureInjector>>
       mock_failure_injector_;
   mojo::RemoteSet<storage::mojom::IndexedDBObserver> observers_;
   mojo::Receiver<storage::mojom::QuotaClient> quota_client_receiver_;
diff --git a/content/browser/indexed_db/indexed_db_control_wrapper.h b/content/browser/indexed_db/indexed_db_control_wrapper.h
index 8cd1b9e..0b78f764 100644
--- a/content/browser/indexed_db/indexed_db_control_wrapper.h
+++ b/content/browser/indexed_db/indexed_db_control_wrapper.h
@@ -60,7 +60,7 @@
  private:
   void BindRemoteIfNeeded();
 
-  base::Optional<storage::StoragePolicyObserver> storage_policy_observer_;
+  absl::optional<storage::StoragePolicyObserver> storage_policy_observer_;
 
   mojo::Remote<storage::mojom::IndexedDBControl> indexed_db_control_;
   scoped_refptr<IndexedDBContextImpl> context_;
diff --git a/content/browser/indexed_db/indexed_db_external_object.h b/content/browser/indexed_db/indexed_db_external_object.h
index 318a447d..f0a1fe2 100644
--- a/content/browser/indexed_db/indexed_db_external_object.h
+++ b/content/browser/indexed_db/indexed_db_external_object.h
@@ -13,12 +13,12 @@
 
 #include "base/callback.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/shared_remote.h"
 #include "storage/browser/blob/blob_data_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/blob/blob.mojom.h"
 #include "third_party/blink/public/mojom/indexeddb/indexeddb.mojom.h"
 
diff --git a/content/browser/indexed_db/indexed_db_external_object_storage.h b/content/browser/indexed_db/indexed_db_external_object_storage.h
index 69795abc..0f44af1 100644
--- a/content/browser/indexed_db/indexed_db_external_object_storage.h
+++ b/content/browser/indexed_db/indexed_db_external_object_storage.h
@@ -12,11 +12,11 @@
 
 #include "base/callback_forward.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "components/services/storage/public/mojom/blob_storage_context.mojom.h"
 #include "content/browser/indexed_db/indexed_db_external_object.h"
 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
 #include "storage/common/file_system/file_system_mount_option.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/leveldatabase/src/include/leveldb/status.h"
 
 namespace content {
diff --git a/content/browser/indexed_db/indexed_db_leveldb_operations.cc b/content/browser/indexed_db/indexed_db_leveldb_operations.cc
index e3e0cd3..badd5b9 100644
--- a/content/browser/indexed_db/indexed_db_leveldb_operations.cc
+++ b/content/browser/indexed_db/indexed_db_leveldb_operations.cc
@@ -77,7 +77,7 @@
 
 bool IsPathTooLong(storage::FilesystemProxy* filesystem,
                    const base::FilePath& leveldb_dir) {
-  base::Optional<int> limit =
+  absl::optional<int> limit =
       filesystem->GetMaximumPathComponentLength(leveldb_dir.DirName());
   if (!limit.has_value()) {
     DLOG(WARNING) << "GetMaximumPathComponentLength returned -1";
@@ -115,7 +115,7 @@
 
   const int64_t kMaxJsonLength = 4096;
 
-  base::Optional<base::File::Info> file_info =
+  absl::optional<base::File::Info> file_info =
       filesystem_proxy->GetFileInfo(info_path);
   if (!file_info.has_value())
     return message;
@@ -132,7 +132,7 @@
       std::string input_js(file_info->size, '\0');
       if (file_info->size ==
           file.Read(0, base::data(input_js), file_info->size)) {
-        base::Optional<base::Value> val = base::JSONReader::Read(input_js);
+        absl::optional<base::Value> val = base::JSONReader::Read(input_js);
         if (val && val->is_dict()) {
           std::string* s = val->FindStringKey("message");
           if (s)
diff --git a/content/browser/indexed_db/indexed_db_tombstone_sweeper.cc b/content/browser/indexed_db/indexed_db_tombstone_sweeper.cc
index d36b023..1c3b5877 100644
--- a/content/browser/indexed_db/indexed_db_tombstone_sweeper.cc
+++ b/content/browser/indexed_db/indexed_db_tombstone_sweeper.cc
@@ -105,7 +105,7 @@
 
 void IndexedDBTombstoneSweeper::Stop(StopReason reason) {
   leveldb::Status s;
-  RecordUMAStats(reason, base::nullopt, s);
+  RecordUMAStats(reason, absl::nullopt, s);
 }
 
 bool IndexedDBTombstoneSweeper::RunRound() {
@@ -131,13 +131,13 @@
   if (status == Status::SWEEPING)
     return false;
 
-  RecordUMAStats(base::nullopt, status, s);
+  RecordUMAStats(absl::nullopt, status, s);
   return true;
 }
 
 void IndexedDBTombstoneSweeper::RecordUMAStats(
-    base::Optional<StopReason> stop_reason,
-    base::Optional<IndexedDBTombstoneSweeper::Status> status,
+    absl::optional<StopReason> stop_reason,
+    absl::optional<IndexedDBTombstoneSweeper::Status> status,
     const leveldb::Status& leveldb_error) {
   DCHECK(stop_reason || status);
   DCHECK(!stop_reason || !status);
@@ -350,9 +350,9 @@
         if (!can_continue)
           return sweep_status;
       }
-      sweep_state_.index_it = base::nullopt;
+      sweep_state_.index_it = absl::nullopt;
     }
-    sweep_state_.object_store_it = base::nullopt;
+    sweep_state_.object_store_it = absl::nullopt;
   }
   return Status::DONE_COMPLETE;
 }
@@ -458,7 +458,7 @@
     }
   }
   ++indices_scanned_;
-  sweep_state_.index_it_key = base::nullopt;
+  sweep_state_.index_it_key = absl::nullopt;
   return true;
 }
 
diff --git a/content/browser/indexed_db/indexed_db_tombstone_sweeper.h b/content/browser/indexed_db/indexed_db_tombstone_sweeper.h
index 49c89e3..e389b9f4 100644
--- a/content/browser/indexed_db/indexed_db_tombstone_sweeper.h
+++ b/content/browser/indexed_db/indexed_db_tombstone_sweeper.h
@@ -14,12 +14,12 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
 #include "content/browser/indexed_db/indexed_db_leveldb_coding.h"
 #include "content/browser/indexed_db/indexed_db_pre_close_task_queue.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/leveldatabase/src/include/leveldb/status.h"
 #include "third_party/leveldatabase/src/include/leveldb/write_batch.h"
 
@@ -111,16 +111,16 @@
 
     // Stores the random starting database seed. Not bounded.
     size_t start_database_seed = 0;
-    base::Optional<WrappingIterator<DatabaseMetadataVector>> database_it;
+    absl::optional<WrappingIterator<DatabaseMetadataVector>> database_it;
 
     // Stores the random starting object store seed. Not bounded.
     size_t start_object_store_seed = 0;
-    base::Optional<WrappingIterator<ObjectStoreMetadataMap>> object_store_it;
+    absl::optional<WrappingIterator<ObjectStoreMetadataMap>> object_store_it;
 
     // Stores the random starting object store seed. Not bounded.
     size_t start_index_seed = 0;
-    base::Optional<WrappingIterator<IndexMetadataMap>> index_it;
-    base::Optional<IndexDataKey> index_it_key;
+    absl::optional<WrappingIterator<IndexMetadataMap>> index_it;
+    absl::optional<IndexDataKey> index_it_key;
   };
 
   // Accumulated metrics that are reported at the end of sweeping.
@@ -149,8 +149,8 @@
   // of the sweeper.
   // Exactly one optional argument must be populated.
   void RecordUMAStats(
-      base::Optional<IndexedDBPreCloseTaskQueue::StopReason> stop_reason,
-      base::Optional<Status> status,
+      absl::optional<IndexedDBPreCloseTaskQueue::StopReason> stop_reason,
+      absl::optional<Status> status,
       const leveldb::Status& leveldb_error);
 
   leveldb::Status FlushDeletions();
@@ -178,7 +178,7 @@
 
   // Used to measure total time of the task.
   const base::TickClock* clock_for_testing_ = nullptr;
-  base::Optional<base::TimeTicks> start_time_;
+  absl::optional<base::TimeTicks> start_time_;
 
   bool has_writes_ = false;
   leveldb::WriteBatch round_deletion_batch_;
diff --git a/content/browser/interest_group/ad_auction.cc b/content/browser/interest_group/ad_auction.cc
index 4afe5c1..29effe4 100644
--- a/content/browser/interest_group/ad_auction.cc
+++ b/content/browser/interest_group/ad_auction.cc
@@ -12,7 +12,6 @@
 #include "base/callback.h"
 #include "base/check.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "content/browser/devtools/devtools_instrumentation.h"
 #include "content/browser/interest_group/ad_auction_service_impl.h"
@@ -24,6 +23,7 @@
 #include "content/public/common/content_client.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -252,13 +252,13 @@
     return;
   }
 
-  base::Optional<GURL> bidder_report_url;
+  absl::optional<GURL> bidder_report_url;
   if (bidder_report->report_requested && bidder_report->report_url.is_valid() &&
       bidder_report->report_url.SchemeIs(url::kHttpsScheme)) {
     bidder_report_url = bidder_report->report_url;
   }
 
-  base::Optional<GURL> seller_report_url;
+  absl::optional<GURL> seller_report_url;
   if (seller_report->success && seller_report->report_url.is_valid() &&
       seller_report->report_url.SchemeIs(url::kHttpsScheme)) {
     seller_report_url = seller_report->report_url;
@@ -280,7 +280,7 @@
 void AdAuction::OnAuctionFailed() {
   DCHECK(callback_);
 
-  std::move(callback_).Run(this, base::nullopt, base::nullopt, base::nullopt);
+  std::move(callback_).Run(this, absl::nullopt, absl::nullopt, absl::nullopt);
 }
 
 }  // namespace content
diff --git a/content/browser/interest_group/ad_auction.h b/content/browser/interest_group/ad_auction.h
index 4dc6cc0..05105fae13 100644
--- a/content/browser/interest_group/ad_auction.h
+++ b/content/browser/interest_group/ad_auction.h
@@ -11,8 +11,8 @@
 
 #include "base/callback_forward.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -30,9 +30,9 @@
   // an auction had no winner, all URLs are null.
   using AuctionCompleteCallback =
       base::OnceCallback<void(AdAuction* auction,
-                              base::Optional<GURL> render_url,
-                              base::Optional<GURL> bidder_report_url,
-                              base::Optional<GURL> seller_report_url)>;
+                              absl::optional<GURL> render_url,
+                              absl::optional<GURL> bidder_report_url,
+                              absl::optional<GURL> seller_report_url)>;
 
   // `ad_auction_service` must remain valid for the lifetime of the AdAuction.
   AdAuction(AdAuctionServiceImpl* ad_auction_service,
diff --git a/content/browser/interest_group/ad_auction_service_impl.cc b/content/browser/interest_group/ad_auction_service_impl.cc
index 8e64ed7..8518cdc 100644
--- a/content/browser/interest_group/ad_auction_service_impl.cc
+++ b/content/browser/interest_group/ad_auction_service_impl.cc
@@ -9,7 +9,6 @@
 
 #include "base/check.h"
 #include "base/containers/contains.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "content/browser/devtools/devtools_instrumentation.h"
 #include "content/browser/interest_group/ad_auction.h"
@@ -32,6 +31,7 @@
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 #include "url/url_constants.h"
@@ -154,7 +154,7 @@
         render_frame_host()->GetSiteInstance()->GetBrowserContext(),
         render_frame_host(), render_frame_host()->GetProcess()->GetID(),
         ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
-        url::Origin(), base::nullopt /* navigation_id */,
+        url::Origin(), absl::nullopt /* navigation_id */,
         ukm::SourceIdObj::FromInt64(render_frame_host()->GetPageUkmSourceId()),
         &factory_receiver, nullptr /* header_client */,
         nullptr /* bypass_redirect_checks */, nullptr /* disable_secure_dns */,
@@ -189,9 +189,9 @@
 void AdAuctionServiceImpl::OnAuctionComplete(
     RunAdAuctionCallback callback,
     AdAuction* auction,
-    base::Optional<GURL> render_url,
-    base::Optional<GURL> bidder_report_url,
-    base::Optional<GURL> seller_report_url) {
+    absl::optional<GURL> render_url,
+    absl::optional<GURL> bidder_report_url,
+    absl::optional<GURL> seller_report_url) {
   auto auction_it = auctions_.find(auction);
   DCHECK(auction_it != auctions_.end());
   auctions_.erase(auction_it);
diff --git a/content/browser/interest_group/ad_auction_service_impl.h b/content/browser/interest_group/ad_auction_service_impl.h
index 6b2a7cf..56fdf26 100644
--- a/content/browser/interest_group/ad_auction_service_impl.h
+++ b/content/browser/interest_group/ad_auction_service_impl.h
@@ -73,9 +73,9 @@
   // Deletes `auction`.
   void OnAuctionComplete(RunAdAuctionCallback callback,
                          AdAuction* auction,
-                         base::Optional<GURL> render_url,
-                         base::Optional<GURL> bidder_report_url,
-                         base::Optional<GURL> seller_report_url);
+                         absl::optional<GURL> render_url,
+                         absl::optional<GURL> bidder_report_url,
+                         absl::optional<GURL> seller_report_url);
 
   void OnWorkletServiceCrash();
 
diff --git a/content/browser/interest_group/auction_url_loader_factory_proxy_unittest.cc b/content/browser/interest_group/auction_url_loader_factory_proxy_unittest.cc
index 2a33f9a..ca5bbf0e 100644
--- a/content/browser/interest_group/auction_url_loader_factory_proxy_unittest.cc
+++ b/content/browser/interest_group/auction_url_loader_factory_proxy_unittest.cc
@@ -232,7 +232,7 @@
   }
 
   void TryMakeRequest(const std::string& url,
-                      base::Optional<std::string> accept_value,
+                      absl::optional<std::string> accept_value,
                       ExpectedResponse expected_response) {
     network::ResourceRequest request;
     request.url = GURL(url);
@@ -261,21 +261,21 @@
   TryMakeRequest(kScoringWorkletUrl, kAcceptJson, ExpectedResponse::kReject);
   TryMakeRequest(kScoringWorkletUrl, "Unknown/Unknown",
                  ExpectedResponse::kReject);
-  TryMakeRequest(kScoringWorkletUrl, base::nullopt, ExpectedResponse::kReject);
+  TryMakeRequest(kScoringWorkletUrl, absl::nullopt, ExpectedResponse::kReject);
 
   TryMakeRequest(kBiddingWorkletUrl1, kAcceptJavascript,
                  ExpectedResponse::kUseTrustedFactory);
   TryMakeRequest(kBiddingWorkletUrl1, kAcceptJson, ExpectedResponse::kReject);
   TryMakeRequest(kBiddingWorkletUrl1, "Unknown/Unknown",
                  ExpectedResponse::kReject);
-  TryMakeRequest(kBiddingWorkletUrl1, base::nullopt, ExpectedResponse::kReject);
+  TryMakeRequest(kBiddingWorkletUrl1, absl::nullopt, ExpectedResponse::kReject);
   TryMakeRequest(kTrustedBiddingSignalsUrl1, kAcceptJavascript,
                  ExpectedResponse::kReject);
   TryMakeRequest(kTrustedBiddingSignalsUrl1, kAcceptJson,
                  ExpectedResponse::kReject);
   TryMakeRequest(kTrustedBiddingSignalsUrl1, "Unknown/Unknown",
                  ExpectedResponse::kReject);
-  TryMakeRequest(kTrustedBiddingSignalsUrl1, base::nullopt,
+  TryMakeRequest(kTrustedBiddingSignalsUrl1, absl::nullopt,
                  ExpectedResponse::kReject);
 
   TryMakeRequest(kBiddingWorkletUrl2, kAcceptJavascript,
diff --git a/content/browser/interest_group/interest_group_browsertest.cc b/content/browser/interest_group/interest_group_browsertest.cc
index 3a33b7e..9ff7901 100644
--- a/content/browser/interest_group/interest_group_browsertest.cc
+++ b/content/browser/interest_group/interest_group_browsertest.cc
@@ -10,7 +10,6 @@
 #include "base/callback_forward.h"
 #include "base/containers/contains.h"
 #include "base/containers/flat_set.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "base/synchronization/lock.h"
@@ -42,6 +41,7 @@
 #include "services/network/public/mojom/fetch_api.mojom.h"
 #include "testing/gmock/include/gmock/gmock-matchers.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/interest_group/ad_auction_service.mojom.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
@@ -346,11 +346,11 @@
       /* owner= */ test_origin_a,
       /* name = */ "bicycles",
       /* bidding_url = */ GURL("https://bid.a.test"),
-      /* update_url  = */ base::nullopt,
-      /* trusted_bidding_signals_url = */ base::nullopt,
-      /* trusted_bidding_signals_keys = */ base::nullopt,
-      /* user_bidding_signals = */ base::nullopt,
-      /* ads = */ base::nullopt)));
+      /* update_url  = */ absl::nullopt,
+      /* trusted_bidding_signals_url = */ absl::nullopt,
+      /* trusted_bidding_signals_keys = */ absl::nullopt,
+      /* user_bidding_signals = */ absl::nullopt,
+      /* ads = */ absl::nullopt)));
 
   // This join should silently fail since a.test is not the same origin as
   // the update_url, update.a.test
@@ -358,12 +358,12 @@
       /* expiry */ base::Time(),
       /* owner= */ test_origin_a,
       /* name = */ "tricycles",
-      /* bidding_url = */ base::nullopt,
+      /* bidding_url = */ absl::nullopt,
       /* update_url  = */ GURL("https://update.a.test"),
-      /* trusted_bidding_signals_url = */ base::nullopt,
-      /* trusted_bidding_signals_keys = */ base::nullopt,
-      /* user_bidding_signals = */ base::nullopt,
-      /* ads = */ base::nullopt)));
+      /* trusted_bidding_signals_url = */ absl::nullopt,
+      /* trusted_bidding_signals_keys = */ absl::nullopt,
+      /* user_bidding_signals = */ absl::nullopt,
+      /* ads = */ absl::nullopt)));
 
   // This join should silently fail since a.test is not the same origin as
   // the trusted_bidding_signals_url, signals.a.test
@@ -371,12 +371,12 @@
       /* expiry */ base::Time(),
       /* owner= */ test_origin_a,
       /* name = */ "four-wheelers",
-      /* bidding_url = */ base::nullopt,
-      /* update_url  = */ base::nullopt,
+      /* bidding_url = */ absl::nullopt,
+      /* update_url  = */ absl::nullopt,
       /* trusted_bidding_signals_url = */ GURL("https://signals.a.test"),
-      /* trusted_bidding_signals_keys = */ base::nullopt,
-      /* user_bidding_signals = */ base::nullopt,
-      /* ads = */ base::nullopt)));
+      /* trusted_bidding_signals_keys = */ absl::nullopt,
+      /* user_bidding_signals = */ absl::nullopt,
+      /* ads = */ absl::nullopt)));
 
   // This join should silently fail since d.test is not allowlisted for the API
   GURL test_url_d = https_server_->GetURL("d.test", "/echo");
@@ -408,12 +408,12 @@
       /* expiry */ base::Time::Now() + base::TimeDelta::FromSeconds(300),
       /* owner= */ test_origin_d,
       /* name = */ "candy",
-      /* bidding_url = */ base::nullopt,
-      /* update_url  = */ base::nullopt,
-      /* trusted_bidding_signals_url = */ base::nullopt,
-      /* trusted_bidding_signals_keys = */ base::nullopt,
-      /* user_bidding_signals = */ base::nullopt,
-      /* ads = */ base::nullopt));
+      /* bidding_url = */ absl::nullopt,
+      /* update_url  = */ absl::nullopt,
+      /* trusted_bidding_signals_url = */ absl::nullopt,
+      /* trusted_bidding_signals_keys = */ absl::nullopt,
+      /* user_bidding_signals = */ absl::nullopt,
+      /* ads = */ absl::nullopt));
 
   ASSERT_TRUE(NavigateToURL(shell(), test_url_d));
   // This leave should do nothing because origin_d is not allowed by privacy
@@ -769,11 +769,11 @@
           /* name = */ "cars",
           /* bidding_url = */
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads));
 
   EXPECT_EQ(
@@ -901,11 +901,11 @@
           /* name = */ "cars",
           /* bidding_url = */
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads));
 
   EXPECT_EQ(
@@ -970,13 +970,13 @@
           /* name = */ "cars",
           /* bidding_url = */
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
           /* trusted_bidding_signals_url = */
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads, "['key1']"));
 
   GURL test_url_d = https_server_->GetURL("d.test", "/echo");
@@ -1027,7 +1027,7 @@
       "/interest_group/bidding_logic_stop_bidding_after_win.js");
   disabled_group->ads = std::vector<blink::mojom::InterestGroupAdPtr>();
   disabled_group->ads->emplace_back(blink::mojom::InterestGroupAd::New(
-      GURL("https://stop_bidding_after_win.com/render"), base::nullopt));
+      GURL("https://stop_bidding_after_win.com/render"), absl::nullopt));
   storage_->JoinInterestGroup(std::move(disabled_group));
   ASSERT_EQ(1, GetJoinCount(url::Origin::Create(disabled_domain), "candy"));
 
@@ -1045,13 +1045,13 @@
           /* bidding_url = */
           https_server_->GetURL(test_url.host(),
                                 "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
           /* trusted_bidding_signals_url = */
           https_server_->GetURL(test_url.host(),
                                 "/interest_group/trusted_bidding_signals.json"),
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads, "['key1']"));
 
   EXPECT_EQ("https://example.com/render",
@@ -1092,13 +1092,13 @@
           /* name = */ "cars",
           /* bidding_url = */
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
           /* trusted_bidding_signals_url = */
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads, "['key1']"));
 
   EXPECT_EQ(
@@ -1138,7 +1138,7 @@
   for (const auto& expected_request : kExpectedRequests) {
     SCOPED_TRACE(expected_request.url);
 
-    base::Optional<network::ResourceRequest> request =
+    absl::optional<network::ResourceRequest> request =
         url_loader_monitor.GetRequestInfo(expected_request.url);
     ASSERT_TRUE(request);
     EXPECT_EQ(network::mojom::CredentialsMode::kOmit,
@@ -1183,7 +1183,7 @@
   for (const auto& expected_report_url : kExpectedReportUrls) {
     SCOPED_TRACE(expected_report_url);
 
-    base::Optional<network::ResourceRequest> request =
+    absl::optional<network::ResourceRequest> request =
         url_loader_monitor.GetRequestInfo(expected_report_url);
     ASSERT_TRUE(request);
     EXPECT_EQ(network::mojom::CredentialsMode::kOmit,
@@ -1230,13 +1230,13 @@
           /* name = */ "cars",
           /* bidding_url = */
           https_server_->GetURL(kBidder, "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
           /* trusted_bidding_signals_url = */
           https_server_->GetURL(kBidder,
                                 "/interest_group/trusted_bidding_signals.json"),
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads, "['key1']"));
 
   // Navigate to publisher.
@@ -1300,11 +1300,11 @@
           https_server_->GetURL(
               "a.test",
               "/interest_group/bidding_logic_stop_bidding_after_win.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       "[{renderUrl : 'https://stop_bidding_after_win.com/render'}]"));
   EXPECT_TRUE(JoinInterestGroupAndWaitInJs(
       blink::mojom::InterestGroup::New(
@@ -1313,13 +1313,13 @@
           /* name = */ "bikes",
           /* bidding_url = */
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
           /* trusted_bidding_signals_url = */
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       "[{renderUrl : 'https://example.com/render'}]", "['key1']"));
   EXPECT_TRUE(JoinInterestGroupAndWaitInJs(
       blink::mojom::InterestGroup::New(
@@ -1328,11 +1328,11 @@
           /* name = */ "shoes",
           /* bidding_url = */
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       "[{renderUrl : 'https://example.com/render2'}]"));
 
   EXPECT_EQ(
@@ -1373,11 +1373,11 @@
           https_server_->GetURL(
               "a.test",
               "/interest_group/bidding_logic_stop_bidding_after_win.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads));
 
   GURL test_url2 = https_server_->GetURL("b.test", "/echo");
@@ -1390,11 +1390,11 @@
           /* name = */ "shoes",
           /* bidding_url = */
           https_server_->GetURL("b.test", "/interest_group/bidding_logic.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       "[{renderUrl : 'https://example.com/render'}]"));
 
   // Both owners have one interest group in storage, and both interest groups
@@ -1489,11 +1489,11 @@
           /* bidding_url = */
           https_server_->GetURL(
               "a.test", "/interest_group/bidding_logic_invalid_ad_url.js"),
-          /* update_url  = */ base::nullopt,
-          /* trusted_bidding_signals_url = */ base::nullopt,
-          /* trusted_bidding_signals_keys = */ base::nullopt,
+          /* update_url  = */ absl::nullopt,
+          /* trusted_bidding_signals_url = */ absl::nullopt,
+          /* trusted_bidding_signals_keys = */ absl::nullopt,
           /* user_bidding_signals = */ "{some: 'json', data: {here: [1, 2]}}",
-          /* ads = */ base::nullopt),
+          /* ads = */ absl::nullopt),
       ads));
 
   EXPECT_EQ(
@@ -1525,13 +1525,13 @@
           /*bidding_url=*/
           https_server_->GetURL("a.test",
                                 "/interest_group/bidding_logic_throws.js"),
-          /*update_url=*/base::nullopt,
+          /*update_url=*/absl::nullopt,
           /*trusted_bidding_signals_url=*/
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /*trusted_bidding_signals_keys=*/base::nullopt,
+          /*trusted_bidding_signals_keys=*/absl::nullopt,
           /*user_bidding_signals=*/"{some: 'json', data: {here: [1, 2, 3]}}",
-          /*ads=*/base::nullopt),
+          /*ads=*/absl::nullopt),
       /*ads=*/
       "[{renderUrl: 'https://example.com/render', metadata: {ad: 'metadata', "
       "here: [1, 2, 3]}}]",
@@ -1568,13 +1568,13 @@
           /*name=*/"boats",
           /*bidding_url=*/
           https_server_->GetURL("b.test", "/interest_group/bidding_logic.js"),
-          /*update_url=*/base::nullopt,
+          /*update_url=*/absl::nullopt,
           /*trusted_bidding_signals_url=*/
           https_server_->GetURL("b.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /*trusted_bidding_signals_keys=*/base::nullopt,
+          /*trusted_bidding_signals_keys=*/absl::nullopt,
           /*user_bidding_signals=*/"{some: 'json', data: {here: [1, 2, 3]}}",
-          /*ads=*/base::nullopt),
+          /*ads=*/absl::nullopt),
       /*ads=*/
       "[{renderUrl: 'https://example2.com/render', metadata: {ad: 'metadata', "
       "here: [1, 2, 3]}}]",
@@ -1594,13 +1594,13 @@
           /*bidding_url=*/
           https_server_->GetURL(
               "a.test", "/interest_group/bidding_argument_validator.js"),
-          /*update_url=*/base::nullopt,
+          /*update_url=*/absl::nullopt,
           /*trusted_bidding_signals_url=*/
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /*trusted_bidding_signals_keys=*/base::nullopt,
+          /*trusted_bidding_signals_keys=*/absl::nullopt,
           /*user_bidding_signals=*/"{some: 'json', data: {here: [1, 2, 3]}}",
-          /*ads=*/base::nullopt),
+          /*ads=*/absl::nullopt),
       /*ads=*/
       "[{renderUrl: 'https://example.com/render', metadata: {ad: 'metadata', "
       "here: [1, 2, 3]}}]",
@@ -1639,13 +1639,13 @@
           /*name=*/"cars",
           /*bidding_url=*/
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /*update_url=*/base::nullopt,
+          /*update_url=*/absl::nullopt,
           /*trusted_bidding_signals_url=*/
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /*trusted_bidding_signals_keys=*/base::nullopt,
+          /*trusted_bidding_signals_keys=*/absl::nullopt,
           /*user_bidding_signals=*/"{some: 'json', data: {here: [1, 2, 3]}}",
-          /*ads=*/base::nullopt),
+          /*ads=*/absl::nullopt),
       /*ads=*/
       "[{renderUrl: 'https://example.com/render', metadata: {ad: 'metadata', "
       "here: [1, 2, 3]}}]",
@@ -1680,13 +1680,13 @@
           /*name=*/"cars",
           /*bidding_url=*/
           https_server_->GetURL("a.test", "/interest_group/bidding_logic.js"),
-          /*update_url=*/base::nullopt,
+          /*update_url=*/absl::nullopt,
           /*trusted_bidding_signals_url=*/
           https_server_->GetURL("a.test",
                                 "/interest_group/trusted_bidding_signals.json"),
-          /*trusted_bidding_signals_keys=*/base::nullopt,
+          /*trusted_bidding_signals_keys=*/absl::nullopt,
           /*user_bidding_signals=*/"{some: 'json', data: {here: [1, 2, 3]}}",
-          /*ads=*/base::nullopt),
+          /*ads=*/absl::nullopt),
       /*ads=*/
       "[{renderUrl: 'https://example.com/render', metadata: {ad: 'metadata', "
       "here: [1, 2, 3]}}]",
@@ -1962,8 +1962,8 @@
 
   auction_service->RunAdAuction(
       blink::mojom::AuctionAdConfig::New(),
-      base::BindLambdaForTesting([&run_loop](const base::Optional<GURL>& url) {
-        EXPECT_THAT(url, Eq(base::nullopt));
+      base::BindLambdaForTesting([&run_loop](const absl::optional<GURL>& url) {
+        EXPECT_THAT(url, Eq(absl::nullopt));
         run_loop.Quit();
       }));
   run_loop.Run();
@@ -2014,9 +2014,9 @@
     EXPECT_EQ(1, GetJoinCount(test_origin_a_, kGroupName));
   }
 
-  base::Optional<GURL> RunAuctionBypassBlink(
+  absl::optional<GURL> RunAuctionBypassBlink(
       blink::mojom::AuctionAdConfigPtr config) {
-    base::Optional<GURL> maybe_url;
+    absl::optional<GURL> maybe_url;
     base::RunLoop run_loop;
     mojo::Remote<blink::mojom::AdAuctionService> auction_service;
     AdAuctionServiceImpl::CreateMojoService(
@@ -2026,7 +2026,7 @@
     auction_service->RunAdAuction(
         std::move(config),
         base::BindLambdaForTesting(
-            [&run_loop, &maybe_url](const base::Optional<GURL>& url) {
+            [&run_loop, &maybe_url](const absl::optional<GURL>& url) {
               maybe_url = url;
               run_loop.Quit();
             }));
@@ -2069,7 +2069,7 @@
   config->interest_group_buyers = blink::mojom::InterestGroupBuyers::New();
   config->interest_group_buyers->set_buyers({test_origin_a_});
 
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTestRunAdAuctionBypassBlink,
@@ -2087,7 +2087,7 @@
   config->interest_group_buyers = blink::mojom::InterestGroupBuyers::New();
   config->interest_group_buyers->set_buyers({test_origin_a_});
 
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTestRunAdAuctionBypassBlink,
@@ -2100,7 +2100,7 @@
   config->interest_group_buyers = blink::mojom::InterestGroupBuyers::New();
   config->interest_group_buyers->set_buyers({test_origin_a_});
 
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTestRunAdAuctionBypassBlink,
@@ -2123,7 +2123,7 @@
   config->interest_group_buyers = blink::mojom::InterestGroupBuyers::New();
   config->interest_group_buyers->set_buyers({test_origin_a_http});
 
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTestRunAdAuctionBypassBlink,
@@ -2148,7 +2148,7 @@
   config->interest_group_buyers->set_buyers(
       {test_origin_a_, test_origin_a_http});
 
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTestRunAdAuctionBypassBlink,
@@ -2190,7 +2190,7 @@
   config->interest_group_buyers->set_all_buyers(blink::mojom::AllBuyers::New());
 
   // All buyers isn't supported.
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 IN_PROC_BROWSER_TEST_F(InterestGroupBrowserTestRunAdAuctionBypassBlink,
@@ -2235,7 +2235,7 @@
   config->per_buyer_signals.value()[test_origin_b] =
       "{\"even\": \"more\", \"x\": 4.5}";
 
-  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(base::nullopt));
+  EXPECT_THAT(RunAuctionBypassBlink(std::move(config)), Eq(absl::nullopt));
 }
 
 }  // namespace
diff --git a/content/browser/interest_group/interest_group_storage.cc b/content/browser/interest_group/interest_group_storage.cc
index 713964b..a9a4d9e 100644
--- a/content/browser/interest_group/interest_group_storage.cc
+++ b/content/browser/interest_group/interest_group_storage.cc
@@ -13,7 +13,6 @@
 #include "base/json/json_string_value_serializer.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/strings/string_piece.h"
 #include "base/threading/sequenced_task_runner_handle.h"
@@ -27,6 +26,7 @@
 #include "sql/recovery.h"
 #include "sql/statement.h"
 #include "sql/transaction.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
@@ -94,15 +94,15 @@
   return url::Origin::Create(GURL(serialized_origin));
 }
 
-std::string Serialize(const base::Optional<GURL>& url) {
+std::string Serialize(const absl::optional<GURL>& url) {
   if (!url)
     return "";
   return url->spec();
 }
-base::Optional<GURL> DeserializeURL(const std::string& serialized_url) {
+absl::optional<GURL> DeserializeURL(const std::string& serialized_url) {
   GURL result(serialized_url);
   if (result.is_empty())
-    return base::nullopt;
+    return absl::nullopt;
   return result;
 }
 
@@ -130,7 +130,7 @@
 }
 
 std::string Serialize(
-    const base::Optional<std::vector<InterestGroupAdPtr>>& ads) {
+    const absl::optional<std::vector<InterestGroupAdPtr>>& ads) {
   if (!ads)
     return "";
   base::Value list(base::Value::Type::LIST);
@@ -139,19 +139,19 @@
   }
   return Serialize(list);
 }
-base::Optional<std::vector<InterestGroupAdPtr>>
+absl::optional<std::vector<InterestGroupAdPtr>>
 DeserializeInterestGroupAdPtrVector(std::string serialized_ads) {
   std::vector<InterestGroupAdPtr> result;
   std::unique_ptr<base::Value> ads_value = DeserializeValue(serialized_ads);
   if (!ads_value) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   for (const auto& ad_value : ads_value->GetList())
     result.push_back(FromInterestGroupAdPtrValue(&ad_value));
   return result;
 }
 
-std::string Serialize(const base::Optional<std::vector<std::string>> strings) {
+std::string Serialize(const absl::optional<std::vector<std::string>> strings) {
   if (!strings)
     return "";
   base::Value list(base::Value::Type::LIST);
@@ -159,11 +159,11 @@
     list.Append(s);
   return Serialize(list);
 }
-base::Optional<std::vector<std::string>> DeserializeStringVector(
+absl::optional<std::vector<std::string>> DeserializeStringVector(
     std::string serialized_vector) {
   std::unique_ptr<base::Value> list = DeserializeValue(serialized_vector);
   if (!list)
-    return base::nullopt;
+    return absl::nullopt;
   std::vector<std::string> result;
   for (const auto& value : list->GetList())
     result.push_back(value.GetString());
@@ -493,7 +493,7 @@
   return win_hist.Run();
 }
 
-base::Optional<std::vector<url::Origin>> DoGetAllInterestGroupOwners(
+absl::optional<std::vector<url::Origin>> DoGetAllInterestGroupOwners(
     sql::Database& db,
     base::Time expiring_after) {
   std::vector<url::Origin> result;
@@ -507,7 +507,7 @@
   if (!load.is_valid()) {
     DLOG(ERROR) << "LoadAllInterestGroups SQL statement did not compile: "
                 << db.GetErrorMessage();
-    return base::nullopt;
+    return absl::nullopt;
   }
   load.Reset(true);
   load.BindTime(0, expiring_after);
@@ -515,7 +515,7 @@
     result.push_back(DeserializeOrigin(load.ColumnString(0)));
   }
   if (!load.Succeeded())
-    return base::nullopt;
+    return absl::nullopt;
   return result;
 }
 
@@ -605,7 +605,7 @@
   return bid_count.Succeeded();
 }
 
-base::Optional<std::vector<BiddingInterestGroupPtr>>
+absl::optional<std::vector<BiddingInterestGroupPtr>>
 DoGetInterestGroupsForOwner(sql::Database& db,
                             const url::Origin& owner,
                             base::Time now) {
@@ -634,7 +634,7 @@
   if (!load.is_valid()) {
     DLOG(ERROR) << "GetInterestGroupsForOwner SQL statement did not compile: "
                 << db.GetErrorMessage();
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   load.Reset(true);
@@ -643,7 +643,7 @@
   sql::Transaction transaction(&db);
 
   if (!transaction.Begin())
-    return base::nullopt;
+    return absl::nullopt;
   while (load.Step()) {
     BiddingInterestGroupPtr bidding_interest_group =
         auction_worklet::mojom::BiddingInterestGroup::New();
@@ -669,7 +669,7 @@
     result.push_back(std::move(bidding_interest_group));
   }
   if (!load.Succeeded())
-    return base::nullopt;
+    return absl::nullopt;
 
   // These queries are in separate loops to improve locality of the database
   // access.
@@ -677,25 +677,25 @@
     if (!GetJoinCount(db, owner, bidding_interest_group->group->name,
                       now - InterestGroupStorage::kHistoryLength,
                       bidding_interest_group)) {
-      return base::nullopt;
+      return absl::nullopt;
     }
   }
   for (auto& bidding_interest_group : result) {
     if (!GetBidCount(db, owner, bidding_interest_group->group->name,
                      now - InterestGroupStorage::kHistoryLength,
                      bidding_interest_group)) {
-      return base::nullopt;
+      return absl::nullopt;
     }
   }
   for (auto& bidding_interest_group : result) {
     if (!GetPreviousWins(db, owner, bidding_interest_group->group->name,
                          now - InterestGroupStorage::kHistoryLength,
                          bidding_interest_group)) {
-      return base::nullopt;
+      return absl::nullopt;
     }
   }
   if (!transaction.Commit())
-    return base::nullopt;
+    return absl::nullopt;
   return result;
 }
 
@@ -709,7 +709,7 @@
     return false;
 
   std::vector<url::Origin> affected_origins;
-  base::Optional<std::vector<url::Origin>> maybe_all_origins =
+  absl::optional<std::vector<url::Origin>> maybe_all_origins =
       DoGetAllInterestGroupOwners(db, infinite_past);
   if (!maybe_all_origins)
     return false;
@@ -720,7 +720,7 @@
   }
 
   for (const auto& affected_origin : affected_origins) {
-    base::Optional<std::vector<BiddingInterestGroupPtr>> maybe_interest_groups =
+    absl::optional<std::vector<BiddingInterestGroupPtr>> maybe_interest_groups =
         DoGetInterestGroupsForOwner(db, affected_origin, infinite_past);
     if (!maybe_interest_groups)
       return false;
@@ -1007,7 +1007,7 @@
   if (!EnsureDBInitialized())
     return {};
 
-  base::Optional<std::vector<url::Origin>> maybe_result =
+  absl::optional<std::vector<url::Origin>> maybe_result =
       DoGetAllInterestGroupOwners(*db_, base::Time::Now());
   if (!maybe_result)
     return {};
@@ -1020,7 +1020,7 @@
   if (!EnsureDBInitialized())
     return {};
 
-  base::Optional<std::vector<BiddingInterestGroupPtr>> maybe_result =
+  absl::optional<std::vector<BiddingInterestGroupPtr>> maybe_result =
       DoGetInterestGroupsForOwner(*db_, owner, base::Time::Now());
   if (!maybe_result)
     return {};
@@ -1072,12 +1072,12 @@
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   base::Time infinite_past = base::Time::Min();
   std::vector<BiddingInterestGroupPtr> result;
-  base::Optional<std::vector<url::Origin>> maybe_owners =
+  absl::optional<std::vector<url::Origin>> maybe_owners =
       DoGetAllInterestGroupOwners(*db_, infinite_past);
   if (!maybe_owners)
     return {};
   for (const auto& owner : *maybe_owners) {
-    base::Optional<std::vector<BiddingInterestGroupPtr>> maybe_owner_results =
+    absl::optional<std::vector<BiddingInterestGroupPtr>> maybe_owner_results =
         DoGetInterestGroupsForOwner(*db_, owner, infinite_past);
     DCHECK(maybe_owner_results);
     std::move(maybe_owner_results->begin(), maybe_owner_results->end(),
diff --git a/content/browser/interest_group/interest_group_storage_unittest.cc b/content/browser/interest_group/interest_group_storage_unittest.cc
index 25d9221..1d40d30 100644
--- a/content/browser/interest_group/interest_group_storage_unittest.cc
+++ b/content/browser/interest_group/interest_group_storage_unittest.cc
@@ -264,7 +264,7 @@
   full->update_url = GURL("https://full.example.com/update");
   full->trusted_bidding_signals_url = GURL("https://full.example.com/signals");
   full->trusted_bidding_signals_keys =
-      base::make_optional(std::vector<std::string>{"a", "b", "c", "d"});
+      absl::make_optional(std::vector<std::string>{"a", "b", "c", "d"});
   full->user_bidding_signals = "foo";
   full->ads = std::vector<blink::mojom::InterestGroupAdPtr>();
   full->ads->emplace_back(blink::mojom::InterestGroupAd::New(
diff --git a/content/browser/isolated_origin_browsertest.cc b/content/browser/isolated_origin_browsertest.cc
index 5ebcc41..e087d00 100644
--- a/content/browser/isolated_origin_browsertest.cc
+++ b/content/browser/isolated_origin_browsertest.cc
@@ -238,7 +238,7 @@
   net::EmbeddedTestServer https_server_;
   base::test::ScopedFeatureList feature_list_;
 
-  base::Optional<std::string> header_;
+  absl::optional<std::string> header_;
   std::queue<std::string> content_;
 
   DISALLOW_COPY_AND_ASSIGN(OriginIsolationOptInHeaderTest);
@@ -1383,7 +1383,7 @@
           // override them.
           URLLoaderInterceptor::WriteResponse(
               "content/test/data/isolated_base_origin_with_subframe.html",
-              params->client.get(), &headers, base::Optional<net::SSLInfo>());
+              params->client.get(), &headers, absl::optional<net::SSLInfo>());
           return true;
         }
         if (params->url_request.url.host() == "a.foo.com" ||
@@ -5154,7 +5154,7 @@
               "Cross-Origin-Opener-Policy: same-origin\n";
           URLLoaderInterceptor::WriteResponse(
               "content/test/data" + params->url_request.url.path(),
-              params->client.get(), &headers, base::Optional<net::SSLInfo>());
+              params->client.get(), &headers, absl::optional<net::SSLInfo>());
           return true;
         } else if (params->url_request.url.host() == "a.foo.com" ||
                    params->url_request.url.host() == "b.foo.com") {
diff --git a/content/browser/isolation_context.h b/content/browser/isolation_context.h
index a607fdb..3551350 100644
--- a/content/browser/isolation_context.h
+++ b/content/browser/isolation_context.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_BROWSER_ISOLATION_CONTEXT_H_
 #define CONTENT_BROWSER_ISOLATION_CONTEXT_H_
 
-#include "base/optional.h"
 #include "base/util/type_safety/id_type.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_or_resource_context.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/keyboard_lock/keyboard_lock_service_impl.cc b/content/browser/keyboard_lock/keyboard_lock_service_impl.cc
index 49c98cc..27c9a4b7 100644
--- a/content/browser/keyboard_lock/keyboard_lock_service_impl.cc
+++ b/content/browser/keyboard_lock/keyboard_lock_service_impl.cc
@@ -12,13 +12,13 @@
 #include "base/check.h"
 #include "base/containers/flat_set.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "content/browser/keyboard_lock/keyboard_lock_metrics.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/render_widget_host.h"
 #include "content/public/common/content_features.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
 #include "ui/events/keycodes/dom/dom_code.h"
 #include "ui/events/keycodes/dom/keycode_converter.h"
@@ -99,7 +99,7 @@
     return;
   }
 
-  base::Optional<base::flat_set<ui::DomCode>> dom_code_set;
+  absl::optional<base::flat_set<ui::DomCode>> dom_code_set;
   if (!dom_codes.empty())
     dom_code_set = std::move(dom_codes);
 
diff --git a/content/browser/launch_as_mojo_client_browsertest.cc b/content/browser/launch_as_mojo_client_browsertest.cc
index 4a257ea2..9603852 100644
--- a/content/browser/launch_as_mojo_client_browsertest.cc
+++ b/content/browser/launch_as_mojo_client_browsertest.cc
@@ -155,7 +155,7 @@
   base::RunLoop loop;
   shell_controller->GetSwitchValue(
       kExtraSwitchName,
-      base::BindLambdaForTesting([&](const base::Optional<std::string>& value) {
+      base::BindLambdaForTesting([&](const absl::optional<std::string>& value) {
         ASSERT_TRUE(value);
         EXPECT_EQ(kExtraSwitchValue, *value);
         loop.Quit();
diff --git a/content/browser/loader/cached_navigation_url_loader.cc b/content/browser/loader/cached_navigation_url_loader.cc
index 15d9b59..670174b 100644
--- a/content/browser/loader/cached_navigation_url_loader.cc
+++ b/content/browser/loader/cached_navigation_url_loader.cc
@@ -42,7 +42,7 @@
       /*url_loader_client_endpoints=*/nullptr, std::move(response_head),
       /*response_body=*/mojo::ScopedDataPipeConsumerHandle(), global_id,
       /*is_download=*/false, blink::NavigationDownloadPolicy(),
-      request_info_->isolation_info.network_isolation_key(), base::nullopt,
+      request_info_->isolation_info.network_isolation_key(), absl::nullopt,
       /*early_hints=*/{});
 }
 CachedNavigationURLLoader::~CachedNavigationURLLoader() {}
diff --git a/content/browser/loader/cross_site_document_blocking_browsertest.cc b/content/browser/loader/cross_site_document_blocking_browsertest.cc
index 8b4b76f..293eb9c2 100644
--- a/content/browser/loader/cross_site_document_blocking_browsertest.cc
+++ b/content/browser/loader/cross_site_document_blocking_browsertest.cc
@@ -417,8 +417,8 @@
   const GURL url_to_intercept_;
   URLLoaderInterceptor interceptor_;
 
-  base::Optional<url::Origin> request_initiator_to_inject_;
-  base::Optional<network::mojom::RequestMode> request_mode_to_inject_;
+  absl::optional<url::Origin> request_initiator_to_inject_;
+  absl::optional<network::mojom::RequestMode> request_mode_to_inject_;
 
   // |pending_test_client_remote_| below is used to transition results of
   // |test_client_.CreateRemote()| into IO thread.
diff --git a/content/browser/loader/derived_origin_in_fetch_browsertest.cc b/content/browser/loader/derived_origin_in_fetch_browsertest.cc
index e2855c3a..47aaa1b 100644
--- a/content/browser/loader/derived_origin_in_fetch_browsertest.cc
+++ b/content/browser/loader/derived_origin_in_fetch_browsertest.cc
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/optional.h"
 #include "content/public/common/content_switches.h"
 #include "content/public/test/browser_test.h"
 #include "content/public/test/content_browser_test.h"
@@ -11,6 +10,7 @@
 #include "content/shell/browser/shell.h"
 #include "services/network/public/cpp/resource_request.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -33,11 +33,11 @@
 
   ExecuteScriptAsync(shell(), JsReplace("fetch($1);", destination));
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(destination);
 
   ASSERT_TRUE(request);
-  const base::Optional<url::Origin>& initiator = request->request_initiator;
+  const absl::optional<url::Origin>& initiator = request->request_initiator;
   ASSERT_TRUE(initiator);
   EXPECT_TRUE(initiator->CanBeDerivedFrom(starting_file_url));
 }
diff --git a/content/browser/loader/file_url_loader_factory.cc b/content/browser/loader/file_url_loader_factory.cc
index 4c637ccb..94d3056 100644
--- a/content/browser/loader/file_url_loader_factory.cc
+++ b/content/browser/loader/file_url_loader_factory.cc
@@ -175,7 +175,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {}
+      const absl::optional<GURL>& new_url) override {}
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override {}
   void PauseReadingBodyFromNet() override {}
@@ -391,7 +391,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {
+      const absl::optional<GURL>& new_url) override {
     // |removed_headers| and |modified_headers| are unused. It doesn't make
     // sense for files. The FileURLLoader can redirect only to another file.
     std::unique_ptr<RedirectData> redirect_data = std::move(redirect_data_);
diff --git a/content/browser/loader/loader_browsertest.cc b/content/browser/loader/loader_browsertest.cc
index 977273f4..4b182ed6 100644
--- a/content/browser/loader/loader_browsertest.cc
+++ b/content/browser/loader/loader_browsertest.cc
@@ -688,13 +688,13 @@
 struct RequestData {
   const GURL url;
   const net::SiteForCookies site_for_cookies;
-  const base::Optional<url::Origin> initiator;
+  const absl::optional<url::Origin> initiator;
   const int load_flags;
   const std::string referrer;
 
   RequestData(const GURL& url,
               const net::SiteForCookies& site_for_cookies,
-              const base::Optional<url::Origin>& initiator,
+              const absl::optional<url::Origin>& initiator,
               int load_flags,
               const std::string& referrer)
       : url(url),
diff --git a/content/browser/loader/navigation_early_hints_manager.h b/content/browser/loader/navigation_early_hints_manager.h
index 89747e8..6052600c8c 100644
--- a/content/browser/loader/navigation_early_hints_manager.h
+++ b/content/browser/loader/navigation_early_hints_manager.h
@@ -42,7 +42,7 @@
     PreloadedResource& operator=(const PreloadedResource&);
 
     // Completion error code. Set only when network request is completed.
-    base::Optional<int> error_code;
+    absl::optional<int> error_code;
     // True when the preload was canceled. When true, the response was already
     // in the disk cache.
     bool was_canceled = false;
diff --git a/content/browser/loader/navigation_early_hints_manager_unittest.cc b/content/browser/loader/navigation_early_hints_manager_unittest.cc
index a1cf0b95..38b4010 100644
--- a/content/browser/loader/navigation_early_hints_manager_unittest.cc
+++ b/content/browser/loader/navigation_early_hints_manager_unittest.cc
@@ -74,7 +74,7 @@
         GURL(kPreloadPath), network::mojom::LinkRelAttribute::kPreload,
         network::mojom::LinkAsAttribute::kScript,
         network::mojom::CrossOriginAttribute::kUnspecified,
-        /*mime_type=*/base::nullopt);
+        /*mime_type=*/absl::nullopt);
     auto hints = network::mojom::EarlyHints::New();
     hints->headers = network::mojom::ParsedHeaders::New();
     hints->headers->link_headers.push_back(std::move(link_header));
diff --git a/content/browser/loader/navigation_loader_interceptor.cc b/content/browser/loader/navigation_loader_interceptor.cc
index 2e41072..44f65c6 100644
--- a/content/browser/loader/navigation_loader_interceptor.cc
+++ b/content/browser/loader/navigation_loader_interceptor.cc
@@ -8,9 +8,9 @@
 
 namespace content {
 
-base::Optional<SubresourceLoaderParams>
+absl::optional<SubresourceLoaderParams>
 NavigationLoaderInterceptor::MaybeCreateSubresourceLoaderParams() {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool NavigationLoaderInterceptor::MaybeCreateLoaderForResponse(
diff --git a/content/browser/loader/navigation_loader_interceptor.h b/content/browser/loader/navigation_loader_interceptor.h
index c776845..617bf47 100644
--- a/content/browser/loader/navigation_loader_interceptor.h
+++ b/content/browser/loader/navigation_loader_interceptor.h
@@ -7,7 +7,6 @@
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
@@ -16,6 +15,7 @@
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace blink {
 class ThrottlingURLLoader;
@@ -88,7 +88,7 @@
   // does NOT want to handle the specific request given to MaybeCreateLoader()
   // but wants to handle the subsequent resource requests or ensure other
   // interceptors are skipped.
-  virtual base::Optional<SubresourceLoaderParams>
+  virtual absl::optional<SubresourceLoaderParams>
   MaybeCreateSubresourceLoaderParams();
 
   // Returns true if the handler creates a loader for the |response_head| and
diff --git a/content/browser/loader/navigation_url_loader.h b/content/browser/loader/navigation_url_loader.h
index cb161cd..2813dae 100644
--- a/content/browser/loader/navigation_url_loader.h
+++ b/content/browser/loader/navigation_url_loader.h
@@ -10,9 +10,9 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/browser/loader/navigation_loader_interceptor.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 
 namespace net {
diff --git a/content/browser/loader/navigation_url_loader_delegate.h b/content/browser/loader/navigation_url_loader_delegate.h
index 0537cc1..b80eb6c 100644
--- a/content/browser/loader/navigation_url_loader_delegate.h
+++ b/content/browser/loader/navigation_url_loader_delegate.h
@@ -9,11 +9,11 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/common/navigation_params.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/navigation/navigation_policy.h"
 
 namespace net {
@@ -87,7 +87,7 @@
       bool is_download,
       blink::NavigationDownloadPolicy download_policy,
       net::NetworkIsolationKey network_isolation_key,
-      base::Optional<SubresourceLoaderParams> subresource_loader_params,
+      absl::optional<SubresourceLoaderParams> subresource_loader_params,
       EarlyHints early_hints) = 0;
 
   // Called if the request fails before receving a response. Specific
diff --git a/content/browser/loader/navigation_url_loader_impl.cc b/content/browser/loader/navigation_url_loader_impl.cc
index fe20b4a..54d5a879 100644
--- a/content/browser/loader/navigation_url_loader_impl.cc
+++ b/content/browser/loader/navigation_url_loader_impl.cc
@@ -15,7 +15,6 @@
 #include "base/debug/dump_without_crashing.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
 #include "components/download/public/common/download_stats.h"
@@ -87,6 +86,7 @@
 #include "services/network/public/cpp/wrapper_shared_url_loader_factory.h"
 #include "services/network/public/mojom/network_context.mojom-forward.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/mime_sniffing_throttle.h"
 #include "third_party/blink/public/common/loader/record_load_histograms.h"
 #include "third_party/blink/public/common/loader/throttling_url_loader.h"
@@ -1023,7 +1023,7 @@
             container_host->SetControllerRegistration(
                 nullptr, false /* notify_controllerchange */);
             container_host->UpdateUrls(GURL(), net::SiteForCookies(),
-                                       base::nullopt);
+                                       absl::nullopt);
           }
         }
       }
diff --git a/content/browser/loader/navigation_url_loader_impl.h b/content/browser/loader/navigation_url_loader_impl.h
index 7b10181..2f6bdf3 100644
--- a/content/browser/loader/navigation_url_loader_impl.h
+++ b/content/browser/loader/navigation_url_loader_impl.h
@@ -7,7 +7,6 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/loader/navigation_url_loader.h"
 #include "content/browser/loader/single_request_url_loader_factory.h"
@@ -22,6 +21,7 @@
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/navigation/navigation_policy.h"
 
@@ -235,7 +235,7 @@
 
   // Currently used by the AppCache loader to pass its factory to the
   // renderer which enables it to handle subresources.
-  base::Optional<SubresourceLoaderParams> subresource_loader_params_;
+  absl::optional<SubresourceLoaderParams> subresource_loader_params_;
 
   std::vector<std::unique_ptr<NavigationLoaderInterceptor>> interceptors_;
   size_t interceptor_index_ = 0;
@@ -266,7 +266,7 @@
   // the case that the response is intercepted by download, and OnComplete()
   // is already called while we are transferring the |url_loader_| and
   // response body to download code.
-  base::Optional<network::URLLoaderCompletionStatus> status_;
+  absl::optional<network::URLLoaderCompletionStatus> status_;
 
   // Before creating this URLLoaderRequestController on UI thread, the
   // embedder may have elected to proxy the URLLoaderFactory receiver, in
diff --git a/content/browser/loader/navigation_url_loader_impl_unittest.cc b/content/browser/loader/navigation_url_loader_impl_unittest.cc
index 87b1624..56f6220 100644
--- a/content/browser/loader/navigation_url_loader_impl_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_impl_unittest.cc
@@ -57,7 +57,7 @@
 class TestNavigationLoaderInterceptor : public NavigationLoaderInterceptor {
  public:
   explicit TestNavigationLoaderInterceptor(
-      base::Optional<network::ResourceRequest>* most_recent_resource_request)
+      absl::optional<network::ResourceRequest>* most_recent_resource_request)
       : most_recent_resource_request_(most_recent_resource_request) {
     net::URLRequestContextBuilder context_builder;
     context_builder.set_proxy_resolution_service(
@@ -130,7 +130,7 @@
     url_loader_.reset();
   }
 
-  base::Optional<network::ResourceRequest>*
+  absl::optional<network::ResourceRequest>*
       most_recent_resource_request_;  // NOT OWNED.
   network::ResourceScheduler resource_scheduler_;
   std::unique_ptr<net::URLRequestContext> context_;
@@ -178,7 +178,7 @@
       bool upgrade_if_insecure = false) {
     mojom::BeginNavigationParamsPtr begin_params =
         mojom::BeginNavigationParams::New(
-            base::nullopt /* initiator_frame_token */, headers,
+            absl::nullopt /* initiator_frame_token */, headers,
             net::LOAD_NORMAL, false /* skip_service_worker */,
             blink::mojom::RequestContextType::LOCATION,
             network::mojom::RequestDestination::kDocument,
@@ -188,11 +188,11 @@
             GURL() /* searchable_form_url */,
             std::string() /* searchable_form_encoding */,
             GURL() /* client_side_redirect_url */,
-            base::nullopt /* devtools_initiator_info */,
-            nullptr /* trust_token_params */, base::nullopt /* impression */,
+            absl::nullopt /* devtools_initiator_info */,
+            nullptr /* trust_token_params */, absl::nullopt /* impression */,
             base::TimeTicks() /* renderer_before_unload_start */,
             base::TimeTicks() /* renderer_before_unload_end */,
-            base::nullopt /* web_bundle_token */);
+            absl::nullopt /* web_bundle_token */);
 
     auto common_params = CreateCommonNavigationParams();
     common_params->url = url;
@@ -217,9 +217,9 @@
             false /* obey_origin_policy */,
             net::HttpRequestHeaders() /* cors_exempt_headers */,
             nullptr /* client_security_state */,
-            base::nullopt /* devtools_accepted_stream_types */));
+            absl::nullopt /* devtools_accepted_stream_types */));
     std::vector<std::unique_ptr<NavigationLoaderInterceptor>> interceptors;
-    most_recent_resource_request_ = base::nullopt;
+    most_recent_resource_request_ = absl::nullopt;
     interceptors.push_back(std::make_unique<TestNavigationLoaderInterceptor>(
         &most_recent_resource_request_));
 
@@ -306,7 +306,7 @@
       network_change_notifier_;
   std::unique_ptr<TestBrowserContext> browser_context_;
   net::EmbeddedTestServer http_test_server_;
-  base::Optional<network::ResourceRequest> most_recent_resource_request_;
+  absl::optional<network::ResourceRequest> most_recent_resource_request_;
 };
 
 TEST_F(NavigationURLLoaderImplTest, IsolationInfoOfMainFrameNavigation) {
diff --git a/content/browser/loader/navigation_url_loader_unittest.cc b/content/browser/loader/navigation_url_loader_unittest.cc
index d75a2661..35365dbf 100644
--- a/content/browser/loader/navigation_url_loader_unittest.cc
+++ b/content/browser/loader/navigation_url_loader_unittest.cc
@@ -58,7 +58,7 @@
       NavigationURLLoaderDelegate* delegate) {
     mojom::BeginNavigationParamsPtr begin_params =
         mojom::BeginNavigationParams::New(
-            base::nullopt /* initiator_frame_token */,
+            absl::nullopt /* initiator_frame_token */,
             std::string() /* headers */, net::LOAD_NORMAL,
             false /* skip_service_worker */,
             blink::mojom::RequestContextType::LOCATION,
@@ -69,11 +69,11 @@
             GURL() /* searchable_form_url */,
             std::string() /* searchable_form_encoding */,
             GURL() /* client_side_redirect_url */,
-            base::nullopt /* devtools_initiator_info */,
-            nullptr /* trust_token_params */, base::nullopt /* impression */,
+            absl::nullopt /* devtools_initiator_info */,
+            nullptr /* trust_token_params */, absl::nullopt /* impression */,
             base::TimeTicks() /* renderer_before_unload_start */,
             base::TimeTicks() /* renderer_before_unload_end */,
-            base::nullopt /* web_bundle_token */);
+            absl::nullopt /* web_bundle_token */);
     auto common_params = CreateCommonNavigationParams();
     common_params->url = url;
     common_params->initiator_origin = url::Origin::Create(url);
@@ -97,7 +97,7 @@
             false /* obey_origin_policy */,
             net::HttpRequestHeaders() /* cors_exempt_headers */,
             nullptr /* client_security_state */,
-            base::nullopt /* devtools_accepted_stream_types */));
+            absl::nullopt /* devtools_accepted_stream_types */));
     return NavigationURLLoader::Create(
         browser_context_.get(), storage_partition, std::move(request_info),
         nullptr, nullptr, nullptr, nullptr, delegate,
diff --git a/content/browser/loader/object_navigation_fallback_body_loader.h b/content/browser/loader/object_navigation_fallback_body_loader.h
index cf6055a..4f80c47 100644
--- a/content/browser/loader/object_navigation_fallback_body_loader.h
+++ b/content/browser/loader/object_navigation_fallback_body_loader.h
@@ -9,13 +9,13 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "mojo/public/cpp/system/data_pipe_drainer.h"
 #include "services/network/public/cpp/url_loader_completion_status.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/timing/resource_timing.mojom.h"
 
 namespace network {
@@ -121,7 +121,7 @@
   // `response_body_drainer_` will be reset to null when the response body is
   // completely drained.
   std::unique_ptr<mojo::DataPipeDrainer> response_body_drainer_;
-  base::Optional<network::URLLoaderCompletionStatus> status_;
+  absl::optional<network::URLLoaderCompletionStatus> status_;
   blink::mojom::ResourceTimingInfoPtr timing_info_;
   std::string server_timing_value_;
   base::WeakPtr<NavigationRequest> navigation_request_;
diff --git a/content/browser/loader/prefetch_browsertest.cc b/content/browser/loader/prefetch_browsertest.cc
index d02271e..1ca10a8d 100644
--- a/content/browser/loader/prefetch_browsertest.cc
+++ b/content/browser/loader/prefetch_browsertest.cc
@@ -190,7 +190,7 @@
   EXPECT_EQ(1, GetPrefetchURLLoaderCallCount());
 
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(cross_origin_target_url);
   ASSERT_TRUE(request);
   ASSERT_TRUE(request->site_for_cookies.IsNull());
@@ -700,7 +700,7 @@
   WaitUntilLoaded(cross_origin_preload_url);
 
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(cross_origin_target_url);
   ASSERT_TRUE(request);
   ASSERT_TRUE(request->site_for_cookies.IsNull());
diff --git a/content/browser/loader/prefetch_url_loader.cc b/content/browser/loader/prefetch_url_loader.cc
index 0619250..0952e2b7 100644
--- a/content/browser/loader/prefetch_url_loader.cc
+++ b/content/browser/loader/prefetch_url_loader.cc
@@ -96,7 +96,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   DCHECK(modified_headers.IsEmpty())
       << "Redirect with modified headers was not supported yet. "
          "crbug.com/845683";
@@ -113,7 +113,7 @@
   loader_->FollowRedirect(
       removed_headers, net::HttpRequestHeaders() /* modified_headers */,
       net::HttpRequestHeaders() /* modified_cors_exempt_headers */,
-      base::nullopt);
+      absl::nullopt);
 }
 
 void PrefetchURLLoader::SetPriority(net::RequestPriority priority,
diff --git a/content/browser/loader/prefetch_url_loader.h b/content/browser/loader/prefetch_url_loader.h
index c9a23b53..851185f 100644
--- a/content/browser/loader/prefetch_url_loader.h
+++ b/content/browser/loader/prefetch_url_loader.h
@@ -11,7 +11,6 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/web_package/prefetched_signed_exchange_cache.h"
 #include "content/common/content_export.h"
@@ -22,6 +21,7 @@
 #include "net/base/network_isolation_key.h"
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace network {
@@ -92,7 +92,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
diff --git a/content/browser/manifest/manifest_browsertest.cc b/content/browser/manifest/manifest_browsertest.cc
index 182da57..6085e566 100644
--- a/content/browser/manifest/manifest_browsertest.cc
+++ b/content/browser/manifest/manifest_browsertest.cc
@@ -158,7 +158,7 @@
 
   void DidUpdateWebManifestURL(
       RenderFrameHost* rfh,
-      const base::Optional<GURL>& manifest_url) override {
+      const absl::optional<GURL>& manifest_url) override {
     if (!manifest_url) {
       reported_manifest_urls_.emplace_back();
       return;
diff --git a/content/browser/manifest/manifest_manager_host.cc b/content/browser/manifest/manifest_manager_host.cc
index 67e9d92..2c02ec5 100644
--- a/content/browser/manifest/manifest_manager_host.cc
+++ b/content/browser/manifest/manifest_manager_host.cc
@@ -86,7 +86,7 @@
 }
 
 void ManifestManagerHost::ManifestUrlChanged(
-    const base::Optional<GURL>& manifest_url) {
+    const absl::optional<GURL>& manifest_url) {
   if (!manifest_manager_frame_->IsCurrent())
     return;
 
diff --git a/content/browser/manifest/manifest_manager_host.h b/content/browser/manifest/manifest_manager_host.h
index 6b1304b..edde528 100644
--- a/content/browser/manifest/manifest_manager_host.h
+++ b/content/browser/manifest/manifest_manager_host.h
@@ -64,7 +64,7 @@
                                  const blink::Manifest& manifest);
 
   // blink::mojom::ManifestUrlChangeObserver:
-  void ManifestUrlChanged(const base::Optional<GURL>& manifest_url) override;
+  void ManifestUrlChanged(const absl::optional<GURL>& manifest_url) override;
 
   RenderFrameHostImpl* manifest_manager_frame_;
   mojo::Remote<blink::mojom::ManifestManager> manifest_manager_;
diff --git a/content/browser/media/active_media_session_controller.cc b/content/browser/media/active_media_session_controller.cc
index 8cb0e28..3e5a986 100644
--- a/content/browser/media/active_media_session_controller.cc
+++ b/content/browser/media/active_media_session_controller.cc
@@ -61,7 +61,7 @@
   // Stop listening to any keys that are currently being watched, but aren't in
   // |actions|.
   for (const MediaSessionAction& action : actions_) {
-    base::Optional<ui::KeyboardCode> action_key_code =
+    absl::optional<ui::KeyboardCode> action_key_code =
         MediaSessionActionToKeyCode(action);
     if (!action_key_code.has_value())
       continue;
@@ -73,7 +73,7 @@
   // to necessary media keys.
   actions_.clear();
   for (const MediaSessionAction& action : actions) {
-    base::Optional<ui::KeyboardCode> action_key_code =
+    absl::optional<ui::KeyboardCode> action_key_code =
         MediaSessionActionToKeyCode(action);
     if (action_key_code.has_value()) {
       // It's okay to call this even on keys we're already listening to, since
@@ -92,7 +92,7 @@
 }
 
 void ActiveMediaSessionController::MediaSessionPositionChanged(
-    const base::Optional<media_session::MediaPosition>& position) {
+    const absl::optional<media_session::MediaPosition>& position) {
   position_ = position;
 }
 
@@ -226,7 +226,7 @@
   }
 }
 
-base::Optional<ui::KeyboardCode>
+absl::optional<ui::KeyboardCode>
 ActiveMediaSessionController::MediaSessionActionToKeyCode(
     MediaSessionAction action) const {
   switch (action) {
@@ -251,7 +251,7 @@
     case MediaSessionAction::kToggleCamera:
     case MediaSessionAction::kHangUp:
     case MediaSessionAction::kRaise:
-      return base::nullopt;
+      return absl::nullopt;
   }
 }
 
diff --git a/content/browser/media/active_media_session_controller.h b/content/browser/media/active_media_session_controller.h
index ab2457a..c2b9aad 100644
--- a/content/browser/media/active_media_session_controller.h
+++ b/content/browser/media/active_media_session_controller.h
@@ -9,11 +9,11 @@
 #include <vector>
 
 #include "base/containers/flat_set.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/media_session/public/mojom/media_controller.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/base/accelerators/media_keys_listener.h"
 #include "ui/events/keycodes/keyboard_codes.h"
 
@@ -35,14 +35,14 @@
   void MediaSessionInfoChanged(
       media_session::mojom::MediaSessionInfoPtr session_info) override;
   void MediaSessionMetadataChanged(
-      const base::Optional<media_session::MediaMetadata>& metadata) override {}
+      const absl::optional<media_session::MediaMetadata>& metadata) override {}
   void MediaSessionActionsChanged(
       const std::vector<media_session::mojom::MediaSessionAction>& actions)
       override;
   void MediaSessionChanged(
-      const base::Optional<base::UnguessableToken>& request_id) override {}
+      const absl::optional<base::UnguessableToken>& request_id) override {}
   void MediaSessionPositionChanged(
-      const base::Optional<media_session::MediaPosition>& position) override;
+      const absl::optional<media_session::MediaPosition>& position) override;
 
   // ui::MediaKeysListener::Delegate:
   void OnMediaKeysAccelerator(const ui::Accelerator& accelerator) override;
@@ -69,7 +69,7 @@
 
   // Returns nullopt if the action is not supported via hardware keys (e.g.
   // SeekBackward).
-  base::Optional<ui::KeyboardCode> MediaSessionActionToKeyCode(
+  absl::optional<ui::KeyboardCode> MediaSessionActionToKeyCode(
       media_session::mojom::MediaSessionAction action) const;
 
   void MaybePerformAction(media_session::mojom::MediaSessionAction action);
@@ -91,7 +91,7 @@
       media_controller_observer_receiver_{this};
 
   // Stores the current playback position.
-  base::Optional<media_session::MediaPosition> position_;
+  absl::optional<media_session::MediaPosition> position_;
 };
 
 }  // namespace content
diff --git a/content/browser/media/android/browser_gpu_video_accelerator_factories.cc b/content/browser/media/android/browser_gpu_video_accelerator_factories.cc
index 22992ba..d6c7432e 100644
--- a/content/browser/media/android/browser_gpu_video_accelerator_factories.cc
+++ b/content/browser/media/android/browser_gpu_video_accelerator_factories.cc
@@ -177,7 +177,7 @@
   return nullptr;
 }
 
-base::Optional<media::VideoEncodeAccelerator::SupportedProfiles>
+absl::optional<media::VideoEncodeAccelerator::SupportedProfiles>
 BrowserGpuVideoAcceleratorFactories::
     GetVideoEncodeAcceleratorSupportedProfiles() {
   return media::VideoEncodeAccelerator::SupportedProfiles();
diff --git a/content/browser/media/android/browser_gpu_video_accelerator_factories.h b/content/browser/media/android/browser_gpu_video_accelerator_factories.h
index 55c4530..0035fff0 100644
--- a/content/browser/media/android/browser_gpu_video_accelerator_factories.h
+++ b/content/browser/media/android/browser_gpu_video_accelerator_factories.h
@@ -37,7 +37,7 @@
       media::MediaLog* media_log,
       media::VideoDecoderImplementation implementation,
       media::RequestOverlayInfoCB request_overlay_info_cb) override;
-  base::Optional<media::VideoEncodeAccelerator::SupportedProfiles>
+  absl::optional<media::VideoEncodeAccelerator::SupportedProfiles>
   GetVideoEncodeAcceleratorSupportedProfiles() override;
   bool IsEncoderSupportKnown() override;
   void NotifyEncoderSupportKnown(base::OnceClosure) override;
diff --git a/content/browser/media/android/media_player_renderer.cc b/content/browser/media/android/media_player_renderer.cc
index 3284828..704d1c4 100644
--- a/content/browser/media/android/media_player_renderer.cc
+++ b/content/browser/media/android/media_player_renderer.cc
@@ -130,7 +130,7 @@
 }
 
 void MediaPlayerRenderer::SetLatencyHint(
-    base::Optional<base::TimeDelta> latency_hint) {}
+    absl::optional<base::TimeDelta> latency_hint) {}
 
 void MediaPlayerRenderer::Flush(base::OnceClosure flush_cb) {
   DVLOG(3) << __func__;
diff --git a/content/browser/media/android/media_player_renderer.h b/content/browser/media/android/media_player_renderer.h
index c61ec6d..05a3863 100644
--- a/content/browser/media/android/media_player_renderer.h
+++ b/content/browser/media/android/media_player_renderer.h
@@ -59,7 +59,7 @@
   void Initialize(media::MediaResource* media_resource,
                   media::RendererClient* client,
                   media::PipelineStatusCallback init_cb) override;
-  void SetLatencyHint(base::Optional<base::TimeDelta> latency_hint) override;
+  void SetLatencyHint(absl::optional<base::TimeDelta> latency_hint) override;
   void Flush(base::OnceClosure flush_cb) override;
   void StartPlayingFrom(base::TimeDelta time) override;
 
diff --git a/content/browser/media/android/media_resource_getter_impl.cc b/content/browser/media/android/media_resource_getter_impl.cc
index 464b3e30..b2b9ecd8 100644
--- a/content/browser/media/android/media_resource_getter_impl.cc
+++ b/content/browser/media/android/media_resource_getter_impl.cc
@@ -60,7 +60,7 @@
          site_for_cookies.IsFirstParty(top_frame_origin.GetURL()));
   net::IsolationInfo isolation_info = net::IsolationInfo::Create(
       net::IsolationInfo::RequestType::kOther, top_frame_origin,
-      top_frame_origin, site_for_cookies, base::nullopt);
+      top_frame_origin, site_for_cookies, absl::nullopt);
 
   mojo::PendingRemote<network::mojom::RestrictedCookieManager> pipe;
   static_cast<StoragePartitionImpl*>(storage_partition)
@@ -140,7 +140,7 @@
   // Non-standard URLs, such as data, will not be found in HTTP auth cache
   // anyway, because they have no valid origin, so don't waste the time.
   if (!url.IsStandard()) {
-    GetAuthCredentialsCallback(std::move(callback), base::nullopt);
+    GetAuthCredentialsCallback(std::move(callback), absl::nullopt);
     return;
   }
 
@@ -149,7 +149,7 @@
   // Can't get a NetworkIsolationKey to get credentials if the RenderFrameHost
   // has already been destroyed.
   if (!render_frame_host) {
-    GetAuthCredentialsCallback(std::move(callback), base::nullopt);
+    GetAuthCredentialsCallback(std::move(callback), absl::nullopt);
     return;
   }
 
@@ -193,7 +193,7 @@
 
 void MediaResourceGetterImpl::GetAuthCredentialsCallback(
     GetAuthCredentialsCB callback,
-    const base::Optional<net::AuthCredentials>& credentials) {
+    const absl::optional<net::AuthCredentials>& credentials) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (credentials)
     std::move(callback).Run(credentials->username(), credentials->password());
diff --git a/content/browser/media/android/media_resource_getter_impl.h b/content/browser/media/android/media_resource_getter_impl.h
index fb0ab976..864cf937 100644
--- a/content/browser/media/android/media_resource_getter_impl.h
+++ b/content/browser/media/android/media_resource_getter_impl.h
@@ -55,7 +55,7 @@
   // Called when GetAuthCredentials() finishes.
   void GetAuthCredentialsCallback(
       GetAuthCredentialsCB callback,
-      const base::Optional<net::AuthCredentials>& credentials);
+      const absl::optional<net::AuthCredentials>& credentials);
 
   // Called when GetPlatformPathFromFileSystemURL() finishes.
   void GetPlatformPathCallback(GetPlatformPathCB callback,
diff --git a/content/browser/media/audio_input_stream_broker.cc b/content/browser/media/audio_input_stream_broker.cc
index 9219b30597..8502d993 100644
--- a/content/browser/media/audio_input_stream_broker.cc
+++ b/content/browser/media/audio_input_stream_broker.cc
@@ -12,7 +12,6 @@
 #include "base/logging.h"
 #include "base/memory/read_only_shared_memory_region.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/trace_event/trace_event.h"
 #include "build/build_config.h"
 #include "build/chromeos_buildflags.h"
@@ -23,6 +22,7 @@
 #include "media/audio/audio_logging.h"
 #include "media/base/media_switches.h"
 #include "media/base/user_input_monitor.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if BUILDFLAG(IS_CHROMEOS_ASH)
 #include "content/browser/media/keyboard_mic_registration.h"
@@ -181,7 +181,7 @@
     mojo::PendingRemote<media::mojom::AudioInputStream> stream,
     media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
     bool initially_muted,
-    const base::Optional<base::UnguessableToken>& stream_id) {
+    const absl::optional<base::UnguessableToken>& stream_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   awaiting_created_ = false;
   TRACE_EVENT_NESTABLE_ASYNC_END1("audio", "CreateStream", this, "success",
diff --git a/content/browser/media/audio_input_stream_broker.h b/content/browser/media/audio_input_stream_broker.h
index 469e5824..afcd8db9 100644
--- a/content/browser/media/audio_input_stream_broker.h
+++ b/content/browser/media/audio_input_stream_broker.h
@@ -57,7 +57,7 @@
   void StreamCreated(mojo::PendingRemote<media::mojom::AudioInputStream> stream,
                      media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
                      bool initially_muted,
-                     const base::Optional<base::UnguessableToken>& stream_id);
+                     const absl::optional<base::UnguessableToken>& stream_id);
 
   void ObserverBindingLost(uint32_t reason, const std::string& description);
   void ClientBindingLost();
diff --git a/content/browser/media/audio_input_stream_broker_unittest.cc b/content/browser/media/audio_input_stream_broker_unittest.cc
index 1e7af39..49d869e 100644
--- a/content/browser/media/audio_input_stream_broker_unittest.cc
+++ b/content/browser/media/audio_input_stream_broker_unittest.cc
@@ -61,7 +61,7 @@
           client_receiver,
       media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
       bool initially_muted,
-      const base::Optional<base::UnguessableToken>& stream_id) override {
+      const absl::optional<base::UnguessableToken>& stream_id) override {
     EXPECT_TRUE(stream_id.has_value());
     input_stream_.Bind(std::move(input_stream));
     client_receiver_ = std::move(client_receiver);
@@ -224,7 +224,7 @@
       .WillOnce(testing::DeleteArg<0>());
 
   std::move(stream_request_data.created_callback)
-      .Run(nullptr, kInitiallyMuted, base::nullopt);
+      .Run(nullptr, kInitiallyMuted, absl::nullopt);
 
   env.RunUntilIdle();
 }
diff --git a/content/browser/media/audio_loopback_stream_broker.cc b/content/browser/media/audio_loopback_stream_broker.cc
index 2ce319603..464a7df 100644
--- a/content/browser/media/audio_loopback_stream_broker.cc
+++ b/content/browser/media/audio_loopback_stream_broker.cc
@@ -115,7 +115,7 @@
   renderer_factory_client_->StreamCreated(
       std::move(stream), std::move(client_receiver_), std::move(data_pipe),
       false /* |initially_muted|: Loopback streams are never muted. */,
-      base::nullopt /* |stream_id|: Loopback streams don't have ids */);
+      absl::nullopt /* |stream_id|: Loopback streams don't have ids */);
 }
 
 void AudioLoopbackStreamBroker::Cleanup() {
diff --git a/content/browser/media/audio_loopback_stream_broker.h b/content/browser/media/audio_loopback_stream_broker.h
index 6cf2add..0218939 100644
--- a/content/browser/media/audio_loopback_stream_broker.h
+++ b/content/browser/media/audio_loopback_stream_broker.h
@@ -9,7 +9,6 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/media/audio_muting_session.h"
 #include "content/browser/media/audio_stream_broker.h"
 #include "content/common/content_export.h"
@@ -20,6 +19,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace audio {
 namespace mojom {
@@ -73,7 +73,7 @@
 
   // Constructed only if the loopback source playback should be muted while the
   // loopback stream is running.
-  base::Optional<AudioMutingSession> muter_;
+  absl::optional<AudioMutingSession> muter_;
 
   mojo::Remote<blink::mojom::RendererAudioInputStreamFactoryClient>
       renderer_factory_client_;
diff --git a/content/browser/media/audio_loopback_stream_broker_unittest.cc b/content/browser/media/audio_loopback_stream_broker_unittest.cc
index d0fc98c..6f3f077 100644
--- a/content/browser/media/audio_loopback_stream_broker_unittest.cc
+++ b/content/browser/media/audio_loopback_stream_broker_unittest.cc
@@ -77,7 +77,7 @@
           client_receiver,
       media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
       bool initially_muted,
-      const base::Optional<base::UnguessableToken>& stream_id) override {
+      const absl::optional<base::UnguessableToken>& stream_id) override {
     // Loopback streams have no stream ids.
     EXPECT_FALSE(stream_id.has_value());
     input_stream_.Bind(std::move(input_stream));
diff --git a/content/browser/media/audio_stream_broker.h b/content/browser/media/audio_stream_broker.h
index 7631a55..9213c51 100644
--- a/content/browser/media/audio_stream_broker.h
+++ b/content/browser/media/audio_stream_broker.h
@@ -11,11 +11,11 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "media/mojo/mojom/audio_input_stream.mojom.h"
 #include "media/mojo/mojom/audio_output_stream.mojom.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom.h"
 
 namespace base {
diff --git a/content/browser/media/capture/aura_window_video_capture_device.cc b/content/browser/media/capture/aura_window_video_capture_device.cc
index 8ae387aa..f07d584 100644
--- a/content/browser/media/capture/aura_window_video_capture_device.cc
+++ b/content/browser/media/capture/aura_window_video_capture_device.cc
@@ -11,7 +11,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/chromeos_buildflags.h"
 #include "content/browser/media/capture/mouse_cursor_overlay_controller.h"
@@ -21,6 +20,7 @@
 #include "media/base/bind_to_current_loop.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/aura/window.h"
 #include "ui/aura/window_observer.h"
 #include "ui/aura/window_occlusion_tracker.h"
@@ -142,7 +142,7 @@
 
   aura::Window* target_window_ = nullptr;
 #if BUILDFLAG(IS_CHROMEOS_ASH)
-  base::Optional<aura::WindowOcclusionTracker::ScopedForceVisible>
+  absl::optional<aura::WindowOcclusionTracker::ScopedForceVisible>
       force_visible_;
 #endif
 
diff --git a/content/browser/media/capture/content_capture_device_browsertest_base.h b/content/browser/media/capture/content_capture_device_browsertest_base.h
index a1d7253..af53641 100644
--- a/content/browser/media/capture/content_capture_device_browsertest_base.h
+++ b/content/browser/media/capture/content_capture_device_browsertest_base.h
@@ -9,12 +9,12 @@
 #include <string>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
 #include "content/browser/media/capture/fake_video_capture_stack.h"
 #include "content/public/test/content_browser_test.h"
 #include "media/capture/video_capture_types.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/skia/include/core/SkColor.h"
 #include "ui/gfx/geometry/size.h"
 
@@ -118,7 +118,7 @@
       const net::test_server::HttpRequest& request);
 
   FakeVideoCaptureStack capture_stack_;
-  base::Optional<gfx::Size> expected_source_size_;
+  absl::optional<gfx::Size> expected_source_size_;
   std::unique_ptr<FrameSinkVideoCaptureDevice> device_;
 
   // Arbitrary string constants used to refer to each document by
diff --git a/content/browser/media/capture/frame_sink_video_capture_device.cc b/content/browser/media/capture/frame_sink_video_capture_device.cc
index 5a80c72..a584d54 100644
--- a/content/browser/media/capture/frame_sink_video_capture_device.cc
+++ b/content/browser/media/capture/frame_sink_video_capture_device.cc
@@ -304,8 +304,8 @@
   target_ = frame_sink_id;
   if (capturer_) {
     capturer_->ChangeTarget(target_.is_valid()
-                                ? base::make_optional<viz::FrameSinkId>(target_)
-                                : base::nullopt,
+                                ? absl::make_optional<viz::FrameSinkId>(target_)
+                                : absl::nullopt,
                             viz::SubtreeCaptureId());
   }
 }
diff --git a/content/browser/media/capture/frame_sink_video_capture_device.h b/content/browser/media/capture/frame_sink_video_capture_device.h
index fe65ce0..5f1a92c 100644
--- a/content/browser/media/capture/frame_sink_video_capture_device.h
+++ b/content/browser/media/capture/frame_sink_video_capture_device.h
@@ -12,7 +12,6 @@
 
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
@@ -27,6 +26,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/device/public/mojom/wake_lock.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -164,7 +164,7 @@
 
   // Set when OnFatalError() is called. This prevents any future
   // AllocateAndStartWithReceiver() calls from succeeding.
-  base::Optional<std::string> fatal_error_message_;
+  absl::optional<std::string> fatal_error_message_;
 
   SEQUENCE_CHECKER(sequence_checker_);
 
diff --git a/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc b/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc
index c541b57..9d152086 100644
--- a/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc
+++ b/content/browser/media/capture/frame_sink_video_capture_device_unittest.cc
@@ -101,7 +101,7 @@
                     const gfx::Size& max_size,
                     bool use_fixed_aspect_ratio));
   MOCK_METHOD1(SetAutoThrottlingEnabled, void(bool));
-  void ChangeTarget(const base::Optional<viz::FrameSinkId>& frame_sink_id,
+  void ChangeTarget(const absl::optional<viz::FrameSinkId>& frame_sink_id,
                     const viz::SubtreeCaptureId& subtree_capture_id) final {
     DCHECK_NOT_ON_DEVICE_THREAD();
     MockChangeTarget(frame_sink_id ? *frame_sink_id : viz::FrameSinkId());
diff --git a/content/browser/media/capture/slow_window_capturer_chromeos.cc b/content/browser/media/capture/slow_window_capturer_chromeos.cc
index 1bd6a6d..5832477 100644
--- a/content/browser/media/capture/slow_window_capturer_chromeos.cc
+++ b/content/browser/media/capture/slow_window_capturer_chromeos.cc
@@ -101,7 +101,7 @@
 }
 
 void SlowWindowCapturerChromeOS::ChangeTarget(
-    const base::Optional<viz::FrameSinkId>& frame_sink_id,
+    const absl::optional<viz::FrameSinkId>& frame_sink_id,
     const viz::SubtreeCaptureId& subtree_capture_id) {
   // The SlowWindowCapturerChromeOS does not capture from compositor frame
   // sinks.
diff --git a/content/browser/media/capture/slow_window_capturer_chromeos.h b/content/browser/media/capture/slow_window_capturer_chromeos.h
index 3a2ec7f7..b019e7e 100644
--- a/content/browser/media/capture/slow_window_capturer_chromeos.h
+++ b/content/browser/media/capture/slow_window_capturer_chromeos.h
@@ -67,7 +67,7 @@
                                 const gfx::Size& max_size,
                                 bool use_fixed_aspect_ratio) final;
   void SetAutoThrottlingEnabled(bool enabled) final;
-  void ChangeTarget(const base::Optional<viz::FrameSinkId>& frame_sink_id,
+  void ChangeTarget(const absl::optional<viz::FrameSinkId>& frame_sink_id,
                     const viz::SubtreeCaptureId& subtree_capture_id) final;
   void Start(
       mojo::PendingRemote<viz::mojom::FrameSinkVideoConsumer> consumer) final;
diff --git a/content/browser/media/capture/web_contents_frame_tracker.cc b/content/browser/media/capture/web_contents_frame_tracker.cc
index 02a991aa..44205f6 100644
--- a/content/browser/media/capture/web_contents_frame_tracker.cc
+++ b/content/browser/media/capture/web_contents_frame_tracker.cc
@@ -43,7 +43,7 @@
   ~WebContentsContext() override = default;
 
   // WebContextFrameTracker::Context overrides.
-  base::Optional<gfx::Rect> GetScreenBounds() override {
+  absl::optional<gfx::Rect> GetScreenBounds() override {
     if (auto* view = GetCurrentView()) {
       // If we know the available size of the screen, we don't want to exceed
       // it as it may result in strange capture behavior in some cases.
@@ -51,7 +51,7 @@
       view->GetScreenInfo(&info);
       return info.rect;
     }
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   viz::FrameSinkId GetFrameSinkIdForCapture() override {
@@ -148,7 +148,7 @@
   // If we know the available size of the screen, we don't want to exceed
   // it as it may result in strange capture behavior in some cases.
   if (context_) {
-    const base::Optional<gfx::Rect> screen_bounds = context_->GetScreenBounds();
+    const absl::optional<gfx::Rect> screen_bounds = context_->GetScreenBounds();
     if (screen_bounds) {
       if (screen_bounds->size().IsEmpty()) {
         return {};
diff --git a/content/browser/media/capture/web_contents_frame_tracker.h b/content/browser/media/capture/web_contents_frame_tracker.h
index ab2ffb0..5fa85af 100644
--- a/content/browser/media/capture/web_contents_frame_tracker.h
+++ b/content/browser/media/capture/web_contents_frame_tracker.h
@@ -9,7 +9,6 @@
 
 #include "base/memory/scoped_refptr.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
@@ -17,6 +16,7 @@
 #include "content/public/browser/web_contents.h"
 #include "content/public/browser/web_contents_media_capture_id.h"
 #include "content/public/browser/web_contents_observer.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/gfx/geometry/size.h"
 #include "ui/gfx/native_widget_types.h"
 
@@ -40,7 +40,7 @@
     virtual ~Context() = default;
 
     // Get bounds of the attached screen, if any.
-    virtual base::Optional<gfx::Rect> GetScreenBounds() = 0;
+    virtual absl::optional<gfx::Rect> GetScreenBounds() = 0;
 
     // While the DOM always has a FrameSinkId, we may want to capture
     // a different frame sink ID overlaying the DOM content that represents
@@ -119,7 +119,7 @@
 
   // We may not have a frame sink ID target at all times.
   std::unique_ptr<Context> context_;
-  base::Optional<viz::FrameSinkId> target_frame_sink_id_;
+  absl::optional<viz::FrameSinkId> target_frame_sink_id_;
   gfx::NativeView target_native_view_ = gfx::NativeView();
 
   // Indicates whether the WebContents's capturer count needs to be
diff --git a/content/browser/media/capture/web_contents_frame_tracker_unittest.cc b/content/browser/media/capture/web_contents_frame_tracker_unittest.cc
index d278e11..573257a 100644
--- a/content/browser/media/capture/web_contents_frame_tracker_unittest.cc
+++ b/content/browser/media/capture/web_contents_frame_tracker_unittest.cc
@@ -36,7 +36,7 @@
   ~SimpleContext() override = default;
 
   // WebContentsFrameTracker::Context overrides.
-  base::Optional<gfx::Rect> GetScreenBounds() override {
+  absl::optional<gfx::Rect> GetScreenBounds() override {
     return screen_bounds_;
   }
   viz::FrameSinkId GetFrameSinkIdForCapture() override {
@@ -54,7 +54,7 @@
   void set_frame_sink_id(viz::FrameSinkId frame_sink_id) {
     frame_sink_id_ = frame_sink_id;
   }
-  void set_screen_bounds(base::Optional<gfx::Rect> screen_bounds) {
+  void set_screen_bounds(absl::optional<gfx::Rect> screen_bounds) {
     screen_bounds_ = std::move(screen_bounds);
   }
 
@@ -62,7 +62,7 @@
   int capturer_count_ = 0;
   viz::FrameSinkId frame_sink_id_;
   gfx::Size last_capture_size_;
-  base::Optional<gfx::Rect> screen_bounds_;
+  absl::optional<gfx::Rect> screen_bounds_;
 };
 
 // The capture device is mostly for interacting with the frame tracker. We do
diff --git a/content/browser/media/cdm_registry_impl.cc b/content/browser/media/cdm_registry_impl.cc
index df7d580..2a93d859 100644
--- a/content/browser/media/cdm_registry_impl.cc
+++ b/content/browser/media/cdm_registry_impl.cc
@@ -76,7 +76,7 @@
 bool CdmRegistryImpl::FinalizeCdmCapability(
     const std::string& key_system,
     CdmInfo::Robustness robustness,
-    base::Optional<media::CdmCapability> cdm_capability) {
+    absl::optional<media::CdmCapability> cdm_capability) {
   base::AutoLock auto_lock(lock_);
 
   auto itr = cdms_.begin();
diff --git a/content/browser/media/cdm_registry_impl.h b/content/browser/media/cdm_registry_impl.h
index ca286b1d..9ac86806 100644
--- a/content/browser/media/cdm_registry_impl.h
+++ b/content/browser/media/cdm_registry_impl.h
@@ -42,7 +42,7 @@
   bool FinalizeCdmCapability(
       const std::string& key_system,
       CdmInfo::Robustness robustness,
-      base::Optional<media::CdmCapability> cdm_capability);
+      absl::optional<media::CdmCapability> cdm_capability);
 
  private:
   friend class CdmRegistryImplTest;
diff --git a/content/browser/media/cdm_registry_impl_unittest.cc b/content/browser/media/cdm_registry_impl_unittest.cc
index a0362f0..d534d5a6 100644
--- a/content/browser/media/cdm_registry_impl_unittest.cc
+++ b/content/browser/media/cdm_registry_impl_unittest.cc
@@ -90,7 +90,7 @@
   void RegisterForLazyInitialization() {
     // Register a CdmInfo without CdmCapability to allow lazy initialization.
     Register(CdmInfo(kTestKeySystem, CdmInfo::Robustness::kSoftwareSecure,
-                     base::nullopt));
+                     absl::nullopt));
     auto cdm_info = cdm_registry_.GetCdmInfo(
         kTestKeySystem, CdmInfo::Robustness::kSoftwareSecure);
     ASSERT_TRUE(cdm_info);
@@ -254,7 +254,7 @@
 TEST_F(CdmRegistryImplTest, FinalizeCdmCapability_RemoveCdmInfo) {
   RegisterForLazyInitialization();
   EXPECT_FALSE(cdm_registry_.FinalizeCdmCapability(
-      kTestKeySystem, CdmInfo::Robustness::kSoftwareSecure, base::nullopt));
+      kTestKeySystem, CdmInfo::Robustness::kSoftwareSecure, absl::nullopt));
   EXPECT_FALSE(cdm_registry_.GetCdmInfo(kTestKeySystem,
                                         CdmInfo::Robustness::kSoftwareSecure));
 }
diff --git a/content/browser/media/flinging_renderer.cc b/content/browser/media/flinging_renderer.cc
index 456a34e6..f89d219a 100644
--- a/content/browser/media/flinging_renderer.cc
+++ b/content/browser/media/flinging_renderer.cc
@@ -73,7 +73,7 @@
 }
 
 void FlingingRenderer::SetLatencyHint(
-    base::Optional<base::TimeDelta> latency_hint) {}
+    absl::optional<base::TimeDelta> latency_hint) {}
 
 void FlingingRenderer::Flush(base::OnceClosure flush_cb) {
   DVLOG(2) << __func__;
diff --git a/content/browser/media/flinging_renderer.h b/content/browser/media/flinging_renderer.h
index 5eba7df4..36161ea 100644
--- a/content/browser/media/flinging_renderer.h
+++ b/content/browser/media/flinging_renderer.h
@@ -47,7 +47,7 @@
   void Initialize(media::MediaResource* media_resource,
                   media::RendererClient* client,
                   media::PipelineStatusCallback init_cb) override;
-  void SetLatencyHint(base::Optional<base::TimeDelta> latency_hint) override;
+  void SetLatencyHint(absl::optional<base::TimeDelta> latency_hint) override;
   void Flush(base::OnceClosure flush_cb) override;
   void StartPlayingFrom(base::TimeDelta time) override;
   void SetPlaybackRate(double playback_rate) override;
diff --git a/content/browser/media/forwarding_audio_stream_factory.h b/content/browser/media/forwarding_audio_stream_factory.h
index a20537a..051ed68 100644
--- a/content/browser/media/forwarding_audio_stream_factory.h
+++ b/content/browser/media/forwarding_audio_stream_factory.h
@@ -13,7 +13,6 @@
 #include "base/containers/unique_ptr_adapters.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/media/audio_muting_session.h"
 #include "content/browser/media/audio_stream_broker.h"
@@ -23,6 +22,7 @@
 #include "media/mojo/mojom/audio_stream_factory.mojom.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/media/renderer_audio_input_stream_factory.mojom.h"
 
 namespace media {
@@ -150,7 +150,7 @@
     int stream_id_counter_ = 0;
 
     // Instantiated when |outputs_| should be muted, empty otherwise.
-    base::Optional<AudioMutingSession> muter_;
+    absl::optional<AudioMutingSession> muter_;
 
     StreamBrokerSet inputs_;
     StreamBrokerSet outputs_;
diff --git a/content/browser/media/key_system_support_impl.cc b/content/browser/media/key_system_support_impl.cc
index 4877aa4..29c8b8f 100644
--- a/content/browser/media/key_system_support_impl.cc
+++ b/content/browser/media/key_system_support_impl.cc
@@ -44,12 +44,12 @@
 // Returns a CdmCapability with codecs specified on command line. Returns null
 // if kOverrideHardwareSecureCodecsForTesting was not specified or not valid
 // codecs specified.
-base::Optional<media::CdmCapability>
+absl::optional<media::CdmCapability>
 GetHardwareSecureCapabilityOverriddenFromCommandLine() {
   auto* command_line = base::CommandLine::ForCurrentProcess();
   if (!command_line || !command_line->HasSwitch(
                            switches::kOverrideHardwareSecureCodecsForTesting)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   auto overridden_codecs_string = command_line->GetSwitchValueASCII(
@@ -72,7 +72,7 @@
 
   if (video_codecs.empty()) {
     DVLOG(1) << "No codec codec specified on command line";
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   // Overridden codecs assume CENC and temporary session support.
@@ -85,13 +85,13 @@
 
 // Software secure capability can be obtained synchronously in all supported
 // cases. If needed, this can be easily converted to an asynchronous call.
-base::Optional<media::CdmCapability> GetSoftwareSecureCapability(
+absl::optional<media::CdmCapability> GetSoftwareSecureCapability(
     const std::string& key_system) {
   auto cdm_info = CdmRegistryImpl::GetInstance()->GetCdmInfo(
       key_system, CdmInfo::Robustness::kSoftwareSecure);
   if (!cdm_info) {
     SendCdmAvailableUMA(key_system, false);
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   SendCdmAvailableUMA(key_system, true);
@@ -99,7 +99,7 @@
   if (!cdm_info->capability) {
     DVLOG(1) << "Lazy initialization of SoftwareSecure CdmCapability not "
                 "supported!";
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return cdm_info->capability;
@@ -107,7 +107,7 @@
 
 // Trying to get hardware secure capability synchronously. If lazy
 // initialization is needed, set `lazy_initialize` to true.
-base::Optional<media::CdmCapability> GetHardwareSecureCapability(
+absl::optional<media::CdmCapability> GetHardwareSecureCapability(
     const std::string& key_system,
     bool* lazy_initialize) {
   *lazy_initialize = false;
@@ -118,7 +118,7 @@
 #if !BUILDFLAG(USE_CHROMEOS_PROTECTED_MEDIA)
   if (!base::FeatureList::IsEnabled(media::kHardwareSecureDecryption)) {
     DVLOG(1) << "Hardware secure decryption disabled";
-    return base::nullopt;
+    return absl::nullopt;
   }
 #endif
 
@@ -139,14 +139,14 @@
       command_line->HasSwitch(switches::kDisableAcceleratedVideoDecode)) {
     DVLOG(1) << "Hardware secure codecs not supported because accelerated "
                 "video decode disabled";
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   auto cdm_info = CdmRegistryImpl::GetInstance()->GetCdmInfo(
       key_system, CdmInfo::Robustness::kHardwareSecure);
   if (!cdm_info) {
     DVLOG(1) << "No Hardware secure decryption CDM registered";
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   if (cdm_info->capability) {
@@ -156,7 +156,7 @@
 
   DVLOG(1) << "Lazy initialization of CdmCapability";
   *lazy_initialize = true;
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace
@@ -220,7 +220,7 @@
   GetMediaFoundationServiceHardwareSecureCdmCapability(
       key_system, cdm_info->path, std::move(cdm_capability_cb));
 #else
-  std::move(cdm_capability_cb).Run(base::nullopt);
+  std::move(cdm_capability_cb).Run(absl::nullopt);
 #endif  // defined(OS_WIN)
 }
 
@@ -233,7 +233,7 @@
     const std::string& key_system,
     IsKeySystemSupportedCallback callback,
     bool lazy_initialize,
-    base::Optional<media::CdmCapability> hw_secure_capability) {
+    absl::optional<media::CdmCapability> hw_secure_capability) {
   // See comment above. This could be called multiple times when we have
   // parallel `IsKeySystemSupported()` calls from different renderer processes.
   // This is okay and won't cause collision or corruption of data.
diff --git a/content/browser/media/key_system_support_impl.h b/content/browser/media/key_system_support_impl.h
index 5a97c1f..8b035085 100644
--- a/content/browser/media/key_system_support_impl.h
+++ b/content/browser/media/key_system_support_impl.h
@@ -9,12 +9,12 @@
 #include <string>
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/common/cdm_info.h"
 #include "media/cdm/cdm_capability.h"
 #include "media/mojo/mojom/key_system_support.mojom.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -38,7 +38,7 @@
   friend class KeySystemSupportImplTest;
 
   using CdmCapabilityCB =
-      base::OnceCallback<void(base::Optional<media::CdmCapability>)>;
+      base::OnceCallback<void(absl::optional<media::CdmCapability>)>;
   using HardwareSecureCapabilityCB =
       base::RepeatingCallback<void(const std::string&, CdmCapabilityCB)>;
 
@@ -53,7 +53,7 @@
       const std::string& key_system,
       IsKeySystemSupportedCallback callback,
       bool lazy_initialize,
-      base::Optional<media::CdmCapability> hw_secure_capability);
+      absl::optional<media::CdmCapability> hw_secure_capability);
 
   HardwareSecureCapabilityCB hw_secure_capability_cb_for_testing_;
 
diff --git a/content/browser/media/key_system_support_impl_unittest.cc b/content/browser/media/key_system_support_impl_unittest.cc
index 743d5a7..77dd3db 100644
--- a/content/browser/media/key_system_support_impl_unittest.cc
+++ b/content/browser/media/key_system_support_impl_unittest.cc
@@ -103,7 +103,7 @@
   // Registers |key_system| with |capability|. All other values for CdmInfo have
   // some default value as they're not returned by IsKeySystemSupported().
   void Register(const std::string& key_system,
-                base::Optional<media::CdmCapability> capability,
+                absl::optional<media::CdmCapability> capability,
                 Robustness robustness = Robustness::kSoftwareSecure) {
     DVLOG(1) << __func__;
 
@@ -190,7 +190,7 @@
 
 TEST_F(KeySystemSupportImplTest, LazyInitialize_Supported) {
   scoped_feature_list_.InitAndEnableFeature(media::kHardwareSecureDecryption);
-  Register("KeySystem", base::nullopt, Robustness::kHardwareSecure);
+  Register("KeySystem", absl::nullopt, Robustness::kHardwareSecure);
 
   EXPECT_CALL(hw_secure_capability_cb_, Run("KeySystem", _))
       .WillOnce(RunOnceCallback<1>(TestCdmCapability()));
@@ -204,10 +204,10 @@
 
 TEST_F(KeySystemSupportImplTest, LazyInitialize_NotSupported) {
   scoped_feature_list_.InitAndEnableFeature(media::kHardwareSecureDecryption);
-  Register("KeySystem", base::nullopt, Robustness::kHardwareSecure);
+  Register("KeySystem", absl::nullopt, Robustness::kHardwareSecure);
 
   EXPECT_CALL(hw_secure_capability_cb_, Run("KeySystem", _))
-      .WillOnce(RunOnceCallback<1>(base::nullopt));
+      .WillOnce(RunOnceCallback<1>(absl::nullopt));
   EXPECT_FALSE(IsSupported("KeySystem"));
   EXPECT_FALSE(capability_);
 
@@ -219,7 +219,7 @@
 TEST_F(KeySystemSupportImplTest,
        LazyInitialize_HardwareSecureDecryptionDisabled) {
   scoped_feature_list_.InitAndDisableFeature(media::kHardwareSecureDecryption);
-  Register("KeySystem", base::nullopt, Robustness::kHardwareSecure);
+  Register("KeySystem", absl::nullopt, Robustness::kHardwareSecure);
 
   EXPECT_FALSE(IsSupported("KeySystem"));
   EXPECT_FALSE(capability_);
diff --git a/content/browser/media/key_system_support_win.cc b/content/browser/media/key_system_support_win.cc
index f39080b..9b41b4d 100644
--- a/content/browser/media/key_system_support_win.cc
+++ b/content/browser/media/key_system_support_win.cc
@@ -32,7 +32,7 @@
       key_system_capability->hw_secure_capability->video_codecs.empty() ||
       key_system_capability->hw_secure_capability->encryption_schemes.empty() ||
       key_system_capability->hw_secure_capability->session_types.empty()) {
-    std::move(cdm_capability_cb).Run(base::nullopt);
+    std::move(cdm_capability_cb).Run(absl::nullopt);
     return;
   }
 
@@ -47,7 +47,7 @@
     CdmCapabilityCB cdm_capability_cb) {
   if (!media::MediaFoundationCdm::IsAvailable()) {
     DVLOG(1) << "MediaFoundationCdm not available!";
-    std::move(cdm_capability_cb).Run(base::nullopt);
+    std::move(cdm_capability_cb).Run(absl::nullopt);
     return;
   }
 
diff --git a/content/browser/media/key_system_support_win.h b/content/browser/media/key_system_support_win.h
index e2d0f4f..c8696cd 100644
--- a/content/browser/media/key_system_support_win.h
+++ b/content/browser/media/key_system_support_win.h
@@ -9,14 +9,14 @@
 
 #include "base/callback.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "content/public/common/cdm_info.h"
 #include "media/cdm/cdm_capability.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
 using CdmCapabilityCB =
-    base::OnceCallback<void(base::Optional<media::CdmCapability>)>;
+    base::OnceCallback<void(absl::optional<media::CdmCapability>)>;
 
 // Returns the hardware secure CdmCapability supported in MediaFoundationService
 // for `key_system` by the CDM located in `cdm_path`.
diff --git a/content/browser/media/media_internals.cc b/content/browser/media/media_internals.cc
index 3c708c2..1ba5dd0 100644
--- a/content/browser/media/media_internals.cc
+++ b/content/browser/media/media_internals.cc
@@ -383,7 +383,7 @@
       break;
     case media::MediaLogRecord::Type::kMediaEventTriggered: {
       // Delete the "event" param so that it won't spam the log.
-      base::Optional<base::Value> exists = cloned_params.ExtractPath("event");
+      absl::optional<base::Value> exists = cloned_params.ExtractPath("event");
       DCHECK(exists.has_value());
       dict.SetKey("type", std::move(exists.value()));
       break;
diff --git a/content/browser/media/media_power_experiment_manager.cc b/content/browser/media/media_power_experiment_manager.cc
index b238923..ee7bcbe1 100644
--- a/content/browser/media/media_power_experiment_manager.cc
+++ b/content/browser/media/media_power_experiment_manager.cc
@@ -50,7 +50,7 @@
 void MediaPowerExperimentManager::CheckExperimentState() {
   // See if an experiment should be running.
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  base::Optional<MediaPlayerId> new_experiment_player;
+  absl::optional<MediaPlayerId> new_experiment_player;
   if (players_.size() == 1)
     new_experiment_player = players_.begin()->first;
 
diff --git a/content/browser/media/media_power_experiment_manager.h b/content/browser/media/media_power_experiment_manager.h
index 4bea182..bbc5effb 100644
--- a/content/browser/media/media_power_experiment_manager.h
+++ b/content/browser/media/media_power_experiment_manager.h
@@ -12,12 +12,12 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/sequenced_task_runner.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/media_player_id.h"
 #include "media/base/video_codecs.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -66,7 +66,7 @@
   std::map<MediaPlayerId, ExperimentCB> players_;
 
   // If set, this is the player that has a running experiment.
-  base::Optional<MediaPlayerId> current_experiment_player_;
+  absl::optional<MediaPlayerId> current_experiment_player_;
   ExperimentCB current_experiment_cb_;
 
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
diff --git a/content/browser/media/media_web_contents_observer.cc b/content/browser/media/media_web_contents_observer.cc
index bf7138a..4ec6332 100644
--- a/content/browser/media/media_web_contents_observer.cc
+++ b/content/browser/media/media_web_contents_observer.cc
@@ -40,7 +40,7 @@
 static void OnAudioOutputDeviceIdTranslated(
     base::WeakPtr<MediaWebContentsObserver> observer,
     const MediaPlayerId& player_id,
-    const base::Optional<std::string>& raw_device_id) {
+    const absl::optional<std::string>& raw_device_id) {
   if (!raw_device_id)
     return;
 
@@ -246,7 +246,7 @@
   return *picture_in_picture_allowed_in_fullscreen_;
 }
 
-const base::Optional<MediaPlayerId>&
+const absl::optional<MediaPlayerId>&
 MediaWebContentsObserver::GetFullscreenVideoMediaPlayerId() const {
   return fullscreen_player_;
 }
@@ -485,7 +485,7 @@
   auto callback_on_io_thread = base::BindOnce(
       [](const std::string& salt, const url::Origin& origin,
          const std::string& hashed_device_id,
-         base::OnceCallback<void(const base::Optional<std::string>&)>
+         base::OnceCallback<void(const absl::optional<std::string>&)>
              callback) {
         MediaStreamManager::GetMediaDeviceIDForHMAC(
             blink::mojom::MediaDeviceType::MEDIA_AUDIO_OUTPUT, salt,
diff --git a/content/browser/media/media_web_contents_observer.h b/content/browser/media/media_web_contents_observer.h
index 18136e25..fa144885 100644
--- a/content/browser/media/media_web_contents_observer.h
+++ b/content/browser/media/media_web_contents_observer.h
@@ -13,7 +13,6 @@
 #include "base/containers/flat_map.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/browser/media/media_power_experiment_manager.h"
 #include "content/browser/media/session/media_session_controllers_manager.h"
@@ -30,6 +29,7 @@
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/device/public/mojom/wake_lock.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if defined(OS_ANDROID)
 #include "ui/android/view_android.h"
@@ -81,7 +81,7 @@
   bool IsPictureInPictureAllowedForFullscreenVideo() const;
 
   // Gets the MediaPlayerId of the fullscreen video if it exists.
-  const base::Optional<MediaPlayerId>& GetFullscreenVideoMediaPlayerId() const;
+  const absl::optional<MediaPlayerId>& GetFullscreenVideoMediaPlayerId() const;
 
   // WebContentsObserver implementation.
   void WebContentsDestroyed() override;
@@ -273,8 +273,8 @@
   // Tracking variables and associated wake locks for media playback.
   PlayerInfoMap player_info_map_;
   mojo::Remote<device::mojom::WakeLock> audio_wake_lock_;
-  base::Optional<MediaPlayerId> fullscreen_player_;
-  base::Optional<bool> picture_in_picture_allowed_in_fullscreen_;
+  absl::optional<MediaPlayerId> fullscreen_player_;
+  absl::optional<bool> picture_in_picture_allowed_in_fullscreen_;
   bool has_audio_wake_lock_for_testing_ = false;
 
   std::unique_ptr<MediaSessionControllersManager> session_controllers_manager_;
diff --git a/content/browser/media/session/audio_focus_delegate.h b/content/browser/media/session/audio_focus_delegate.h
index fe6fdad9..8e0033a 100644
--- a/content/browser/media/session/audio_focus_delegate.h
+++ b/content/browser/media/session/audio_focus_delegate.h
@@ -36,7 +36,7 @@
   virtual void AbandonAudioFocus() = 0;
 
   // Retrieves the current |AudioFocusType| for the associated |MediaSession|.
-  virtual base::Optional<media_session::mojom::AudioFocusType>
+  virtual absl::optional<media_session::mojom::AudioFocusType>
   GetCurrentFocusType() const = 0;
 
   // |MediaSession| should call this when it's state changes.
diff --git a/content/browser/media/session/audio_focus_delegate_android.cc b/content/browser/media/session/audio_focus_delegate_android.cc
index c2baa37..e11270f 100644
--- a/content/browser/media/session/audio_focus_delegate_android.cc
+++ b/content/browser/media/session/audio_focus_delegate_android.cc
@@ -54,7 +54,7 @@
   Java_AudioFocusDelegate_abandonAudioFocus(env, j_media_session_delegate_);
 }
 
-base::Optional<media_session::mojom::AudioFocusType>
+absl::optional<media_session::mojom::AudioFocusType>
 AudioFocusDelegateAndroid::GetCurrentFocusType() const {
   JNIEnv* env = base::android::AttachCurrentThread();
   DCHECK(env);
diff --git a/content/browser/media/session/audio_focus_delegate_android.h b/content/browser/media/session/audio_focus_delegate_android.h
index bca44484..de3174b 100644
--- a/content/browser/media/session/audio_focus_delegate_android.h
+++ b/content/browser/media/session/audio_focus_delegate_android.h
@@ -30,7 +30,7 @@
   AudioFocusResult RequestAudioFocus(
       media_session::mojom::AudioFocusType audio_focus_type) override;
   void AbandonAudioFocus() override;
-  base::Optional<media_session::mojom::AudioFocusType> GetCurrentFocusType()
+  absl::optional<media_session::mojom::AudioFocusType> GetCurrentFocusType()
       const override;
   const base::UnguessableToken& request_id() const override;
 
diff --git a/content/browser/media/session/audio_focus_delegate_default.cc b/content/browser/media/session/audio_focus_delegate_default.cc
index 6b498d1f..b7dc5d2 100644
--- a/content/browser/media/session/audio_focus_delegate_default.cc
+++ b/content/browser/media/session/audio_focus_delegate_default.cc
@@ -47,7 +47,7 @@
   // AudioFocusDelegate implementation.
   AudioFocusResult RequestAudioFocus(AudioFocusType audio_focus_type) override;
   void AbandonAudioFocus() override;
-  base::Optional<media_session::mojom::AudioFocusType> GetCurrentFocusType()
+  absl::optional<media_session::mojom::AudioFocusType> GetCurrentFocusType()
       const override;
   void MediaSessionInfoChanged(
       const media_session::mojom::MediaSessionInfoPtr&) override;
@@ -77,7 +77,7 @@
   MediaSessionImpl* media_session_;
 
   // The last requested AudioFocusType by the associated |media_session_|.
-  base::Optional<AudioFocusType> audio_focus_type_;
+  absl::optional<AudioFocusType> audio_focus_type_;
 
   // ID to uniquely identify the audio focus delegate.
   base::UnguessableToken const request_id_ = base::UnguessableToken::Create();
@@ -142,7 +142,7 @@
   audio_focus_.reset();
 }
 
-base::Optional<media_session::mojom::AudioFocusType>
+absl::optional<media_session::mojom::AudioFocusType>
 AudioFocusDelegateDefault::GetCurrentFocusType() const {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   return audio_focus_type_;
diff --git a/content/browser/media/session/media_session_android.cc b/content/browser/media/session/media_session_android.cc
index eaad905..8ce73f1 100644
--- a/content/browser/media/session/media_session_android.cc
+++ b/content/browser/media/session/media_session_android.cc
@@ -100,7 +100,7 @@
 }
 
 void MediaSessionAndroid::MediaSessionMetadataChanged(
-    const base::Optional<media_session::MediaMetadata>& metadata) {
+    const absl::optional<media_session::MediaMetadata>& metadata) {
   ScopedJavaLocalRef<jobject> j_local_session = GetJavaObject();
   if (j_local_session.is_null())
     return;
@@ -157,7 +157,7 @@
 }
 
 void MediaSessionAndroid::MediaSessionPositionChanged(
-    const base::Optional<media_session::MediaPosition>& position) {
+    const absl::optional<media_session::MediaPosition>& position) {
   ScopedJavaLocalRef<jobject> j_local_session = GetJavaObject();
   if (j_local_session.is_null())
     return;
diff --git a/content/browser/media/session/media_session_android.h b/content/browser/media/session/media_session_android.h
index 4b5c51c..0e0995d 100644
--- a/content/browser/media/session/media_session_android.h
+++ b/content/browser/media/session/media_session_android.h
@@ -37,7 +37,7 @@
   void MediaSessionInfoChanged(
       media_session::mojom::MediaSessionInfoPtr session_info) override;
   void MediaSessionMetadataChanged(
-      const base::Optional<media_session::MediaMetadata>& metadata) override;
+      const absl::optional<media_session::MediaMetadata>& metadata) override;
   void MediaSessionActionsChanged(
       const std::vector<media_session::mojom::MediaSessionAction>& action)
       override;
@@ -46,7 +46,7 @@
                            std::vector<media_session::MediaImage>>& images)
       override;
   void MediaSessionPositionChanged(
-      const base::Optional<media_session::MediaPosition>& position) override;
+      const absl::optional<media_session::MediaPosition>& position) override;
 
   // MediaSession method wrappers.
   void Resume(JNIEnv* env, const base::android::JavaParamRef<jobject>& j_obj);
diff --git a/content/browser/media/session/media_session_browsertest.cc b/content/browser/media/session/media_session_browsertest.cc
index 76e6ba5..a226e65e 100644
--- a/content/browser/media/session/media_session_browsertest.cc
+++ b/content/browser/media/session/media_session_browsertest.cc
@@ -7,7 +7,6 @@
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/containers/contains.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/synchronization/lock.h"
@@ -32,6 +31,7 @@
 #include "services/media_session/public/cpp/features.h"
 #include "services/media_session/public/cpp/test/audio_focus_test_util.h"
 #include "services/media_session/public/cpp/test/mock_media_session.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -70,7 +70,7 @@
   }
 
   base::RunLoop run_loop_;
-  base::Optional<SkBitmap> bitmap_;
+  absl::optional<SkBitmap> bitmap_;
 
   DISALLOW_COPY_AND_ASSIGN(MediaImageGetterHelper);
 };
diff --git a/content/browser/media/session/media_session_controller.cc b/content/browser/media/session/media_session_controller.cc
index bc5b2c3..13688d95 100644
--- a/content/browser/media/session/media_session_controller.cc
+++ b/content/browser/media/session/media_session_controller.cc
@@ -145,7 +145,7 @@
   return RenderFrameHost::FromID(id_.frame_routing_id);
 }
 
-base::Optional<media_session::MediaPosition>
+absl::optional<media_session::MediaPosition>
 MediaSessionController::GetPosition(int player_id) const {
   DCHECK_EQ(player_id_, player_id);
   return position_;
diff --git a/content/browser/media/session/media_session_controller.h b/content/browser/media/session/media_session_controller.h
index d3ded513..907f2a0 100644
--- a/content/browser/media/session/media_session_controller.h
+++ b/content/browser/media/session/media_session_controller.h
@@ -7,7 +7,6 @@
 
 #include "base/compiler_specific.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/media/session/media_session_player_observer.h"
 #include "content/common/content_export.h"
@@ -16,6 +15,7 @@
 #include "media/audio/audio_device_description.h"
 #include "media/base/media_content_type.h"
 #include "services/media_session/public/cpp/media_position.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -61,7 +61,7 @@
   void OnSetAudioSinkId(int player_id,
                         const std::string& raw_device_id) override;
   RenderFrameHost* render_frame_host() const override;
-  base::Optional<media_session::MediaPosition> GetPosition(
+  absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const override;
   bool IsPictureInPictureAvailable(int player_id) const override;
   bool HasAudio(int player_id) const override;
@@ -106,7 +106,7 @@
   // Outlives |this|.
   MediaSessionImpl* const media_session_;
 
-  base::Optional<media_session::MediaPosition> position_;
+  absl::optional<media_session::MediaPosition> position_;
 
   // These objects are only created on the UI thread, so this is safe.
   static int player_count_;
diff --git a/content/browser/media/session/media_session_controller_unittest.cc b/content/browser/media/session/media_session_controller_unittest.cc
index 4c31080..8e7a205 100644
--- a/content/browser/media/session/media_session_controller_unittest.cc
+++ b/content/browser/media/session/media_session_controller_unittest.cc
@@ -34,7 +34,7 @@
     return audio_focus_result_;
   }
   void AbandonAudioFocus() override { audio_focus_type_.reset(); }
-  base::Optional<media_session::mojom::AudioFocusType> GetCurrentFocusType()
+  absl::optional<media_session::mojom::AudioFocusType> GetCurrentFocusType()
       const override {
     return audio_focus_type_;
   }
@@ -45,7 +45,7 @@
   }
 
  private:
-  base::Optional<media_session::mojom::AudioFocusType> audio_focus_type_;
+  absl::optional<media_session::mojom::AudioFocusType> audio_focus_type_;
   AudioFocusResult audio_focus_result_ = AudioFocusResult::kSuccess;
 };
 
diff --git a/content/browser/media/session/media_session_impl.cc b/content/browser/media/session/media_session_impl.cc
index 96021a0..ce8638f 100644
--- a/content/browser/media/session/media_session_impl.cc
+++ b/content/browser/media/session/media_session_impl.cc
@@ -399,7 +399,7 @@
   // also transient, there is also nothing to do. Otherwise, the session needs
   // to request audio focus again.
   if (audio_focus_state_ == State::ACTIVE) {
-    base::Optional<AudioFocusType> current_focus_type =
+    absl::optional<AudioFocusType> current_focus_type =
         delegate_->GetCurrentFocusType();
     if (current_focus_type == AudioFocusType::kGain ||
         current_focus_type == required_audio_focus_type) {
@@ -526,7 +526,7 @@
 }
 
 void MediaSessionImpl::RebuildAndNotifyMediaPositionChanged() {
-  base::Optional<media_session::MediaPosition> position;
+  absl::optional<media_session::MediaPosition> position;
 
   // If there was a position specified from Blink then we should use that.
   if (routed_service_ && routed_service_->position())
@@ -1136,7 +1136,7 @@
       normal_players_.begin()->first.player_id);
 }
 
-void MediaSessionImpl::SetAudioSinkId(const base::Optional<std::string>& id) {
+void MediaSessionImpl::SetAudioSinkId(const absl::optional<std::string>& id) {
   audio_device_id_for_origin_ = id;
 
   for (const auto& it : normal_players_) {
diff --git a/content/browser/media/session/media_session_impl.h b/content/browser/media/session/media_session_impl.h
index b44ea5a..cde2af0 100644
--- a/content/browser/media/session/media_session_impl.h
+++ b/content/browser/media/session/media_session_impl.h
@@ -15,7 +15,6 @@
 #include "base/containers/flat_set.h"
 #include "base/containers/id_map.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/timer/timer.h"
 #include "content/browser/media/session/audio_focus_delegate.h"
 #include "content/browser/media/session/media_session_uma_helper.h"
@@ -26,6 +25,7 @@
 #include "mojo/public/cpp/bindings/receiver_set.h"
 #include "mojo/public/cpp/bindings/remote_set.h"
 #include "services/media_session/public/mojom/audio_focus.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/favicon/favicon_url.mojom.h"
 #include "third_party/blink/public/mojom/mediasession/media_session.mojom.h"
 
@@ -265,7 +265,7 @@
   // rerouted. This setting persists until cross-origin navigation occurs, the
   // renderer reports an audio sink change to a device different from |id|, or
   // this method is called again.
-  void SetAudioSinkId(const base::Optional<std::string>& id) override;
+  void SetAudioSinkId(const absl::optional<std::string>& id) override;
 
   // Mute/Unmute the microphone for a WebRTC session.
   void ToggleMicrophone() override;
@@ -465,7 +465,7 @@
   media_session::mojom::MediaSessionInfoPtr session_info_;
 
   // The last updated |MediaPosition| that was sent to |observers_|.
-  base::Optional<media_session::MediaPosition> position_;
+  absl::optional<media_session::MediaPosition> position_;
 
   MediaSessionUmaHelper uma_helper_;
 
@@ -484,7 +484,7 @@
   // Used to persist audio device selection between navigations on the same
   // origin.
   url::Origin origin_;
-  base::Optional<std::string> audio_device_id_for_origin_;
+  absl::optional<std::string> audio_device_id_for_origin_;
 
 #if defined(OS_ANDROID)
   std::unique_ptr<MediaSessionAndroid> session_android_;
diff --git a/content/browser/media/session/media_session_impl_browsertest.cc b/content/browser/media/session/media_session_impl_browsertest.cc
index d3e9938..a8e154f 100644
--- a/content/browser/media/session/media_session_impl_browsertest.cc
+++ b/content/browser/media/session/media_session_impl_browsertest.cc
@@ -82,7 +82,7 @@
     }
   }
 
-  base::Optional<AudioFocusType> GetCurrentFocusType() const {
+  absl::optional<AudioFocusType> GetCurrentFocusType() const {
     return audio_focus_type_;
   }
 
@@ -116,7 +116,7 @@
   const bool async_mode_ = false;
 
   std::list<AudioFocusType> requests_;
-  base::Optional<AudioFocusType> audio_focus_type_;
+  absl::optional<AudioFocusType> audio_focus_type_;
 };
 
 }  // namespace
@@ -196,7 +196,7 @@
 
   bool IsActive() { return media_session_->IsActive(); }
 
-  base::Optional<AudioFocusType> GetSessionAudioFocusType() {
+  absl::optional<AudioFocusType> GetSessionAudioFocusType() {
     return mock_audio_focus_delegate_->GetCurrentFocusType();
   }
 
diff --git a/content/browser/media/session/media_session_impl_service_routing_unittest.cc b/content/browser/media/session/media_session_impl_service_routing_unittest.cc
index b95bec80..0543af5 100644
--- a/content/browser/media/session/media_session_impl_service_routing_unittest.cc
+++ b/content/browser/media/session/media_session_impl_service_routing_unittest.cc
@@ -59,13 +59,13 @@
   MOCK_METHOD2(OnSetAudioSinkId,
                void(int player_id, const std::string& raw_device_id));
 
-  base::Optional<media_session::MediaPosition> GetPosition(
+  absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const override {
     return position_;
   }
 
   void SetPosition(
-      const base::Optional<media_session::MediaPosition>& position) {
+      const absl::optional<media_session::MediaPosition>& position) {
     position_ = position;
   }
 
@@ -98,7 +98,7 @@
 
   const media_session::mojom::MediaAudioVideoState audio_video_state_;
 
-  base::Optional<media_session::MediaPosition> position_;
+  absl::optional<media_session::MediaPosition> position_;
 };
 
 }  // anonymous namespace
@@ -1051,7 +1051,7 @@
 
   observer.WaitForExpectedPosition(expected_position);
 
-  services_[main_frame_]->SetPositionState(base::nullopt);
+  services_[main_frame_]->SetPositionState(absl::nullopt);
 
   EXPECT_EQ(services_[main_frame_].get(), ComputeServiceForRouting());
 
diff --git a/content/browser/media/session/media_session_impl_uma_unittest.cc b/content/browser/media/session/media_session_impl_uma_unittest.cc
index d58439e..468039d 100644
--- a/content/browser/media/session/media_session_impl_uma_unittest.cc
+++ b/content/browser/media/session/media_session_impl_uma_unittest.cc
@@ -45,9 +45,9 @@
   void OnSetAudioSinkId(int player_id,
                         const std::string& raw_device_id) override {}
 
-  base::Optional<media_session::MediaPosition> GetPosition(
+  absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const override {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   bool IsPictureInPictureAvailable(int player_id) const override {
diff --git a/content/browser/media/session/media_session_impl_unittest.cc b/content/browser/media/session/media_session_impl_unittest.cc
index 69fc323..a529333f 100644
--- a/content/browser/media/session/media_session_impl_unittest.cc
+++ b/content/browser/media/session/media_session_impl_unittest.cc
@@ -51,7 +51,7 @@
     return AudioFocusResult::kSuccess;
   }
 
-  base::Optional<AudioFocusType> GetCurrentFocusType() const override {
+  absl::optional<AudioFocusType> GetCurrentFocusType() const override {
     return AudioFocusType::kGain;
   }
 
diff --git a/content/browser/media/session/media_session_player_observer.h b/content/browser/media/session/media_session_player_observer.h
index 671ae6d..b327e59 100644
--- a/content/browser/media/session/media_session_player_observer.h
+++ b/content/browser/media/session/media_session_player_observer.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_
 #define CONTENT_BROWSER_MEDIA_SESSION_MEDIA_SESSION_PLAYER_OBSERVER_H_
 
-#include "base/optional.h"
 #include "base/time/time.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace media_session {
 struct MediaPosition;
@@ -53,7 +53,7 @@
                                 const std::string& raw_device_id) = 0;
 
   // Returns the position for |player_id|.
-  virtual base::Optional<media_session::MediaPosition> GetPosition(
+  virtual absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const = 0;
 
   // Returns if picture-in-picture is available for |player_id|.
diff --git a/content/browser/media/session/media_session_service_impl.cc b/content/browser/media/session/media_session_service_impl.cc
index 6444598b..57ee925 100644
--- a/content/browser/media/session/media_session_service_impl.cc
+++ b/content/browser/media/session/media_session_service_impl.cc
@@ -73,7 +73,7 @@
 }
 
 void MediaSessionServiceImpl::SetPositionState(
-    const base::Optional<media_session::MediaPosition>& position) {
+    const absl::optional<media_session::MediaPosition>& position) {
   position_ = position;
   MediaSessionImpl* session = GetMediaSession();
   if (session)
diff --git a/content/browser/media/session/media_session_service_impl.h b/content/browser/media/session/media_session_service_impl.h
index 1d7311c2..1bd0870 100644
--- a/content/browser/media/session/media_session_service_impl.h
+++ b/content/browser/media/session/media_session_service_impl.h
@@ -44,7 +44,7 @@
   const std::set<media_session::mojom::MediaSessionAction>& actions() const {
     return actions_;
   }
-  const base::Optional<media_session::MediaPosition>& position() const {
+  const absl::optional<media_session::MediaPosition>& position() const {
     return position_;
   }
   media_session::mojom::MicrophoneState microphone_state() const {
@@ -63,7 +63,7 @@
 
   void SetPlaybackState(blink::mojom::MediaSessionPlaybackState state) override;
   void SetPositionState(
-      const base::Optional<media_session::MediaPosition>& position) override;
+      const absl::optional<media_session::MediaPosition>& position) override;
   void SetMetadata(blink::mojom::SpecMediaMetadataPtr metadata) override;
   void SetMicrophoneState(
       media_session::mojom::MicrophoneState microphone_state) override;
@@ -91,7 +91,7 @@
   blink::mojom::MediaSessionPlaybackState playback_state_;
   blink::mojom::SpecMediaMetadataPtr metadata_;
   std::set<media_session::mojom::MediaSessionAction> actions_;
-  base::Optional<media_session::MediaPosition> position_;
+  absl::optional<media_session::MediaPosition> position_;
 
   // Tracks whether the microphone is muted in a WebRTC session.
   media_session::mojom::MicrophoneState microphone_state_ =
diff --git a/content/browser/media/session/media_session_service_impl_browsertest.cc b/content/browser/media/session/media_session_service_impl_browsertest.cc
index 771c14e..8664d81 100644
--- a/content/browser/media/session/media_session_service_impl_browsertest.cc
+++ b/content/browser/media/session/media_session_service_impl_browsertest.cc
@@ -62,9 +62,9 @@
   void OnSetAudioSinkId(int player_id,
                         const std::string& raw_device_id) override {}
 
-  base::Optional<media_session::MediaPosition> GetPosition(
+  absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const override {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   bool IsPictureInPictureAvailable(int player_id) const override {
diff --git a/content/browser/media/session/mock_media_session_player_observer.cc b/content/browser/media/session/mock_media_session_player_observer.cc
index b7d299d..2a7e548 100644
--- a/content/browser/media/session/mock_media_session_player_observer.cc
+++ b/content/browser/media/session/mock_media_session_player_observer.cc
@@ -89,7 +89,7 @@
   players_[player_id].audio_sink_id_ = raw_device_id;
 }
 
-base::Optional<media_session::MediaPosition>
+absl::optional<media_session::MediaPosition>
 MockMediaSessionPlayerObserver::GetPosition(int player_id) const {
   EXPECT_GE(player_id, 0);
   EXPECT_GT(players_.size(), static_cast<size_t>(player_id));
diff --git a/content/browser/media/session/mock_media_session_player_observer.h b/content/browser/media/session/mock_media_session_player_observer.h
index 3ee698e..09b0747 100644
--- a/content/browser/media/session/mock_media_session_player_observer.h
+++ b/content/browser/media/session/mock_media_session_player_observer.h
@@ -34,7 +34,7 @@
   void OnExitPictureInPicture(int player_id) override;
   void OnSetAudioSinkId(int player_id,
                         const std::string& raw_device_id) override;
-  base::Optional<media_session::MediaPosition> GetPosition(
+  absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const override;
   bool IsPictureInPictureAvailable(int player_id) const override;
   RenderFrameHost* render_frame_host() const override;
@@ -82,7 +82,7 @@
 
     bool is_playing_;
     double volume_multiplier_;
-    base::Optional<media_session::MediaPosition> position_;
+    absl::optional<media_session::MediaPosition> position_;
     bool is_in_picture_in_picture_;
     std::string audio_sink_id_ =
         media::AudioDeviceDescription::kDefaultDeviceId;
diff --git a/content/browser/media/session/pepper_player_delegate.cc b/content/browser/media/session/pepper_player_delegate.cc
index 8635055..e50b05f 100644
--- a/content/browser/media/session/pepper_player_delegate.cc
+++ b/content/browser/media/session/pepper_player_delegate.cc
@@ -80,11 +80,11 @@
   NOTREACHED();
 }
 
-base::Optional<media_session::MediaPosition> PepperPlayerDelegate::GetPosition(
+absl::optional<media_session::MediaPosition> PepperPlayerDelegate::GetPosition(
     int player_id) const {
   // Pepper does not support position data.
   DCHECK_EQ(player_id, kPlayerId);
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool PepperPlayerDelegate::IsPictureInPictureAvailable(int player_id) const {
diff --git a/content/browser/media/session/pepper_player_delegate.h b/content/browser/media/session/pepper_player_delegate.h
index 011b16b..a5991aa 100644
--- a/content/browser/media/session/pepper_player_delegate.h
+++ b/content/browser/media/session/pepper_player_delegate.h
@@ -34,7 +34,7 @@
   void OnExitPictureInPicture(int player_id) override;
   void OnSetAudioSinkId(int player_id,
                         const std::string& raw_device_id) override;
-  base::Optional<media_session::MediaPosition> GetPosition(
+  absl::optional<media_session::MediaPosition> GetPosition(
       int player_id) const override;
   bool IsPictureInPictureAvailable(int player_id) const override;
   RenderFrameHost* render_frame_host() const override;
diff --git a/content/browser/media/system_media_controls_notifier.cc b/content/browser/media/system_media_controls_notifier.cc
index 9f78d4ad..4f07d9f 100644
--- a/content/browser/media/system_media_controls_notifier.cc
+++ b/content/browser/media/system_media_controls_notifier.cc
@@ -112,7 +112,7 @@
 }
 
 void SystemMediaControlsNotifier::MediaSessionMetadataChanged(
-    const base::Optional<media_session::MediaMetadata>& metadata) {
+    const absl::optional<media_session::MediaMetadata>& metadata) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
   if (metadata.has_value()) {
@@ -164,7 +164,7 @@
     // If no images are fetched in the fetch image algorithm, the user agent
     // may have fallback behavior such as displaying a default image as artwork.
     // We display the application icon if no artwork is provided.
-    base::Optional<gfx::ImageSkia> icon =
+    absl::optional<gfx::ImageSkia> icon =
         GetContentClient()->browser()->GetProductLogo();
     if (icon.has_value())
       system_media_controls_->SetThumbnail(*icon->bitmap());
@@ -174,7 +174,7 @@
 }
 
 void SystemMediaControlsNotifier::MediaSessionPositionChanged(
-    const base::Optional<media_session::MediaPosition>& position) {
+    const absl::optional<media_session::MediaPosition>& position) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
   if (position) {
diff --git a/content/browser/media/system_media_controls_notifier.h b/content/browser/media/system_media_controls_notifier.h
index 06763629..c62c694 100644
--- a/content/browser/media/system_media_controls_notifier.h
+++ b/content/browser/media/system_media_controls_notifier.h
@@ -41,14 +41,14 @@
   void MediaSessionInfoChanged(
       media_session::mojom::MediaSessionInfoPtr session_info) override;
   void MediaSessionMetadataChanged(
-      const base::Optional<media_session::MediaMetadata>& metadata) override;
+      const absl::optional<media_session::MediaMetadata>& metadata) override;
   void MediaSessionActionsChanged(
       const std::vector<media_session::mojom::MediaSessionAction>& actions)
       override;
   void MediaSessionChanged(
-      const base::Optional<base::UnguessableToken>& request_id) override {}
+      const absl::optional<base::UnguessableToken>& request_id) override {}
   void MediaSessionPositionChanged(
-      const base::Optional<media_session::MediaPosition>& position) override;
+      const absl::optional<media_session::MediaPosition>& position) override;
 
   // media_session::mojom::MediaControllerImageObserver implementation.
   void MediaControllerImageChanged(
diff --git a/content/browser/media/system_media_controls_notifier_unittest.cc b/content/browser/media/system_media_controls_notifier_unittest.cc
index b7a1818..546212b3 100644
--- a/content/browser/media/system_media_controls_notifier_unittest.cc
+++ b/content/browser/media/system_media_controls_notifier_unittest.cc
@@ -62,9 +62,9 @@
       metadata.title = title;
       metadata.artist = artist;
       notifier_->MediaSessionMetadataChanged(
-          base::Optional<media_session::MediaMetadata>(metadata));
+          absl::optional<media_session::MediaMetadata>(metadata));
     } else {
-      notifier_->MediaSessionMetadataChanged(base::nullopt);
+      notifier_->MediaSessionMetadataChanged(absl::nullopt);
     }
   }
 
diff --git a/content/browser/message_port_provider.cc b/content/browser/message_port_provider.cc
index 036c679..59163df0 100644
--- a/content/browser/message_port_provider.cc
+++ b/content/browser/message_port_provider.cc
@@ -6,7 +6,6 @@
 
 #include <utility>
 
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "build/build_config.h"
 #include "build/chromecast_buildflags.h"
@@ -14,6 +13,7 @@
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/messaging/string_message_codec.h"
 
 #if defined(OS_ANDROID)
@@ -47,7 +47,7 @@
 
   RenderFrameHostImpl* rfh =
       static_cast<RenderFrameHostImpl*>(web_contents->GetMainFrame());
-  rfh->PostMessageEvent(base::nullopt, source_origin, target_origin,
+  rfh->PostMessageEvent(absl::nullopt, source_origin, target_origin,
                         std::move(message));
 }
 
@@ -92,7 +92,7 @@
 void MessagePortProvider::PostMessageToFrame(
     WebContents* web_contents,
     const std::u16string& source_origin,
-    const base::Optional<std::u16string>& target_origin,
+    const absl::optional<std::u16string>& target_origin,
     const std::u16string& data,
     std::vector<blink::WebMessagePort> ports) {
   // Extract the underlying descriptors.
diff --git a/content/browser/mojo_sandbox_browsertest.cc b/content/browser/mojo_sandbox_browsertest.cc
index 45d8c86d2..6984992 100644
--- a/content/browser/mojo_sandbox_browsertest.cc
+++ b/content/browser/mojo_sandbox_browsertest.cc
@@ -178,7 +178,7 @@
   // The browser should not be considered sandboxed.
   EXPECT_FALSE(sandbox::policy::Sandbox::IsProcessSandboxed());
 
-  base::Optional<bool> maybe_is_sandboxed;
+  absl::optional<bool> maybe_is_sandboxed;
   base::RunLoop run_loop;
   test_service.set_disconnect_handler(run_loop.QuitClosure());
   test_service->IsProcessSandboxed(
@@ -200,7 +200,7 @@
   // The browser should not be considered sandboxed.
   EXPECT_FALSE(sandbox::policy::Sandbox::IsProcessSandboxed());
 
-  base::Optional<bool> maybe_is_sandboxed;
+  absl::optional<bool> maybe_is_sandboxed;
   base::RunLoop run_loop;
   test_service.set_disconnect_handler(run_loop.QuitClosure());
   test_service->IsProcessSandboxed(
diff --git a/content/browser/navigation_browsertest.cc b/content/browser/navigation_browsertest.cc
index c8161892..8ffbc174 100644
--- a/content/browser/navigation_browsertest.cc
+++ b/content/browser/navigation_browsertest.cc
@@ -829,7 +829,7 @@
   EXPECT_TRUE(NavigateToURL(shell(), url));
   monitor.WaitForUrls();
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(url);
   ASSERT_TRUE(request->trusted_params);
   EXPECT_TRUE(net::IsolationInfo::Create(
@@ -848,7 +848,7 @@
   EXPECT_TRUE(NavigateToURLFromRenderer(shell(), url));
   monitor.WaitForUrls();
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(url);
   ASSERT_TRUE(request->trusted_params);
   EXPECT_TRUE(net::IsolationInfo::Create(
@@ -868,7 +868,7 @@
   EXPECT_TRUE(NavigateToURL(shell(), url));
   monitor.WaitForUrls();
 
-  base::Optional<network::ResourceRequest> main_frame_request =
+  absl::optional<network::ResourceRequest> main_frame_request =
       monitor.GetRequestInfo(url);
   ASSERT_TRUE(main_frame_request.has_value());
   ASSERT_TRUE(main_frame_request->trusted_params);
@@ -879,7 +879,7 @@
                   .IsEqualForTesting(
                       main_frame_request->trusted_params->isolation_info));
 
-  base::Optional<network::ResourceRequest> iframe_request =
+  absl::optional<network::ResourceRequest> iframe_request =
       monitor.GetRequestInfo(iframe_document);
   ASSERT_TRUE(iframe_request->trusted_params);
   EXPECT_TRUE(
@@ -900,7 +900,7 @@
   // Perform the actual navigation.
   EXPECT_TRUE(NavigateToURL(shell(), url));
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(url);
   ASSERT_TRUE(request.has_value());
   ASSERT_FALSE(request->request_initiator.has_value());
@@ -922,7 +922,7 @@
   // Perform the actual navigation.
   EXPECT_TRUE(NavigateToURLFromRenderer(shell(), url));
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(url);
   ASSERT_TRUE(request.has_value());
   EXPECT_EQ(starting_page_origin, request->request_initiator);
@@ -963,7 +963,7 @@
   starting_page_origin = starting_page_origin.Create(starting_page);
 
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(url);
   EXPECT_EQ(starting_page_origin, request->request_initiator);
 }
@@ -1005,7 +1005,7 @@
   url::Origin starting_page_origin;
   starting_page_origin = starting_page_origin.Create(starting_page);
 
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(url);
   ASSERT_TRUE(request.has_value());
   EXPECT_EQ(starting_page_origin, request->request_initiator);
@@ -3499,7 +3499,7 @@
   void set_disallowed_process(int id) { disallowed_process_id_ = id; }
 
  private:
-  base::Optional<GURL> effective_url_;
+  absl::optional<GURL> effective_url_;
   int disallowed_process_id_ = 0;
 };
 
@@ -3663,7 +3663,7 @@
       web_contents(), base::BindLambdaForTesting([&](NavigationHandle* handle) {
         auto* request = NavigationRequest::From(handle);
 
-        const base::Optional<blink::LocalFrameToken>& frame_token =
+        const absl::optional<blink::LocalFrameToken>& frame_token =
             request->GetInitiatorFrameToken();
         EXPECT_TRUE(frame_token.has_value());
         EXPECT_EQ(initiator_frame_token, frame_token.value());
@@ -3753,7 +3753,7 @@
         auto* request = NavigationRequest::From(handle);
         ASSERT_TRUE(request->IsPost());
 
-        const base::Optional<blink::LocalFrameToken>& frame_token =
+        const absl::optional<blink::LocalFrameToken>& frame_token =
             request->GetInitiatorFrameToken();
         EXPECT_TRUE(frame_token.has_value());
         EXPECT_EQ(initiator_frame_token, frame_token.value());
@@ -3859,7 +3859,7 @@
         auto* request = NavigationRequest::From(handle);
         ASSERT_TRUE(request->IsPost());
 
-        const base::Optional<blink::LocalFrameToken>& frame_token =
+        const absl::optional<blink::LocalFrameToken>& frame_token =
             request->GetInitiatorFrameToken();
         EXPECT_TRUE(frame_token.has_value());
         EXPECT_EQ(initiator_frame_token, frame_token.value());
diff --git a/content/browser/net/cross_origin_embedder_policy_reporter.cc b/content/browser/net/cross_origin_embedder_policy_reporter.cc
index 7d6f45a..f506654 100644
--- a/content/browser/net/cross_origin_embedder_policy_reporter.cc
+++ b/content/browser/net/cross_origin_embedder_policy_reporter.cc
@@ -28,8 +28,8 @@
 CrossOriginEmbedderPolicyReporter::CrossOriginEmbedderPolicyReporter(
     StoragePartition* storage_partition,
     const GURL& context_url,
-    const base::Optional<std::string>& endpoint,
-    const base::Optional<std::string>& report_only_endpoint,
+    const absl::optional<std::string>& endpoint,
+    const absl::optional<std::string>& report_only_endpoint,
     const net::NetworkIsolationKey& network_isolation_key)
     : storage_partition_(storage_partition),
       context_url_(context_url),
@@ -87,7 +87,7 @@
 void CrossOriginEmbedderPolicyReporter::QueueAndNotify(
     std::initializer_list<std::pair<base::StringPiece, base::StringPiece>> body,
     bool report_only) {
-  const base::Optional<std::string>& endpoint =
+  const absl::optional<std::string>& endpoint =
       report_only ? report_only_endpoint_ : endpoint_;
   const char* const disposition = report_only ? "reporting" : "enforce";
   if (observer_) {
@@ -112,7 +112,7 @@
 
     storage_partition_->GetNetworkContext()->QueueReport(
         kType, *endpoint, context_url_, network_isolation_key_,
-        /*user_agent=*/base::nullopt, std::move(body_to_pass));
+        /*user_agent=*/absl::nullopt, std::move(body_to_pass));
   }
 }
 
diff --git a/content/browser/net/cross_origin_embedder_policy_reporter.h b/content/browser/net/cross_origin_embedder_policy_reporter.h
index f5ab09d..14f0902 100644
--- a/content/browser/net/cross_origin_embedder_policy_reporter.h
+++ b/content/browser/net/cross_origin_embedder_policy_reporter.h
@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
@@ -17,6 +16,7 @@
 #include "net/base/network_isolation_key.h"
 #include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
 #include "services/network/public/mojom/fetch_api.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/frame/reporting_observer.mojom.h"
 #include "url/gurl.h"
 
@@ -40,8 +40,8 @@
   CrossOriginEmbedderPolicyReporter(
       StoragePartition* storage_partition,
       const GURL& context_url,
-      const base::Optional<std::string>& endpoint,
-      const base::Optional<std::string>& report_only_endpoint,
+      const absl::optional<std::string>& endpoint,
+      const absl::optional<std::string>& report_only_endpoint,
       const net::NetworkIsolationKey& network_isolation_key);
   ~CrossOriginEmbedderPolicyReporter() override;
   CrossOriginEmbedderPolicyReporter(const CrossOriginEmbedderPolicyReporter&) =
@@ -83,8 +83,8 @@
   StoragePartition* const storage_partition_;
 
   const GURL context_url_;
-  const base::Optional<std::string> endpoint_;
-  const base::Optional<std::string> report_only_endpoint_;
+  const absl::optional<std::string> endpoint_;
+  const absl::optional<std::string> report_only_endpoint_;
   const net::NetworkIsolationKey network_isolation_key_;
 
   mojo::ReceiverSet<network::mojom::CrossOriginEmbedderPolicyReporter>
diff --git a/content/browser/net/cross_origin_embedder_policy_reporter_unittest.cc b/content/browser/net/cross_origin_embedder_policy_reporter_unittest.cc
index b8aad0fa..8a14c47 100644
--- a/content/browser/net/cross_origin_embedder_policy_reporter_unittest.cc
+++ b/content/browser/net/cross_origin_embedder_policy_reporter_unittest.cc
@@ -48,7 +48,7 @@
                    const std::string& group,
                    const GURL& url,
                    const net::NetworkIsolationKey& network_isolation_key,
-                   const base::Optional<std::string>& user_agent,
+                   const absl::optional<std::string>& user_agent,
                    base::Value body) override {
     DCHECK(!user_agent);
     reports_.emplace_back(
@@ -189,7 +189,7 @@
 TEST_F(CrossOriginEmbedderPolicyReporterTest, NullEndpointsForCorp) {
   const GURL kContextUrl("https://example.com/path");
   CrossOriginEmbedderPolicyReporter reporter(storage_partition(), kContextUrl,
-                                             base::nullopt, base::nullopt,
+                                             absl::nullopt, absl::nullopt,
                                              net::NetworkIsolationKey());
 
   reporter.QueueCorpViolationReport(GURL("https://www1.example.com/y"),
@@ -270,7 +270,7 @@
   TestObserver observer(observer_remote.InitWithNewPipeAndPassReceiver());
 
   CrossOriginEmbedderPolicyReporter reporter(storage_partition(), kContextUrl,
-                                             base::nullopt, base::nullopt,
+                                             absl::nullopt, absl::nullopt,
                                              net::NetworkIsolationKey());
   reporter.BindObserver(std::move(observer_remote));
   reporter.QueueCorpViolationReport(GURL("https://u:[email protected]/x"),
@@ -335,7 +335,7 @@
 TEST_F(CrossOriginEmbedderPolicyReporterTest, NullEndpointsForNavigation) {
   const GURL kContextUrl("https://example.com/path");
   CrossOriginEmbedderPolicyReporter reporter(storage_partition(), kContextUrl,
-                                             base::nullopt, base::nullopt,
+                                             absl::nullopt, absl::nullopt,
                                              net::NetworkIsolationKey());
 
   reporter.QueueNavigationReport(GURL("https://www1.example.com/y"),
@@ -378,7 +378,7 @@
   TestObserver observer(observer_remote.InitWithNewPipeAndPassReceiver());
 
   CrossOriginEmbedderPolicyReporter reporter(storage_partition(), kContextUrl,
-                                             base::nullopt, base::nullopt,
+                                             absl::nullopt, absl::nullopt,
                                              net::NetworkIsolationKey());
   reporter.BindObserver(std::move(observer_remote));
   reporter.QueueNavigationReport(GURL("https://www1.example.com/x#foo?bar=baz"),
@@ -432,7 +432,7 @@
        NullEndpointsForWorkerInitialization) {
   const GURL kContextUrl("https://example.com/path");
   CrossOriginEmbedderPolicyReporter reporter(storage_partition(), kContextUrl,
-                                             base::nullopt, base::nullopt,
+                                             absl::nullopt, absl::nullopt,
                                              net::NetworkIsolationKey());
 
   reporter.QueueWorkerInitializationReport(
@@ -479,7 +479,7 @@
   TestObserver observer(observer_remote.InitWithNewPipeAndPassReceiver());
 
   CrossOriginEmbedderPolicyReporter reporter(storage_partition(), kContextUrl,
-                                             base::nullopt, base::nullopt,
+                                             absl::nullopt, absl::nullopt,
                                              net::NetworkIsolationKey());
   reporter.BindObserver(std::move(observer_remote));
   reporter.QueueWorkerInitializationReport(
diff --git a/content/browser/net/cross_origin_opener_policy_reporter.cc b/content/browser/net/cross_origin_opener_policy_reporter.cc
index 544cb41..3f4ded2 100644
--- a/content/browser/net/cross_origin_opener_policy_reporter.cc
+++ b/content/browser/net/cross_origin_opener_policy_reporter.cc
@@ -56,7 +56,7 @@
   }
 }
 
-base::Optional<blink::FrameToken> GetFrameToken(FrameTreeNode* frame,
+absl::optional<blink::FrameToken> GetFrameToken(FrameTreeNode* frame,
                                                 SiteInstance* site_instance) {
   RenderFrameHostImpl* rfh = frame->current_frame_host();
   if (rfh->GetSiteInstance() == site_instance)
@@ -67,7 +67,7 @@
   if (proxy)
     return proxy->GetFrameToken();
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 // Find all the related windows that might try to access the new document in
@@ -152,7 +152,7 @@
     const GURL& previous_url,
     bool same_origin_with_previous,
     bool is_report_only) {
-  const base::Optional<std::string>& endpoint =
+  const absl::optional<std::string>& endpoint =
       is_report_only ? coop_.report_only_reporting_endpoint
                      : coop_.reporting_endpoint;
   if (!endpoint)
@@ -173,7 +173,7 @@
     bool is_current_source,
     bool same_origin_with_next,
     bool is_report_only) {
-  const base::Optional<std::string>& endpoint =
+  const absl::optional<std::string>& endpoint =
       is_report_only ? coop_.report_only_reporting_endpoint
                      : coop_.reporting_endpoint;
   if (!endpoint)
@@ -240,7 +240,7 @@
   }
 
   storage_partition_->GetNetworkContext()->QueueReport(
-      "coop", endpoint, context_url_, network_isolation_key_, base::nullopt,
+      "coop", endpoint, context_url_, network_isolation_key_, absl::nullopt,
       std::move(body));
 }
 
@@ -310,7 +310,7 @@
   RenderFrameHostImpl* accessed_rfh = accessed_node->current_frame_host();
   SiteInstance* site_instance = accessing_rfh->GetSiteInstance();
 
-  base::Optional<blink::FrameToken> accessed_window_token =
+  absl::optional<blink::FrameToken> accessed_window_token =
       GetFrameToken(accessed_node, site_instance);
   if (!accessed_window_token)
     return;
@@ -392,7 +392,7 @@
       ToString(is_report_only ? coop_.report_only_value : coop_.value));
   storage_partition_->GetNetworkContext()->QueueReport(
       "coop", endpoint, context_url_, network_isolation_key_,
-      /*user_agent=*/base::nullopt, std::move(body));
+      /*user_agent=*/absl::nullopt, std::move(body));
 }
 
 }  // namespace content
diff --git a/content/browser/net/cross_origin_opener_policy_reporter.h b/content/browser/net/cross_origin_opener_policy_reporter.h
index 0af3819..7029ea03 100644
--- a/content/browser/net/cross_origin_opener_policy_reporter.h
+++ b/content/browser/net/cross_origin_opener_policy_reporter.h
@@ -7,13 +7,13 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/global_routing_id.h"
 #include "mojo/public/cpp/bindings/unique_receiver_set.h"
 #include "net/base/network_isolation_key.h"
 #include "services/network/public/mojom/cross_origin_opener_policy.mojom.h"
 #include "services/network/public/mojom/source_location.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
diff --git a/content/browser/net/cross_origin_opener_policy_reporter_unittest.cc b/content/browser/net/cross_origin_opener_policy_reporter_unittest.cc
index 00be747..8e66c661 100644
--- a/content/browser/net/cross_origin_opener_policy_reporter_unittest.cc
+++ b/content/browser/net/cross_origin_opener_policy_reporter_unittest.cc
@@ -43,7 +43,7 @@
                    const std::string& group,
                    const GURL& url,
                    const net::NetworkIsolationKey& network_isolation_key,
-                   const base::Optional<std::string>& user_agent,
+                   const absl::optional<std::string>& user_agent,
                    base::Value body) override {
     DCHECK(!user_agent);
     reports_.emplace_back(
diff --git a/content/browser/net/reporting_service_proxy.cc b/content/browser/net/reporting_service_proxy.cc
index 7394fc1a..74dd306 100644
--- a/content/browser/net/reporting_service_proxy.cc
+++ b/content/browser/net/reporting_service_proxy.cc
@@ -48,7 +48,7 @@
   void QueueInterventionReport(const GURL& url,
                                const std::string& id,
                                const std::string& message,
-                               const base::Optional<std::string>& source_file,
+                               const absl::optional<std::string>& source_file,
                                int line_number,
                                int column_number) override {
     auto body = std::make_unique<base::DictionaryValue>();
@@ -65,9 +65,9 @@
 
   void QueueDeprecationReport(const GURL& url,
                               const std::string& id,
-                              base::Optional<base::Time> anticipated_removal,
+                              absl::optional<base::Time> anticipated_removal,
                               const std::string& message,
-                              const base::Optional<std::string>& source_file,
+                              const absl::optional<std::string>& source_file,
                               int line_number,
                               int column_number) override {
     auto body = std::make_unique<base::DictionaryValue>();
@@ -88,12 +88,12 @@
   void QueueCspViolationReport(const GURL& url,
                                const std::string& group,
                                const std::string& document_url,
-                               const base::Optional<std::string>& referrer,
-                               const base::Optional<std::string>& blocked_url,
+                               const absl::optional<std::string>& referrer,
+                               const absl::optional<std::string>& blocked_url,
                                const std::string& effective_directive,
                                const std::string& original_policy,
-                               const base::Optional<std::string>& source_file,
-                               const base::Optional<std::string>& script_sample,
+                               const absl::optional<std::string>& source_file,
+                               const absl::optional<std::string>& script_sample,
                                const std::string& disposition,
                                uint16_t status_code,
                                int line_number,
@@ -123,8 +123,8 @@
       const GURL& url,
       const std::string& policy_id,
       const std::string& disposition,
-      const base::Optional<std::string>& message,
-      const base::Optional<std::string>& source_file,
+      const absl::optional<std::string>& message,
+      const absl::optional<std::string>& source_file,
       int line_number,
       int column_number) override {
     auto body = std::make_unique<base::DictionaryValue>();
@@ -147,8 +147,8 @@
       const std::string& group,
       const std::string& policy_id,
       const std::string& disposition,
-      const base::Optional<std::string>& message,
-      const base::Optional<std::string>& source_file,
+      const absl::optional<std::string>& message,
+      const absl::optional<std::string>& source_file,
       int line_number,
       int column_number) override {
     auto body = std::make_unique<base::DictionaryValue>();
@@ -178,7 +178,7 @@
 
     rph->GetStoragePartition()->GetNetworkContext()->QueueReport(
         type, group, url, network_isolation_key_,
-        /*user_agent=*/base::nullopt,
+        /*user_agent=*/absl::nullopt,
         base::Value::FromUniquePtrValue(std::move(body)));
   }
 
diff --git a/content/browser/net/trust_token_browsertest.cc b/content/browser/net/trust_token_browsertest.cc
index 00555a5..a92d965 100644
--- a/content/browser/net/trust_token_browsertest.cc
+++ b/content/browser/net/trust_token_browsertest.cc
@@ -1707,7 +1707,7 @@
 void HandlerWrappingLocalTrustTokenFulfiller::FulfillTrustTokenIssuance(
     network::mojom::FulfillTrustTokenIssuanceRequestPtr request,
     FulfillTrustTokenIssuanceCallback callback) {
-  base::Optional<std::string> maybe_result =
+  absl::optional<std::string> maybe_result =
       handler_.Issue(std::move(request->request));
   if (maybe_result) {
     std::move(callback).Run(
diff --git a/content/browser/net/trust_token_origin_trial_browsertest.cc b/content/browser/net/trust_token_origin_trial_browsertest.cc
index 9b7871c..2a7e52b4 100644
--- a/content/browser/net/trust_token_origin_trial_browsertest.cc
+++ b/content/browser/net/trust_token_origin_trial_browsertest.cc
@@ -229,7 +229,7 @@
   // |on_received_request_| is called once a request arrives at
   // |kTrustTokenUrl|; the request is then placed in |trust_token_request_|.
   base::OnceClosure on_received_request_ GUARDED_BY(mutex_);
-  base::Optional<network::ResourceRequest> trust_token_request_
+  absl::optional<network::ResourceRequest> trust_token_request_
       GUARDED_BY(mutex_);
 };
 
@@ -330,8 +330,8 @@
   }
 
   network::TrustTokenTestParameters trust_token_params(
-      test_description.op, base::nullopt, base::nullopt, base::nullopt,
-      base::nullopt, base::nullopt, base::nullopt);
+      test_description.op, absl::nullopt, absl::nullopt, absl::nullopt,
+      absl::nullopt, absl::nullopt, absl::nullopt);
 
   network::TrustTokenParametersAndSerialization
       expected_params_and_serialization =
diff --git a/content/browser/net/trust_token_parameters_browsertest.cc b/content/browser/net/trust_token_parameters_browsertest.cc
index 6f8b1f1c..2d96e74 100644
--- a/content/browser/net/trust_token_parameters_browsertest.cc
+++ b/content/browser/net/trust_token_parameters_browsertest.cc
@@ -86,7 +86,7 @@
                    expected_params_and_serialization.serialized_params + "});");
 
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(trust_token_url);
   ASSERT_TRUE(request);
   ASSERT_TRUE(request->trust_token_params);
@@ -119,7 +119,7 @@
                          expected_params_and_serialization.serialized_params)));
 
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(trust_token_url);
   ASSERT_TRUE(request);
   ASSERT_TRUE(request->trust_token_params);
@@ -156,7 +156,7 @@
                  expected_params_and_serialization.serialized_params.c_str())));
 
   monitor.WaitForUrls();
-  base::Optional<network::ResourceRequest> request =
+  absl::optional<network::ResourceRequest> request =
       monitor.GetRequestInfo(trust_token_url);
   ASSERT_TRUE(request);
 
diff --git a/content/browser/network_service_client.cc b/content/browser/network_service_client.cc
index 4c9d79f..99b7067 100644
--- a/content/browser/network_service_client.cc
+++ b/content/browser/network_service_client.cc
@@ -8,7 +8,6 @@
 
 #include "base/bind.h"
 #include "base/feature_list.h"
-#include "base/optional.h"
 #include "base/task/post_task.h"
 #include "base/threading/sequence_bound.h"
 #include "base/unguessable_token.h"
@@ -29,6 +28,7 @@
 #include "content/public/common/network_service_util.h"
 #include "services/network/public/cpp/network_switches.h"
 #include "services/network/public/mojom/network_context.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/web_feature/web_feature.mojom.h"
 
 #if defined(OS_ANDROID)
@@ -172,7 +172,7 @@
 }
 
 void NetworkServiceClient::OnCertificateRequested(
-    const base::Optional<base::UnguessableToken>& window_id,
+    const absl::optional<base::UnguessableToken>& window_id,
     const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
     mojo::PendingRemote<network::mojom::ClientCertificateResponder>
         cert_responder_remote) {
@@ -188,7 +188,7 @@
 }
 
 void NetworkServiceClient::OnAuthRequired(
-    const base::Optional<base::UnguessableToken>& window_id,
+    const absl::optional<base::UnguessableToken>& window_id,
     uint32_t request_id,
     const GURL& url,
     bool first_auth_attempt,
@@ -198,7 +198,7 @@
         auth_challenge_responder) {
   mojo::Remote<network::mojom::AuthChallengeResponder>
       auth_challenge_responder_remote(std::move(auth_challenge_responder));
-  auth_challenge_responder_remote->OnAuthCredentials(base::nullopt);
+  auth_challenge_responder_remote->OnAuthCredentials(absl::nullopt);
 }
 
 void NetworkServiceClient::OnClearSiteData(const GURL& url,
diff --git a/content/browser/network_service_client.h b/content/browser/network_service_client.h
index cfca9ed..8954b088 100644
--- a/content/browser/network_service_client.h
+++ b/content/browser/network_service_client.h
@@ -83,12 +83,12 @@
                              bool fatal,
                              OnSSLCertificateErrorCallback response) override;
   void OnCertificateRequested(
-      const base::Optional<base::UnguessableToken>& window_id,
+      const absl::optional<base::UnguessableToken>& window_id,
       const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
       mojo::PendingRemote<network::mojom::ClientCertificateResponder>
           cert_responder) override;
   void OnAuthRequired(
-      const base::Optional<base::UnguessableToken>& window_id,
+      const absl::optional<base::UnguessableToken>& window_id,
       uint32_t request_id,
       const GURL& url,
       bool first_auth_attempt,
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
index dc8f37a..9f6c3208 100644
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
@@ -12,7 +12,6 @@
 #include "base/callback_helpers.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/test/scoped_feature_list.h"
 #include "base/test/test_simple_task_runner.h"
@@ -37,6 +36,7 @@
 #include "mojo/public/cpp/system/functions.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/notifications/notification_constants.h"
 #include "third_party/blink/public/common/notifications/notification_resources.h"
 #include "third_party/blink/public/mojom/notifications/notification_service.mojom.h"
@@ -278,7 +278,7 @@
     if (success) {
       get_notification_resources_ = notification_resources;
     } else {
-      get_notification_resources_ = base::nullopt;
+      get_notification_resources_ = absl::nullopt;
     }
     std::move(quit_closure).Run();
   }
@@ -369,7 +369,7 @@
     return get_notifications_data_;
   }
 
-  base::Optional<blink::NotificationResources>
+  absl::optional<blink::NotificationResources>
   GetNotificationResourcesFromContextSync(const std::string& notification_id) {
     base::RunLoop run_loop;
     notification_context_->ReadNotificationResources(
@@ -454,7 +454,7 @@
 
   std::vector<NotificationDatabaseData> get_notifications_data_;
 
-  base::Optional<blink::NotificationResources> get_notification_resources_;
+  absl::optional<blink::NotificationResources> get_notification_resources_;
 
   bool read_notification_data_callback_result_ = false;
 
diff --git a/content/browser/notifications/devtools_event_logging.cc b/content/browser/notifications/devtools_event_logging.cc
index 6e80bb63..b827fc7 100644
--- a/content/browser/notifications/devtools_event_logging.cc
+++ b/content/browser/notifications/devtools_event_logging.cc
@@ -123,8 +123,8 @@
 void LogNotificationClickedEventToDevTools(
     BrowserContext* browser_context,
     const NotificationDatabaseData& data,
-    const base::Optional<int>& action_index,
-    const base::Optional<std::u16string>& reply) {
+    const absl::optional<int>& action_index,
+    const absl::optional<std::u16string>& reply) {
   DevToolsCallback callback = GetDevToolsCallback(browser_context, data);
   if (!callback)
     return;
diff --git a/content/browser/notifications/devtools_event_logging.h b/content/browser/notifications/devtools_event_logging.h
index 70a1928f..04bcf2c 100644
--- a/content/browser/notifications/devtools_event_logging.h
+++ b/content/browser/notifications/devtools_event_logging.h
@@ -7,8 +7,8 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "base/time/time.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class GURL;
 
@@ -37,8 +37,8 @@
 void LogNotificationClickedEventToDevTools(
     BrowserContext* browser_context,
     const NotificationDatabaseData& data,
-    const base::Optional<int>& action_index,
-    const base::Optional<std::u16string>& reply);
+    const absl::optional<int>& action_index,
+    const absl::optional<std::u16string>& reply);
 
 }  // namespace notifications
 }  // namespace content
diff --git a/content/browser/notifications/notification_database_conversions.cc b/content/browser/notifications/notification_database_conversions.cc
index 295c7370..9681dde7 100644
--- a/content/browser/notifications/notification_database_conversions.cc
+++ b/content/browser/notifications/notification_database_conversions.cc
@@ -10,13 +10,13 @@
 
 #include "base/check.h"
 #include "base/notreached.h"
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"
 #include "base/time/time.h"
 #include "content/browser/notifications/notification_database_data.pb.h"
 #include "content/browser/notifications/notification_database_resources.pb.h"
 #include "content/public/browser/notification_database_data.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/notifications/notification_resources.h"
 #include "third_party/blink/public/mojom/notifications/notification.mojom.h"
 #include "third_party/skia/include/core/SkBitmap.h"
@@ -69,19 +69,19 @@
     output->time_until_close_millis =
         base::TimeDelta::FromMilliseconds(message.time_until_close_millis());
   } else {
-    output->time_until_close_millis = base::nullopt;
+    output->time_until_close_millis = absl::nullopt;
   }
   if (message.has_time_until_first_click_millis()) {
     output->time_until_first_click_millis = base::TimeDelta::FromMilliseconds(
         message.time_until_first_click_millis());
   } else {
-    output->time_until_first_click_millis = base::nullopt;
+    output->time_until_first_click_millis = absl::nullopt;
   }
   if (message.has_time_until_last_click_millis()) {
     output->time_until_last_click_millis = base::TimeDelta::FromMilliseconds(
         message.time_until_last_click_millis());
   } else {
-    output->time_until_last_click_millis = base::nullopt;
+    output->time_until_last_click_millis = absl::nullopt;
   }
 
   switch (message.closed_reason()) {
@@ -176,12 +176,12 @@
             base::TimeDelta::FromMicroseconds(
                 payload.show_trigger_timestamp()));
   } else {
-    notification_data->show_trigger_timestamp = base::nullopt;
+    notification_data->show_trigger_timestamp = absl::nullopt;
   }
 
   output->has_triggered = message.has_triggered();
 
-  output->notification_resources = base::nullopt;
+  output->notification_resources = absl::nullopt;
 
   return true;
 }
diff --git a/content/browser/notifications/notification_database_conversions_unittest.cc b/content/browser/notifications/notification_database_conversions_unittest.cc
index 9523222..78d1740 100644
--- a/content/browser/notifications/notification_database_conversions_unittest.cc
+++ b/content/browser/notifications/notification_database_conversions_unittest.cc
@@ -6,7 +6,6 @@
 #include <stdint.h>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/stl_util.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
@@ -17,6 +16,7 @@
 #include "content/public/browser/notification_database_data.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/notifications/notification_constants.h"
 #include "third_party/blink/public/common/notifications/notification_resources.h"
 #include "third_party/blink/public/mojom/notifications/notification.mojom.h"
@@ -301,7 +301,7 @@
      SerializeAndDeserializeNullPlaceholder) {
   auto action = blink::mojom::NotificationAction::New();
   action->type = kNotificationActionType;
-  action->placeholder = base::nullopt;  // null string.
+  action->placeholder = absl::nullopt;  // null string.
 
   blink::PlatformNotificationData notification_data;
   notification_data.actions.push_back(std::move(action));
@@ -325,7 +325,7 @@
   blink::PlatformNotificationData notification_data;
 
   // explicitly empty timestamp
-  notification_data.show_trigger_timestamp = base::nullopt;
+  notification_data.show_trigger_timestamp = absl::nullopt;
 
   NotificationDatabaseData database_data;
   database_data.notification_data = notification_data;
diff --git a/content/browser/notifications/notification_event_dispatcher_impl.cc b/content/browser/notifications/notification_event_dispatcher_impl.cc
index 39b54da..0f63398 100644
--- a/content/browser/notifications/notification_event_dispatcher_impl.cc
+++ b/content/browser/notifications/notification_event_dispatcher_impl.cc
@@ -8,7 +8,6 @@
 #include "base/callback.h"
 #include "base/callback_helpers.h"
 #include "base/metrics/histogram_functions.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/browser/notifications/devtools_event_logging.h"
 #include "content/browser/notifications/platform_notification_context_impl.h"
@@ -20,6 +19,7 @@
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/storage_partition.h"
 #include "content/public/common/persistent_notification_status.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/notifications/platform_notification_data.h"
 
 namespace content {
@@ -219,8 +219,8 @@
 void DispatchNotificationClickEventOnWorker(
     const scoped_refptr<ServiceWorkerVersion>& service_worker,
     const NotificationDatabaseData& notification_database_data,
-    const base::Optional<int>& action_index,
-    const base::Optional<std::u16string>& reply,
+    const absl::optional<int>& action_index,
+    const absl::optional<std::u16string>& reply,
     ServiceWorkerVersion::StatusCallback callback,
     blink::ServiceWorkerStatusCode start_worker_status) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
@@ -244,8 +244,8 @@
 
 // Dispatches the notification click event on the |service_worker_registration|.
 void DoDispatchNotificationClickEvent(
-    const base::Optional<int>& action_index,
-    const base::Optional<std::u16string>& reply,
+    const absl::optional<int>& action_index,
+    const absl::optional<std::u16string>& reply,
     const scoped_refptr<PlatformNotificationContext>& notification_context,
     BrowserContext* browser_context,
     const ServiceWorkerRegistration* service_worker_registration,
@@ -428,8 +428,8 @@
     BrowserContext* browser_context,
     const std::string& notification_id,
     const GURL& origin,
-    const base::Optional<int>& action_index,
-    const base::Optional<std::u16string>& reply,
+    const absl::optional<int>& action_index,
+    const absl::optional<std::u16string>& reply,
     NotificationDispatchCompleteCallback dispatch_complete_callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
diff --git a/content/browser/notifications/notification_event_dispatcher_impl.h b/content/browser/notifications/notification_event_dispatcher_impl.h
index c836840..2db60439 100644
--- a/content/browser/notifications/notification_event_dispatcher_impl.h
+++ b/content/browser/notifications/notification_event_dispatcher_impl.h
@@ -33,8 +33,8 @@
       BrowserContext* browser_context,
       const std::string& notification_id,
       const GURL& origin,
-      const base::Optional<int>& action_index,
-      const base::Optional<std::u16string>& reply,
+      const absl::optional<int>& action_index,
+      const absl::optional<std::u16string>& reply,
       NotificationDispatchCompleteCallback dispatch_complete_callback) override;
   void DispatchNotificationCloseEvent(
       BrowserContext* browser_context,
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 4fd6bb17..8c91fc0 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -198,7 +198,7 @@
     return;
 
   // Reset |next_trigger_| to keep track of the next trigger timestamp.
-  next_trigger_ = base::nullopt;
+  next_trigger_ = absl::nullopt;
 
   // Iterate over all notifications and delete all expired ones.
   std::set<std::string> close_notification_ids;
@@ -981,7 +981,7 @@
 
   // Only store resources for notifications that will be scheduled.
   if (!CanTrigger(write_database_data))
-    write_database_data.notification_resources = base::nullopt;
+    write_database_data.notification_resources = absl::nullopt;
 
   NotificationDatabase::Status status =
       database_->WriteNotificationData(origin, write_database_data);
diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
index 71dad76..b195cb84 100644
--- a/content/browser/notifications/platform_notification_context_impl.h
+++ b/content/browser/notifications/platform_notification_context_impl.h
@@ -16,7 +16,6 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/notifications/notification_database.h"
 #include "content/browser/notifications/notification_id_generator.h"
@@ -25,6 +24,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/platform_notification_context.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/notifications/notification_service.mojom.h"
 
 class GURL;
@@ -328,7 +328,7 @@
   NotificationIdGenerator notification_id_generator_;
 
   // Keeps track of the next trigger timestamp.
-  base::Optional<base::Time> next_trigger_;
+  absl::optional<base::Time> next_trigger_;
 
   // Calls through to PlatformNotificationService methods.
   std::unique_ptr<PlatformNotificationServiceProxy> service_proxy_;
diff --git a/content/browser/notifications/platform_notification_context_trigger_unittest.cc b/content/browser/notifications/platform_notification_context_trigger_unittest.cc
index 7c33482e..2311f80 100644
--- a/content/browser/notifications/platform_notification_context_trigger_unittest.cc
+++ b/content/browser/notifications/platform_notification_context_trigger_unittest.cc
@@ -87,14 +87,14 @@
 
  protected:
   void WriteNotificationData(const std::string& tag,
-                             base::Optional<base::Time> timestamp) {
+                             absl::optional<base::Time> timestamp) {
     ASSERT_TRUE(
         TryWriteNotificationData("https://example.com", tag, timestamp));
   }
 
   bool TryWriteNotificationData(const std::string& url,
                                 const std::string& tag,
-                                base::Optional<base::Time> timestamp) {
+                                absl::optional<base::Time> timestamp) {
     GURL origin(url);
     NotificationDatabaseData notification_database_data;
     notification_database_data.origin = origin;
@@ -277,7 +277,7 @@
   ASSERT_TRUE(TryWriteNotificationData(
       "https://example.com",
       std::to_string(kMaximumScheduledNotificationsPerOrigin + 1),
-      base::nullopt));
+      absl::nullopt));
 
   ASSERT_FALSE(TryWriteNotificationData(
       "https://example.com",
diff --git a/content/browser/payments/payment_app_database.cc b/content/browser/payments/payment_app_database.cc
index 836a2eb9..410aa20 100644
--- a/content/browser/payments/payment_app_database.cc
+++ b/content/browser/payments/payment_app_database.cc
@@ -10,7 +10,6 @@
 #include "base/base64.h"
 #include "base/bind.h"
 #include "base/containers/contains.h"
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
 #include "content/browser/payments/payment_app.pb.h"
@@ -18,6 +17,7 @@
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
 #include "content/browser/service_worker/service_worker_registration.h"
 #include "content/public/browser/browser_thread.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/manifest/manifest.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/gfx/codec/png_codec.h"
diff --git a/content/browser/payments/payment_app_info_fetcher.cc b/content/browser/payments/payment_app_info_fetcher.cc
index 946ddfd7f..7a2d7248 100644
--- a/content/browser/payments/payment_app_info_fetcher.cc
+++ b/content/browser/payments/payment_app_info_fetcher.cc
@@ -10,7 +10,6 @@
 #include "base/base64.h"
 #include "base/bind.h"
 #include "base/callback_helpers.h"
-#include "base/optional.h"
 #include "components/payments/content/icon/icon_size.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/browser/service_worker/service_worker_context_wrapper.h"
@@ -19,6 +18,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/global_routing_id.h"
 #include "content/public/browser/manifest_icon_downloader.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/manifest/manifest_icon_selector.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
 #include "ui/gfx/codec/png_codec.h"
diff --git a/content/browser/payments/payment_app_provider_util.cc b/content/browser/payments/payment_app_provider_util.cc
index cb0b745..52cd30f 100644
--- a/content/browser/payments/payment_app_provider_util.cc
+++ b/content/browser/payments/payment_app_provider_util.cc
@@ -54,7 +54,7 @@
   return payments::mojom::CanMakePaymentResponse::New(
       response_type, /*can_make_payment=*/false,
       /*ready_for_minimal_ui=*/false,
-      /*account_balance=*/base::nullopt);
+      /*account_balance=*/absl::nullopt);
 }
 
 // static
@@ -63,9 +63,9 @@
     payments::mojom::PaymentEventResponseType response_type) {
   return payments::mojom::PaymentHandlerResponse::New(
       /*method_name=*/"", /*stringified_details=*/"", response_type,
-      /*payer_name=*/base::nullopt, /*payer_email=*/base::nullopt,
-      /*payer_phone=*/base::nullopt, /*shipping_address=*/nullptr,
-      /*shipping_option=*/base::nullopt);
+      /*payer_name=*/absl::nullopt, /*payer_email=*/absl::nullopt,
+      /*payer_phone=*/absl::nullopt, /*shipping_address=*/nullptr,
+      /*shipping_option=*/absl::nullopt);
 }
 
 }  // namespace content
diff --git a/content/browser/payments/payment_manager.cc b/content/browser/payments/payment_manager.cc
index b4a4eddb..9a341d52 100644
--- a/content/browser/payments/payment_manager.cc
+++ b/content/browser/payments/payment_manager.cc
@@ -7,7 +7,6 @@
 #include <utility>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/strings/string_util.h"
 #include "content/browser/payments/payment_app.pb.h"
 #include "content/browser/payments/payment_app_context_impl.h"
@@ -16,6 +15,7 @@
 #include "content/browser/service_worker/service_worker_registration.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/service_worker_context.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index aaa4e7f..729ca76 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -21,7 +21,7 @@
 
 namespace {
 
-base::Optional<blink::scheduler::WebSchedulerTrackedFeature>
+absl::optional<blink::scheduler::WebSchedulerTrackedFeature>
 PermissionToSchedulingFeature(PermissionType permission_name) {
   switch (permission_name) {
     case PermissionType::GEOLOCATION:
@@ -67,7 +67,7 @@
     case PermissionType::FONT_ACCESS:
     case PermissionType::DISPLAY_CAPTURE:
     case PermissionType::FILE_HANDLING:
-      return base::nullopt;
+      return absl::nullopt;
   }
 }
 
@@ -75,7 +75,7 @@
                                            PermissionType permission_name) {
   DCHECK(render_frame_host);
 
-  base::Optional<blink::scheduler::WebSchedulerTrackedFeature> feature =
+  absl::optional<blink::scheduler::WebSchedulerTrackedFeature> feature =
       PermissionToSchedulingFeature(permission_name);
 
   if (!feature)
@@ -95,7 +95,7 @@
 void MergeOverriddenAndDelegatedResults(
     base::OnceCallback<void(const std::vector<blink::mojom::PermissionStatus>&)>
         original_cb,
-    std::vector<base::Optional<blink::mojom::PermissionStatus>>
+    std::vector<absl::optional<blink::mojom::PermissionStatus>>
         overridden_results,
     const std::vector<blink::mojom::PermissionStatus>& delegated_results) {
   std::vector<blink::mojom::PermissionStatus> full_results;
@@ -160,7 +160,7 @@
 
 PermissionControllerImpl::SubscriptionsStatusMap
 PermissionControllerImpl::GetSubscriptionsStatuses(
-    const base::Optional<GURL>& origin) {
+    const absl::optional<GURL>& origin) {
   SubscriptionsStatusMap statuses;
   for (SubscriptionsMap::iterator iter(&subscriptions_); !iter.IsAtEnd();
        iter.Advance()) {
@@ -192,7 +192,7 @@
 
 PermissionControllerImpl::OverrideStatus
 PermissionControllerImpl::SetOverrideForDevTools(
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     PermissionType permission,
     const blink::mojom::PermissionStatus& status) {
   PermissionControllerDelegate* delegate =
@@ -202,7 +202,7 @@
     return OverrideStatus::kOverrideNotSet;
   }
   const auto old_statuses = GetSubscriptionsStatuses(
-      origin ? base::make_optional(origin->GetURL()) : base::nullopt);
+      origin ? absl::make_optional(origin->GetURL()) : absl::nullopt);
   devtools_permission_overrides_.Set(origin, permission, status);
   NotifyChangedSubscriptions(old_statuses);
 
@@ -212,7 +212,7 @@
 
 PermissionControllerImpl::OverrideStatus
 PermissionControllerImpl::GrantOverridesForDevTools(
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     const std::vector<PermissionType>& permissions) {
   PermissionControllerDelegate* delegate =
       browser_context_->GetPermissionControllerDelegate();
@@ -224,7 +224,7 @@
   }
 
   const auto old_statuses = GetSubscriptionsStatuses(
-      origin ? base::make_optional(origin->GetURL()) : base::nullopt);
+      origin ? absl::make_optional(origin->GetURL()) : absl::nullopt);
   devtools_permission_overrides_.GrantPermissions(origin, permissions);
   // If any statuses changed because they lose overrides or the new overrides
   // modify their previous state (overridden or not), subscribers must be
@@ -250,7 +250,7 @@
 }
 
 void PermissionControllerImpl::UpdateDelegateOverridesForDevTools(
-    const base::Optional<url::Origin>& origin) {
+    const absl::optional<url::Origin>& origin) {
   PermissionControllerDelegate* delegate =
       browser_context_->GetPermissionControllerDelegate();
   if (!delegate)
@@ -270,7 +270,7 @@
     base::OnceCallback<void(blink::mojom::PermissionStatus)> callback) {
   NotifySchedulerAboutPermissionRequest(render_frame_host, permission);
 
-  base::Optional<blink::mojom::PermissionStatus> status_override =
+  absl::optional<blink::mojom::PermissionStatus> status_override =
       devtools_permission_overrides_.Get(url::Origin::Create(requesting_origin),
                                          permission);
   if (status_override.has_value()) {
@@ -299,10 +299,10 @@
     NotifySchedulerAboutPermissionRequest(render_frame_host, permission);
 
   std::vector<PermissionType> permissions_without_overrides;
-  std::vector<base::Optional<blink::mojom::PermissionStatus>> results;
+  std::vector<absl::optional<blink::mojom::PermissionStatus>> results;
   url::Origin origin = url::Origin::Create(requesting_origin);
   for (const auto& permission : permissions) {
-    base::Optional<blink::mojom::PermissionStatus> override_status =
+    absl::optional<blink::mojom::PermissionStatus> override_status =
         devtools_permission_overrides_.Get(origin, permission);
     if (!override_status)
       permissions_without_overrides.push_back(permission);
@@ -335,7 +335,7 @@
     PermissionType permission,
     const GURL& requesting_origin,
     const GURL& embedding_origin) {
-  base::Optional<blink::mojom::PermissionStatus> status =
+  absl::optional<blink::mojom::PermissionStatus> status =
       devtools_permission_overrides_.Get(url::Origin::Create(requesting_origin),
                                          permission);
   if (status.has_value())
@@ -354,7 +354,7 @@
     PermissionType permission,
     RenderFrameHost* render_frame_host,
     const GURL& requesting_origin) {
-  base::Optional<blink::mojom::PermissionStatus> status =
+  absl::optional<blink::mojom::PermissionStatus> status =
       devtools_permission_overrides_.Get(url::Origin::Create(requesting_origin),
                                          permission);
   if (status.has_value())
@@ -381,7 +381,7 @@
 void PermissionControllerImpl::OnDelegatePermissionStatusChange(
     Subscription* subscription,
     blink::mojom::PermissionStatus status) {
-  base::Optional<blink::mojom::PermissionStatus> status_override =
+  absl::optional<blink::mojom::PermissionStatus> status_override =
       devtools_permission_overrides_.Get(
           url::Origin::Create(subscription->requesting_origin),
           subscription->permission);
diff --git a/content/browser/permissions/permission_controller_impl.h b/content/browser/permissions/permission_controller_impl.h
index cfd01f6..3702cb36 100644
--- a/content/browser/permissions/permission_controller_impl.h
+++ b/content/browser/permissions/permission_controller_impl.h
@@ -34,10 +34,10 @@
   // others. If no |origin| is specified, grant permissions to all origins in
   // the browser context.
   OverrideStatus GrantOverridesForDevTools(
-      const base::Optional<url::Origin>& origin,
+      const absl::optional<url::Origin>& origin,
       const std::vector<PermissionType>& permissions);
   OverrideStatus SetOverrideForDevTools(
-      const base::Optional<url::Origin>& origin,
+      const absl::optional<url::Origin>& origin,
       PermissionType permission,
       const blink::mojom::PermissionStatus& status);
   void ResetOverridesForDevTools();
@@ -91,12 +91,12 @@
   blink::mojom::PermissionStatus GetSubscriptionCurrentValue(
       const Subscription& subscription);
   SubscriptionsStatusMap GetSubscriptionsStatuses(
-      const base::Optional<GURL>& origin = base::nullopt);
+      const absl::optional<GURL>& origin = absl::nullopt);
   void NotifyChangedSubscriptions(const SubscriptionsStatusMap& old_statuses);
   void OnDelegatePermissionStatusChange(Subscription* subscription,
                                         blink::mojom::PermissionStatus status);
   void UpdateDelegateOverridesForDevTools(
-      const base::Optional<url::Origin>& origin);
+      const absl::optional<url::Origin>& origin);
 
   DevToolsPermissionOverrides devtools_permission_overrides_;
 
diff --git a/content/browser/permissions/permission_controller_impl_unittest.cc b/content/browser/permissions/permission_controller_impl_unittest.cc
index 39a5a9c..748a88c 100644
--- a/content/browser/permissions/permission_controller_impl_unittest.cc
+++ b/content/browser/permissions/permission_controller_impl_unittest.cc
@@ -45,13 +45,13 @@
       (override));
   MOCK_METHOD(void,
               SetPermissionOverridesForDevTools,
-              (const base::Optional<url::Origin>& origin,
+              (const absl::optional<url::Origin>& origin,
                const PermissionOverrides& overrides),
               (override));
   MOCK_METHOD(void, ResetPermissionOverridesForDevTools, (), (override));
   MOCK_METHOD(bool,
               IsPermissionOverridableByDevTools,
-              (PermissionType, const base::Optional<url::Origin>&),
+              (PermissionType, const absl::optional<url::Origin>&),
               (override));
 
  private:
@@ -98,7 +98,7 @@
 }
 
 TEST_F(PermissionControllerImplTest, SettingOverridesForwardsUpdates) {
-  auto kTestOrigin = base::make_optional(url::Origin::Create(GURL(kTestUrl)));
+  auto kTestOrigin = absl::make_optional(url::Origin::Create(GURL(kTestUrl)));
   EXPECT_CALL(*mock_manager(),
               SetPermissionOverridesForDevTools(
                   kTestOrigin, testing::ElementsAre(testing::Pair(
diff --git a/content/browser/picture_in_picture/picture_in_picture_content_browsertest.cc b/content/browser/picture_in_picture/picture_in_picture_content_browsertest.cc
index 41dfaf3..0305266 100644
--- a/content/browser/picture_in_picture/picture_in_picture_content_browsertest.cc
+++ b/content/browser/picture_in_picture/picture_in_picture_content_browsertest.cc
@@ -2,7 +2,6 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_feature_list.h"
 #include "content/browser/picture_in_picture/picture_in_picture_service_impl.h"
@@ -19,6 +18,7 @@
 #include "content/shell/browser/shell.h"
 #include "net/dns/mock_host_resolver.h"
 #include "services/media_session/public/cpp/features.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/picture_in_picture/picture_in_picture.mojom.h"
 
 namespace content {
@@ -55,13 +55,13 @@
   void SetSurfaceId(const viz::SurfaceId& surface_id) override {}
   cc::Layer* GetLayerForTesting() override { return nullptr; }
 
-  const base::Optional<PlaybackState>& playback_state() const {
+  const absl::optional<PlaybackState>& playback_state() const {
     return playback_state_;
   }
 
  private:
   gfx::Size size_;
-  base::Optional<PlaybackState> playback_state_;
+  absl::optional<PlaybackState> playback_state_;
 
   DISALLOW_COPY_AND_ASSIGN(TestOverlayWindow);
 };
diff --git a/content/browser/picture_in_picture/picture_in_picture_service_impl.cc b/content/browser/picture_in_picture/picture_in_picture_service_impl.cc
index ed3e6c83..99339af 100644
--- a/content/browser/picture_in_picture/picture_in_picture_service_impl.cc
+++ b/content/browser/picture_in_picture/picture_in_picture_service_impl.cc
@@ -32,7 +32,7 @@
 void PictureInPictureServiceImpl::StartSession(
     uint32_t player_id,
     mojo::PendingAssociatedRemote<media::mojom::MediaPlayer> player_remote,
-    const base::Optional<viz::SurfaceId>& surface_id,
+    const absl::optional<viz::SurfaceId>& surface_id,
     const gfx::Size& natural_size,
     bool show_play_pause_button,
     mojo::PendingRemote<blink::mojom::PictureInPictureSessionObserver> observer,
diff --git a/content/browser/picture_in_picture/picture_in_picture_service_impl.h b/content/browser/picture_in_picture/picture_in_picture_service_impl.h
index 9efba0a..099f359c 100644
--- a/content/browser/picture_in_picture/picture_in_picture_service_impl.h
+++ b/content/browser/picture_in_picture/picture_in_picture_service_impl.h
@@ -40,7 +40,7 @@
   void StartSession(
       uint32_t player_id,
       mojo::PendingAssociatedRemote<media::mojom::MediaPlayer> player_remote,
-      const base::Optional<viz::SurfaceId>& surface_id,
+      const absl::optional<viz::SurfaceId>& surface_id,
       const gfx::Size& natural_size,
       bool show_play_pause_button,
       mojo::PendingRemote<blink::mojom::PictureInPictureSessionObserver>,
diff --git a/content/browser/picture_in_picture/picture_in_picture_service_impl_unittest.cc b/content/browser/picture_in_picture/picture_in_picture_service_impl_unittest.cc
index b1f6ec7..bc57b4bb 100644
--- a/content/browser/picture_in_picture/picture_in_picture_service_impl_unittest.cc
+++ b/content/browser/picture_in_picture/picture_in_picture_service_impl_unittest.cc
@@ -307,7 +307,7 @@
   gfx::Size window_size;
 
   service().StartSession(
-      kPlayerVideoOnlyId, BindMediaPlayerReceiverAndPassRemote(), base::nullopt,
+      kPlayerVideoOnlyId, BindMediaPlayerReceiverAndPassRemote(), absl::nullopt,
       gfx::Size(42, 42), true /* show_play_pause_button */,
       std::move(observer_remote),
       base::BindLambdaForTesting(
diff --git a/content/browser/picture_in_picture/picture_in_picture_session.cc b/content/browser/picture_in_picture/picture_in_picture_session.cc
index 4df065f..3d2efee4 100644
--- a/content/browser/picture_in_picture/picture_in_picture_session.cc
+++ b/content/browser/picture_in_picture/picture_in_picture_session.cc
@@ -39,7 +39,7 @@
 void PictureInPictureSession::Update(
     uint32_t player_id,
     mojo::PendingAssociatedRemote<media::mojom::MediaPlayer> player_remote,
-    const base::Optional<viz::SurfaceId>& surface_id,
+    const absl::optional<viz::SurfaceId>& surface_id,
     const gfx::Size& natural_size,
     bool show_play_pause_button) {
   player_id_ = MediaPlayerId(
diff --git a/content/browser/picture_in_picture/picture_in_picture_session.h b/content/browser/picture_in_picture/picture_in_picture_session.h
index 51cb4ed..0f13721 100644
--- a/content/browser/picture_in_picture/picture_in_picture_session.h
+++ b/content/browser/picture_in_picture/picture_in_picture_session.h
@@ -45,7 +45,7 @@
   void Update(
       uint32_t player_id,
       mojo::PendingAssociatedRemote<media::mojom::MediaPlayer> player_remote,
-      const base::Optional<viz::SurfaceId>& surface_id,
+      const absl::optional<viz::SurfaceId>& surface_id,
       const gfx::Size& natural_size,
       bool show_play_pause_button) final;
 
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc
index b047f87..9be14f9 100644
--- a/content/browser/plugin_service_impl.cc
+++ b/content/browser/plugin_service_impl.cc
@@ -121,7 +121,7 @@
 PpapiPluginProcessHost* PluginServiceImpl::FindPpapiPluginProcess(
     const base::FilePath& plugin_path,
     const base::FilePath& profile_data_directory,
-    const base::Optional<url::Origin>& origin_lock) {
+    const absl::optional<url::Origin>& origin_lock) {
   for (PpapiPluginProcessHostIterator iter; !iter.Done(); ++iter) {
     if (iter->plugin_path() == plugin_path &&
         iter->profile_data_directory() == profile_data_directory &&
@@ -150,7 +150,7 @@
     const url::Origin& embedder_origin,
     const base::FilePath& plugin_path,
     const base::FilePath& profile_data_directory,
-    const base::Optional<url::Origin>& origin_lock) {
+    const absl::optional<url::Origin>& origin_lock) {
   DCHECK_CURRENTLY_ON(base::FeatureList::IsEnabled(features::kProcessHostOnUI)
                           ? BrowserThread::UI
                           : BrowserThread::IO);
@@ -244,7 +244,7 @@
     const url::Origin& embedder_origin,
     const base::FilePath& plugin_path,
     const base::FilePath& profile_data_directory,
-    const base::Optional<url::Origin>& origin_lock,
+    const absl::optional<url::Origin>& origin_lock,
     PpapiPluginProcessHost::PluginClient* client) {
   PpapiPluginProcessHost* plugin_host = FindOrStartPpapiPluginProcess(
       render_process_id, embedder_origin, plugin_path, profile_data_directory,
diff --git a/content/browser/plugin_service_impl.h b/content/browser/plugin_service_impl.h
index 3ce3ad5..b0fb11b 100644
--- a/content/browser/plugin_service_impl.h
+++ b/content/browser/plugin_service_impl.h
@@ -21,7 +21,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/singleton.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/sequenced_task_runner.h"
 #include "base/synchronization/waitable_event_watcher.h"
@@ -32,6 +31,7 @@
 #include "content/public/browser/plugin_service.h"
 #include "content/public/common/pepper_plugin_info.h"
 #include "ipc/ipc_channel_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -90,7 +90,7 @@
       const url::Origin& embedder_origin,
       const base::FilePath& plugin_path,
       const base::FilePath& profile_data_directory,
-      const base::Optional<url::Origin>& origin_lock);
+      const absl::optional<url::Origin>& origin_lock);
 
   // Opens a channel to a plugin process for the given mime type, starting
   // a new plugin process if necessary.  This must be called on the IO thread
@@ -99,7 +99,7 @@
                                 const url::Origin& embedder_origin,
                                 const base::FilePath& plugin_path,
                                 const base::FilePath& profile_data_directory,
-                                const base::Optional<url::Origin>& origin_lock,
+                                const absl::optional<url::Origin>& origin_lock,
                                 PpapiPluginProcessHost::PluginClient* client);
 
   // Used to monitor plugin stability.
@@ -127,7 +127,7 @@
   PpapiPluginProcessHost* FindPpapiPluginProcess(
       const base::FilePath& plugin_path,
       const base::FilePath& profile_data_directory,
-      const base::Optional<url::Origin>& origin_lock);
+      const absl::optional<url::Origin>& origin_lock);
 
   void RegisterPepperPlugins();
 
diff --git a/content/browser/plugin_service_impl_browsertest.cc b/content/browser/plugin_service_impl_browsertest.cc
index a41b60ed..022a743 100644
--- a/content/browser/plugin_service_impl_browsertest.cc
+++ b/content/browser/plugin_service_impl_browsertest.cc
@@ -9,7 +9,6 @@
 #include <utility>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
@@ -20,6 +19,7 @@
 #include "content/public/test/browser_test.h"
 #include "content/public/test/content_browser_test.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -80,7 +80,7 @@
     run_loop.Run();
   }
 
-  void OpenChannelToFakePlugin(const base::Optional<url::Origin>& origin,
+  void OpenChannelToFakePlugin(const absl::optional<url::Origin>& origin,
                                TestPluginClient* client) {
     base::RunLoop run_loop;
     client->SetRunLoop(&run_loop);
@@ -128,11 +128,11 @@
 
   // Empty origins all go to same pid.
   TestPluginClient client3a;
-  OpenChannelToFakePlugin(base::nullopt, &client3a);
+  OpenChannelToFakePlugin(absl::nullopt, &client3a);
   EXPECT_NE(base::kNullProcessId, client3a.plugin_pid());
 
   TestPluginClient client3b;
-  OpenChannelToFakePlugin(base::nullopt, &client3b);
+  OpenChannelToFakePlugin(absl::nullopt, &client3b);
   EXPECT_NE(base::kNullProcessId, client3b.plugin_pid());
 
   // Actual test: how empty origins got lumped into pids.
@@ -167,7 +167,7 @@
   }
 
   // But there's always room for the empty origin case.
-  OpenChannelToFakePlugin(base::nullopt, &client);
+  OpenChannelToFakePlugin(absl::nullopt, &client);
   EXPECT_NE(base::kNullProcessId, client.plugin_pid());
 
   // And re-using existing processes is always possible.
diff --git a/content/browser/portal/portal.cc b/content/browser/portal/portal.cc
index be2fed8..bdd5073e 100644
--- a/content/browser/portal/portal.cc
+++ b/content/browser/portal/portal.cc
@@ -258,7 +258,7 @@
       owner_render_frame_host_->GetSiteInstance(),
       mojo::ConvertTo<Referrer>(referrer), ui::PAGE_TRANSITION_LINK,
       should_replace_entry, download_policy, "GET", nullptr, "", nullptr,
-      network::mojom::SourceLocation::New(), false, base::nullopt);
+      network::mojom::SourceLocation::New(), false, absl::nullopt);
 
   std::move(callback).Run();
 }
diff --git a/content/browser/portal/portal_browsertest.cc b/content/browser/portal/portal_browsertest.cc
index ca3c926f..3027eab 100644
--- a/content/browser/portal/portal_browsertest.cc
+++ b/content/browser/portal/portal_browsertest.cc
@@ -10,7 +10,6 @@
 #include "base/callback.h"
 #include "base/callback_helpers.h"
 #include "base/memory/ptr_util.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/strcat.h"
 #include "base/strings/stringprintf.h"
@@ -69,6 +68,7 @@
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/input/focus_type.mojom.h"
@@ -690,18 +690,18 @@
     // The hit test region for the portal frame should be at index 1 after
     // activation, so we wait for the hit test data to update until it's in
     // this state.
-    auto hit_test_index = [&]() -> base::Optional<size_t> {
+    auto hit_test_index = [&]() -> absl::optional<size_t> {
       const auto& display_hit_test_query_map =
           GetHostFrameSinkManager()->display_hit_test_query();
       auto it = display_hit_test_query_map.find(root_frame_sink_id);
       // On Mac, we create a new root layer after activation, so the hit test
       // data may not have anything for the new layer yet.
       if (it == display_hit_test_query_map.end())
-        return base::nullopt;
+        return absl::nullopt;
       CHECK_EQ(portal_frame->GetRenderWidgetHost()->GetView(), view);
       size_t index;
       if (!it->second->FindIndexOfFrameSink(view->GetFrameSinkId(), &index))
-        return base::nullopt;
+        return absl::nullopt;
       return index;
     };
     hit_test_observer.WaitForHitTestData();
@@ -945,7 +945,7 @@
   std::unique_ptr<SyntheticTapGesture> gesture =
       std::make_unique<SyntheticTapGesture>(params);
 
-  base::Optional<PortalActivatedObserver> predecessor_activated;
+  absl::optional<PortalActivatedObserver> predecessor_activated;
   {
     PortalCreatedObserver adoption_observer(portal_frame);
     adoption_observer.set_created_callback(base::BindLambdaForTesting(
@@ -1004,7 +1004,7 @@
   params.position = gfx::PointF(20, 20);
 
   // Activate the portal, and then wait for the predecessor to be reactivated.
-  base::Optional<PortalActivatedObserver> adopted_activated;
+  absl::optional<PortalActivatedObserver> adopted_activated;
   {
     PortalCreatedObserver adoption_observer(portal_frame);
     adoption_observer.set_created_callback(base::BindLambdaForTesting(
@@ -1074,7 +1074,7 @@
   params.duration_ms = 1;
 
   // Simulate a tap and activate the portal.
-  base::Optional<PortalActivatedObserver> adopted_activated;
+  absl::optional<PortalActivatedObserver> adopted_activated;
   {
     PortalCreatedObserver adoption_observer(portal_frame);
     adoption_observer.set_created_callback(base::BindLambdaForTesting(
@@ -1899,7 +1899,7 @@
       main_frame->GetProcess());
   outer_delegate_proxy->AdvanceFocus(blink::mojom::FocusType::kNone,
                                      main_frame->GetFrameToken());
-  base::Optional<bad_message::BadMessageReason> result = rph_kill_waiter.Wait();
+  absl::optional<bad_message::BadMessageReason> result = rph_kill_waiter.Wait();
   EXPECT_TRUE(result.has_value());
   EXPECT_EQ(result.value(), bad_message::RFPH_ADVANCE_FOCUS_INTO_PORTAL);
 }
@@ -2693,7 +2693,7 @@
   }
 
  private:
-  base::Optional<URLLoaderInterceptor> url_loader_interceptor_;
+  absl::optional<URLLoaderInterceptor> url_loader_interceptor_;
 };
 
 IN_PROC_BROWSER_TEST_F(PortalOriginTrialBrowserTest, WithoutTrialToken) {
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index c8d0148..4493794 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -179,7 +179,7 @@
 PpapiPluginProcessHost* PpapiPluginProcessHost::CreatePluginHost(
     const PepperPluginInfo& info,
     const base::FilePath& profile_data_directory,
-    const base::Optional<url::Origin>& origin_lock) {
+    const absl::optional<url::Origin>& origin_lock) {
   PpapiPluginProcessHost* plugin_host =
       new PpapiPluginProcessHost(info, profile_data_directory, origin_lock);
   if (plugin_host->Init(info))
@@ -259,7 +259,7 @@
 PpapiPluginProcessHost::PpapiPluginProcessHost(
     const PepperPluginInfo& info,
     const base::FilePath& profile_data_directory,
-    const base::Optional<url::Origin>& origin_lock)
+    const absl::optional<url::Origin>& origin_lock)
     : profile_data_directory_(profile_data_directory),
       origin_lock_(origin_lock) {
   uint32_t base_permissions = info.permissions;
diff --git a/content/browser/ppapi_plugin_process_host.h b/content/browser/ppapi_plugin_process_host.h
index 47f218f..924c4b4 100644
--- a/content/browser/ppapi_plugin_process_host.h
+++ b/content/browser/ppapi_plugin_process_host.h
@@ -15,13 +15,13 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
 #include "content/public/browser/browser_child_process_host_delegate.h"
 #include "content/public/browser/browser_child_process_host_iterator.h"
 #include "ipc/ipc_sender.h"
 #include "ppapi/shared_impl/ppapi_permissions.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
@@ -67,7 +67,7 @@
   static PpapiPluginProcessHost* CreatePluginHost(
       const PepperPluginInfo& info,
       const base::FilePath& profile_data_directory,
-      const base::Optional<url::Origin>& origin_lock);
+      const absl::optional<url::Origin>& origin_lock);
 
   // Notification that a PP_Instance has been created and the associated
   // renderer related data including the RenderView/Process pair for the given
@@ -97,7 +97,7 @@
 
   BrowserPpapiHostImpl* host_impl() { return host_impl_.get(); }
   BrowserChildProcessHostImpl* process() { return process_.get(); }
-  const base::Optional<url::Origin>& origin_lock() const {
+  const absl::optional<url::Origin>& origin_lock() const {
     return origin_lock_;
   }
   const base::FilePath& plugin_path() const { return plugin_path_; }
@@ -114,7 +114,7 @@
   // You must call Init before doing anything else.
   PpapiPluginProcessHost(const PepperPluginInfo& info,
                          const base::FilePath& profile_data_directory,
-                         const base::Optional<url::Origin>& origin_lock);
+                         const absl::optional<url::Origin>& origin_lock);
 
   // Actually launches the process with the given plugin info. Returns true
   // on success (the process was spawned).
@@ -156,7 +156,7 @@
 
   // Specific origin to which this is bound, omitted to allow any origin to
   // re-use the plugin host.
-  const base::Optional<url::Origin> origin_lock_;
+  const absl::optional<url::Origin> origin_lock_;
 
   std::unique_ptr<BrowserChildProcessHostImpl> process_;
 
diff --git a/content/browser/prerender/prerender_browsertest.cc b/content/browser/prerender/prerender_browsertest.cc
index fed7eec..e34e837 100644
--- a/content/browser/prerender/prerender_browsertest.cc
+++ b/content/browser/prerender/prerender_browsertest.cc
@@ -11,7 +11,6 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/scoped_observation.h"
 #include "base/synchronization/lock.h"
@@ -52,6 +51,7 @@
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "net/test/embedded_test_server/http_request.h"
 #include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/browser_interface_broker.mojom.h"
 #include "ui/shell_dialogs/select_file_dialog.h"
diff --git a/content/browser/prerender/prerender_host.h b/content/browser/prerender/prerender_host.h
index 107d2e4..09592d2 100644
--- a/content/browser/prerender/prerender_host.h
+++ b/content/browser/prerender/prerender_host.h
@@ -8,13 +8,13 @@
 #include <memory>
 
 #include "base/observer_list_types.h"
-#include "base/optional.h"
 #include "base/types/pass_key.h"
 #include "content/browser/renderer_host/back_forward_cache_impl.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/global_routing_id.h"
 #include "content/public/browser/render_frame_host.h"
 #include "content/public/browser/web_contents_observer.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/prerender/prerender.mojom.h"
 #include "url/gurl.h"
@@ -135,7 +135,7 @@
   // this is also used for the ID of this PrerenderHost.
   int frame_tree_node_id_ = RenderFrameHost::kNoFrameTreeNodeId;
 
-  base::Optional<FinalStatus> final_status_;
+  absl::optional<FinalStatus> final_status_;
 
   std::unique_ptr<PageHolder> page_holder_;
 
diff --git a/content/browser/presentation/presentation_service_impl_unittest.cc b/content/browser/presentation/presentation_service_impl_unittest.cc
index f60bc3f..d34d8f5 100644
--- a/content/browser/presentation/presentation_service_impl_unittest.cc
+++ b/content/browser/presentation/presentation_service_impl_unittest.cc
@@ -16,7 +16,6 @@
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "content/browser/presentation/presentation_test_utils.h"
@@ -31,6 +30,7 @@
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -155,7 +155,7 @@
   std::unique_ptr<PresentationServiceImpl> service_impl_;
 
   MockPresentationController mock_controller_;
-  base::Optional<mojo::Receiver<PresentationController>> controller_receiver_;
+  absl::optional<mojo::Receiver<PresentationController>> controller_receiver_;
 
   GURL presentation_url1_;
   GURL presentation_url2_;
diff --git a/content/browser/process_internals/process_internals_handler_impl.cc b/content/browser/process_internals/process_internals_handler_impl.cc
index 43dd9e5..6bfc35f 100644
--- a/content/browser/process_internals/process_internals_handler_impl.cc
+++ b/content/browser/process_internals/process_internals_handler_impl.cc
@@ -38,8 +38,8 @@
   frame_info->process_id = frame->GetProcess()->GetID();
   frame_info->last_committed_url =
       frame->GetLastCommittedURL().is_valid()
-          ? base::make_optional(frame->GetLastCommittedURL())
-          : base::nullopt;
+          ? absl::make_optional(frame->GetLastCommittedURL())
+          : absl::nullopt;
   frame_info->is_bfcached = is_bfcached;
 
   SiteInstanceImpl* site_instance =
@@ -54,8 +54,8 @@
 
   frame_info->site_instance->site_url =
       site_instance->HasSite()
-          ? base::make_optional(site_instance->GetSiteInfo().site_url())
-          : base::nullopt;
+          ? absl::make_optional(site_instance->GetSiteInfo().site_url())
+          : absl::nullopt;
 
   // Only send a process lock URL if it's different from the site URL.  In the
   // common case they are the same, so we avoid polluting the UI with two
@@ -65,8 +65,8 @@
                                   site_instance->GetSiteInfo().site_url();
   frame_info->site_instance->process_lock_url =
       should_show_lock_url
-          ? base::make_optional(site_instance->GetSiteInfo().process_lock_url())
-          : base::nullopt;
+          ? absl::make_optional(site_instance->GetSiteInfo().process_lock_url())
+          : absl::nullopt;
 
   frame_info->site_instance->is_origin_keyed =
       site_instance->GetSiteInfo().is_origin_keyed();
diff --git a/content/browser/push_messaging/push_messaging_manager.cc b/content/browser/push_messaging/push_messaging_manager.cc
index d39de525..910e436a 100644
--- a/content/browser/push_messaging/push_messaging_manager.cc
+++ b/content/browser/push_messaging/push_messaging_manager.cc
@@ -15,7 +15,6 @@
 #include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/notreached.h"
-#include "base/optional.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/task/post_task.h"
 #include "base/time/time.h"
@@ -31,6 +30,7 @@
 #include "content/public/browser/web_contents.h"
 #include "content/public/common/child_process_host.h"
 #include "content/public/common/content_switches.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
 #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
 #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom.h"
@@ -136,7 +136,7 @@
 
   GURL requesting_origin;
   int64_t service_worker_registration_id;
-  base::Optional<std::string> existing_subscription_id;
+  absl::optional<std::string> existing_subscription_id;
   blink::mojom::PushSubscriptionOptionsPtr options;
   SubscribeCallback callback;
 
@@ -174,7 +174,7 @@
       const std::string& application_server_key,
       bool is_valid,
       const GURL& endpoint,
-      const base::Optional<base::Time>& expiration_time,
+      const absl::optional<base::Time>& expiration_time,
       const std::vector<uint8_t>& p256dh,
       const std::vector<uint8_t>& auth);
 
@@ -218,7 +218,7 @@
   void DidRegister(RegisterData data,
                    const std::string& push_subscription_id,
                    const GURL& endpoint,
-                   const base::Optional<base::Time>& expiration_time,
+                   const absl::optional<base::Time>& expiration_time,
                    const std::vector<uint8_t>& p256dh,
                    const std::vector<uint8_t>& auth,
                    blink::mojom::PushRegistrationStatus status);
@@ -518,7 +518,7 @@
     RegisterData data,
     const std::string& push_subscription_id,
     const GURL& endpoint,
-    const base::Optional<base::Time>& expiration_time,
+    const absl::optional<base::Time>& expiration_time,
     const std::vector<uint8_t>& p256dh,
     const std::vector<uint8_t>& auth,
     blink::mojom::PushRegistrationStatus status) {
@@ -557,7 +557,7 @@
     RegisterData data,
     const std::string& push_subscription_id,
     const GURL& endpoint,
-    const base::Optional<base::Time>& expiration_time,
+    const absl::optional<base::Time>& expiration_time,
     const std::vector<uint8_t>& p256dh,
     const std::vector<uint8_t>& auth,
     blink::mojom::PushRegistrationStatus status) {
@@ -580,7 +580,7 @@
 void PushMessagingManager::DidPersistRegistrationOnSW(
     RegisterData data,
     const GURL& endpoint,
-    const base::Optional<base::Time>& expiration_time,
+    const absl::optional<base::Time>& expiration_time,
     const std::vector<uint8_t>& p256dh,
     const std::vector<uint8_t>& auth,
     blink::mojom::PushRegistrationStatus push_registration_status,
@@ -608,7 +608,7 @@
     RegisterData data,
     blink::mojom::PushRegistrationStatus status,
     const GURL& endpoint,
-    const base::Optional<base::Time>& expiration_time,
+    const absl::optional<base::Time>& expiration_time,
     const std::vector<uint8_t>& p256dh,
     const std::vector<uint8_t>& auth) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
@@ -726,12 +726,12 @@
     case blink::mojom::PushUnregistrationStatus::PENDING_SERVICE_ERROR:
       std::move(callback).Run(blink::mojom::PushErrorType::NONE,
                               true /* did_unsubscribe */,
-                              base::nullopt /* error_message */);
+                              absl::nullopt /* error_message */);
       break;
     case blink::mojom::PushUnregistrationStatus::SUCCESS_WAS_NOT_REGISTERED:
       std::move(callback).Run(blink::mojom::PushErrorType::NONE,
                               false /* did_unsubscribe */,
-                              base::nullopt /* error_message */);
+                              absl::nullopt /* error_message */);
       break;
     case blink::mojom::PushUnregistrationStatus::NO_SERVICE_WORKER:
     case blink::mojom::PushUnregistrationStatus::SERVICE_NOT_AVAILABLE:
@@ -860,7 +860,7 @@
     const std::string& application_server_key,
     bool is_valid,
     const GURL& endpoint,
-    const base::Optional<base::Time>& expiration_time,
+    const absl::optional<base::Time>& expiration_time,
     const std::vector<uint8_t>& p256dh,
     const std::vector<uint8_t>& auth) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -945,7 +945,7 @@
   if (!push_service) {
     std::move(callback).Run(
         false /* is_valid */, GURL::EmptyGURL() /* endpoint */,
-        base::nullopt /* expiration_time */,
+        absl::nullopt /* expiration_time */,
         std::vector<uint8_t>() /* p256dh */, std::vector<uint8_t>() /* auth */);
     return;
   }
diff --git a/content/browser/push_messaging/push_messaging_manager.h b/content/browser/push_messaging/push_messaging_manager.h
index 33cac78c..e3ae88a2 100644
--- a/content/browser/push_messaging/push_messaging_manager.h
+++ b/content/browser/push_messaging/push_messaging_manager.h
@@ -82,7 +82,7 @@
       RegisterData data,
       const std::string& push_subscription_id,
       const GURL& endpoint,
-      const base::Optional<base::Time>& expiration_time,
+      const absl::optional<base::Time>& expiration_time,
       const std::vector<uint8_t>& p256dh,
       const std::vector<uint8_t>& auth,
       blink::mojom::PushRegistrationStatus status);
@@ -90,7 +90,7 @@
   void DidPersistRegistrationOnSW(
       RegisterData data,
       const GURL& endpoint,
-      const base::Optional<base::Time>& expiration_time,
+      const absl::optional<base::Time>& expiration_time,
       const std::vector<uint8_t>& p256dh,
       const std::vector<uint8_t>& auth,
       blink::mojom::PushRegistrationStatus push_registration_status,
@@ -104,7 +104,7 @@
       RegisterData data,
       blink::mojom::PushRegistrationStatus status,
       const GURL& endpoint,
-      const base::Optional<base::Time>& expiration_time,
+      const absl::optional<base::Time>& expiration_time,
       const std::vector<uint8_t>& p256dh,
       const std::vector<uint8_t>& auth);
 
diff --git a/content/browser/push_messaging/push_messaging_router.cc b/content/browser/push_messaging/push_messaging_router.cc
index f7c33c42..43c4dd05 100644
--- a/content/browser/push_messaging/push_messaging_router.cc
+++ b/content/browser/push_messaging/push_messaging_router.cc
@@ -123,7 +123,7 @@
     const GURL& origin,
     int64_t service_worker_registration_id,
     const std::string& message_id,
-    base::Optional<std::string> payload,
+    absl::optional<std::string> payload,
     PushEventCallback deliver_message_callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   StartServiceWorkerForDispatch(
@@ -136,7 +136,7 @@
 // static
 void PushMessagingRouter::DeliverMessageToWorker(
     const std::string& message_id,
-    base::Optional<std::string> payload,
+    absl::optional<std::string> payload,
     PushEventCallback deliver_message_callback,
     scoped_refptr<ServiceWorkerVersion> service_worker,
     scoped_refptr<DevToolsBackgroundServicesContextImpl> devtools_context,
diff --git a/content/browser/push_messaging/push_messaging_router.h b/content/browser/push_messaging/push_messaging_router.h
index 5fde5fe..8d58668 100644
--- a/content/browser/push_messaging/push_messaging_router.h
+++ b/content/browser/push_messaging/push_messaging_router.h
@@ -10,7 +10,7 @@
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom-forward.h"
 #include "url/gurl.h"
@@ -39,7 +39,7 @@
                              const GURL& origin,
                              int64_t service_worker_registration_id,
                              const std::string& message_id,
-                             base::Optional<std::string> payload,
+                             absl::optional<std::string> payload,
                              PushEventCallback deliver_message_callback);
 
   // TODO(https://crbug.com/753163): Add the ability to trigger a push
@@ -60,7 +60,7 @@
   // Must be called on the ServiceWorkerContext core thread.
   static void DeliverMessageToWorker(
       const std::string& message_id,
-      base::Optional<std::string> payload,
+      absl::optional<std::string> payload,
       PushEventCallback deliver_message_callback,
       scoped_refptr<ServiceWorkerVersion> service_worker,
       scoped_refptr<DevToolsBackgroundServicesContextImpl> devtools_context,
diff --git a/content/browser/renderer_host/agent_scheduling_group_host.cc b/content/browser/renderer_host/agent_scheduling_group_host.cc
index 964fd56..68d34d9 100644
--- a/content/browser/renderer_host/agent_scheduling_group_host.cc
+++ b/content/browser/renderer_host/agent_scheduling_group_host.cc
@@ -339,7 +339,7 @@
 void AgentSchedulingGroupHost::CreateFrameProxy(
     const blink::RemoteFrameToken& token,
     int32_t routing_id,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int32_t view_routing_id,
     int32_t parent_routing_id,
     blink::mojom::FrameReplicationStatePtr replicated_state,
diff --git a/content/browser/renderer_host/agent_scheduling_group_host.h b/content/browser/renderer_host/agent_scheduling_group_host.h
index 0cb1079..ba5c49e 100644
--- a/content/browser/renderer_host/agent_scheduling_group_host.h
+++ b/content/browser/renderer_host/agent_scheduling_group_host.h
@@ -95,7 +95,7 @@
   void CreateFrameProxy(
       const blink::RemoteFrameToken& token,
       int32_t routing_id,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int32_t view_routing_id,
       int32_t parent_routing_id,
       blink::mojom::FrameReplicationStatePtr replicated_state,
diff --git a/content/browser/renderer_host/back_forward_cache_impl.h b/content/browser/renderer_host/back_forward_cache_impl.h
index 6c3795d5..7e0e77e 100644
--- a/content/browser/renderer_host/back_forward_cache_impl.h
+++ b/content/browser/renderer_host/back_forward_cache_impl.h
@@ -13,7 +13,6 @@
 #include "base/feature_list.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/time/time.h"
@@ -25,6 +24,7 @@
 #include "content/public/browser/render_process_host.h"
 #include "content/public/browser/render_process_host_observer.h"
 #include "content/public/common/content_features.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/page/page.mojom.h"
 #include "third_party/perfetto/include/perfetto/tracing/traced_value_forward.h"
 #include "url/gurl.h"
diff --git a/content/browser/renderer_host/back_forward_cache_metrics.cc b/content/browser/renderer_host/back_forward_cache_metrics.cc
index 9c18b7c8..8b293de 100644
--- a/content/browser/renderer_host/back_forward_cache_metrics.cc
+++ b/content/browser/renderer_host/back_forward_cache_metrics.cc
@@ -142,10 +142,10 @@
 
   // BackForwardCacheMetrics can be reused when reloading. Reset fields for UKM
   // for the next navigation.
-  navigated_away_from_main_document_timestamp_ = base::nullopt;
-  started_navigation_timestamp_ = base::nullopt;
-  renderer_killed_timestamp_ = base::nullopt;
-  browsing_instance_swap_result_ = base::nullopt;
+  navigated_away_from_main_document_timestamp_ = absl::nullopt;
+  started_navigation_timestamp_ = absl::nullopt;
+  renderer_killed_timestamp_ = absl::nullopt;
+  browsing_instance_swap_result_ = absl::nullopt;
 }
 
 void BackForwardCacheMetrics::RecordHistoryNavigationUkm(
@@ -439,7 +439,7 @@
 }
 
 void BackForwardCacheMetrics::SetBrowsingInstanceSwapResult(
-    base::Optional<ShouldSwapBrowsingInstance> reason) {
+    absl::optional<ShouldSwapBrowsingInstance> reason) {
   browsing_instance_swap_result_ = reason;
 }
 
diff --git a/content/browser/renderer_host/back_forward_cache_metrics.h b/content/browser/renderer_host/back_forward_cache_metrics.h
index 3068258..69a7648 100644
--- a/content/browser/renderer_host/back_forward_cache_metrics.h
+++ b/content/browser/renderer_host/back_forward_cache_metrics.h
@@ -10,13 +10,13 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/time/tick_clock.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/should_swap_browsing_instance.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/back_forward_cache.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace url {
 class Origin;
@@ -162,9 +162,9 @@
       EvictedAfterDocumentRestoredReason reason);
 
   // Sets the reason why the browsing instance is not swapped. Passing
-  // base::nullopt resets the reason.
+  // absl::nullopt resets the reason.
   void SetBrowsingInstanceSwapResult(
-      base::Optional<ShouldSwapBrowsingInstance> reason);
+      absl::optional<ShouldSwapBrowsingInstance> reason);
 
   // Notifies that the main frame has started a navigation to an entry
   // associated with |this|.
@@ -265,8 +265,8 @@
   uint64_t same_origin_frames_features_ = 0;
   uint64_t cross_origin_frames_features_ = 0;
 
-  base::Optional<base::TimeTicks> started_navigation_timestamp_;
-  base::Optional<base::TimeTicks> navigated_away_from_main_document_timestamp_;
+  absl::optional<base::TimeTicks> started_navigation_timestamp_;
+  absl::optional<base::TimeTicks> navigated_away_from_main_document_timestamp_;
 
   std::unique_ptr<BackForwardCacheCanStoreDocumentResult> page_store_result_;
 
@@ -275,11 +275,11 @@
   bool previous_navigation_is_history_ = false;
   bool previous_navigation_is_served_from_bfcache_ = false;
 
-  base::Optional<base::TimeTicks> renderer_killed_timestamp_;
+  absl::optional<base::TimeTicks> renderer_killed_timestamp_;
 
   // The reason why the last attempted navigation in the frame used or didn't
   // use a new BrowsingInstance.
-  base::Optional<ShouldSwapBrowsingInstance> browsing_instance_swap_result_;
+  absl::optional<ShouldSwapBrowsingInstance> browsing_instance_swap_result_;
 
   DISALLOW_COPY_AND_ASSIGN(BackForwardCacheMetrics);
 };
diff --git a/content/browser/renderer_host/blocked_scheme_navigation_browsertest.cc b/content/browser/renderer_host/blocked_scheme_navigation_browsertest.cc
index 18cac7db..ff0e948 100644
--- a/content/browser/renderer_host/blocked_scheme_navigation_browsertest.cc
+++ b/content/browser/renderer_host/blocked_scheme_navigation_browsertest.cc
@@ -363,7 +363,7 @@
             ? std::string()
             : base::StringPrintf(kNavigationBlockedMessage, scheme.c_str());
 
-    base::Optional<WebContentsConsoleObserver> console_observer;
+    absl::optional<WebContentsConsoleObserver> console_observer;
     if (!expected_message.empty()) {
       console_observer.emplace(shell()->web_contents());
       console_observer->SetPattern(expected_message);
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm
index eb7bc3a..a0fbf5b 100644
--- a/content/browser/renderer_host/browser_compositor_view_mac.mm
+++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -13,7 +13,6 @@
 #include "base/command_line.h"
 #include "base/containers/circular_deque.h"
 #include "base/lazy_instance.h"
-#include "base/optional.h"
 #include "base/trace_event/trace_event.h"
 #include "components/viz/common/features.h"
 #include "components/viz/common/surfaces/local_surface_id.h"
@@ -21,6 +20,7 @@
 #include "content/browser/renderer_host/display_util.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/context_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/accelerated_widget_mac/accelerated_widget_mac.h"
 #include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
 #include "ui/base/layout.h"
diff --git a/content/browser/renderer_host/clipboard_host_impl.h b/content/browser/renderer_host/clipboard_host_impl.h
index 77a4ae0..05cbbba 100644
--- a/content/browser/renderer_host/clipboard_host_impl.h
+++ b/content/browser/renderer_host/clipboard_host_impl.h
@@ -13,13 +13,13 @@
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/base/big_buffer.h"
 #include "mojo/public/cpp/bindings/receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/clipboard/clipboard.mojom.h"
 #include "ui/base/clipboard/clipboard.h"
 
@@ -86,7 +86,7 @@
     void InvokeCallbacks();
 
     base::Time time_{base::Time::Now()};
-    base::Optional<ClipboardPasteContentAllowed> allowed_;
+    absl::optional<ClipboardPasteContentAllowed> allowed_;
     std::vector<IsClipboardPasteContentAllowedCallback> callbacks_;
   };
 
diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc
index 6c5e198..90d9063 100644
--- a/content/browser/renderer_host/code_cache_host_impl.cc
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
@@ -42,16 +42,16 @@
 // The secondary key is:
 // Case 1. an empty GURL if the render process is not locked to an origin. In
 // this case, code cache uses |resource_url| as the key.
-// Case 2. a base::nullopt, if the origin lock is opaque (for ex: browser
+// Case 2. a absl::nullopt, if the origin lock is opaque (for ex: browser
 // initiated navigation to a data: URL). In these cases, the code should not be
 // cached since the serialized value of opaque origins should not be used as a
 // key.
 // Case 3: origin_lock if the scheme of origin_lock is Http/Https/chrome.
-// Case 4. base::nullopt otherwise.
-base::Optional<GURL> GetSecondaryKeyForCodeCache(const GURL& resource_url,
+// Case 4. absl::nullopt otherwise.
+absl::optional<GURL> GetSecondaryKeyForCodeCache(const GURL& resource_url,
                                                  int render_process_id) {
   if (!resource_url.is_valid() || !resource_url.SchemeIsHTTPOrHTTPS())
-    return base::nullopt;
+    return absl::nullopt;
 
   ProcessLock process_lock =
       ChildProcessSecurityPolicyImpl::GetInstance()->GetProcessLock(
@@ -67,9 +67,9 @@
   // origin checks should always fail for opaque origins but the serialized
   // value of opaque origins does not ensure this.
   // NOTE: HasOpaqueOrigin() will return true if the ProcessLock lock url is
-  // invalid, leading to a return value of base::nullopt.
+  // invalid, leading to a return value of absl::nullopt.
   if (process_lock.HasOpaqueOrigin())
-    return base::nullopt;
+    return absl::nullopt;
 
   // Case 3: process_lock_url is used to enfore site-isolation in code caches.
   // Http/https/chrome schemes are safe to be used as a secondary key. Other
@@ -86,7 +86,7 @@
     return process_lock.lock_url();
   }
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace
@@ -128,7 +128,7 @@
   if (!code_cache)
     return;
 
-  base::Optional<GURL> origin_lock =
+  absl::optional<GURL> origin_lock =
       GetSecondaryKeyForCodeCache(url, render_process_id_);
   if (!origin_lock)
     return;
@@ -146,7 +146,7 @@
     return;
   }
 
-  base::Optional<GURL> origin_lock =
+  absl::optional<GURL> origin_lock =
       GetSecondaryKeyForCodeCache(url, render_process_id_);
   if (!origin_lock) {
     std::move(callback).Run(base::Time(), std::vector<uint8_t>());
@@ -166,7 +166,7 @@
   if (!code_cache)
     return;
 
-  base::Optional<GURL> origin_lock =
+  absl::optional<GURL> origin_lock =
       GetSecondaryKeyForCodeCache(url, render_process_id_);
   if (!origin_lock)
     return;
diff --git a/content/browser/renderer_host/cookie_browsertest.cc b/content/browser/renderer_host/cookie_browsertest.cc
index 74c9606..315a00b 100644
--- a/content/browser/renderer_host/cookie_browsertest.cc
+++ b/content/browser/renderer_host/cookie_browsertest.cc
@@ -8,7 +8,6 @@
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/task/post_task.h"
 #include "base/test/bind.h"
 #include "base/test/metrics/histogram_tester.h"
@@ -42,6 +41,7 @@
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -66,7 +66,7 @@
       net::CookieOptions::SameSiteCookieContext::MakeInclusive());
 
   auto cookie_obj = net::CanonicalCookie::Create(
-      url, cookie_line, base::Time::Now(), base::nullopt /* server_time */);
+      url, cookie_line, base::Time::Now(), absl::nullopt /* server_time */);
 
   base::RunLoop run_loop;
   tab->GetBrowserContext()
@@ -288,7 +288,7 @@
       mojo::PendingRemote<network::mojom::RestrictedCookieManager> real_rcm)
       : receiver_(this, std::move(receiver)), real_rcm_(std::move(real_rcm)) {}
 
-  void set_override_url(base::Optional<std::string> maybe_url) {
+  void set_override_url(absl::optional<std::string> maybe_url) {
     override_url_ = std::move(maybe_url);
   }
 
@@ -319,7 +319,7 @@
     return override_url_ ? GURL(override_url_.value()) : url_in;
   }
 
-  base::Optional<std::string> override_url_;
+  absl::optional<std::string> override_url_;
 
   mojo::Receiver<network::mojom::RestrictedCookieManager> receiver_;
   mojo::Remote<network::mojom::RestrictedCookieManager> real_rcm_;
@@ -352,14 +352,14 @@
     return false;  // only made a proxy, still need the actual impl to be made.
   }
 
-  void set_override_url(base::Optional<std::string> maybe_url) {
+  void set_override_url(absl::optional<std::string> maybe_url) {
     override_url_ = maybe_url;
     if (rcm_interceptor_)
       rcm_interceptor_->set_override_url(override_url_);
   }
 
  private:
-  base::Optional<std::string> override_url_;
+  absl::optional<std::string> override_url_;
   std::unique_ptr<RestrictedCookieManagerInterceptor> rcm_interceptor_;
 };
 
diff --git a/content/browser/renderer_host/cross_origin_opener_policy_status.cc b/content/browser/renderer_host/cross_origin_opener_policy_status.cc
index 15fceac4..aa98c8e0 100644
--- a/content/browser/renderer_host/cross_origin_opener_policy_status.cc
+++ b/content/browser/renderer_host/cross_origin_opener_policy_status.cc
@@ -128,14 +128,14 @@
   return parsed_headers->cross_origin_opener_policy;
 }
 
-base::Optional<network::mojom::BlockedByResponseReason>
+absl::optional<network::mojom::BlockedByResponseReason>
 CrossOriginOpenerPolicyStatus::EnforceCOOP(
     const network::CrossOriginOpenerPolicy& response_coop,
     const url::Origin& response_origin,
     const net::NetworkIsolationKey& network_isolation_key) {
   // COOP only applies to top level browsing contexts.
   if (!frame_tree_node_->IsMainFrame()) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   const GURL& response_url = navigation_request_->common_params().url;
@@ -266,7 +266,7 @@
   // of the navigation to the subsequent response.
   is_navigation_source_ = true;
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 std::unique_ptr<CrossOriginOpenerPolicyReporter>
@@ -336,8 +336,8 @@
           "CrossOriginOpenerPolicyReporting", base::Time::Now());
 
   if (!reporting_enabled) {
-    coop.reporting_endpoint = base::nullopt;
-    coop.report_only_reporting_endpoint = base::nullopt;
+    coop.reporting_endpoint = absl::nullopt;
+    coop.report_only_reporting_endpoint = absl::nullopt;
     coop.report_only_value =
         network::mojom::CrossOriginOpenerPolicyValue::kUnsafeNone;
   }
diff --git a/content/browser/renderer_host/cross_origin_opener_policy_status.h b/content/browser/renderer_host/cross_origin_opener_policy_status.h
index 0c10a15..e2b8d63c 100644
--- a/content/browser/renderer_host/cross_origin_opener_policy_status.h
+++ b/content/browser/renderer_host/cross_origin_opener_policy_status.h
@@ -38,7 +38,7 @@
   // Called when receiving a redirect or the final response. Returns a
   // BlockedByResponse reason if the navigation should be blocked, nullopt
   // otherwise.
-  base::Optional<network::mojom::BlockedByResponseReason> EnforceCOOP(
+  absl::optional<network::mojom::BlockedByResponseReason> EnforceCOOP(
       const network::CrossOriginOpenerPolicy& response_coop,
       const url::Origin& response_origin,
       const net::NetworkIsolationKey& network_isolation_key);
diff --git a/content/browser/renderer_host/cross_process_frame_connector.cc b/content/browser/renderer_host/cross_process_frame_connector.cc
index 89ecb17..44bea54c 100644
--- a/content/browser/renderer_host/cross_process_frame_connector.cc
+++ b/content/browser/renderer_host/cross_process_frame_connector.cc
@@ -327,7 +327,7 @@
 
 void CrossProcessFrameConnector::UpdateViewportIntersection(
     const blink::mojom::ViewportIntersectionState& intersection_state,
-    const base::Optional<blink::FrameVisualProperties>& visual_properties) {
+    const absl::optional<blink::FrameVisualProperties>& visual_properties) {
   if (visual_properties.has_value())
     SynchronizeVisualProperties(visual_properties.value(), false);
   UpdateViewportIntersectionInternal(intersection_state);
diff --git a/content/browser/renderer_host/cross_process_frame_connector.h b/content/browser/renderer_host/cross_process_frame_connector.h
index 3634253..8d591f8 100644
--- a/content/browser/renderer_host/cross_process_frame_connector.h
+++ b/content/browser/renderer_host/cross_process_frame_connector.h
@@ -286,7 +286,7 @@
                                     bool display_locked);
   void UpdateViewportIntersection(
       const blink::mojom::ViewportIntersectionState& intersection_state,
-      const base::Optional<blink::FrameVisualProperties>& visual_properties);
+      const absl::optional<blink::FrameVisualProperties>& visual_properties);
 
   // These enums back crashed frame histograms - see MaybeLogCrash() and
   // MaybeLogShownCrash() below.  Please do not modify or remove existing enum
diff --git a/content/browser/renderer_host/data_transfer_util.cc b/content/browser/renderer_host/data_transfer_util.cc
index 6775ec7..3f2363d 100644
--- a/content/browser/renderer_host/data_transfer_util.cc
+++ b/content/browser/renderer_host/data_transfer_util.cc
@@ -11,13 +11,13 @@
 #include "base/check.h"
 #include "base/containers/span.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/chromeos_buildflags.h"
 #include "content/browser/file_system_access/file_system_access_manager_impl.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "services/network/public/mojom/referrer_policy.mojom-shared.h"
 #include "storage/browser/file_system/external_mount_points.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/file_system_access/file_system_access_data_transfer_token.mojom.h"
 #include "third_party/blink/public/mojom/page/drag.mojom.h"
 #include "ui/base/clipboard/clipboard_constants.h"
@@ -134,8 +134,8 @@
       // browser messages, in which case the field is unused and this will hit
       // a DCHECK.
       drop_data.filesystem_id.empty()
-          ? base::nullopt
-          : base::Optional<std::string>(
+          ? absl::nullopt
+          : absl::optional<std::string>(
                 base::UTF16ToUTF8(drop_data.filesystem_id)),
       drop_data.referrer_policy);
 }
@@ -182,7 +182,7 @@
       continue;
     }
   }
-  return blink::mojom::DragData::New(std::move(items), base::nullopt,
+  return blink::mojom::DragData::New(std::move(items), absl::nullopt,
                                      network::mojom::ReferrerPolicy::kDefault);
 }
 
diff --git a/content/browser/renderer_host/display_feature.cc b/content/browser/renderer_host/display_feature.cc
index f839304..a665ca5 100644
--- a/content/browser/renderer_host/display_feature.cc
+++ b/content/browser/renderer_host/display_feature.cc
@@ -44,7 +44,7 @@
 }
 
 // static
-base::Optional<DisplayFeature> DisplayFeature::Create(Orientation orientation,
+absl::optional<DisplayFeature> DisplayFeature::Create(Orientation orientation,
                                                       int offset,
                                                       int mask_length,
                                                       int width,
@@ -52,23 +52,23 @@
                                                       ParamErrorEnum* error) {
   if (!width && !height) {
     *error = ParamErrorEnum::kDisplayFeatureWithZeroScreenSize;
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   if (offset < 0 || mask_length < 0) {
     *error = ParamErrorEnum::kNegativeDisplayFeatureParams;
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   if (orientation == Orientation::kVertical && offset + mask_length > width) {
     *error = ParamErrorEnum::kOutsideScreenWidth;
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   if (orientation == Orientation::kHorizontal &&
       offset + mask_length > height) {
     *error = ParamErrorEnum::kOutsideScreenHeight;
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return DisplayFeature{orientation, offset, mask_length};
diff --git a/content/browser/renderer_host/display_feature.h b/content/browser/renderer_host/display_feature.h
index ec31167..d020320 100644
--- a/content/browser/renderer_host/display_feature.h
+++ b/content/browser/renderer_host/display_feature.h
@@ -7,9 +7,9 @@
 
 #include <vector>
 
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/gfx/geometry/rect.h"
 
 namespace content {
@@ -65,7 +65,7 @@
   std::vector<gfx::Rect> ComputeWindowSegments(
       const gfx::Size& visible_viewport_size) const;
 
-  static base::Optional<DisplayFeature> Create(
+  static absl::optional<DisplayFeature> Create(
       Orientation orientation,
       int offset,
       int mask_length,
diff --git a/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.h b/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.h
index f758390f..c827a6f 100644
--- a/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.h
+++ b/content/browser/renderer_host/dwrite_font_lookup_table_builder_win.h
@@ -19,10 +19,10 @@
 #include "base/macros.h"
 #include "base/memory/read_only_shared_memory_region.h"
 #include "base/memory/singleton.h"
-#include "base/optional.h"
 #include "base/synchronization/atomic_flag.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/font_unique_name_lookup/font_unique_name_table.pb.h"
 #include "third_party/blink/public/mojom/dwrite_font_proxy/dwrite_font_proxy.mojom.h"
 
@@ -232,7 +232,7 @@
   base::FilePath cache_directory_;
 
   bool caching_enabled_ = true;
-  base::Optional<base::WaitableEvent> hang_event_for_testing_;
+  absl::optional<base::WaitableEvent> hang_event_for_testing_;
   base::CancelableOnceCallback<void()> timeout_callback_;
 
   // All responses are serialized through this DeferredSequencedTaskRunner. It
diff --git a/content/browser/renderer_host/dwrite_font_lookup_table_builder_win_unittest.cc b/content/browser/renderer_host/dwrite_font_lookup_table_builder_win_unittest.cc
index 6e3f0e1..90489b2 100644
--- a/content/browser/renderer_host/dwrite_font_lookup_table_builder_win_unittest.cc
+++ b/content/browser/renderer_host/dwrite_font_lookup_table_builder_win_unittest.cc
@@ -61,7 +61,7 @@
     blink::FontTableMatcher font_table_matcher(font_table_memory.Map());
 
     for (auto& test_font_name_index : kExpectedTestFonts) {
-      base::Optional<blink::FontTableMatcher::MatchResult> match_result =
+      absl::optional<blink::FontTableMatcher::MatchResult> match_result =
           font_table_matcher.MatchName(test_font_name_index.font_name);
       ASSERT_TRUE(match_result) << "No font matched for font name: "
                                 << test_font_name_index.font_name;
@@ -118,7 +118,7 @@
         blink::FontTableMatcher font_table_matcher(font_table_memory.Map());
 
         for (auto& test_font_name_index : kExpectedTestFonts) {
-          base::Optional<blink::FontTableMatcher::MatchResult> match_result =
+          absl::optional<blink::FontTableMatcher::MatchResult> match_result =
               font_table_matcher.MatchName(test_font_name_index.font_name);
           ASSERT_TRUE(!match_result);
         }
diff --git a/content/browser/renderer_host/dwrite_font_proxy_impl_win_unittest.cc b/content/browser/renderer_host/dwrite_font_proxy_impl_win_unittest.cc
index 6a869e3a..8192e7e 100644
--- a/content/browser/renderer_host/dwrite_font_proxy_impl_win_unittest.cc
+++ b/content/browser/renderer_host/dwrite_font_proxy_impl_win_unittest.cc
@@ -306,7 +306,7 @@
     base::ReadOnlySharedMemoryRegion font_table_memory) {
   blink::FontTableMatcher font_table_matcher(font_table_memory.Map());
   for (auto& test_font_name_index : kExpectedTestFonts) {
-    base::Optional<blink::FontTableMatcher::MatchResult> match_result =
+    absl::optional<blink::FontTableMatcher::MatchResult> match_result =
         font_table_matcher.MatchName(test_font_name_index.font_name);
     ASSERT_TRUE(match_result)
         << "No font matched for font name: " << test_font_name_index.font_name;
diff --git a/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc b/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc
index 507b33af..1ee0103 100644
--- a/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc
+++ b/content/browser/renderer_host/embedded_frame_sink_provider_impl_unittest.cc
@@ -190,7 +190,7 @@
   // Renderer submits a CompositorFrame with |local_id|.
   const viz::LocalSurfaceId local_id(1, base::UnguessableToken::Create());
   compositor_frame_sink->SubmitCompositorFrame(
-      local_id, viz::MakeDefaultCompositorFrame(), base::nullopt, 0);
+      local_id, viz::MakeDefaultCompositorFrame(), absl::nullopt, 0);
 
   RunUntilIdle();
 
diff --git a/content/browser/renderer_host/file_utilities_host_impl.cc b/content/browser/renderer_host/file_utilities_host_impl.cc
index f959c86..b48f42a 100644
--- a/content/browser/renderer_host/file_utilities_host_impl.cc
+++ b/content/browser/renderer_host/file_utilities_host_impl.cc
@@ -8,10 +8,10 @@
 #include <utility>
 
 #include "base/files/file_util.h"
-#include "base/optional.h"
 #include "content/browser/child_process_security_policy_impl.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -33,7 +33,7 @@
   // permission to read the file.
   auto* security_policy = ChildProcessSecurityPolicyImpl::GetInstance();
   if (!security_policy->CanReadFile(process_id_, path)) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
 
@@ -41,7 +41,7 @@
   if (base::GetFileInfo(path, &info)) {
     std::move(callback).Run(info);
   } else {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
   }
 }
 
diff --git a/content/browser/renderer_host/frame_navigation_entry.cc b/content/browser/renderer_host/frame_navigation_entry.cc
index e9d940c..59bcb3d 100644
--- a/content/browser/renderer_host/frame_navigation_entry.cc
+++ b/content/browser/renderer_host/frame_navigation_entry.cc
@@ -24,9 +24,9 @@
     scoped_refptr<SiteInstanceImpl> site_instance,
     scoped_refptr<SiteInstanceImpl> source_site_instance,
     const GURL& url,
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     const Referrer& referrer,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     const std::vector<GURL>& redirect_chain,
     const blink::PageState& page_state,
     const std::string& method,
@@ -84,9 +84,9 @@
     SiteInstanceImpl* site_instance,
     scoped_refptr<SiteInstanceImpl> source_site_instance,
     const GURL& url,
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     const Referrer& referrer,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     const std::vector<GURL>& redirect_chain,
     const blink::PageState& page_state,
     const std::string& method,
diff --git a/content/browser/renderer_host/frame_navigation_entry.h b/content/browser/renderer_host/frame_navigation_entry.h
index b9fcb29..f106807 100644
--- a/content/browser/renderer_host/frame_navigation_entry.h
+++ b/content/browser/renderer_host/frame_navigation_entry.h
@@ -9,12 +9,12 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/policy_container_host.h"
 #include "content/browser/site_instance_impl.h"
 #include "content/public/common/referrer.h"
 #include "services/network/public/cpp/resource_request_body.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/page_state/page_state.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -49,9 +49,9 @@
       scoped_refptr<SiteInstanceImpl> site_instance,
       scoped_refptr<SiteInstanceImpl> source_site_instance,
       const GURL& url,
-      const base::Optional<url::Origin>& origin,
+      const absl::optional<url::Origin>& origin,
       const Referrer& referrer,
-      const base::Optional<url::Origin>& initiator_origin,
+      const absl::optional<url::Origin>& initiator_origin,
       const std::vector<GURL>& redirect_chain,
       const blink::PageState& page_state,
       const std::string& method,
@@ -74,9 +74,9 @@
       SiteInstanceImpl* site_instance,
       scoped_refptr<SiteInstanceImpl> source_site_instance,
       const GURL& url,
-      const base::Optional<url::Origin>& origin,
+      const absl::optional<url::Origin>& origin,
       const Referrer& referrer,
-      const base::Optional<url::Origin>& initiator_origin,
+      const absl::optional<url::Origin>& initiator_origin,
       const std::vector<GURL>& redirect_chain,
       const blink::PageState& page_state,
       const std::string& method,
@@ -144,10 +144,10 @@
   void set_referrer(const Referrer& referrer) { referrer_ = referrer; }
   const Referrer& referrer() const { return referrer_; }
 
-  // The origin that initiated the original navigation.  base::nullopt means
+  // The origin that initiated the original navigation.  absl::nullopt means
   // that the original navigation was browser-initiated (e.g. initiated from a
   // trusted surface like the omnibox or the bookmarks bar).
-  const base::Optional<url::Origin>& initiator_origin() const {
+  const absl::optional<url::Origin>& initiator_origin() const {
     return initiator_origin_;
   }
 
@@ -157,7 +157,7 @@
   void set_committed_origin(const url::Origin& origin) {
     committed_origin_ = origin;
   }
-  const base::Optional<url::Origin>& committed_origin() const {
+  const absl::optional<url::Origin>& committed_origin() const {
     return committed_origin_;
   }
 
@@ -244,9 +244,9 @@
   // For a committed navigation, holds the origin of the resulting document.
   // TODO(nasko): This should be possible to calculate at ReadyToCommit time
   // and verified when receiving the DidCommit IPC.
-  base::Optional<url::Origin> committed_origin_;
+  absl::optional<url::Origin> committed_origin_;
   Referrer referrer_;
-  base::Optional<url::Origin> initiator_origin_;
+  absl::optional<url::Origin> initiator_origin_;
   // This is used when transferring a pending entry from one process to another.
   // We also send the main frame's redirect chain through session sync for
   // offline analysis.
diff --git a/content/browser/renderer_host/frame_tree_node.h b/content/browser/renderer_host/frame_tree_node.h
index 104edc2..2f3aa37 100644
--- a/content/browser/renderer_host/frame_tree_node.h
+++ b/content/browser/renderer_host/frame_tree_node.h
@@ -127,7 +127,7 @@
 
   FrameTreeNode* original_opener() const { return original_opener_; }
 
-  const base::Optional<base::UnguessableToken>& opener_devtools_frame_token() {
+  const absl::optional<base::UnguessableToken>& opener_devtools_frame_token() {
     return opener_devtools_frame_token_;
   }
 
@@ -516,7 +516,7 @@
 
   // The devtools frame token of the frame which opened this frame. This is
   // not cleared even if the opener is destroyed or disowns the frame.
-  base::Optional<base::UnguessableToken> opener_devtools_frame_token_;
+  absl::optional<base::UnguessableToken> opener_devtools_frame_token_;
 
   // An observer that clears this node's |original_opener_| if the opener is
   // destroyed.
diff --git a/content/browser/renderer_host/input/input_router.h b/content/browser/renderer_host/input/input_router.h
index a9851670..ed463c0b 100644
--- a/content/browser/renderer_host/input/input_router.h
+++ b/content/browser/renderer_host/input/input_router.h
@@ -79,10 +79,10 @@
   virtual void SetFrameTreeNodeId(int frameTreeNodeId) = 0;
 
   // Return the currently allowed touch-action.
-  virtual base::Optional<cc::TouchAction> AllowedTouchAction() = 0;
+  virtual absl::optional<cc::TouchAction> AllowedTouchAction() = 0;
 
   // Return the currently active touch-action.
-  virtual base::Optional<cc::TouchAction> ActiveTouchAction() = 0;
+  virtual absl::optional<cc::TouchAction> ActiveTouchAction() = 0;
 
   virtual void SetForceEnableZoom(bool enabled) = 0;
 
diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc
index 3e59f18..3d8cc4fb 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -248,11 +248,11 @@
   touch_action_filter_.SetForceEnableZoom(enabled);
 }
 
-base::Optional<cc::TouchAction> InputRouterImpl::AllowedTouchAction() {
+absl::optional<cc::TouchAction> InputRouterImpl::AllowedTouchAction() {
   return touch_action_filter_.allowed_touch_action();
 }
 
-base::Optional<cc::TouchAction> InputRouterImpl::ActiveTouchAction() {
+absl::optional<cc::TouchAction> InputRouterImpl::ActiveTouchAction() {
   return touch_action_filter_.active_touch_action();
 }
 
@@ -740,7 +740,7 @@
   // TouchAction::kNone will prevent scrolling, in which case the timeout serves
   // little purpose. It's also a strong signal that touch handling is critical
   // to page functionality, so the timeout could do more harm than good.
-  base::Optional<cc::TouchAction> allowed_touch_action =
+  absl::optional<cc::TouchAction> allowed_touch_action =
       touch_action_filter_.allowed_touch_action();
   cc::TouchAction compositor_allowed_touch_action =
       touch_action_filter_.compositor_allowed_touch_action();
diff --git a/content/browser/renderer_host/input/input_router_impl.h b/content/browser/renderer_host/input/input_router_impl.h
index 93f1e97..8b025cf 100644
--- a/content/browser/renderer_host/input/input_router_impl.h
+++ b/content/browser/renderer_host/input/input_router_impl.h
@@ -79,8 +79,8 @@
   void SetDeviceScaleFactor(float device_scale_factor) override;
   void SetFrameTreeNodeId(int frame_tree_node_id) override;
   void SetForceEnableZoom(bool enabled) override;
-  base::Optional<cc::TouchAction> AllowedTouchAction() override;
-  base::Optional<cc::TouchAction> ActiveTouchAction() override;
+  absl::optional<cc::TouchAction> AllowedTouchAction() override;
+  absl::optional<cc::TouchAction> ActiveTouchAction() override;
   mojo::PendingRemote<blink::mojom::WidgetInputHandlerHost> BindNewHost()
       override;
   void StopFling() override;
diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
index c919387..0eab816 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -496,8 +496,8 @@
   void OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource source,
       blink::mojom::InputEventResultState ack_state,
-      base::Optional<cc::TouchAction> expected_touch_action,
-      base::Optional<cc::TouchAction> expected_allowed_touch_action) {
+      absl::optional<cc::TouchAction> expected_touch_action,
+      absl::optional<cc::TouchAction> expected_allowed_touch_action) {
     auto touch_event_consumers = blink::mojom::TouchEventConsumers::New(
         HasTouchEventHandlers(true), HasHitTestableScrollbar(false));
     input_router_->OnHasTouchEventConsumers(std::move(touch_event_consumers));
@@ -528,7 +528,7 @@
  public:
   InputRouterImplTest() = default;
 
-  base::Optional<cc::TouchAction> AllowedTouchAction() {
+  absl::optional<cc::TouchAction> AllowedTouchAction() {
     return input_router_->touch_action_filter_.allowed_touch_action_;
   }
 
@@ -728,7 +728,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateConsumed) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kConsumed, expected_touch_action,
@@ -736,7 +736,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateNotConsumed) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kNotConsumed, expected_touch_action,
@@ -744,7 +744,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateConsumedShouldBubble) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kNotConsumed, expected_touch_action,
@@ -752,7 +752,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateNoConsumerExists) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kNoConsumerExists,
@@ -760,7 +760,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateIgnored) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kIgnored, expected_touch_action,
@@ -768,7 +768,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateNonBlocking) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kSetNonBlocking,
@@ -776,7 +776,7 @@
 }
 
 TEST_F(InputRouterImplTest, TouchActionAutoWithAckStateNonBlockingDueToFling) {
-  base::Optional<cc::TouchAction> expected_touch_action;
+  absl::optional<cc::TouchAction> expected_touch_action;
   OnTouchEventAckWithAckState(
       blink::mojom::InputEventResultSource::kCompositorThread,
       blink::mojom::InputEventResultState::kSetNonBlockingDueToFling,
@@ -2191,13 +2191,13 @@
   DispatchedMessages dispatched_messages = GetAndResetDispatchedMessages();
   ASSERT_EQ(1U, dispatched_messages.size());
   ASSERT_TRUE(dispatched_messages[0]->ToEvent());
-  base::Optional<cc::TouchAction> expected_touch_action = cc::TouchAction::kPan;
+  absl::optional<cc::TouchAction> expected_touch_action = cc::TouchAction::kPan;
   dispatched_messages[0]->ToEvent()->CallCallback(
       blink::mojom::InputEventResultSource::kCompositorThread,
       ui::LatencyInfo(), blink::mojom::InputEventResultState::kConsumed,
       nullptr, blink::mojom::TouchActionOptional::New(cc::TouchAction::kPan));
   ASSERT_EQ(1U, disposition_handler_->GetAndResetAckCount());
-  base::Optional<cc::TouchAction> allowed_touch_action = AllowedTouchAction();
+  absl::optional<cc::TouchAction> allowed_touch_action = AllowedTouchAction();
   cc::TouchAction compositor_allowed_touch_action =
       CompositorAllowedTouchAction();
   EXPECT_FALSE(allowed_touch_action.has_value());
@@ -2431,7 +2431,7 @@
  public:
   InputRouterImplScaleGestureEventTest() {}
 
-  base::Optional<gfx::SizeF> GetContactSize(const WebGestureEvent& event) {
+  absl::optional<gfx::SizeF> GetContactSize(const WebGestureEvent& event) {
     switch (event.GetType()) {
       case WebInputEvent::Type::kGestureTapDown:
         return gfx::SizeF(event.data.tap_down.width,
@@ -2451,7 +2451,7 @@
         return gfx::SizeF(event.data.two_finger_tap.first_finger_width,
                           event.data.two_finger_tap.first_finger_height);
       default:
-        return base::nullopt;
+        return absl::nullopt;
     }
   }
 
@@ -2535,13 +2535,13 @@
       const WebGestureEvent* sent_event,
       const gfx::PointF& orig,
       const gfx::PointF& scaled,
-      const base::Optional<gfx::SizeF>& contact_size_scaled) {
+      const absl::optional<gfx::SizeF>& contact_size_scaled) {
     EXPECT_FLOAT_EQ(scaled.x(), sent_event->PositionInWidget().x());
     EXPECT_FLOAT_EQ(scaled.y(), sent_event->PositionInWidget().y());
     EXPECT_FLOAT_EQ(orig.x(), sent_event->PositionInScreen().x());
     EXPECT_FLOAT_EQ(orig.y(), sent_event->PositionInScreen().y());
 
-    base::Optional<gfx::SizeF> event_contact_size = GetContactSize(*sent_event);
+    absl::optional<gfx::SizeF> event_contact_size = GetContactSize(*sent_event);
     if (event_contact_size && contact_size_scaled) {
       EXPECT_FLOAT_EQ(contact_size_scaled->width(),
                       event_contact_size->width());
@@ -2553,13 +2553,13 @@
   void TestLocationInFilterEvent(
       const WebGestureEvent* filter_event,
       const gfx::PointF& orig,
-      const base::Optional<gfx::SizeF>& contact_size) {
+      const absl::optional<gfx::SizeF>& contact_size) {
     EXPECT_FLOAT_EQ(orig.x(), filter_event->PositionInWidget().x());
     EXPECT_FLOAT_EQ(orig.y(), filter_event->PositionInWidget().y());
     EXPECT_FLOAT_EQ(orig.x(), filter_event->PositionInScreen().x());
     EXPECT_FLOAT_EQ(orig.y(), filter_event->PositionInScreen().y());
 
-    base::Optional<gfx::SizeF> event_contact_size =
+    absl::optional<gfx::SizeF> event_contact_size =
         GetContactSize(*filter_event);
     if (event_contact_size && contact_size) {
       EXPECT_FLOAT_EQ(contact_size->width(), event_contact_size->width());
@@ -2640,12 +2640,12 @@
 
   FlushGestureEvents({WebInputEvent::Type::kGesturePinchUpdate});
   const WebGestureEvent* sent_event = GetSentWebInputEvent<WebGestureEvent>();
-  TestLocationInSentEvent(sent_event, anchor, anchor_scaled, base::nullopt);
+  TestLocationInSentEvent(sent_event, anchor, anchor_scaled, absl::nullopt);
   EXPECT_FLOAT_EQ(scale_change, sent_event->data.pinch_update.scale);
 
   const WebGestureEvent* filter_event =
       GetFilterWebInputEvent<WebGestureEvent>();
-  TestLocationInFilterEvent(filter_event, anchor, base::nullopt);
+  TestLocationInFilterEvent(filter_event, anchor, absl::nullopt);
   EXPECT_FLOAT_EQ(scale_change, filter_event->data.pinch_update.scale);
 
   SendGestureSequence({WebInputEvent::Type::kGesturePinchEnd,
diff --git a/content/browser/renderer_host/input/mock_input_router.cc b/content/browser/renderer_host/input/mock_input_router.cc
index d199325..035726f 100644
--- a/content/browser/renderer_host/input/mock_input_router.cc
+++ b/content/browser/renderer_host/input/mock_input_router.cc
@@ -37,11 +37,11 @@
   return false;
 }
 
-base::Optional<cc::TouchAction> MockInputRouter::AllowedTouchAction() {
+absl::optional<cc::TouchAction> MockInputRouter::AllowedTouchAction() {
   return cc::TouchAction::kAuto;
 }
 
-base::Optional<cc::TouchAction> MockInputRouter::ActiveTouchAction() {
+absl::optional<cc::TouchAction> MockInputRouter::ActiveTouchAction() {
   return cc::TouchAction::kAuto;
 }
 
diff --git a/content/browser/renderer_host/input/mock_input_router.h b/content/browser/renderer_host/input/mock_input_router.h
index 440c2d6f..dcf2eee2 100644
--- a/content/browser/renderer_host/input/mock_input_router.h
+++ b/content/browser/renderer_host/input/mock_input_router.h
@@ -7,10 +7,10 @@
 
 #include "content/browser/renderer_host/input/input_router.h"
 
-#include "base/optional.h"
 #include "cc/input/touch_action.h"
 #include "content/browser/renderer_host/event_with_latency_info.h"
 #include "content/common/input/event_with_latency_info.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/input/touch_event.mojom.h"
 
 namespace content {
@@ -42,8 +42,8 @@
   bool HasPendingEvents() const override;
   void SetDeviceScaleFactor(float device_scale_factor) override {}
   void SetFrameTreeNodeId(int frameTreeNodeId) override {}
-  base::Optional<cc::TouchAction> AllowedTouchAction() override;
-  base::Optional<cc::TouchAction> ActiveTouchAction() override;
+  absl::optional<cc::TouchAction> AllowedTouchAction() override;
+  absl::optional<cc::TouchAction> ActiveTouchAction() override;
   void SetForceEnableZoom(bool enabled) override {}
   mojo::PendingRemote<blink::mojom::WidgetInputHandlerHost> BindNewHost()
       override;
diff --git a/content/browser/renderer_host/input/touch_action_filter.h b/content/browser/renderer_host/input/touch_action_filter.h
index b264555a..68446903 100644
--- a/content/browser/renderer_host/input/touch_action_filter.h
+++ b/content/browser/renderer_host/input/touch_action_filter.h
@@ -8,9 +8,9 @@
 #include <string>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "cc/input/touch_action.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace blink {
 class WebGestureEvent;
@@ -57,11 +57,11 @@
   // the renderer for a touch start event that is currently in flight.
   void OnSetCompositorAllowedTouchAction(cc::TouchAction);
 
-  base::Optional<cc::TouchAction> allowed_touch_action() const {
+  absl::optional<cc::TouchAction> allowed_touch_action() const {
     return allowed_touch_action_;
   }
 
-  base::Optional<cc::TouchAction> active_touch_action() const {
+  absl::optional<cc::TouchAction> active_touch_action() const {
     return active_touch_action_;
   }
 
@@ -138,13 +138,13 @@
   int num_of_active_touches_ = 0;
 
   // What touch actions are currently permitted.
-  base::Optional<cc::TouchAction> allowed_touch_action_;
+  absl::optional<cc::TouchAction> allowed_touch_action_;
 
   // The touch action that is used for the current gesture sequence. At the
   // touch sequence end, the |allowed_touch_action_| is reset while this remains
   // set as the effective touch action, for the still in progress gesture
   // sequence due to fling.
-  base::Optional<cc::TouchAction> active_touch_action_;
+  absl::optional<cc::TouchAction> active_touch_action_;
 
   // Allowed touch action received from the compositor.
   cc::TouchAction compositor_allowed_touch_action_;
diff --git a/content/browser/renderer_host/input/touch_action_filter_unittest.cc b/content/browser/renderer_host/input/touch_action_filter_unittest.cc
index a84e2f7..8c0aa4cc 100644
--- a/content/browser/renderer_host/input/touch_action_filter_unittest.cc
+++ b/content/browser/renderer_host/input/touch_action_filter_unittest.cc
@@ -28,7 +28,7 @@
   ~TouchActionFilterTest() override = default;
 
  protected:
-  base::Optional<cc::TouchAction> ActiveTouchAction() const {
+  absl::optional<cc::TouchAction> ActiveTouchAction() const {
     return filter_.active_touch_action_;
   }
   void ResetTouchAction() { filter_.ResetTouchAction(); }
diff --git a/content/browser/renderer_host/input/touchpad_pinch_event_queue.h b/content/browser/renderer_host/input/touchpad_pinch_event_queue.h
index 2b861cc53..63f2124 100644
--- a/content/browser/renderer_host/input/touchpad_pinch_event_queue.h
+++ b/content/browser/renderer_host/input/touchpad_pinch_event_queue.h
@@ -8,9 +8,9 @@
 #include <memory>
 
 #include "base/containers/circular_deque.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/common/input/event_with_latency_info.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/mojom/input/input_event_result.mojom-shared.h"
 
@@ -70,7 +70,7 @@
 
   base::circular_deque<std::unique_ptr<QueuedTouchpadPinchEvent>> pinch_queue_;
   std::unique_ptr<QueuedTouchpadPinchEvent> pinch_event_awaiting_ack_;
-  base::Optional<bool> first_event_prevented_;
+  absl::optional<bool> first_event_prevented_;
 
   DISALLOW_COPY_AND_ASSIGN(TouchpadPinchEventQueue);
 };
diff --git a/content/browser/renderer_host/ipc_utils.cc b/content/browser/renderer_host/ipc_utils.cc
index 0d3db79..ddc8feb 100644
--- a/content/browser/renderer_host/ipc_utils.cc
+++ b/content/browser/renderer_host/ipc_utils.cc
@@ -6,7 +6,6 @@
 
 #include <utility>
 
-#include "base/optional.h"
 #include "content/browser/bad_message.h"
 #include "content/browser/blob_storage/chrome_blob_storage_context.h"
 #include "content/browser/child_process_security_policy_impl.h"
@@ -19,6 +18,7 @@
 #include "content/public/common/child_process_host.h"
 #include "content/public/common/url_constants.h"
 #include "mojo/public/cpp/system/message_pipe.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.cc b/content/browser/renderer_host/media/audio_input_device_manager.cc
index 1055426..6e96b01 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.cc
+++ b/content/browser/renderer_host/media/audio_input_device_manager.cc
@@ -136,7 +136,7 @@
     audio_system_->GetAssociatedOutputDeviceID(
         device.id, base::BindOnce(&AudioInputDeviceManager::OpenedOnIOThread,
                                   base::Unretained(this), session_id, device,
-                                  base::Optional<media::AudioParameters>()));
+                                  absl::optional<media::AudioParameters>()));
   } else {
     // TODO(tommi): As is, we hit this code path when device.type is
     // MEDIA_GUM_TAB_AUDIO_CAPTURE and the device id is not a device that
@@ -229,8 +229,8 @@
 void AudioInputDeviceManager::OpenedOnIOThread(
     const base::UnguessableToken& session_id,
     const blink::MediaStreamDevice& device,
-    const base::Optional<media::AudioParameters>& input_params,
-    const base::Optional<std::string>& matched_output_device_id) {
+    const absl::optional<media::AudioParameters>& input_params,
+    const absl::optional<std::string>& matched_output_device_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(GetDevice(session_id) == devices_.end());
   DCHECK(!input_params || input_params->IsValid());
diff --git a/content/browser/renderer_host/media/audio_input_device_manager.h b/content/browser/renderer_host/media/audio_input_device_manager.h
index 21103157..5940f95c 100644
--- a/content/browser/renderer_host/media/audio_input_device_manager.h
+++ b/content/browser/renderer_host/media/audio_input_device_manager.h
@@ -95,8 +95,8 @@
   void OpenedOnIOThread(
       const base::UnguessableToken& session_id,
       const blink::MediaStreamDevice& device,
-      const base::Optional<media::AudioParameters>& input_params,
-      const base::Optional<std::string>& matched_output_device_id);
+      const absl::optional<media::AudioParameters>& input_params,
+      const absl::optional<std::string>& matched_output_device_id);
 
   // Callback called on IO thread with the session_id referencing the closed
   // device.
diff --git a/content/browser/renderer_host/media/audio_input_stream_handle_unittest.cc b/content/browser/renderer_host/media/audio_input_stream_handle_unittest.cc
index 278f7a8..1bec2c8 100644
--- a/content/browser/renderer_host/media/audio_input_stream_handle_unittest.cc
+++ b/content/browser/renderer_host/media/audio_input_stream_handle_unittest.cc
@@ -54,7 +54,7 @@
           client_receiver,
       media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
       bool initially_muted,
-      const base::Optional<base::UnguessableToken>& stream_id) override {
+      const absl::optional<base::UnguessableToken>& stream_id) override {
     EXPECT_TRUE(stream_id.has_value());
     input_stream_.Bind(std::move(input_stream));
     client_receiver_ = std::move(client_receiver);
diff --git a/content/browser/renderer_host/media/audio_output_authorization_handler.cc b/content/browser/renderer_host/media/audio_output_authorization_handler.cc
index bc1df1d..9cf06d6 100644
--- a/content/browser/renderer_host/media/audio_output_authorization_handler.cc
+++ b/content/browser/renderer_host/media/audio_output_authorization_handler.cc
@@ -320,7 +320,7 @@
     AuthorizationCompletedCallback cb,
     const std::string& id_for_renderer,
     const std::string& raw_device_id,
-    const base::Optional<media::AudioParameters>& params) const {
+    const absl::optional<media::AudioParameters>& params) const {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(!raw_device_id.empty());
   DCHECK(!params || params->IsValid());
diff --git a/content/browser/renderer_host/media/audio_output_authorization_handler.h b/content/browser/renderer_host/media/audio_output_authorization_handler.h
index 41633c5..90dfadb 100644
--- a/content/browser/renderer_host/media/audio_output_authorization_handler.h
+++ b/content/browser/renderer_host/media/audio_output_authorization_handler.h
@@ -104,7 +104,7 @@
       AuthorizationCompletedCallback cb,
       const std::string& device_id_for_renderer,
       const std::string& raw_device_id,
-      const base::Optional<media::AudioParameters>& params) const;
+      const absl::optional<media::AudioParameters>& params) const;
 
   media::AudioSystem* const audio_system_;
   MediaStreamManager* const media_stream_manager_;
diff --git a/content/browser/renderer_host/media/audio_service_listener.h b/content/browser/renderer_host/media/audio_service_listener.h
index afd6623..69912664 100644
--- a/content/browser/renderer_host/media/audio_service_listener.h
+++ b/content/browser/renderer_host/media/audio_service_listener.h
@@ -9,12 +9,12 @@
 #include <vector>
 
 #include "base/gtest_prod_util.h"
-#include "base/optional.h"
 #include "base/process/process_handle.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/service_process_host.h"
 #include "content/public/browser/service_process_info.h"
 #include "mojo/public/cpp/bindings/receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
index b0ffc4a..b884dd5a 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
@@ -411,7 +411,7 @@
 
 void MediaDevicesDispatcherHost::GotAudioInputParameters(
     size_t index,
-    const base::Optional<media::AudioParameters>& parameters) {
+    const absl::optional<media::AudioParameters>& parameters) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK_GT(pending_audio_input_capabilities_requests_.size(), 0U);
   DCHECK_GT(current_audio_input_capabilities_.size(), index);
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.h b/content/browser/renderer_host/media/media_devices_dispatcher_host.h
index 662bb2230..467b754 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.h
@@ -91,7 +91,7 @@
 
   void GotAudioInputParameters(
       size_t index,
-      const base::Optional<media::AudioParameters>& parameters);
+      const absl::optional<media::AudioParameters>& parameters);
 
   void FinalizeGetAudioInputCapabilities();
 
diff --git a/content/browser/renderer_host/media/media_devices_manager.cc b/content/browser/renderer_host/media/media_devices_manager.cc
index 20046d2..34d51d0 100644
--- a/content/browser/renderer_host/media/media_devices_manager.cc
+++ b/content/browser/renderer_host/media/media_devices_manager.cc
@@ -591,7 +591,7 @@
   media::VideoCaptureFormats formats;
 
   if (try_in_use_first) {
-    base::Optional<media::VideoCaptureFormat> format =
+    absl::optional<media::VideoCaptureFormat> format =
         video_capture_manager_->GetDeviceFormatInUse(
             blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE, device_id);
     if (format.has_value()) {
@@ -811,7 +811,7 @@
 void MediaDevicesManager::GotAudioInputCapabilities(
     size_t state_id,
     size_t capabilities_index,
-    const base::Optional<media::AudioParameters>& parameters) {
+    const absl::optional<media::AudioParameters>& parameters) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(base::Contains(enumeration_states_, state_id));
 
diff --git a/content/browser/renderer_host/media/media_devices_manager.h b/content/browser/renderer_host/media/media_devices_manager.h
index 5b6b6df..ba5b6a8b 100644
--- a/content/browser/renderer_host/media/media_devices_manager.h
+++ b/content/browser/renderer_host/media/media_devices_manager.h
@@ -245,7 +245,7 @@
   void GotAudioInputCapabilities(
       size_t state_index,
       size_t capabilities_index,
-      const base::Optional<media::AudioParameters>& parameters);
+      const absl::optional<media::AudioParameters>& parameters);
   void FinalizeDevicesEnumerated(EnumerationState enumeration_state);
 
   std::vector<VideoInputDeviceCapabilitiesPtr> ComputeVideoInputCapabilities(
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
index bfd6e8d..d27f3d0d 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.cc
@@ -196,7 +196,7 @@
 
 void MediaStreamDispatcherHost::StopStreamDevice(
     const std::string& device_id,
-    const base::Optional<base::UnguessableToken>& session_id) {
+    const absl::optional<base::UnguessableToken>& session_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
   media_stream_manager_->StopStreamDevice(
@@ -254,7 +254,7 @@
 }
 
 void MediaStreamDispatcherHost::SetCapturingLinkSecured(
-    const base::Optional<base::UnguessableToken>& session_id,
+    const absl::optional<base::UnguessableToken>& session_id,
     blink::mojom::MediaStreamType type,
     bool is_secure) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host.h b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
index 4ea592f..5543dda 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host.h
@@ -65,14 +65,14 @@
   void CancelRequest(int32_t request_id) override;
   void StopStreamDevice(
       const std::string& device_id,
-      const base::Optional<base::UnguessableToken>& session_id) override;
+      const absl::optional<base::UnguessableToken>& session_id) override;
   void OpenDevice(int32_t request_id,
                   const std::string& device_id,
                   blink::mojom::MediaStreamType type,
                   OpenDeviceCallback callback) override;
   void CloseDevice(const std::string& label) override;
   void SetCapturingLinkSecured(
-      const base::Optional<base::UnguessableToken>& session_id,
+      const absl::optional<base::UnguessableToken>& session_id,
       blink::mojom::MediaStreamType type,
       bool is_secure) override;
   void OnStreamStarted(const std::string& label) override;
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index 39ce29b..3627d00 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -110,7 +110,7 @@
         page_request_id, controls, false,
         blink::mojom::StreamSelectionInfo::New(
             blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-            base::nullopt),
+            absl::nullopt),
         base::BindOnce(&MockMediaStreamDispatcherHost::OnStreamGenerated,
                        base::Unretained(this), page_request_id));
   }
diff --git a/content/browser/renderer_host/media/media_stream_manager.cc b/content/browser/renderer_host/media/media_stream_manager.cc
index 472b693..56037de7 100644
--- a/content/browser/renderer_host/media/media_stream_manager.cc
+++ b/content/browser/renderer_host/media/media_stream_manager.cc
@@ -436,7 +436,7 @@
     const url::Origin& security_origin,
     const std::string& source_id,
     scoped_refptr<base::SequencedTaskRunner> task_runner,
-    base::OnceCallback<void(const base::Optional<std::string>&)> callback,
+    base::OnceCallback<void(const absl::optional<std::string>&)> callback,
     const MediaDeviceEnumeration& enumeration) {
   for (const auto& device : enumeration[static_cast<size_t>(type)]) {
     if (MediaStreamManager::DoesMediaDeviceIDMatchHMAC(
@@ -447,7 +447,7 @@
     }
   }
   task_runner->PostTask(FROM_HERE,
-                        base::BindOnce(std::move(callback), base::nullopt));
+                        base::BindOnce(std::move(callback), absl::nullopt));
 }
 
 }  // namespace
@@ -859,7 +859,7 @@
   StreamSelectionInfoPtr audio_stream_selection_info_ptr =
       StreamSelectionInfo::New(
           blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-          base::nullopt);
+          absl::nullopt);
   auto request = std::make_unique<DeviceRequest>(
       render_process_id, render_frame_id, requester_id, page_request_id,
       false /* user gesture */, std::move(audio_stream_selection_info_ptr),
@@ -1153,7 +1153,7 @@
   StreamSelectionInfoPtr audio_stream_selection_info_ptr =
       StreamSelectionInfo::New(
           blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-          base::nullopt);
+          absl::nullopt);
   auto request = std::make_unique<DeviceRequest>(
       render_process_id, render_frame_id, requester_id, page_request_id,
       false /* user gesture */, std::move(audio_stream_selection_info_ptr),
@@ -1389,14 +1389,14 @@
                        base::Unretained(this), label, enumeration));
   } else {
     PostRequestToUI(label, enumeration,
-                    base::Optional<media::AudioParameters>());
+                    absl::optional<media::AudioParameters>());
   }
 }
 
 void MediaStreamManager::PostRequestToUI(
     const std::string& label,
     const MediaDeviceEnumeration& enumeration,
-    const base::Optional<media::AudioParameters>& output_parameters) {
+    const absl::optional<media::AudioParameters>& output_parameters) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(!output_parameters || output_parameters->IsValid());
   DeviceRequest* request = FindRequest(label);
@@ -1747,7 +1747,7 @@
     return false;
   }
 
-  base::Optional<base::UnguessableToken> requested_session_id =
+  absl::optional<base::UnguessableToken> requested_session_id =
       new_request.audio_stream_selection_info_ptr->session_id;
 #if DCHECK_IS_ON()
   if (strategy == StreamSelectionStrategy::SEARCH_BY_SESSION_ID) {
@@ -2573,7 +2573,7 @@
     url::Origin security_origin,
     std::string hmac_device_id,
     scoped_refptr<base::SequencedTaskRunner> task_runner,
-    base::OnceCallback<void(const base::Optional<std::string>&)> callback) {
+    base::OnceCallback<void(const absl::optional<std::string>&)> callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   DCHECK(stream_type == MediaStreamType::DEVICE_AUDIO_CAPTURE ||
          stream_type == MediaStreamType::DEVICE_VIDEO_CAPTURE);
@@ -2589,7 +2589,7 @@
     url::Origin security_origin,
     std::string hmac_device_id,
     scoped_refptr<base::SequencedTaskRunner> task_runner,
-    base::OnceCallback<void(const base::Optional<std::string>&)> callback) {
+    base::OnceCallback<void(const absl::optional<std::string>&)> callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   MediaStreamManager* msm = g_media_stream_manager_tls_ptr.Pointer()->Get();
   MediaDevicesManager::BoolDeviceTypes requested_types;
diff --git a/content/browser/renderer_host/media/media_stream_manager.h b/content/browser/renderer_host/media/media_stream_manager.h
index 4f8e46b..22816c4 100644
--- a/content/browser/renderer_host/media/media_stream_manager.h
+++ b/content/browser/renderer_host/media/media_stream_manager.h
@@ -37,7 +37,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/power_monitor/power_observer.h"
 #include "base/single_thread_task_runner.h"
 #include "base/task/current_thread.h"
@@ -52,6 +51,7 @@
 #include "content/public/browser/media_stream_request.h"
 #include "content/public/browser/permission_controller.h"
 #include "media/base/video_facing.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/mediastream/media_devices.h"
 #include "third_party/blink/public/common/mediastream/media_stream_controls.h"
 #include "third_party/blink/public/common/mediastream/media_stream_request.h"
@@ -332,7 +332,7 @@
       url::Origin security_origin,
       std::string hmac_device_id,
       scoped_refptr<base::SequencedTaskRunner> task_runner,
-      base::OnceCallback<void(const base::Optional<std::string>&)> callback);
+      base::OnceCallback<void(const absl::optional<std::string>&)> callback);
   // Overload that allows for a blink::mojom::MediaDeviceType to be specified
   // instead of a blink::mojom::MediaStreamType. This allows for getting the raw
   // device ID from the HMAC of an audio output device.
@@ -342,7 +342,7 @@
       url::Origin security_origin,
       std::string hmac_device_id,
       scoped_refptr<base::SequencedTaskRunner> task_runner,
-      base::OnceCallback<void(const base::Optional<std::string>&)> callback);
+      base::OnceCallback<void(const absl::optional<std::string>&)> callback);
 
   // Returns true if the renderer process identified with |render_process_id|
   // is allowed to access |origin|.
@@ -474,7 +474,7 @@
   void PostRequestToUI(
       const std::string& label,
       const MediaDeviceEnumeration& enumeration,
-      const base::Optional<media::AudioParameters>& output_parameters);
+      const absl::optional<media::AudioParameters>& output_parameters);
   // Returns true if a device with |device_id| has already been requested with
   // a render procecss_id and render_frame_id and type equal to the the values
   // in |request|. If it has been requested, |device_info| contain information
@@ -602,7 +602,7 @@
   // Always initialized on Windows.
   // On other platforms, initialized when no audio task runner is provided in
   // the constructor.
-  base::Optional<base::Thread> video_capture_thread_;
+  absl::optional<base::Thread> video_capture_thread_;
 
   std::unique_ptr<MediaDevicesManager> media_devices_manager_;
 
diff --git a/content/browser/renderer_host/media/media_stream_manager_unittest.cc b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
index 9e78d5c9..805323c 100644
--- a/content/browser/renderer_host/media/media_stream_manager_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_manager_unittest.cc
@@ -287,7 +287,7 @@
         controls, MediaDeviceSaltAndOrigin(), false /* user_gesture */,
         StreamSelectionInfo::New(
             blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-            base::nullopt),
+            absl::nullopt),
         std::move(generate_stream_callback), stopped_callback.Get(),
         std::move(changed_callback), std::move(request_state_change_callback));
     run_loop_.Run();
@@ -353,7 +353,7 @@
 
   blink::MediaStreamDevice CreateOrSearchAudioDeviceStream(
       const StreamSelectionStrategy& strategy,
-      const base::Optional<base::UnguessableToken>& session_id,
+      const absl::optional<base::UnguessableToken>& session_id,
       const blink::StreamControls& controls =
           blink::StreamControls(true /* request_audio */,
                                 false /* request_video */),
@@ -622,7 +622,7 @@
   for (int i = 0; i < num_call_iterations; ++i) {
     blink::MediaStreamDevice audio_device = CreateOrSearchAudioDeviceStream(
         blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-        base::nullopt);
+        absl::nullopt);
 
     EXPECT_EQ(audio_device.id, "default");
     EXPECT_EQ(blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE,
@@ -646,7 +646,7 @@
   std::set<base::UnguessableToken> session_ids;
   for (size_t i = 0; i < num_call_iterations; ++i) {
     blink::MediaStreamDevice audio_device = CreateOrSearchAudioDeviceStream(
-        blink::mojom::StreamSelectionStrategy::FORCE_NEW_STREAM, base::nullopt);
+        blink::mojom::StreamSelectionStrategy::FORCE_NEW_STREAM, absl::nullopt);
 
     EXPECT_EQ(audio_device.id, "default");
     EXPECT_EQ(blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE,
@@ -734,7 +734,7 @@
       controls, MediaDeviceSaltAndOrigin(), false /* user_gesture */,
       StreamSelectionInfo::New(
           blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-          base::nullopt),
+          absl::nullopt),
       std::move(generate_stream_callback),
       MediaStreamManager::DeviceStoppedCallback(),
       MediaStreamManager::DeviceChangedCallback(),
@@ -785,7 +785,7 @@
       controls, MediaDeviceSaltAndOrigin(), false /* user_gesture */,
       StreamSelectionInfo::New(
           blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-          base::nullopt),
+          absl::nullopt),
       std::move(generate_stream_callback), std::move(stopped_callback),
       std::move(changed_callback), std::move(request_state_change_callback));
   run_loop_.Run();
@@ -849,7 +849,7 @@
       controls, MediaDeviceSaltAndOrigin(), false /* user_gesture */,
       StreamSelectionInfo::New(
           blink::mojom::StreamSelectionStrategy::SEARCH_BY_DEVICE_ID,
-          base::nullopt),
+          absl::nullopt),
       std::move(generate_stream_callback), std::move(stopped_callback),
       std::move(changed_callback), std::move(request_state_change_callback));
   run_loop_.Run();
@@ -883,7 +883,7 @@
       kExistingHmacDeviceId, base::SequencedTaskRunnerHandle::Get(),
       base::BindOnce(
           [](const std::string& expected_raw_device_id,
-             const base::Optional<std::string>& raw_device_id) {
+             const absl::optional<std::string>& raw_device_id) {
             ASSERT_TRUE(raw_device_id.has_value());
             EXPECT_EQ(*raw_device_id, expected_raw_device_id);
           },
@@ -894,7 +894,7 @@
   MediaStreamManager::GetMediaDeviceIDForHMAC(
       blink::mojom::MediaStreamType::DEVICE_AUDIO_CAPTURE, kSalt, kOrigin,
       kNonexistingHmacDeviceId, base::SequencedTaskRunnerHandle::Get(),
-      base::BindOnce([](const base::Optional<std::string>& raw_device_id) {
+      base::BindOnce([](const absl::optional<std::string>& raw_device_id) {
         EXPECT_FALSE(raw_device_id.has_value());
       }));
   base::RunLoop().RunUntilIdle();
diff --git a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc
index fcec9938..9e9c600 100644
--- a/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc
+++ b/content/browser/renderer_host/media/render_frame_audio_input_stream_factory_unittest.cc
@@ -135,7 +135,7 @@
             client_receiver,
         media::mojom::ReadOnlyAudioDataPipePtr data_pipe,
         bool initially_muted,
-        const base::Optional<base::UnguessableToken>& stream_id) override {}
+        const absl::optional<base::UnguessableToken>& stream_id) override {}
   };
 
   AudioInputDeviceManager* audio_input_device_manager() {
diff --git a/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc b/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc
index c259f42..4861707 100644
--- a/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc
+++ b/content/browser/renderer_host/media/render_frame_audio_output_stream_factory.cc
@@ -16,7 +16,6 @@
 #include "base/containers/unique_ptr_adapters.h"
 #include "base/location.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "base/time/time.h"
 #include "base/trace_event/trace_event.h"
@@ -32,6 +31,7 @@
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -137,7 +137,7 @@
   void RequestDeviceAuthorization(
       mojo::PendingReceiver<media::mojom::AudioOutputStreamProvider>
           provider_receiver,
-      const base::Optional<base::UnguessableToken>& session_id,
+      const absl::optional<base::UnguessableToken>& session_id,
       const std::string& device_id,
       RequestDeviceAuthorizationCallback callback) final;
 
@@ -264,7 +264,7 @@
 void RenderFrameAudioOutputStreamFactory::Core::RequestDeviceAuthorization(
     mojo::PendingReceiver<media::mojom::AudioOutputStreamProvider>
         provider_receiver,
-    const base::Optional<base::UnguessableToken>& session_id,
+    const absl::optional<base::UnguessableToken>& session_id,
     const std::string& device_id,
     RequestDeviceAuthorizationCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
diff --git a/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc b/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc
index 1a005ac..069da4b 100644
--- a/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc
+++ b/content/browser/renderer_host/media/render_frame_audio_output_stream_factory_unittest.cc
@@ -137,7 +137,7 @@
   mojo::Remote<media::mojom::AudioOutputStreamProvider> provider_remote;
   MockAuthorizationCallback mock_callback;
   factory_remote->RequestDeviceAuthorization(
-      provider_remote.BindNewPipeAndPassReceiver(), base::nullopt,
+      provider_remote.BindNewPipeAndPassReceiver(), absl::nullopt,
       kDefaultDeviceId, mock_callback.Get());
 
   EXPECT_CALL(mock_callback,
@@ -159,7 +159,7 @@
   mojo::Remote<media::mojom::AudioOutputStreamProvider> provider_remote;
   MockAuthorizationCallback mock_callback;
   factory_remote->RequestDeviceAuthorization(
-      provider_remote.BindNewPipeAndPassReceiver(), base::nullopt,
+      provider_remote.BindNewPipeAndPassReceiver(), absl::nullopt,
       kDefaultDeviceId, mock_callback.Get());
   provider_remote.reset();
 
@@ -182,7 +182,7 @@
   mojo::Remote<media::mojom::AudioOutputStreamProvider> provider_remote;
   MockAuthorizationCallback mock_callback;
   factory_remote->RequestDeviceAuthorization(
-      provider_remote.BindNewPipeAndPassReceiver(), base::nullopt, kDeviceId,
+      provider_remote.BindNewPipeAndPassReceiver(), absl::nullopt, kDeviceId,
       mock_callback.Get());
 
   EXPECT_CALL(mock_callback,
@@ -203,7 +203,7 @@
   mojo::Remote<media::mojom::AudioOutputStreamProvider> provider_remote;
   MockAuthorizationCallback mock_callback;
   factory_remote->RequestDeviceAuthorization(
-      provider_remote.BindNewPipeAndPassReceiver(), base::nullopt,
+      provider_remote.BindNewPipeAndPassReceiver(), absl::nullopt,
       kDefaultDeviceId, mock_callback.Get());
   {
     mojo::PendingRemote<media::mojom::AudioOutputStreamProviderClient> client;
@@ -233,7 +233,7 @@
         factory_remote.BindNewPipeAndPassReceiver());
 
     factory_remote->RequestDeviceAuthorization(
-        provider_remote.BindNewPipeAndPassReceiver(), base::nullopt,
+        provider_remote.BindNewPipeAndPassReceiver(), absl::nullopt,
         kDefaultDeviceId, mock_callback.Get());
 
     media::mojom::AudioStreamFactory::CreateOutputStreamCallback
diff --git a/content/browser/renderer_host/media/service_video_capture_provider.h b/content/browser/renderer_host/media/service_video_capture_provider.h
index a14ea1e..8d98e7f0 100644
--- a/content/browser/renderer_host/media/service_video_capture_provider.h
+++ b/content/browser/renderer_host/media/service_video_capture_provider.h
@@ -93,7 +93,7 @@
 
   // We own this but it must operate on the UI thread.
   class ServiceProcessObserver;
-  base::Optional<base::SequenceBound<ServiceProcessObserver>>
+  absl::optional<base::SequenceBound<ServiceProcessObserver>>
       service_process_observer_;
 
   base::WeakPtrFactory<ServiceVideoCaptureProvider> weak_ptr_factory_{this};
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index c9163ed..594589e 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -476,7 +476,7 @@
   OnClientFinishedConsumingBuffer(client, buffer_id, feedback);
 }
 
-const base::Optional<media::VideoCaptureFormat>
+const absl::optional<media::VideoCaptureFormat>
 VideoCaptureController::GetVideoCaptureFormat() const {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   return video_capture_format_;
diff --git a/content/browser/renderer_host/media/video_capture_controller.h b/content/browser/renderer_host/media/video_capture_controller.h
index 8b5b93e3..1bac2c8 100644
--- a/content/browser/renderer_host/media/video_capture_controller.h
+++ b/content/browser/renderer_host/media/video_capture_controller.h
@@ -108,7 +108,7 @@
                     int buffer_id,
                     const media::VideoCaptureFeedback& feedback);
 
-  const base::Optional<media::VideoCaptureFormat> GetVideoCaptureFormat() const;
+  const absl::optional<media::VideoCaptureFormat> GetVideoCaptureFormat() const;
 
   bool has_received_frames() const { return has_received_frames_; }
 
@@ -288,7 +288,7 @@
   bool has_received_frames_;
   base::TimeTicks time_of_start_request_;
 
-  base::Optional<media::VideoCaptureFormat> video_capture_format_;
+  absl::optional<media::VideoCaptureFormat> video_capture_format_;
 
   base::WeakPtrFactory<VideoCaptureController> weak_ptr_factory_{this};
 
diff --git a/content/browser/renderer_host/media/video_capture_manager.cc b/content/browser/renderer_host/media/video_capture_manager.cc
index 26407a4..74d06ae 100644
--- a/content/browser/renderer_host/media/video_capture_manager.cc
+++ b/content/browser/renderer_host/media/video_capture_manager.cc
@@ -556,7 +556,7 @@
   string_stream << "GetDeviceFormatsInUse for device: " << it->second.name;
   EmitLogMessage(string_stream.str(), 1);
 
-  base::Optional<media::VideoCaptureFormat> format =
+  absl::optional<media::VideoCaptureFormat> format =
       GetDeviceFormatInUse(it->second.type, it->second.id);
   if (format.has_value())
     formats_in_use->push_back(format.value());
@@ -564,7 +564,7 @@
   return true;
 }
 
-base::Optional<media::VideoCaptureFormat>
+absl::optional<media::VideoCaptureFormat>
 VideoCaptureManager::GetDeviceFormatInUse(
     blink::mojom::MediaStreamType stream_type,
     const std::string& device_id) {
@@ -572,7 +572,7 @@
   // Return the currently in-use format of the device, if it's started.
   VideoCaptureController* device_in_use =
       LookupControllerByMediaTypeAndDeviceId(stream_type, device_id);
-  return device_in_use ? device_in_use->GetVideoCaptureFormat() : base::nullopt;
+  return device_in_use ? device_in_use->GetVideoCaptureFormat() : absl::nullopt;
 }
 
 void VideoCaptureManager::SetDesktopCaptureWindowId(
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index 0f5149c..766d5d1 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -151,10 +151,10 @@
   bool GetDeviceFormatsInUse(
       const media::VideoCaptureSessionId& capture_session_id,
       media::VideoCaptureFormats* formats_in_use);
-  // Retrieves the format currently in use.  Returns base::nullopt if the
+  // Retrieves the format currently in use.  Returns absl::nullopt if the
   // |stream_type|, |device_id| pair is not found. Returns in-use format of the
   // device otherwise.
-  base::Optional<media::VideoCaptureFormat> GetDeviceFormatInUse(
+  absl::optional<media::VideoCaptureFormat> GetDeviceFormatInUse(
       blink::mojom::MediaStreamType stream_type,
       const std::string& device_id);
 
diff --git a/content/browser/renderer_host/media/video_capture_manager_unittest.cc b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
index 83300b2..dc95075 100644
--- a/content/browser/renderer_host/media/video_capture_manager_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_manager_unittest.cc
@@ -691,7 +691,7 @@
 
   // Right after opening the device, we should see no format in use.
   EXPECT_EQ(
-      base::nullopt,
+      absl::nullopt,
       vcm_->GetDeviceFormatInUse(
           blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE, device_id));
 
@@ -699,7 +699,7 @@
   VideoCaptureControllerID client_id = StartClient(video_session_id, true);
   base::RunLoop().RunUntilIdle();
   // After StartClient(), device's format in use should be valid.
-  base::Optional<media::VideoCaptureFormat> format_in_use =
+  absl::optional<media::VideoCaptureFormat> format_in_use =
       vcm_->GetDeviceFormatInUse(
           blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE, device_id);
   EXPECT_TRUE(format_in_use.has_value());
@@ -714,7 +714,7 @@
   base::RunLoop().RunUntilIdle();
   // After StopClient(), the device's format in use should be empty again.
   EXPECT_EQ(
-      base::nullopt,
+      absl::nullopt,
       vcm_->GetDeviceFormatInUse(
           blink::mojom::MediaStreamType::DEVICE_VIDEO_CAPTURE, device_id));
 
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index 814eebf..6595124 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -234,7 +234,7 @@
 
 bool DoesURLMatchOriginForNavigation(
     const GURL& url,
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     SubresourceWebBundleNavigationInfo*
         subresource_web_bundle_navigation_info) {
   // If there is no origin supplied there is nothing to match. This can happen
@@ -252,7 +252,7 @@
   return origin->CanBeDerivedFrom(url);
 }
 
-base::Optional<url::Origin> GetCommittedOriginForFrameEntry(
+absl::optional<url::Origin> GetCommittedOriginForFrameEntry(
     const mojom::DidCommitProvisionalLoadParams& params,
     NavigationRequest* request) {
   // Error pages commit in an opaque origin, yet have the real URL that resulted
@@ -260,7 +260,7 @@
   // should commit in the correct origin, setting the opaque origin on the
   // FrameNavigationEntry will be incorrect.
   if (request->DidEncounterError())
-    return base::nullopt;
+    return absl::nullopt;
 
   // We also currently don't save committed origins for loadDataWithBaseURL
   // navigations (probably accidentally). Without this check, navigations to
@@ -269,17 +269,17 @@
   // URL used for the navigation.
   // TODO(https://crbug.com/1198406): Save committed origin in
   // FrameNavigationEntry for this case too.
-  base::Optional<std::string> data_url_as_string;
+  absl::optional<std::string> data_url_as_string;
 #if defined(OS_ANDROID)
   data_url_as_string = request->commit_params().data_url_as_string;
 #endif
   if (NavigationRequest::IsLoadDataWithBaseURLAndUnreachableURL(
           request->IsInMainFrame(), request->common_params(),
           data_url_as_string)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
-  return base::make_optional(params.origin);
+  return absl::make_optional(params.origin);
 }
 
 bool IsValidURLForNavigation(bool is_main_frame,
@@ -541,7 +541,7 @@
 std::unique_ptr<NavigationEntry> NavigationController::CreateNavigationEntry(
     const GURL& url,
     Referrer referrer,
-    base::Optional<url::Origin> initiator_origin,
+    absl::optional<url::Origin> initiator_origin,
     ui::PageTransition transition,
     bool is_renderer_initiated,
     const std::string& extra_headers,
@@ -559,7 +559,7 @@
 NavigationControllerImpl::CreateNavigationEntry(
     const GURL& url,
     Referrer referrer,
-    base::Optional<url::Origin> initiator_origin,
+    absl::optional<url::Origin> initiator_origin,
     SiteInstance* source_site_instance,
     ui::PageTransition transition,
     bool is_renderer_initiated,
@@ -1547,7 +1547,7 @@
   std::unique_ptr<NavigationEntryImpl> new_entry;
   bool update_virtual_url = false;
 
-  const base::Optional<url::Origin>& initiator_origin =
+  const absl::optional<url::Origin>& initiator_origin =
       request->common_params().initiator_origin;
 
   // First check if this is an in-page navigation.  If so, clone the current
@@ -1713,7 +1713,7 @@
         ComputePolicyContainerPoliciesForFrameEntry(rfh, is_same_document,
                                                     request));
 
-    if (base::Optional<url::Origin> committed_origin =
+    if (absl::optional<url::Origin> committed_origin =
             GetCommittedOriginForFrameEntry(params, request)) {
       if (committed_origin.has_value())
         frame_entry->set_committed_origin(committed_origin.value());
@@ -1936,7 +1936,7 @@
 
   // Update the existing FrameNavigationEntry to ensure all of its members
   // reflect the parameters coming from the renderer process.
-  const base::Optional<url::Origin>& initiator_origin =
+  const absl::optional<url::Origin>& initiator_origin =
       request->common_params().initiator_origin;
   entry->AddOrUpdateFrameEntry(
       rfh->frame_tree_node(), params.item_sequence_number,
@@ -1997,7 +1997,7 @@
 
   // This FrameNavigationEntry might not end up being used in the
   // CloneAndReplace() call below, if a spot can't be found for it in the tree.
-  const base::Optional<url::Origin>& initiator_origin =
+  const absl::optional<url::Origin>& initiator_origin =
       request->common_params().initiator_origin;
   auto frame_entry = base::MakeRefCounted<FrameNavigationEntry>(
       rfh->frame_tree_node()->unique_name(), params.item_sequence_number,
@@ -2083,7 +2083,7 @@
   // This may be a "new auto" case where we add a new FrameNavigationEntry, or
   // it may be a "history auto" case where we update an existing one.
   NavigationEntryImpl* last_committed = GetLastCommittedEntry();
-  const base::Optional<url::Origin>& initiator_origin =
+  const absl::optional<url::Origin>& initiator_origin =
       request->common_params().initiator_origin;
   last_committed->AddOrUpdateFrameEntry(
       rfh->frame_tree_node(), params.item_sequence_number,
@@ -2442,7 +2442,7 @@
     const GURL& url,
     const blink::LocalFrameToken* initiator_frame_token,
     int initiator_process_id,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     bool is_renderer_initiated,
     SiteInstance* source_site_instance,
     const Referrer& referrer,
@@ -2454,7 +2454,7 @@
     const std::string& extra_headers,
     network::mojom::SourceLocationPtr source_location,
     scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory,
-    const base::Optional<blink::Impression>& impression) {
+    const absl::optional<blink::Impression>& impression) {
   if (is_renderer_initiated)
     DCHECK(initiator_origin.has_value());
 
@@ -2498,7 +2498,7 @@
     entry->AddOrUpdateFrameEntry(
         node, -1, -1, nullptr,
         static_cast<SiteInstanceImpl*>(source_site_instance), url,
-        base::nullopt /* commit_origin */, referrer, initiator_origin,
+        absl::nullopt /* commit_origin */, referrer, initiator_origin,
         std::vector<GURL>(), blink::PageState(), method, -1,
         blob_url_loader_factory, nullptr /* web_bundle_navigation_info */,
         nullptr /* subresource_web_bundle_navigation_info */,
@@ -2535,7 +2535,7 @@
     frame_entry = base::MakeRefCounted<FrameNavigationEntry>(
         node->unique_name(), -1, -1, nullptr,
         static_cast<SiteInstanceImpl*>(source_site_instance), url,
-        base::nullopt /* origin */, referrer, initiator_origin,
+        absl::nullopt /* origin */, referrer, initiator_origin,
         std::vector<GURL>(), blink::PageState(), method, -1,
         blob_url_loader_factory, nullptr /* web_bundle_navigation_info */,
         nullptr /* subresource_web_bundle_navigation_info */,
@@ -3370,7 +3370,7 @@
     entry->AddOrUpdateFrameEntry(
         node, -1, -1, nullptr,
         static_cast<SiteInstanceImpl*>(params.source_site_instance.get()),
-        params.url, base::nullopt, params.referrer, params.initiator_origin,
+        params.url, absl::nullopt, params.referrer, params.initiator_origin,
         params.redirect_chain, blink::PageState(), "GET", -1,
         blob_url_loader_factory, nullptr /* web_bundle_navigation_info */,
         nullptr /* subresource_web_bundle_navigation_info */,
@@ -3444,8 +3444,8 @@
 
   GURL url_to_load;
   GURL virtual_url;
-  base::Optional<url::Origin> origin_to_commit =
-      frame_entry ? frame_entry->committed_origin() : base::nullopt;
+  absl::optional<url::Origin> origin_to_commit =
+      frame_entry ? frame_entry->committed_origin() : absl::nullopt;
 
   // For main frames, rewrite the URL if necessary and compute the virtual URL
   // that should be shown in the address bar.
@@ -3576,7 +3576,7 @@
           params.should_clear_history_list ? 0 : GetEntryCount(),
           false /* was_discarded */, is_view_source_mode,
           params.should_clear_history_list, mojom::NavigationTiming::New(),
-          base::nullopt /* appcache_host_id */,
+          absl::nullopt /* appcache_host_id */,
           mojom::WasActivatedOption::kUnknown,
           base::UnguessableToken::Create() /* navigation_token */,
           std::vector<mojom::PrefetchedSignedExchangeInfoPtr>(),
@@ -3640,7 +3640,7 @@
     bool is_history_navigation_in_new_child_frame) {
   DCHECK(frame_entry);
   GURL dest_url = frame_entry->url();
-  base::Optional<url::Origin> origin_to_commit =
+  absl::optional<url::Origin> origin_to_commit =
       frame_entry->committed_origin();
 
   Referrer dest_referrer = frame_entry->referrer();
@@ -3746,7 +3746,7 @@
       nullptr /* initiator_frame_token */,
       ChildProcessHost::kInvalidUniqueID /* initiator_process_id */,
       entry->extra_headers(), frame_entry, entry, request_body,
-      nullptr /* navigation_ui_data */, base::nullopt /* impression */);
+      nullptr /* navigation_ui_data */, absl::nullopt /* impression */);
 }
 
 void NavigationControllerImpl::NotifyNavigationEntryCommitted(
@@ -3852,7 +3852,7 @@
           ChildProcessHost::kInvalidUniqueID /* initiator_process_id */,
           "" /* extra_headers */, nullptr /* frame_entry */,
           nullptr /* entry */, nullptr /* post_body */,
-          nullptr /* navigation_ui_data */, base::nullopt /* impression */);
+          nullptr /* navigation_ui_data */, absl::nullopt /* impression */);
   navigation_request->set_post_commit_error_page_html(error_page_html);
   navigation_request->set_net_error(error);
   node->CreatedNavigationRequest(std::move(navigation_request));
diff --git a/content/browser/renderer_host/navigation_controller_impl.h b/content/browser/renderer_host/navigation_controller_impl.h
index 07c9373..479dcaea 100644
--- a/content/browser/renderer_host/navigation_controller_impl.h
+++ b/content/browser/renderer_host/navigation_controller_impl.h
@@ -18,7 +18,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
 #include "content/browser/renderer_host/back_forward_cache_impl.h"
@@ -31,6 +30,7 @@
 #include "content/public/browser/reload_type.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
 #include "services/network/public/mojom/source_location.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 
 namespace content {
@@ -168,7 +168,7 @@
       const GURL& url,
       const blink::LocalFrameToken* initiator_frame_token,
       int initiator_process_id,
-      const base::Optional<url::Origin>& initiator_origin,
+      const absl::optional<url::Origin>& initiator_origin,
       bool is_renderer_initiated,
       SiteInstance* source_site_instance,
       const Referrer& referrer,
@@ -180,7 +180,7 @@
       const std::string& extra_headers,
       network::mojom::SourceLocationPtr source_location,
       scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory,
-      const base::Optional<blink::Impression>& impression);
+      const absl::optional<blink::Impression>& impression);
 
   // Whether this is the initial navigation in an unmodified new tab.  In this
   // case, we know there is no content displayed in the page.
@@ -346,7 +346,7 @@
   static std::unique_ptr<NavigationEntryImpl> CreateNavigationEntry(
       const GURL& url,
       Referrer referrer,
-      base::Optional<url::Origin> initiator_origin,
+      absl::optional<url::Origin> initiator_origin,
       SiteInstance* source_site_instance,
       ui::PageTransition transition,
       bool is_renderer_initiated,
diff --git a/content/browser/renderer_host/navigation_controller_impl_browsertest.cc b/content/browser/renderer_host/navigation_controller_impl_browsertest.cc
index 0dfdd95..4b61cea 100644
--- a/content/browser/renderer_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_browsertest.cc
@@ -5570,7 +5570,7 @@
   std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              main_url_a, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              main_url_a, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(), controller.GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
   EXPECT_EQ(0U, restored_entry->root_node()->children.size());
@@ -5638,7 +5638,7 @@
   std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              main_url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              main_url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(), controller.GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
   restored_entry->SetPageState(blink::PageState::CreateFromURL(main_url));
@@ -7504,7 +7504,7 @@
   std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              main_url_a, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              main_url_a, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(), controller.GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
   EXPECT_EQ(0U, restored_entry->root_node()->children.size());
@@ -16199,7 +16199,7 @@
   ASSERT_EQ(1U, entry_1->root_node()->children.size());
   FrameNavigationEntry* frame_entry_1 =
       entry_1->root_node()->children[0]->frame_entry.get();
-  base::Optional<url::Origin> origin_1 = frame_entry_1->initiator_origin();
+  absl::optional<url::Origin> origin_1 = frame_entry_1->initiator_origin();
   ASSERT_TRUE(frame_entry_1->initiator_origin().has_value());
   EXPECT_EQ(url::Origin::Create(main_url),
             frame_entry_1->initiator_origin().value());
@@ -16232,7 +16232,7 @@
   ASSERT_EQ(1U, entry_1->root_node()->children.size());
   FrameNavigationEntry* frame_entry_2 =
       entry_2->root_node()->children[0]->frame_entry.get();
-  base::Optional<url::Origin> origin_2 = frame_entry_2->initiator_origin();
+  absl::optional<url::Origin> origin_2 = frame_entry_2->initiator_origin();
   ASSERT_TRUE(frame_entry_2->initiator_origin().has_value());
   EXPECT_EQ(url::Origin::Create(main_url),
             frame_entry_2->initiator_origin().value());
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index f181d4f..93f398b 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -2393,7 +2393,7 @@
   std::vector<std::unique_ptr<NavigationEntry>> entries;
   std::unique_ptr<NavigationEntry> entry =
       NavigationController::CreateNavigationEntry(
-          url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD, false,
+          url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD, false,
           std::string(), browser_context(),
           nullptr /* blob_url_loader_factory */);
   entry->SetTitle(u"Title");
@@ -2461,7 +2461,7 @@
   std::vector<std::unique_ptr<NavigationEntry>> entries;
   std::unique_ptr<NavigationEntry> new_entry =
       NavigationController::CreateNavigationEntry(
-          url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD, false,
+          url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD, false,
           std::string(), browser_context(),
           nullptr /* blob_url_loader_factory */);
   new_entry->SetTitle(u"Title");
@@ -3771,7 +3771,7 @@
   for (size_t i = 0; i < base::size(kRestoredUrls); ++i) {
     std::unique_ptr<NavigationEntry> entry =
         NavigationController::CreateNavigationEntry(
-            kRestoredUrls[i], Referrer(), base::nullopt,
+            kRestoredUrls[i], Referrer(), absl::nullopt,
             ui::PAGE_TRANSITION_RELOAD, false, std::string(), browser_context(),
             nullptr /* blob_url_loader_factory */);
     entries.push_back(std::move(entry));
@@ -4421,7 +4421,7 @@
       main_test_rfh()->GetSiteInstance(), Referrer(), ui::PAGE_TRANSITION_LINK,
       false /* should_replace_current_entry */,
       blink::NavigationDownloadPolicy(), "GET", nullptr, "",
-      network::mojom::SourceLocation::New(), nullptr, base::nullopt);
+      network::mojom::SourceLocation::New(), nullptr, absl::nullopt);
 
   // Clean up the handler.
   BrowserURLHandlerImpl::GetInstance()->RemoveHandlerForTesting(
@@ -4460,7 +4460,7 @@
       main_test_rfh()->GetSiteInstance(), Referrer(), ui::PAGE_TRANSITION_LINK,
       should_replace_current_entry, blink::NavigationDownloadPolicy(), "GET",
       nullptr, "", network::mojom::SourceLocation::New(), nullptr,
-      base::nullopt);
+      absl::nullopt);
   NavigationRequest* request = node->navigation_request();
   ASSERT_TRUE(request);
 
diff --git a/content/browser/renderer_host/navigation_entry_impl.cc b/content/browser/renderer_host/navigation_entry_impl.cc
index a0237ac..fdace8c 100644
--- a/content/browser/renderer_host/navigation_entry_impl.cc
+++ b/content/browser/renderer_host/navigation_entry_impl.cc
@@ -53,7 +53,7 @@
 
 void RecursivelyGenerateFrameEntries(
     const blink::ExplodedFrameState& state,
-    const std::vector<base::Optional<std::u16string>>& referenced_files,
+    const std::vector<absl::optional<std::u16string>>& referenced_files,
     NavigationEntryImpl::TreeNode* node) {
   // Set a single-frame PageState on the entry.
   blink::ExplodedPageState page_state;
@@ -77,7 +77,7 @@
       nullptr, GURL(state.url_string.value_or(std::u16string())),
       // TODO(nasko): Supply valid origin once the value is persisted across
       // session restore.
-      base::nullopt /* origin */,
+      absl::nullopt /* origin */,
       Referrer(GURL(state.referrer.value_or(std::u16string())),
                state.referrer_policy),
       state.initiator_origin, std::vector<GURL>(),
@@ -92,7 +92,7 @@
   // Don't pass the file list to subframes, since that would result in multiple
   // copies of it ending up in the combined list in GetPageState (via
   // RecursivelyGenerateFrameState).
-  std::vector<base::Optional<std::u16string>> empty_file_list;
+  std::vector<absl::optional<std::u16string>> empty_file_list;
 
   for (const blink::ExplodedFrameState& child_state : state.children) {
     node->children.push_back(
@@ -102,16 +102,16 @@
   }
 }
 
-base::Optional<std::u16string> UrlToOptionalString16(const GURL& url) {
+absl::optional<std::u16string> UrlToOptionalString16(const GURL& url) {
   if (!url.is_valid())
-    return base::nullopt;
+    return absl::nullopt;
   return base::UTF8ToUTF16(url.spec());
 }
 
 void RecursivelyGenerateFrameState(
     NavigationEntryImpl::TreeNode* node,
     blink::ExplodedFrameState* state,
-    std::vector<base::Optional<std::u16string>>* referenced_files) {
+    std::vector<absl::optional<std::u16string>>* referenced_files) {
   // The FrameNavigationEntry's PageState contains just the ExplodedFrameState
   // for that particular frame.
   blink::ExplodedPageState exploded_page_state;
@@ -309,7 +309,7 @@
     : NavigationEntryImpl(nullptr,
                           GURL(),
                           Referrer(),
-                          base::nullopt,
+                          absl::nullopt,
                           std::u16string(),
                           ui::PAGE_TRANSITION_LINK,
                           false,
@@ -319,7 +319,7 @@
     scoped_refptr<SiteInstanceImpl> instance,
     const GURL& url,
     const Referrer& referrer,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     const std::u16string& title,
     ui::PageTransition transition_type,
     bool is_renderer_initiated,
@@ -333,7 +333,7 @@
               std::move(instance),
               nullptr,
               url,
-              base::nullopt /* origin */,
+              absl::nullopt /* origin */,
               referrer,
               initiator_origin,
               std::vector<GURL>(),
@@ -632,7 +632,7 @@
   return root_node()->frame_entry->redirect_chain();
 }
 
-const base::Optional<ReplacedNavigationEntryData>&
+const absl::optional<ReplacedNavigationEntryData>&
 NavigationEntryImpl::GetReplacedEntryData() {
   return replaced_entry_data_;
 }
@@ -747,7 +747,7 @@
 NavigationEntryImpl::ConstructCommitNavigationParams(
     const FrameNavigationEntry& frame_entry,
     const GURL& original_url,
-    const base::Optional<url::Origin>& origin_to_commit,
+    const absl::optional<url::Origin>& origin_to_commit,
     const std::string& original_method,
     const base::flat_map<std::string, bool>& subframe_unique_names,
     bool intended_as_new_entry,
@@ -790,7 +790,7 @@
           pending_offset_to_send, current_offset_to_send,
           current_length_to_send, false, IsViewSourceMode(),
           should_clear_history_list(), mojom::NavigationTiming::New(),
-          base::nullopt, mojom::WasActivatedOption::kUnknown,
+          absl::nullopt, mojom::WasActivatedOption::kUnknown,
           base::UnguessableToken::Create(),
           std::vector<mojom::PrefetchedSignedExchangeInfoPtr>(),
 #if defined(OS_ANDROID)
@@ -861,9 +861,9 @@
     SiteInstanceImpl* site_instance,
     scoped_refptr<SiteInstanceImpl> source_site_instance,
     const GURL& url,
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     const Referrer& referrer,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     const std::vector<GURL>& redirect_chain,
     const blink::PageState& page_state,
     const std::string& method,
diff --git a/content/browser/renderer_host/navigation_entry_impl.h b/content/browser/renderer_host/navigation_entry_impl.h
index 3f1f36b..ba99184 100644
--- a/content/browser/renderer_host/navigation_entry_impl.h
+++ b/content/browser/renderer_host/navigation_entry_impl.h
@@ -14,7 +14,6 @@
 #include "base/containers/flat_map.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
 #include "content/browser/renderer_host/back_forward_cache_metrics.h"
@@ -29,6 +28,7 @@
 #include "content/public/browser/restore_type.h"
 #include "content/public/browser/ssl_status.h"
 #include "net/base/isolation_info.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/page_state/page_state.h"
 #include "url/origin.h"
@@ -89,7 +89,7 @@
       scoped_refptr<SiteInstanceImpl> instance,
       const GURL& url,
       const Referrer& referrer,
-      const base::Optional<url::Origin>& initiator_origin,
+      const absl::optional<url::Origin>& initiator_origin,
       const std::u16string& title,
       ui::PageTransition transition_type,
       bool is_renderer_initiated,
@@ -143,7 +143,7 @@
   int GetHttpStatusCode() override;
   void SetRedirectChain(const std::vector<GURL>& redirects) override;
   const std::vector<GURL>& GetRedirectChain() override;
-  const base::Optional<ReplacedNavigationEntryData>& GetReplacedEntryData()
+  const absl::optional<ReplacedNavigationEntryData>& GetReplacedEntryData()
       override;
   bool IsRestored() override;
   std::string GetExtraHeaders() override;
@@ -187,7 +187,7 @@
   mojom::CommitNavigationParamsPtr ConstructCommitNavigationParams(
       const FrameNavigationEntry& frame_entry,
       const GURL& original_url,
-      const base::Optional<url::Origin>& origin_to_commit,
+      const absl::optional<url::Origin>& origin_to_commit,
       const std::string& original_method,
       const base::flat_map<std::string, bool>& subframe_unique_names,
       bool intended_as_new_entry,
@@ -226,9 +226,9 @@
       SiteInstanceImpl* site_instance,
       scoped_refptr<SiteInstanceImpl> source_site_instance,
       const GURL& url,
-      const base::Optional<url::Origin>& origin,
+      const absl::optional<url::Origin>& origin,
       const Referrer& referrer,
-      const base::Optional<url::Origin>& initiator_origin,
+      const absl::optional<url::Origin>& initiator_origin,
       const std::vector<GURL>& redirect_chain,
       const blink::PageState& page_state,
       const std::string& method,
@@ -381,7 +381,7 @@
     isolation_info_ = isolation_info;
   }
 
-  const base::Optional<net::IsolationInfo>& isolation_info() const {
+  const absl::optional<net::IsolationInfo>& isolation_info() const {
     return isolation_info_;
   }
 
@@ -519,14 +519,14 @@
   // determines the IsolationInfo to be used when navigating to this
   // NavigationEntry; otherwise, it is determined based on the navigating frame
   // and top frame origins. For example, this is used for view-source.
-  base::Optional<net::IsolationInfo> isolation_info_;
+  absl::optional<net::IsolationInfo> isolation_info_;
 
   // Stores information about the entry prior to being replaced (e.g.
   // history.replaceState()). It is preserved after commit (session sync for
   // offline analysis) but should not be persisted. The concept is valid for
   // subframe navigations but we only need to track it for main frames, that's
   // why the field is listed here.
-  base::Optional<ReplacedNavigationEntryData> replaced_entry_data_;
+  absl::optional<ReplacedNavigationEntryData> replaced_entry_data_;
 
   // Set to true if this page does a navigation without ever receiving a user
   // gesture. If true, it will be skipped on subsequent back/forward button
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 20c35644..30b93991 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -20,7 +20,6 @@
 #include "base/metrics/field_trial_params.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/rand_util.h"
 #include "base/stl_util.h"
 #include "base/strings/string_util.h"
@@ -122,6 +121,7 @@
 #include "services/network/public/mojom/fetch_api.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
 #include "services/network/public/mojom/web_sandbox_flags.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/blob/blob_utils.h"
 #include "third_party/blink/public/common/chrome_debug_urls.h"
 #include "third_party/blink/public/common/client_hints/client_hints.h"
@@ -289,7 +289,7 @@
     BrowserContext* browser_context,
     const std::string& method,
     const std::string& user_agent_override,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     blink::mojom::Referrer* referrer,
     FrameTreeNode* frame_tree_node) {
   if (!url.SchemeIsHTTPOrHTTPS())
@@ -333,7 +333,7 @@
     const blink::DocumentPolicyFeatureState& required_policy =
         frame_tree_node->effective_frame_policy().required_document_policy;
     if (!required_policy.empty()) {
-      base::Optional<std::string> policy_header =
+      absl::optional<std::string> policy_header =
           blink::DocumentPolicy::Serialize(required_policy);
       DCHECK(policy_header);
       headers->SetHeader("Sec-Required-Document-Policy", policy_header.value());
@@ -417,7 +417,7 @@
 void RecordStartToCommitMetrics(base::TimeTicks navigation_start_time,
                                 ui::PageTransition transition,
                                 const base::TimeTicks& ready_to_commit_time,
-                                base::Optional<bool> is_background,
+                                absl::optional<bool> is_background,
                                 bool is_same_process,
                                 bool is_main_frame) {
   base::TimeTicks now = base::TimeTicks::Now();
@@ -539,7 +539,7 @@
 
   // TimeToReadyToCommit2
   {
-    constexpr base::Optional<bool> kIsBackground = base::nullopt;
+    constexpr absl::optional<bool> kIsBackground = absl::nullopt;
     base::TimeDelta delta =
         ready_to_commit_time - common_params.navigation_start;
 
@@ -817,7 +817,7 @@
     NavigationEntryImpl* entry,
     const scoped_refptr<network::ResourceRequestBody>& post_body,
     std::unique_ptr<NavigationUIData> navigation_ui_data,
-    const base::Optional<blink::Impression>& impression) {
+    const absl::optional<blink::Impression>& impression) {
   TRACE_EVENT0("navigation", "NavigationRequest::CreateBrowserInitiated");
   // TODO(arthursonzogni): Form submission with the "GET" method is possible.
   // This is not currently handled here.
@@ -826,12 +826,12 @@
   network::mojom::RequestDestination destination =
       GetDestinationFromFrameTreeNode(frame_tree_node);
 
-  base::Optional<network::ResourceRequest::WebBundleTokenParams>
+  absl::optional<network::ResourceRequest::WebBundleTokenParams>
       web_bundle_token_params;
   if (frame_entry && frame_entry->subresource_web_bundle_navigation_info()) {
     auto* bundle_info = frame_entry->subresource_web_bundle_navigation_info();
     web_bundle_token_params =
-        base::make_optional(network::ResourceRequest::WebBundleTokenParams(
+        absl::make_optional(network::ResourceRequest::WebBundleTokenParams(
             bundle_info->bundle_url(), bundle_info->token(),
             bundle_info->render_process_id()));
   }
@@ -844,7 +844,7 @@
       false /* was_initiated_by_link_click */, GURL() /* searchable_form_url */,
       std::string() /* searchable_form_encoding */,
       GURL() /* client_side_redirect_url */,
-      base::nullopt /* devtools_initiator_info */,
+      absl::nullopt /* devtools_initiator_info */,
       nullptr /* trust_token_params */, impression,
       base::TimeTicks() /* renderer_before_unload_start */,
       base::TimeTicks() /* renderer_before_unload_end */,
@@ -934,7 +934,7 @@
   // renderer and sent to the browser instead of being measured here.
   mojom::CommitNavigationParamsPtr commit_params =
       mojom::CommitNavigationParams::New(
-          base::nullopt, network::mojom::WebSandboxFlags(), override_user_agent,
+          absl::nullopt, network::mojom::WebSandboxFlags(), override_user_agent,
           /*redirects=*/std::vector<GURL>(),
           /*redirect_response=*/
           std::vector<network::mojom::URLResponseHeadPtr>(),
@@ -954,7 +954,7 @@
           /*is_view_source=*/false,
           /*should_clear_history_list=*/false,
           /*navigation_timing=*/mojom::NavigationTiming::New(),
-          /*appcache_host_id=*/base::nullopt,
+          /*appcache_host_id=*/absl::nullopt,
           mojom::WasActivatedOption::kUnknown,
           /*navigation_token=*/base::UnguessableToken::Create(),
           /*prefetched_signed_exchanges=*/
@@ -1077,7 +1077,7 @@
           -1 /* current_history_list_offset */,
           -1 /* current_history_list_length */, false /* was_discard */,
           false /* is_view_source */, false /* should_clear_history_list */,
-          mojom::NavigationTiming::New(), base::nullopt /* appcache_host_id */,
+          mojom::NavigationTiming::New(), absl::nullopt /* appcache_host_id */,
           mojom::WasActivatedOption::kUnknown,
           base::UnguessableToken::Create() /* navigation_token */,
           std::vector<mojom::PrefetchedSignedExchangeInfoPtr>(),
@@ -1116,7 +1116,7 @@
       std::move(web_bundle_navigation_info);
   if (subresource_web_bundle_navigation_info) {
     navigation_request->begin_params_->web_bundle_token =
-        base::make_optional(network::ResourceRequest::WebBundleTokenParams(
+        absl::make_optional(network::ResourceRequest::WebBundleTokenParams(
             subresource_web_bundle_navigation_info->bundle_url(),
             subresource_web_bundle_navigation_info->token(),
             subresource_web_bundle_navigation_info->render_process_id()));
@@ -1522,7 +1522,7 @@
     // for aborted loads).
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-        false /*skip_throttles*/, base::nullopt /*error_page_content*/,
+        false /*skip_throttles*/, absl::nullopt /*error_page_content*/,
         false /*collapse_frame*/);
     return;
   }
@@ -1541,7 +1541,7 @@
     StartNavigation(false);
     OnRequestFailedInternal(network::URLLoaderCompletionStatus(net_error),
                             false /* skip_throttles */,
-                            base::nullopt /* error_page_content */,
+                            absl::nullopt /* error_page_content */,
                             false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
     // has destroyed the NavigationRequest.
@@ -1557,7 +1557,7 @@
     StartNavigation(false);
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-        false /* skip_throttles  */, base::nullopt /* error_page_content */,
+        false /* skip_throttles  */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
 
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
@@ -1570,7 +1570,7 @@
   if (CheckAboutSrcDoc() == AboutSrcDocCheckResult::BLOCK_REQUEST) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_INVALID_URL),
-        true /* skip_throttles */, base::nullopt /* error_page_content*/,
+        true /* skip_throttles */, absl::nullopt /* error_page_content*/,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
     // has destroyed the NavigationRequest.
@@ -1628,7 +1628,7 @@
       // Enforce cross-origin-opener-policy for about:blank, about:srcdoc and
       // MHTML iframe, before selecting the RenderFrameHost.
       const url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this);
-      const base::Optional<network::mojom::BlockedByResponseReason>
+      const absl::optional<network::mojom::BlockedByResponseReason>
           coop_requires_blocking = coop_status_.EnforceCOOP(
               policy_container_navigation_bundle_->FinalPolicies()
                   .cross_origin_opener_policy,
@@ -1654,7 +1654,7 @@
                             was_opener_suppressed_);
       SCOPED_CRASH_KEY_BOOL("nav_request", "is_main_frame", IsInMainFrame());
       SCOPED_CRASH_KEY_BOOL("nav_request", "got_initiator_routing_id",
-                            GetInitiatorFrameToken() != base::nullopt);
+                            GetInitiatorFrameToken() != absl::nullopt);
       SCOPED_CRASH_KEY_BOOL("nav_request", "is_renderer_initiated",
                             IsRendererInitiated());
       // Crash keys capturing values affecting whether
@@ -1976,7 +1976,7 @@
   // we do not use the bundle after we moved its contents.
   scoped_refptr<PolicyContainerHost> host =
       std::move(*policy_container_navigation_bundle_).TakePolicyContainerHost();
-  policy_container_navigation_bundle_ = base::nullopt;
+  policy_container_navigation_bundle_ = absl::nullopt;
 
   return host;
 }
@@ -2063,7 +2063,7 @@
     // edge case to silently cancel navigations. See https://crbug.com/941653.
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-        false /* skip_throttles */, base::nullopt /* error_page_content */,
+        false /* skip_throttles */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
     // has destroyed the NavigationRequest.
@@ -2084,7 +2084,7 @@
     // net::ERR_UNSAFE_REDIRECT and an error page. See https://crbug.com/941653.
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-        false /* skip_throttles */, base::nullopt /* error_page_content */,
+        false /* skip_throttles */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
     // has destroyed the NavigationRequest.
@@ -2092,26 +2092,26 @@
   }
 
   const url::Origin origin = GetOriginForURLLoaderFactoryUnchecked(this);
-  const base::Optional<network::mojom::BlockedByResponseReason>
+  const absl::optional<network::mojom::BlockedByResponseReason>
       coop_requires_blocking = coop_status_.EnforceCOOP(
           coop_status_.RetrieveCOOPFromResponse(response_head_.get(), origin),
           origin, network_isolation_key);
   if (coop_requires_blocking) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(*coop_requires_blocking),
-        false /* skip_throttles */, base::nullopt /* error_page_content */,
+        false /* skip_throttles */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to
     // OnRequestFailedInternal has destroyed the NavigationRequest.
     return;
   }
 
-  const base::Optional<network::mojom::BlockedByResponseReason>
+  const absl::optional<network::mojom::BlockedByResponseReason>
       coep_requires_blocking = EnforceCOEP();
   if (coep_requires_blocking) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(*coep_requires_blocking),
-        false /* skip_throttles */, base::nullopt /* error_page_content */,
+        false /* skip_throttles */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to
     // OnRequestFailedInternal has destroyed the NavigationRequest.
@@ -2165,7 +2165,7 @@
   if (net_error != net::OK) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net_error), false /*skip_throttles*/,
-        base::nullopt /*error_page_content*/, false /*collapse_frame*/);
+        absl::nullopt /*error_page_content*/, false /*collapse_frame*/);
 
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
     // has destroyed the NavigationRequest.
@@ -2178,7 +2178,7 @@
           LegacyProtocolInSubresourceCheckResult::BLOCK_REQUEST) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-        false /*skip_throttles*/, base::nullopt /*error_page_content*/,
+        false /*skip_throttles*/, absl::nullopt /*error_page_content*/,
         false /*collapse_frame*/);
 
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
@@ -2517,7 +2517,7 @@
     bool is_download,
     blink::NavigationDownloadPolicy download_policy,
     net::NetworkIsolationKey network_isolation_key,
-    base::Optional<SubresourceLoaderParams> subresource_loader_params,
+    absl::optional<SubresourceLoaderParams> subresource_loader_params,
     EarlyHints early_hints) {
   ScopedNavigationRequestCrashKeys crash_keys(this);
 
@@ -2558,7 +2558,7 @@
       CSPEmbeddedEnforcementResult::BLOCK_RESPONSE) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_BLOCKED_BY_CSP),
-        true /* skip_throttles */, base::nullopt /* error_page_content*/,
+        true /* skip_throttles */, absl::nullopt /* error_page_content*/,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
     // has destroyed the NavigationRequest.
@@ -2570,7 +2570,7 @@
     // TODO(pmeuleman) Move the enforcement of COOP to after
     // ComputePoliciesToCommit and use the origin from
     // GetOriginForURLLoaderFactory.
-    const base::Optional<network::mojom::BlockedByResponseReason>
+    const absl::optional<network::mojom::BlockedByResponseReason>
         coop_requires_blocking = coop_status_.EnforceCOOP(
             coop_status_.RetrieveCOOPFromResponse(response_head_.get(), origin),
             origin, network_isolation_key);
@@ -2581,7 +2581,7 @@
       // of a download.
       OnRequestFailedInternal(
           network::URLLoaderCompletionStatus(*coop_requires_blocking),
-          false /* skip_throttles */, base::nullopt /* error_page_content */,
+          false /* skip_throttles */, absl::nullopt /* error_page_content */,
           false /* collapse_frame */);
       // DO NOT ADD CODE after this. The previous call to
       // OnRequestFailedInternal has destroyed the NavigationRequest.
@@ -2612,8 +2612,8 @@
   // Update the AppCache params of the commit params.
   commit_params_->appcache_host_id =
       appcache_handle_
-          ? base::make_optional(appcache_handle_->appcache_host_id())
-          : base::nullopt;
+          ? absl::make_optional(appcache_handle_->appcache_host_id())
+          : absl::nullopt;
 
   const bool is_first_response = commit_params_->redirects.empty();
   UpdateNavigationHandleTimingsOnResponseReceived(is_first_response);
@@ -2676,21 +2676,21 @@
   if (is_mhtml_archive && !IsInMainFrame() && response_should_be_rendered_) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_BLOCKED_BY_RESPONSE),
-        false /* skip_throttles */, base::nullopt /* error_page_contnet */,
+        false /* skip_throttles */, absl::nullopt /* error_page_contnet */,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to
     // OnRequestFailedInternal has destroyed the NavigationRequest.
     return;
   }
 
-  const base::Optional<network::mojom::BlockedByResponseReason>
+  const absl::optional<network::mojom::BlockedByResponseReason>
       coep_requires_blocking = EnforceCOEP();
   if (coep_requires_blocking) {
     // TODO(https://crbug.com/1172169): Investigate what must be done in case of
     // a download.
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(*coep_requires_blocking),
-        false /* skip_throttles */, base::nullopt /* error_page_content */,
+        false /* skip_throttles */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
     // DO NOT ADD CODE after this. The previous call to
     // OnRequestFailedInternal has destroyed the NavigationRequest.
@@ -2739,7 +2739,7 @@
                                     network::mojom::BlockedByResponseReason::
                                         kCoepFrameResourceNeedsCoepHeader),
                                 false /* skip_throttles */,
-                                base::nullopt /* error_page_content */,
+                                absl::nullopt /* error_page_content */,
                                 false /* collapse_frame */);
         // DO NOT ADD CODE after this. The previous call to
         // OnRequestFailedInternal has destroyed the NavigationRequest.
@@ -2939,7 +2939,7 @@
                       (response_head_->headers->response_code() / 100 != 2))) {
     OnRequestFailedInternal(
         network::URLLoaderCompletionStatus(net::ERR_INVALID_RESPONSE),
-        false /* skip_throttles */, base::nullopt /* error_page_content */,
+        false /* skip_throttles */, absl::nullopt /* error_page_content */,
         false /* collapse_frame */);
 
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
@@ -2960,7 +2960,7 @@
   if (net_error != net::OK) {
     OnRequestFailedInternal(network::URLLoaderCompletionStatus(net_error),
                             false /* skip_throttles */,
-                            base::nullopt /* error_page_content */,
+                            absl::nullopt /* error_page_content */,
                             false /* collapse_frame */);
 
     // DO NOT ADD CODE after this. The previous call to OnRequestFailedInternal
@@ -2978,14 +2978,14 @@
 
   OnRequestFailedInternal(
       status, false /* skip_throttles */,
-      base::nullopt /* error_page_content */,
+      absl::nullopt /* error_page_content */,
       status.should_collapse_initiator /* collapse_frame */);
 }
 
 void NavigationRequest::OnRequestFailedInternal(
     const network::URLLoaderCompletionStatus& status,
     bool skip_throttles,
-    const base::Optional<std::string>& error_page_content,
+    const absl::optional<std::string>& error_page_content,
     bool collapse_frame) {
   CheckStateTransition(WILL_FAIL_REQUEST);
   DCHECK(!(status.error_code == net::ERR_ABORTED &&
@@ -3294,7 +3294,7 @@
   // Give DevTools a chance to override begin params (headers, skip SW)
   // before actually loading resource.
   bool report_raw_headers = false;
-  base::Optional<std::vector<net::SourceStream::SourceType>>
+  absl::optional<std::vector<net::SourceStream::SourceType>>
       devtools_accepted_stream_types;
   devtools_instrumentation::ApplyNetworkRequestOverrides(
       frame_tree_node_, begin_params_.get(), &report_raw_headers,
@@ -3533,7 +3533,7 @@
 
       OnRequestFailedInternal(
           network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-          false /*skip_throttles*/, base::nullopt /*error_page_content*/,
+          false /*skip_throttles*/, absl::nullopt /*error_page_content*/,
           false /*collapse_frame*/);
       // DO NOT ADD CODE after this. The previous call to OnRequestFailed has
       // destroyed the NavigationRequest.
@@ -3572,7 +3572,7 @@
                          weak_factory_.GetWeakPtr(),
                          network::URLLoaderCompletionStatus(net::ERR_ABORTED),
                          false /* skip_throttles */,
-                         base::nullopt /* error_page_content */,
+                         absl::nullopt /* error_page_content */,
                          false /* collapse_frame */));
       // Unlike the other early returns, intentionally skip calling
       // `OnRequestFailedInternal()`. This allows the response body drainer to
@@ -3598,7 +3598,7 @@
       // destroyed the NavigationRequest.
       OnRequestFailedInternal(
           network::URLLoaderCompletionStatus(net::ERR_ABORTED),
-          true /* skip_throttles */, base::nullopt /* error_page_content */,
+          true /* skip_throttles */, absl::nullopt /* error_page_content */,
           false /* collapse_frame */);
       return;
     }
@@ -3646,7 +3646,7 @@
 }
 
 void NavigationRequest::CommitErrorPage(
-    const base::Optional<std::string>& error_page_content) {
+    const absl::optional<std::string>& error_page_content) {
   DCHECK(!IsSameDocument());
 
   UpdateCommitNavigationParamsHistory();
@@ -3806,7 +3806,7 @@
   ClientHintsControllerDelegate* client_hints_delegate =
       browser_context->GetClientHintsControllerDelegate();
   if (client_hints_delegate) {
-    base::Optional<std::vector<network::mojom::WebClientHintsType>>
+    absl::optional<std::vector<network::mojom::WebClientHintsType>>
         opt_in_hints_from_response;
     if (response()) {
       opt_in_hints_from_response = ParseAndPersistAcceptCHForNagivation(
@@ -4997,7 +4997,7 @@
   // another document without error.
   if (!IsSameDocument() && state_ != DID_COMMIT_ERROR_PAGE) {
     ui::PageTransition transition = common_params_->transition;
-    base::Optional<bool> is_background =
+    absl::optional<bool> is_background =
         render_frame_host_->GetProcess()->IsProcessBackgrounded();
 
     RecordStartToCommitMetrics(
@@ -5238,7 +5238,7 @@
 bool NavigationRequest::IsLoadDataWithBaseURLAndUnreachableURL(
     bool is_main_frame,
     const mojom::CommonNavigationParams& common_params,
-    const base::Optional<std::string>& data_url_as_string) {
+    const absl::optional<std::string>& data_url_as_string) {
   if (!is_main_frame || !IsLoadDataWithBaseURL(common_params))
     return false;
 
@@ -5679,11 +5679,11 @@
   return *request_headers_;
 }
 
-const base::Optional<net::SSLInfo>& NavigationRequest::GetSSLInfo() {
+const absl::optional<net::SSLInfo>& NavigationRequest::GetSSLInfo() {
   return ssl_info_;
 }
 
-const base::Optional<net::AuthChallengeInfo>&
+const absl::optional<net::AuthChallengeInfo>&
 NavigationRequest::GetAuthChallengeInfo() {
   return auth_challenge_info_;
 }
@@ -5768,11 +5768,11 @@
   return common_params().href_translate;
 }
 
-const base::Optional<blink::Impression>& NavigationRequest::GetImpression() {
+const absl::optional<blink::Impression>& NavigationRequest::GetImpression() {
   return begin_params().impression;
 }
 
-const base::Optional<blink::LocalFrameToken>&
+const absl::optional<blink::LocalFrameToken>&
 NavigationRequest::GetInitiatorFrameToken() {
   return initiator_frame_token_;
 }
@@ -5781,7 +5781,7 @@
   return initiator_process_id_;
 }
 
-const base::Optional<url::Origin>& NavigationRequest::GetInitiatorOrigin() {
+const absl::optional<url::Origin>& NavigationRequest::GetInitiatorOrigin() {
   return common_params().initiator_origin;
 }
 
@@ -5949,18 +5949,18 @@
   commit_params_->force_enabled_origin_trials = trials;
 }
 
-base::Optional<network::mojom::BlockedByResponseReason>
+absl::optional<network::mojom::BlockedByResponseReason>
 NavigationRequest::EnforceCOEP() {
   // https://html.spec.whatwg.org/#check-a-navigation-response's-adherence-to-its-embedder-policy
   auto* parent_frame = GetParentFrame();
   if (!parent_frame) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   const auto& url = common_params_->url;
   // Some special URLs not loaded using the network are inheriting the
   // Cross-Origin-Embedder-Policy header from their parent.
   if (url.SchemeIsBlob() || url.SchemeIs(url::kDataScheme)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   return network::CrossOriginResourcePolicy::IsNavigationBlocked(
       url, redirect_chain_[0], parent_frame->GetLastCommittedOrigin(),
diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h
index cf3d795..b0f599c 100644
--- a/content/browser/renderer_host/navigation_request.h
+++ b/content/browser/renderer_host/navigation_request.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/strings/string_util.h"
 #include "base/time/time.h"
 #include "base/timer/timer.h"
@@ -57,6 +56,7 @@
 #include "services/network/public/mojom/blocked_by_response_reason.mojom-shared.h"
 #include "services/network/public/mojom/content_security_policy.mojom.h"
 #include "services/network/public/mojom/web_sandbox_flags.mojom-shared.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/navigation/impression.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
@@ -189,7 +189,7 @@
       NavigationEntryImpl* entry,
       const scoped_refptr<network::ResourceRequestBody>& post_body,
       std::unique_ptr<NavigationUIData> navigation_ui_data,
-      const base::Optional<blink::Impression>& impression);
+      const absl::optional<blink::Impression>& impression);
 
   // Creates a request for a renderer-initiated navigation.
   // Note: |body| is sent to the IO thread when calling BeginNavigation, and
@@ -317,8 +317,8 @@
                                   const std::string& header_value) override;
   const net::HttpResponseHeaders* GetResponseHeaders() override;
   net::HttpResponseInfo::ConnectionInfo GetConnectionInfo() override;
-  const base::Optional<net::SSLInfo>& GetSSLInfo() override;
-  const base::Optional<net::AuthChallengeInfo>& GetAuthChallengeInfo() override;
+  const absl::optional<net::SSLInfo>& GetSSLInfo() override;
+  const absl::optional<net::AuthChallengeInfo>& GetAuthChallengeInfo() override;
   net::ResolveErrorInfo GetResolveErrorInfo() override;
   net::IsolationInfo GetIsolationInfo() override;
   void RegisterThrottleForTesting(
@@ -339,11 +339,11 @@
   bool WasResponseCached() override;
   const net::ProxyServer& GetProxyServer() override;
   const std::string& GetHrefTranslate() override;
-  const base::Optional<blink::Impression>& GetImpression() override;
-  const base::Optional<blink::LocalFrameToken>& GetInitiatorFrameToken()
+  const absl::optional<blink::Impression>& GetImpression() override;
+  const absl::optional<blink::LocalFrameToken>& GetInitiatorFrameToken()
       override;
   int GetInitiatorProcessID() override;
-  const base::Optional<url::Origin>& GetInitiatorOrigin() override;
+  const absl::optional<url::Origin>& GetInitiatorOrigin() override;
   const std::vector<std::string>& GetDnsAliases() override;
   bool IsSameProcess() override;
   NavigationEntry* GetNavigationEntry() override;
@@ -751,7 +751,7 @@
   static bool IsLoadDataWithBaseURLAndUnreachableURL(
       bool is_main_frame,
       const mojom::CommonNavigationParams& common_params,
-      const base::Optional<std::string>& data_url_as_string);
+      const absl::optional<std::string>& data_url_as_string);
 
   // Will calculate an *approximation* of the origin that this NavigationRequest
   // will commit.  (An "approximation", because sandboxing is not taken into
@@ -923,7 +923,7 @@
       bool is_download,
       blink::NavigationDownloadPolicy download_policy,
       net::NetworkIsolationKey network_isolation_key,
-      base::Optional<SubresourceLoaderParams> subresource_loader_params,
+      absl::optional<SubresourceLoaderParams> subresource_loader_params,
       EarlyHints early_hints) override;
   void OnRequestFailed(
       const network::URLLoaderCompletionStatus& status) override;
@@ -937,7 +937,7 @@
   void OnRequestFailedInternal(
       const network::URLLoaderCompletionStatus& status,
       bool skip_throttles,
-      const base::Optional<std::string>& error_page_content,
+      const absl::optional<std::string>& error_page_content,
       bool collapse_frame);
 
   // Helper to determine whether an error page for the provided error code
@@ -966,7 +966,7 @@
   // Called either by OnFailureChecksComplete() or OnRequestFailed() directly.
   // |error_page_content| contains the content of the error page (i.e. flattened
   // HTML, JS, CSS).
-  void CommitErrorPage(const base::Optional<std::string>& error_page_content);
+  void CommitErrorPage(const absl::optional<std::string>& error_page_content);
 
   // Have a RenderFrameHost commit the navigation. The NavigationRequest will
   // be destroyed after this call.
@@ -1244,7 +1244,7 @@
 
   void CreateCoepReporter(StoragePartition* storage_partition);
 
-  base::Optional<network::mojom::BlockedByResponseReason> EnforceCOEP();
+  absl::optional<network::mojom::BlockedByResponseReason> EnforceCOEP();
 
   // Check the COOP value of the page is compatible with the COEP value of each
   // of its documents. COOP:kSameOriginPlusCoep is incompatible with COEP:kNone.
@@ -1402,8 +1402,8 @@
   network::mojom::URLResponseHeadPtr response_head_;
   mojo::ScopedDataPipeConsumerHandle response_body_;
   network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints_;
-  base::Optional<net::SSLInfo> ssl_info_;
-  base::Optional<net::AuthChallengeInfo> auth_challenge_info_;
+  absl::optional<net::SSLInfo> ssl_info_;
+  absl::optional<net::AuthChallengeInfo> auth_challenge_info_;
   bool is_download_ = false;
   GlobalRequestID request_id_;
   std::unique_ptr<NavigationEarlyHintsManager> early_hints_manager_;
@@ -1435,13 +1435,13 @@
   // Used in the network service world to pass the subressource loader params
   // to the renderer. Used by AppCache and ServiceWorker, and
   // SignedExchangeSubresourcePrefetch.
-  base::Optional<SubresourceLoaderParams> subresource_loader_params_;
+  absl::optional<SubresourceLoaderParams> subresource_loader_params_;
 
   // See comment on accessor.
   const base::UnguessableToken devtools_navigation_token_ =
       base::UnguessableToken::Create();
 
-  base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+  absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
       subresource_overrides_;
 
   // The NavigationClient interface for that requested this navigation in the
@@ -1587,7 +1587,7 @@
 
   // The headers used for the request. The value of this comes from
   // |begin_params_->headers|. If not set, it needs to be calculated.
-  base::Optional<net::HttpRequestHeaders> request_headers_;
+  absl::optional<net::HttpRequestHeaders> request_headers_;
 
   // Used to update the request's headers. When modified during the navigation
   // start, the headers will be applied to the initial network request. When
@@ -1613,7 +1613,7 @@
 
   // If non-empty, it represents the IsolationInfo explicitly asked to be used
   // for this NavigationRequest.
-  base::Optional<net::IsolationInfo> isolation_info_;
+  absl::optional<net::IsolationInfo> isolation_info_;
 
   // This is used to store the current_frame_host id at request creation time.
   const GlobalFrameRoutingId previous_render_frame_host_id_;
@@ -1624,7 +1624,7 @@
   // The frame with the corresponding frame token may have been deleted before
   // the navigation begins. This parameter is defined if and only if
   // |initiator_process_id_| below is.
-  const base::Optional<blink::LocalFrameToken> initiator_frame_token_;
+  const absl::optional<blink::LocalFrameToken> initiator_frame_token_;
 
   // ID of the renderer process of the frame host that initiated the navigation.
   // This is defined if and only if |initiator_frame_token_| above is, and it is
@@ -1656,7 +1656,7 @@
   network::mojom::ContentSecurityPolicyPtr required_csp_;
 
   // Non-nullopt from construction until |TakePolicyContainerHost()| is called.
-  base::Optional<PolicyContainerNavigationBundle>
+  absl::optional<PolicyContainerNavigationBundle>
       policy_container_navigation_bundle_;
 
   std::unique_ptr<CrossOriginEmbedderPolicyReporter> coep_reporter_;
@@ -1702,7 +1702,7 @@
   mojo::ReceiverSet<network::mojom::CookieAccessObserver> cookie_observers_;
 
   // The sandbox flags of the document to be loaded.
-  base::Optional<network::mojom::WebSandboxFlags> sandbox_flags_to_commit_;
+  absl::optional<network::mojom::WebSandboxFlags> sandbox_flags_to_commit_;
 
   OriginAgentClusterEndResult origin_agent_cluster_end_result_ =
       OriginAgentClusterEndResult::kNotRequestedAndNotOriginKeyed;
diff --git a/content/browser/renderer_host/navigation_request_info.cc b/content/browser/renderer_host/navigation_request_info.cc
index 4f5c3ec..2a62897 100644
--- a/content/browser/renderer_host/navigation_request_info.cc
+++ b/content/browser/renderer_host/navigation_request_info.cc
@@ -22,7 +22,7 @@
     bool obey_origin_policy,
     net::HttpRequestHeaders cors_exempt_headers,
     network::mojom::ClientSecurityStatePtr client_security_state,
-    const base::Optional<std::vector<net::SourceStream::SourceType>>&
+    const absl::optional<std::vector<net::SourceStream::SourceType>>&
         devtools_accepted_stream_types)
     : common_params(std::move(common_params)),
       begin_params(std::move(begin_params)),
diff --git a/content/browser/renderer_host/navigation_request_info.h b/content/browser/renderer_host/navigation_request_info.h
index 6726b81..3c54148 100644
--- a/content/browser/renderer_host/navigation_request_info.h
+++ b/content/browser/renderer_host/navigation_request_info.h
@@ -42,7 +42,7 @@
       bool obey_origin_policy,
       net::HttpRequestHeaders cors_exempt_headers,
       network::mojom::ClientSecurityStatePtr client_security_state,
-      const base::Optional<std::vector<net::SourceStream::SourceType>>&
+      const absl::optional<std::vector<net::SourceStream::SourceType>>&
           devtools_accepted_stream_types);
   NavigationRequestInfo(const NavigationRequestInfo& other) = delete;
   ~NavigationRequestInfo();
@@ -97,7 +97,7 @@
   // If not null, the network service will not advertise any stream types
   // (via Accept-Encoding) that are not listed. Also, it will not attempt
   // decoding any non-listed stream types.
-  base::Optional<std::vector<net::SourceStream::SourceType>>
+  absl::optional<std::vector<net::SourceStream::SourceType>>
       devtools_accepted_stream_types;
 };
 
diff --git a/content/browser/renderer_host/navigation_request_unittest.cc b/content/browser/renderer_host/navigation_request_unittest.cc
index bd0f5c8..da3d9c12 100644
--- a/content/browser/renderer_host/navigation_request_unittest.cc
+++ b/content/browser/renderer_host/navigation_request_unittest.cc
@@ -10,7 +10,6 @@
 #include "base/bind.h"
 #include "base/i18n/number_formatting.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/public/browser/navigation_throttle.h"
 #include "content/public/browser/ssl_status.h"
@@ -24,6 +23,7 @@
 #include "net/ssl/ssl_connection_status_flags.h"
 #include "services/network/public/cpp/content_security_policy/content_security_policy.h"
 #include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
 
 namespace content {
@@ -128,7 +128,7 @@
   // throttle checks when they are finished.
   void SimulateWillFailRequest(
       net::Error net_error_code,
-      const base::Optional<net::SSLInfo> ssl_info = base::nullopt) {
+      const absl::optional<net::SSLInfo> ssl_info = absl::nullopt) {
     was_callback_called_ = false;
     callback_result_ = NavigationThrottle::DEFER;
     request_->set_net_error(net_error_code);
@@ -209,7 +209,7 @@
         ChildProcessHost::kInvalidUniqueID /* initiator_process_id */,
         std::string() /* extra_headers */, nullptr /* frame_entry */,
         nullptr /* entry */, nullptr /* post_body */,
-        nullptr /* navigation_ui_data */, base::nullopt /* impression */);
+        nullptr /* navigation_ui_data */, absl::nullopt /* impression */);
     request_->StartNavigation(true);
   }
 
diff --git a/content/browser/renderer_host/navigation_throttle_runner_unittest.cc b/content/browser/renderer_host/navigation_throttle_runner_unittest.cc
index 8102ee91..5f2a2ab6 100644
--- a/content/browser/renderer_host/navigation_throttle_runner_unittest.cc
+++ b/content/browser/renderer_host/navigation_throttle_runner_unittest.cc
@@ -6,12 +6,12 @@
 
 #include "base/bind.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/public/browser/navigation_throttle.h"
 #include "content/public/common/url_constants.h"
 #include "content/public/test/mock_navigation_handle.h"
 #include "content/public/test/test_navigation_throttle.h"
 #include "content/public/test/test_renderer_host.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -388,7 +388,7 @@
       public testing::WithParamInterface<
           std::tuple<NavigationThrottleRunner::Event,
                      net::Error,
-                     base::Optional<std::string>>> {
+                     absl::optional<std::string>>> {
  public:
   NavigationThrottleRunnerTestWithEventAndError()
       : NavigationThrottleRunnerTest() {}
@@ -399,7 +399,7 @@
   }
   NavigationThrottleRunner::Event event() const { return event_; }
   net::Error error() const { return error_; }
-  const base::Optional<std::string>& custom_error_page() const {
+  const absl::optional<std::string>& custom_error_page() const {
     return custom_error_page_;
   }
 
@@ -410,7 +410,7 @@
  private:
   NavigationThrottleRunner::Event event_;
   net::Error error_;
-  base::Optional<std::string> custom_error_page_ = base::nullopt;
+  absl::optional<std::string> custom_error_page_ = absl::nullopt;
 };
 
 // Checks that the NavigationThrottleRunner correctly propagates a
@@ -456,6 +456,6 @@
                           NavigationThrottleRunner::Event::WillFailRequest,
                           NavigationThrottleRunner::Event::WillProcessResponse),
         ::testing::Values(net::ERR_BLOCKED_BY_ADMINISTRATOR, net::ERR_ABORTED),
-        ::testing::Values(base::nullopt, "<html><body>test</body></html>")));
+        ::testing::Values(absl::nullopt, "<html><body>test</body></html>")));
 
 }  // namespace content
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index d71c4f4..3654c2b 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -204,22 +204,22 @@
   // For renderer-initated navigations this just includes OOPIFs since local
   // beforeunloads will have been run in the renderer before dispatching the
   // navigation IPC.
-  base::Optional<base::TimeTicks> before_unload_start_;
-  base::Optional<base::TimeTicks> before_unload_end_;
+  absl::optional<base::TimeTicks> before_unload_start_;
+  absl::optional<base::TimeTicks> before_unload_end_;
 
   // Time at which the browser process received a navigation request and
   // dispatched beforeunloads to the renderer.
-  base::Optional<base::TimeTicks> before_unload_sent_;
+  absl::optional<base::TimeTicks> before_unload_sent_;
 
   // Timestamps renderer_before_unload_(start|end)_ give the time it took to run
   // beforeunloads for local frames in a renderer-initiated navigation, prior to
   // notifying the browser process about the navigation.
-  base::Optional<base::TimeTicks> renderer_before_unload_start_;
-  base::Optional<base::TimeTicks> renderer_before_unload_end_;
+  absl::optional<base::TimeTicks> renderer_before_unload_start_;
+  absl::optional<base::TimeTicks> renderer_before_unload_end_;
 
   // Time at which the browser process dispatched the CommitNavigation to the
   // renderer.
-  base::Optional<base::TimeTicks> commit_navigation_sent_;
+  absl::optional<base::TimeTicks> commit_navigation_sent_;
 };
 
 Navigator::Navigator(
@@ -621,7 +621,7 @@
     const GURL& url,
     const blink::LocalFrameToken* initiator_frame_token,
     int initiator_process_id,
-    const base::Optional<url::Origin>& initiator_origin,
+    const absl::optional<url::Origin>& initiator_origin,
     const scoped_refptr<network::ResourceRequestBody>& post_body,
     const std::string& extra_headers,
     const Referrer& referrer,
@@ -631,7 +631,7 @@
     blink::mojom::TriggeringEventInfo triggering_event_info,
     const std::string& href_translate,
     scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory,
-    const base::Optional<blink::Impression>& impression) {
+    const absl::optional<blink::Impression>& impression) {
   // Note: This can be called for subframes (even when OOPIFs are not possible)
   // if the disposition calls for a different window.
 
@@ -719,7 +719,7 @@
     scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory,
     network::mojom::SourceLocationPtr source_location,
     bool has_user_gesture,
-    const base::Optional<blink::Impression>& impression) {
+    const absl::optional<blink::Impression>& impression) {
   // |method != "POST"| should imply absence of |post_body|.
   if (method != "POST" && post_body) {
     NOTREACHED();
diff --git a/content/browser/renderer_host/navigator.h b/content/browser/renderer_host/navigator.h
index c0448cfd..66d03f48 100644
--- a/content/browser/renderer_host/navigator.h
+++ b/content/browser/renderer_host/navigator.h
@@ -125,7 +125,7 @@
       const GURL& url,
       const blink::LocalFrameToken* initiator_frame_token,
       int initiator_process_id,
-      const base::Optional<url::Origin>& initiator_origin,
+      const absl::optional<url::Origin>& initiator_origin,
       const scoped_refptr<network::ResourceRequestBody>& post_body,
       const std::string& extra_headers,
       const Referrer& referrer,
@@ -135,7 +135,7 @@
       blink::mojom::TriggeringEventInfo triggering_event_info,
       const std::string& href_translate,
       scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory,
-      const base::Optional<blink::Impression>& impression);
+      const absl::optional<blink::Impression>& impression);
 
   // Called when a document requests a navigation in another document through a
   // RenderFrameProxy. If |method| is "POST", then |post_body| needs to specify
@@ -157,7 +157,7 @@
       scoped_refptr<network::SharedURLLoaderFactory> blob_url_loader_factory,
       network::mojom::SourceLocationPtr source_location,
       bool has_user_gesture,
-      const base::Optional<blink::Impression>& impression);
+      const absl::optional<blink::Impression>& impression);
 
   // Called after BeforeUnloadCompleted callback is invoked from the renderer.
   // If |frame_tree_node| has a NavigationRequest waiting for the renderer
diff --git a/content/browser/renderer_host/origin_policy_throttle.cc b/content/browser/renderer_host/origin_policy_throttle.cc
index 73ca2c4b..6779712 100644
--- a/content/browser/renderer_host/origin_policy_throttle.cc
+++ b/content/browser/renderer_host/origin_policy_throttle.cc
@@ -86,7 +86,7 @@
 
   // If no test origin policy is set, look at the actual origin policy from the
   // response.
-  const base::Optional<network::OriginPolicy>& origin_policy =
+  const absl::optional<network::OriginPolicy>& origin_policy =
       GetTestOriginPolicy().has_value()
           ? GetTestOriginPolicy()
           : NavigationRequest::From(navigation_handle())
@@ -120,7 +120,7 @@
 // static
 void OriginPolicyThrottle::SetOriginPolicyForTesting(
     const network::OriginPolicy& origin_policy) {
-  base::Optional<network::OriginPolicy> new_test_origin_policy = origin_policy;
+  absl::optional<network::OriginPolicy> new_test_origin_policy = origin_policy;
   GetTestOriginPolicy().swap(new_test_origin_policy);
 }
 
@@ -133,9 +133,9 @@
     : NavigationThrottle(handle) {}
 
 // static
-base::Optional<network::OriginPolicy>&
+absl::optional<network::OriginPolicy>&
 OriginPolicyThrottle::GetTestOriginPolicy() {
-  static base::NoDestructor<base::Optional<network::OriginPolicy>>
+  static base::NoDestructor<absl::optional<network::OriginPolicy>>
       test_origin_policy;
   return *test_origin_policy;
 }
diff --git a/content/browser/renderer_host/origin_policy_throttle.h b/content/browser/renderer_host/origin_policy_throttle.h
index c671d98..a742038 100644
--- a/content/browser/renderer_host/origin_policy_throttle.h
+++ b/content/browser/renderer_host/origin_policy_throttle.h
@@ -58,7 +58,7 @@
  private:
   explicit OriginPolicyThrottle(NavigationHandle* handle);
 
-  static base::Optional<network::OriginPolicy>& GetTestOriginPolicy();
+  static absl::optional<network::OriginPolicy>& GetTestOriginPolicy();
 
   DISALLOW_COPY_AND_ASSIGN(OriginPolicyThrottle);
 };
diff --git a/content/browser/renderer_host/overscroll_controller.cc b/content/browser/renderer_host/overscroll_controller.cc
index 616f9d2..7f08eb5 100644
--- a/content/browser/renderer_host/overscroll_controller.cc
+++ b/content/browser/renderer_host/overscroll_controller.cc
@@ -465,7 +465,7 @@
   }
 
   if (delegate_) {
-    base::Optional<float> cap = delegate_->GetMaxOverscrollDelta();
+    absl::optional<float> cap = delegate_->GetMaxOverscrollDelta();
     if (cap) {
       DCHECK_LE(0.f, cap.value());
       switch (overscroll_mode_) {
diff --git a/content/browser/renderer_host/overscroll_controller.h b/content/browser/renderer_host/overscroll_controller.h
index e77d592..64c511d 100644
--- a/content/browser/renderer_host/overscroll_controller.h
+++ b/content/browser/renderer_host/overscroll_controller.h
@@ -7,10 +7,10 @@
 
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "cc/input/overscroll_behavior.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_gesture_event.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "ui/events/blink/did_overscroll_params.h"
@@ -184,7 +184,7 @@
   // cases. So we only process 0.3 second inertial events then cancel the
   // overscroll if it is not completed yet.
   // Timestamp for the first inertial event (fling) in current stream.
-  base::Optional<base::TimeTicks> first_inertial_event_time_;
+  absl::optional<base::TimeTicks> first_inertial_event_time_;
 
   DISALLOW_COPY_AND_ASSIGN(OverscrollController);
 };
diff --git a/content/browser/renderer_host/overscroll_controller_delegate.h b/content/browser/renderer_host/overscroll_controller_delegate.h
index 91f34dae..9495f7b 100644
--- a/content/browser/renderer_host/overscroll_controller_delegate.h
+++ b/content/browser/renderer_host/overscroll_controller_delegate.h
@@ -8,9 +8,9 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/overscroll_controller.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/gfx/geometry/size.h"
 
 namespace content {
@@ -46,7 +46,7 @@
 
   // Returns the optional maximum amount allowed for the absolute value of
   // overscroll delta corresponding to the current overscroll mode.
-  virtual base::Optional<float> GetMaxOverscrollDelta() const = 0;
+  virtual absl::optional<float> GetMaxOverscrollDelta() const = 0;
 
   base::WeakPtr<OverscrollControllerDelegate> GetWeakPtr();
 
diff --git a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
index ad4aaba..fc4d728 100644
--- a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.cc
@@ -159,7 +159,7 @@
   receiver_.set_disconnect_handler(
       base::BindOnce(&PepperHostResolverMessageFilter::OnComplete,
                      base::Unretained(this), net::ERR_NAME_NOT_RESOLVED,
-                     net::ResolveErrorInfo(net::ERR_FAILED), base::nullopt));
+                     net::ResolveErrorInfo(net::ERR_FAILED), absl::nullopt));
   host_resolve_context_ = context->MakeReplyMessageContext();
 
   return PP_OK_COMPLETIONPENDING;
@@ -168,7 +168,7 @@
 void PepperHostResolverMessageFilter::OnComplete(
     int result,
     const net::ResolveErrorInfo& resolve_error_info,
-    const base::Optional<net::AddressList>& resolved_addresses) {
+    const absl::optional<net::AddressList>& resolved_addresses) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   receiver_.reset();
 
@@ -184,7 +184,7 @@
 
 void PepperHostResolverMessageFilter::OnLookupFinished(
     int net_result,
-    const base::Optional<net::AddressList>& addresses,
+    const absl::optional<net::AddressList>& addresses,
     const ReplyMessageContext& context) {
   if (net_result != net::OK) {
     SendResolveError(NetErrorToPepperError(net_result), context);
diff --git a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h
index d65a7982..28173aab 100644
--- a/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_host_resolver_message_filter.h
@@ -68,10 +68,10 @@
   void OnComplete(
       int result,
       const net::ResolveErrorInfo& resolve_error_info,
-      const base::Optional<net::AddressList>& resolved_addresses) override;
+      const absl::optional<net::AddressList>& resolved_addresses) override;
 
   void OnLookupFinished(int net_result,
-                        const base::Optional<net::AddressList>& addresses,
+                        const absl::optional<net::AddressList>& addresses,
                         const ppapi::host::ReplyMessageContext& bound_info);
   void SendResolveReply(int32_t result,
                         const std::string& canonical_name,
diff --git a/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc b/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc
index 7ec68e5..32cca1c 100644
--- a/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_network_monitor_host.cc
@@ -41,7 +41,7 @@
 
 void OnGetNetworkList(
     base::OnceCallback<void(const net::NetworkInterfaceList&)> callback,
-    const base::Optional<net::NetworkInterfaceList>& networks) {
+    const absl::optional<net::NetworkInterfaceList>& networks) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   auto task_runner = base::FeatureList::IsEnabled(features::kProcessHostOnUI)
                          ? content::GetUIThreadTaskRunner({})
diff --git a/content/browser/renderer_host/pepper/pepper_network_proxy_host.cc b/content/browser/renderer_host/pepper/pepper_network_proxy_host.cc
index 77f0182..34f9d27c 100644
--- a/content/browser/renderer_host/pepper/pepper_network_proxy_host.cc
+++ b/content/browser/renderer_host/pepper/pepper_network_proxy_host.cc
@@ -161,7 +161,7 @@
 void PepperNetworkProxyHost::OnResolveProxyCompleted(
     ppapi::host::ReplyMessageContext context,
     PepperProxyLookupHelper* pending_request,
-    base::Optional<net::ProxyInfo> proxy_info) {
+    absl::optional<net::ProxyInfo> proxy_info) {
   auto it = pending_requests_.find(pending_request);
   DCHECK(it != pending_requests_.end());
   pending_requests_.erase(it);
diff --git a/content/browser/renderer_host/pepper/pepper_network_proxy_host.h b/content/browser/renderer_host/pepper/pepper_network_proxy_host.h
index c45c711..3f43756 100644
--- a/content/browser/renderer_host/pepper/pepper_network_proxy_host.h
+++ b/content/browser/renderer_host/pepper/pepper_network_proxy_host.h
@@ -16,10 +16,10 @@
 #include "base/containers/unique_ptr_adapters.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "ppapi/host/host_message_context.h"
 #include "ppapi/host/resource_host.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace net {
@@ -74,7 +74,7 @@
 
   void OnResolveProxyCompleted(ppapi::host::ReplyMessageContext context,
                                PepperProxyLookupHelper* pending_request,
-                               base::Optional<net::ProxyInfo> proxy_info);
+                               absl::optional<net::ProxyInfo> proxy_info);
   void SendFailureReply(int32_t error,
                         ppapi::host::ReplyMessageContext context);
 
diff --git a/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.cc b/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.cc
index afc1122..ad239ad2 100644
--- a/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.cc
+++ b/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.cc
@@ -46,16 +46,16 @@
         receiver_.BindNewPipeAndPassRemote();
     receiver_.set_disconnect_handler(base::BindOnce(
         &UIThreadHelper::OnProxyLookupComplete, base::Unretained(this),
-        net::ERR_ABORTED, base::nullopt));
+        net::ERR_ABORTED, absl::nullopt));
     if (!std::move(look_up_proxy_for_url_callback)
              .Run(url, std::move(proxy_lookup_client))) {
-      OnProxyLookupComplete(net::ERR_FAILED, base::nullopt);
+      OnProxyLookupComplete(net::ERR_FAILED, absl::nullopt);
     }
   }
 
   void OnProxyLookupComplete(
       int32_t net_error,
-      const base::Optional<net::ProxyInfo>& proxy_info) override {
+      const absl::optional<net::ProxyInfo>& proxy_info) override {
     DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
     receiver_.reset();
@@ -98,7 +98,7 @@
 }
 
 void PepperProxyLookupHelper::OnProxyLookupComplete(
-    base::Optional<net::ProxyInfo> proxy_info) {
+    absl::optional<net::ProxyInfo> proxy_info) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
   std::move(look_up_complete_callback_).Run(std::move(proxy_info));
diff --git a/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.h b/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.h
index 0d6b70ab..28e54b9 100644
--- a/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.h
+++ b/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper.h
@@ -10,11 +10,11 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "services/network/public/mojom/proxy_lookup_client.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class GURL;
 
@@ -39,7 +39,7 @@
   // Callback to invoke when complete. Invoked on thread the
   // PepperProxyLookupHelper was created on.
   using LookUpCompleteCallback =
-      base::OnceCallback<void(base::Optional<net::ProxyInfo> proxy_info)>;
+      base::OnceCallback<void(absl::optional<net::ProxyInfo> proxy_info)>;
 
   PepperProxyLookupHelper();
   ~PepperProxyLookupHelper();
@@ -55,7 +55,7 @@
  private:
   class UIThreadHelper;
 
-  void OnProxyLookupComplete(base::Optional<net::ProxyInfo> proxy_info);
+  void OnProxyLookupComplete(absl::optional<net::ProxyInfo> proxy_info);
 
   LookUpCompleteCallback look_up_complete_callback_;
   std::unique_ptr<UIThreadHelper> ui_thread_helper_;
diff --git a/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper_unittest.cc b/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper_unittest.cc
index d16d8d3..4a4385a 100644
--- a/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper_unittest.cc
+++ b/content/browser/renderer_host/pepper/pepper_proxy_lookup_helper_unittest.cc
@@ -12,7 +12,6 @@
 #include "base/check_op.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
@@ -22,6 +21,7 @@
 #include "net/proxy_resolution/proxy_info.h"
 #include "services/network/public/mojom/proxy_lookup_client.mojom.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -80,7 +80,7 @@
   }
 
   // Get the proxy information passed into OnLookupCompleteOnIOThread().
-  const base::Optional<net::ProxyInfo>& proxy_info() const {
+  const absl::optional<net::ProxyInfo>& proxy_info() const {
     return proxy_info_;
   }
 
@@ -128,7 +128,7 @@
 
   // Invoked by |lookup_helper_| on the IO thread once the proxy lookup has
   // completed.
-  void OnLookupCompleteOnIOThread(base::Optional<net::ProxyInfo> proxy_info) {
+  void OnLookupCompleteOnIOThread(absl::optional<net::ProxyInfo> proxy_info) {
     DCHECK_CURRENTLY_ON(BrowserThread::IO);
 
     proxy_info_ = std::move(proxy_info);
@@ -147,7 +147,7 @@
 
   std::unique_ptr<PepperProxyLookupHelper> lookup_helper_;
 
-  base::Optional<net::ProxyInfo> proxy_info_;
+  absl::optional<net::ProxyInfo> proxy_info_;
   mojo::Remote<network::mojom::ProxyLookupClient> proxy_lookup_client_;
 
   base::RunLoop lookup_complete_run_loop_;
@@ -168,7 +168,7 @@
 TEST_F(PepperProxyLookupHelperTest, Failure) {
   StartLookup();
   ClaimProxyLookupClient()->OnProxyLookupComplete(net::ERR_FAILED,
-                                                  base::nullopt);
+                                                  absl::nullopt);
   WaitForLookupCompletion();
   EXPECT_FALSE(proxy_info());
 }
diff --git a/content/browser/renderer_host/pepper/pepper_renderer_connection.cc b/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
index a619469..e4d0407 100644
--- a/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
+++ b/content/browser/renderer_host/pepper/pepper_renderer_connection.cc
@@ -343,7 +343,7 @@
 void PepperRendererConnection::OpenChannelToPepperPlugin(
     const url::Origin& embedder_origin,
     const base::FilePath& path,
-    const base::Optional<url::Origin>& origin_lock,
+    const absl::optional<url::Origin>& origin_lock,
     OpenChannelToPepperPluginCallback callback) {
   // Enforce that the sender of the IPC (i.e. |render_process_id_|) is actually
   // able/allowed to host a frame with |embedder_origin|.
diff --git a/content/browser/renderer_host/pepper/pepper_renderer_connection.h b/content/browser/renderer_host/pepper/pepper_renderer_connection.h
index 72aa8ca..9cfe73ab 100644
--- a/content/browser/renderer_host/pepper/pepper_renderer_connection.h
+++ b/content/browser/renderer_host/pepper/pepper_renderer_connection.h
@@ -68,7 +68,7 @@
   void OpenChannelToPepperPlugin(
       const url::Origin& embedder_origin,
       const base::FilePath& path,
-      const base::Optional<url::Origin>& origin_lock,
+      const absl::optional<url::Origin>& origin_lock,
       OpenChannelToPepperPluginCallback callback) override;
 
  private:
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
index 63273dd..25db4cfc 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.cc
@@ -181,7 +181,7 @@
       mojo::WrapCallbackWithDefaultInvokeIfNotRun(
           base::BindOnce(&PepperTCPServerSocketMessageFilter::OnListenCompleted,
                          weak_ptr_factory_.GetWeakPtr(), reply_context),
-          net::ERR_FAILED, base::nullopt /* local_addr_out */));
+          net::ERR_FAILED, absl::nullopt /* local_addr_out */));
 
   return PP_OK_COMPLETIONPENDING;
 }
@@ -207,7 +207,7 @@
           base::BindOnce(&PepperTCPServerSocketMessageFilter::OnAcceptCompleted,
                          base::Unretained(this), reply_context,
                          std::move(socket_observer_receiver)),
-          net::ERR_FAILED, base::nullopt /* remote_addr */, mojo::NullRemote(),
+          net::ERR_FAILED, absl::nullopt /* remote_addr */, mojo::NullRemote(),
           mojo::ScopedDataPipeConsumerHandle(),
           mojo::ScopedDataPipeProducerHandle()));
   return PP_OK_COMPLETIONPENDING;
@@ -225,7 +225,7 @@
 void PepperTCPServerSocketMessageFilter::OnListenCompleted(
     const ppapi::host::ReplyMessageContext& context,
     int net_result,
-    const base::Optional<net::IPEndPoint>& local_addr) {
+    const absl::optional<net::IPEndPoint>& local_addr) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   // Exit early if this is called during Close().
@@ -292,7 +292,7 @@
     mojo::PendingReceiver<network::mojom::SocketObserver>
         socket_observer_receiver,
     int net_result,
-    const base::Optional<net::IPEndPoint>& remote_addr,
+    const absl::optional<net::IPEndPoint>& remote_addr,
     mojo::PendingRemote<network::mojom::TCPConnectedSocket> connected_socket,
     mojo::ScopedDataPipeConsumerHandle receive_stream,
     mojo::ScopedDataPipeProducerHandle send_stream) {
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h
index aac02751..870f2033 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_tcp_server_socket_message_filter.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "build/chromeos_buildflags.h"
 #include "content/common/content_export.h"
@@ -27,6 +26,7 @@
 #include "ppapi/c/private/ppb_net_address_private.h"
 #include "ppapi/host/resource_message_filter.h"
 #include "services/network/public/mojom/tcp_socket.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if BUILDFLAG(IS_CHROMEOS_ASH)
 #include "chromeos/network/firewall_hole.h"
@@ -98,13 +98,13 @@
 
   void OnListenCompleted(const ppapi::host::ReplyMessageContext& context,
                          int net_result,
-                         const base::Optional<net::IPEndPoint>& local_addr);
+                         const absl::optional<net::IPEndPoint>& local_addr);
   void OnAcceptCompleted(
       const ppapi::host::ReplyMessageContext& context,
       mojo::PendingReceiver<network::mojom::SocketObserver>
           socket_observer_receiver,
       int net_result,
-      const base::Optional<net::IPEndPoint>& remote_addr,
+      const absl::optional<net::IPEndPoint>& remote_addr,
       mojo::PendingRemote<network::mojom::TCPConnectedSocket> connected_socket,
       mojo::ScopedDataPipeConsumerHandle receive_stream,
       mojo::ScopedDataPipeProducerHandle send_stream);
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
index ea4310b3..cee80059 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.cc
@@ -237,7 +237,7 @@
 void PepperTCPSocketMessageFilter::OnComplete(
     int result,
     const net::ResolveErrorInfo& resolve_error_info,
-    const base::Optional<net::AddressList>& resolved_addresses) {
+    const absl::optional<net::AddressList>& resolved_addresses) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   receiver_.reset();
 
@@ -358,7 +358,7 @@
           base::BindOnce(&PepperTCPSocketMessageFilter::OnBindCompleted,
                          weak_ptr_factory_.GetWeakPtr(),
                          context->MakeReplyMessageContext()),
-          net::ERR_FAILED, base::nullopt /* local_addr */));
+          net::ERR_FAILED, absl::nullopt /* local_addr */));
 
   return PP_OK_COMPLETIONPENDING;
 }
@@ -405,7 +405,7 @@
   receiver_.set_disconnect_handler(
       base::BindOnce(&PepperTCPSocketMessageFilter::OnComplete,
                      base::Unretained(this), net::ERR_NAME_NOT_RESOLVED,
-                     net::ResolveErrorInfo(net::ERR_FAILED), base::nullopt));
+                     net::ResolveErrorInfo(net::ERR_FAILED), absl::nullopt));
 
   state_.SetPendingTransition(TCPSocketState::CONNECT);
   host_resolve_context_ = context->MakeReplyMessageContext();
@@ -498,7 +498,7 @@
                          base::Unretained(this),
                          context->MakeReplyMessageContext()),
           net::ERR_FAILED, mojo::ScopedDataPipeConsumerHandle(),
-          mojo::ScopedDataPipeProducerHandle(), base::nullopt /* ssl_info */));
+          mojo::ScopedDataPipeProducerHandle(), absl::nullopt /* ssl_info */));
 
   socket_observer_receiver_.set_disconnect_handler(
       base::BindOnce(&PepperTCPSocketMessageFilter::OnSocketObserverError,
@@ -620,7 +620,7 @@
                          base::Unretained(this),
                          context->MakeReplyMessageContext(),
                          std::move(socket_observer_receiver)),
-          net::ERR_FAILED, base::nullopt /* remote_addr */, mojo::NullRemote(),
+          net::ERR_FAILED, absl::nullopt /* remote_addr */, mojo::NullRemote(),
           mojo::ScopedDataPipeConsumerHandle(),
           mojo::ScopedDataPipeProducerHandle()));
   return PP_OK_COMPLETIONPENDING;
@@ -873,7 +873,7 @@
       mojo::WrapCallbackWithDefaultInvokeIfNotRun(
           base::BindOnce(&PepperTCPSocketMessageFilter::OnConnectCompleted,
                          weak_ptr_factory_.GetWeakPtr(), context),
-          net::ERR_FAILED, base::nullopt, base::nullopt,
+          net::ERR_FAILED, absl::nullopt, absl::nullopt,
           mojo::ScopedDataPipeConsumerHandle(),
           mojo::ScopedDataPipeProducerHandle());
   if (bound_socket_) {
@@ -888,7 +888,7 @@
       return;
     }
     network_context->CreateTCPConnectedSocket(
-        base::nullopt /* local_addr */, address_list, std::move(socket_options),
+        absl::nullopt /* local_addr */, address_list, std::move(socket_options),
         pepper_socket_utils::PepperTCPNetworkAnnotationTag(),
         connected_socket_.BindNewPipeAndPassReceiver(),
         std::move(socket_observer), std::move(callback));
@@ -898,8 +898,8 @@
 void PepperTCPSocketMessageFilter::OnConnectCompleted(
     const ppapi::host::ReplyMessageContext& context,
     int net_result,
-    const base::Optional<net::IPEndPoint>& local_addr,
-    const base::Optional<net::IPEndPoint>& peer_addr,
+    const absl::optional<net::IPEndPoint>& local_addr,
+    const absl::optional<net::IPEndPoint>& peer_addr,
     mojo::ScopedDataPipeConsumerHandle receive_stream,
     mojo::ScopedDataPipeProducerHandle send_stream) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
@@ -966,7 +966,7 @@
     int net_result,
     mojo::ScopedDataPipeConsumerHandle receive_stream,
     mojo::ScopedDataPipeProducerHandle send_stream,
-    const base::Optional<net::SSLInfo>& ssl_info) {
+    const absl::optional<net::SSLInfo>& ssl_info) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   int pp_result = NetErrorToPepperError(net_result);
@@ -974,7 +974,7 @@
     // If this is called as a result of Close() being invoked and closing the
     // pipe, fail the request without doing anything.
     DCHECK_EQ(net_result, net::ERR_FAILED);
-    SendSSLHandshakeReply(context, pp_result, base::nullopt /* ssl_info */);
+    SendSSLHandshakeReply(context, pp_result, absl::nullopt /* ssl_info */);
     return;
   }
 
@@ -997,7 +997,7 @@
 void PepperTCPSocketMessageFilter::OnBindCompleted(
     const ppapi::host::ReplyMessageContext& context,
     int net_result,
-    const base::Optional<net::IPEndPoint>& local_addr) {
+    const absl::optional<net::IPEndPoint>& local_addr) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   int pp_result = NetErrorToPepperError(net_result);
@@ -1065,7 +1065,7 @@
     mojo::PendingReceiver<network::mojom::SocketObserver>
         socket_observer_receiver,
     int net_result,
-    const base::Optional<net::IPEndPoint>& remote_addr,
+    const absl::optional<net::IPEndPoint>& remote_addr,
     mojo::PendingRemote<network::mojom::TCPConnectedSocket> connected_socket,
     mojo::ScopedDataPipeConsumerHandle receive_stream,
     mojo::ScopedDataPipeProducerHandle send_stream) {
@@ -1265,7 +1265,7 @@
 void PepperTCPSocketMessageFilter::SendSSLHandshakeReply(
     const ppapi::host::ReplyMessageContext& context,
     int32_t pp_result,
-    const base::Optional<net::SSLInfo>& ssl_info) {
+    const absl::optional<net::SSLInfo>& ssl_info) {
   ppapi::host::ReplyMessageContext reply_context(context);
   reply_context.params.set_result(pp_result);
   ppapi::PPB_X509Certificate_Fields certificate_fields;
diff --git a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
index 83d2d0c6..611eecd 100644
--- a/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_tcp_socket_message_filter.h
@@ -16,7 +16,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "build/chromeos_buildflags.h"
 #include "content/browser/renderer_host/pepper/browser_ppapi_host_impl.h"
@@ -37,6 +36,7 @@
 #include "services/network/public/mojom/network_context.mojom.h"
 #include "services/network/public/mojom/tcp_socket.mojom.h"
 #include "services/network/public/mojom/tls_socket.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if BUILDFLAG(IS_CHROMEOS_ASH)
 #include "chromeos/network/firewall_hole.h"
@@ -122,7 +122,7 @@
   void OnComplete(
       int result,
       const net::ResolveErrorInfo& resolve_error_info,
-      const base::Optional<net::AddressList>& resolved_addresses) override;
+      const absl::optional<net::AddressList>& resolved_addresses) override;
 
   // network::mojom::SocketObserver overrides.
   void OnReadError(int net_error) override;
@@ -171,7 +171,7 @@
 
   void OnResolveCompleted(
       int net_result,
-      const base::Optional<net::AddressList>& resolved_addresses);
+      const absl::optional<net::AddressList>& resolved_addresses);
 
   // Attempts to connect to all addresses in |address_list| in order.
   void StartConnect(const ppapi::host::ReplyMessageContext& context,
@@ -179,8 +179,8 @@
 
   void OnConnectCompleted(const ppapi::host::ReplyMessageContext& context,
                           int net_result,
-                          const base::Optional<net::IPEndPoint>& local_addr,
-                          const base::Optional<net::IPEndPoint>& peer_addr,
+                          const absl::optional<net::IPEndPoint>& local_addr,
+                          const absl::optional<net::IPEndPoint>& peer_addr,
                           mojo::ScopedDataPipeConsumerHandle receive_stream,
                           mojo::ScopedDataPipeProducerHandle send_stream);
 
@@ -189,21 +189,21 @@
       int net_result,
       mojo::ScopedDataPipeConsumerHandle receive_stream,
       mojo::ScopedDataPipeProducerHandle send_stream,
-      const base::Optional<net::SSLInfo>& ssl_info);
+      const absl::optional<net::SSLInfo>& ssl_info);
 
   void OnListenCompleted(const ppapi::host::ReplyMessageContext& context,
                          int net_result);
 
   void OnBindCompleted(const ppapi::host::ReplyMessageContext& context,
                        int net_result,
-                       const base::Optional<net::IPEndPoint>& local_addr);
+                       const absl::optional<net::IPEndPoint>& local_addr);
 
   void OnAcceptCompleted(
       const ppapi::host::ReplyMessageContext& context,
       mojo::PendingReceiver<network::mojom::SocketObserver>
           socket_observer_receiver,
       int net_result,
-      const base::Optional<net::IPEndPoint>& remote_addr,
+      const absl::optional<net::IPEndPoint>& remote_addr,
       mojo::PendingRemote<network::mojom::TCPConnectedSocket> connected_socket,
       mojo::ScopedDataPipeConsumerHandle receive_stream,
       mojo::ScopedDataPipeProducerHandle send_stream);
@@ -243,7 +243,7 @@
                         int32_t pp_error);
   void SendSSLHandshakeReply(const ppapi::host::ReplyMessageContext& context,
                              int32_t pp_result,
-                             const base::Optional<net::SSLInfo>& ssl_info);
+                             const absl::optional<net::SSLInfo>& ssl_info);
   // The read and write reply messages use the |pending_*_context_| fields, and
   // clear fields related to the pending read / write request as needed.
   void SendReadReply(int32_t pp_result, const std::string& data);
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
index 5c171ec..c355dd9 100644
--- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
+++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.cc
@@ -554,7 +554,7 @@
     mojo::PendingReceiver<network::mojom::UDPSocketListener> listener_receiver,
     const ppapi::host::ReplyMessageContext& context,
     int result,
-    const base::Optional<net::IPEndPoint>& local_addr_out) {
+    const absl::optional<net::IPEndPoint>& local_addr_out) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
   if (result != net::OK) {
@@ -637,8 +637,8 @@
 
 void PepperUDPSocketMessageFilter::OnReceived(
     int result,
-    const base::Optional<net::IPEndPoint>& src_addr,
-    base::Optional<base::span<const uint8_t>> data) {
+    const absl::optional<net::IPEndPoint>& src_addr,
+    absl::optional<base::span<const uint8_t>> data) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(!closed_);
 
diff --git a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
index 6d82d8c..03eef6fb 100644
--- a/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
+++ b/content/browser/renderer_host/pepper/pepper_udp_socket_message_filter.h
@@ -133,7 +133,7 @@
                           listener_receiver,
                       const ppapi::host::ReplyMessageContext& context,
                       int result,
-                      const base::Optional<net::IPEndPoint>& local_addr_out);
+                      const absl::optional<net::IPEndPoint>& local_addr_out);
   void OnBindComplete(mojo::PendingReceiver<network::mojom::UDPSocketListener>
                           listener_receiver,
                       const ppapi::host::ReplyMessageContext& context,
@@ -151,8 +151,8 @@
 
   // network::mojom::UDPSocketListener override:
   void OnReceived(int result,
-                  const base::Optional<net::IPEndPoint>& src_addr,
-                  base::Optional<base::span<const uint8_t>> data) override;
+                  const absl::optional<net::IPEndPoint>& src_addr,
+                  absl::optional<base::span<const uint8_t>> data) override;
 
   void OnSendToCompleted(int net_result);
   void FinishPendingSend(int net_result);
diff --git a/content/browser/renderer_host/policy_container_host.h b/content/browser/renderer_host/policy_container_host.h
index a75862b..cdedd296 100644
--- a/content/browser/renderer_host/policy_container_host.h
+++ b/content/browser/renderer_host/policy_container_host.h
@@ -198,7 +198,7 @@
   mojo::UniqueReceiverSet<blink::mojom::PolicyContainerHostKeepAliveHandle>
       keep_alive_handles_receiver_set_;
 
-  base::Optional<blink::LocalFrameToken> frame_token_ = base::nullopt;
+  absl::optional<blink::LocalFrameToken> frame_token_ = absl::nullopt;
 };
 
 }  // namespace content
diff --git a/content/browser/renderer_host/render_frame_host_android.cc b/content/browser/renderer_host/render_frame_host_android.cc
index e907b16..892e545 100644
--- a/content/browser/renderer_host/render_frame_host_android.cc
+++ b/content/browser/renderer_host/render_frame_host_android.cc
@@ -36,7 +36,7 @@
 namespace {
 void OnGetCanonicalUrlForSharing(
     const base::android::JavaRef<jobject>& jcallback,
-    const base::Optional<GURL>& url) {
+    const absl::optional<GURL>& url) {
   JNIEnv* env = base::android::AttachCurrentThread();
   if (!url) {
     base::android::RunObjectCallbackAndroid(jcallback,
diff --git a/content/browser/renderer_host/render_frame_host_delegate.cc b/content/browser/renderer_host/render_frame_host_delegate.cc
index 490076b..5df24f3 100644
--- a/content/browser/renderer_host/render_frame_host_delegate.cc
+++ b/content/browser/renderer_host/render_frame_host_delegate.cc
@@ -36,7 +36,7 @@
     const std::u16string& message,
     int32_t line_no,
     const std::u16string& source_id,
-    const base::Optional<std::u16string>& untrusted_stack_trace) {
+    const absl::optional<std::u16string>& untrusted_stack_trace) {
   return false;
 }
 
diff --git a/content/browser/renderer_host/render_frame_host_delegate.h b/content/browser/renderer_host/render_frame_host_delegate.h
index 5a520c6..c5235d4 100644
--- a/content/browser/renderer_host/render_frame_host_delegate.h
+++ b/content/browser/renderer_host/render_frame_host_delegate.h
@@ -12,7 +12,6 @@
 
 #include "base/callback_forward.h"
 #include "base/i18n/rtl.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/surface_id.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
@@ -36,6 +35,7 @@
 #include "services/device/public/mojom/geolocation_context.mojom.h"
 #include "services/device/public/mojom/wake_lock.mojom.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/mediastream/media_stream_request.h"
 #include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
@@ -162,7 +162,7 @@
       const std::u16string& message,
       int32_t line_no,
       const std::u16string& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace);
+      const absl::optional<std::u16string>& untrusted_stack_trace);
 
   // Called when a RenderFrame for |render_frame_host| is created in the
   // renderer process. Use |RenderFrameDeleted| to listen for when this
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 6079854..42d97b4 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -1847,7 +1847,7 @@
   return frame_tree_node_->devtools_frame_token();
 }
 
-base::Optional<base::UnguessableToken>
+absl::optional<base::UnguessableToken>
 RenderFrameHostImpl::GetEmbeddingToken() {
   return embedding_token_;
 }
@@ -1860,7 +1860,7 @@
   return frame_tree_node()->frame_owner_properties().is_display_none;
 }
 
-const base::Optional<gfx::Size>& RenderFrameHostImpl::GetFrameSize() {
+const absl::optional<gfx::Size>& RenderFrameHostImpl::GetFrameSize() {
   return frame_size_;
 }
 
@@ -1933,7 +1933,7 @@
   if (IsRenderFrameCreated()) {
     GetAssociatedLocalFrame()->GetCanonicalUrlForSharing(std::move(callback));
   } else {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
   }
 }
 
@@ -2629,7 +2629,7 @@
 
 bool RenderFrameHostImpl::CreateRenderFrame(
     int previous_routing_id,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int parent_routing_id,
     int previous_sibling_routing_id) {
   TRACE_EVENT0("navigation", "RenderFrameHostImpl::CreateRenderFrame");
@@ -3001,8 +3001,8 @@
     blink::mojom::ConsoleMessageLevel log_level,
     const std::u16string& message,
     int32_t line_no,
-    const base::Optional<std::u16string>& source_id,
-    const base::Optional<std::u16string>& untrusted_stack_trace) {
+    const absl::optional<std::u16string>& source_id,
+    const absl::optional<std::u16string>& untrusted_stack_trace) {
   std::u16string updated_source_id;
   if (source_id.has_value())
     updated_source_id = *source_id;
@@ -4190,7 +4190,7 @@
 }
 
 void RenderFrameHostImpl::UpdateManifestURL(
-    const base::Optional<GURL>& manifest_url) {
+    const absl::optional<GURL>& manifest_url) {
   DCHECK(!GetParent());
   document_associated_data_->manifest_url = manifest_url.value_or(GURL());
 }
@@ -4580,7 +4580,7 @@
 }
 
 void RenderFrameHostImpl::UpdateTitle(
-    const base::Optional<::std::u16string>& title,
+    const absl::optional<::std::u16string>& title,
     base::i18n::TextDirection title_direction) {
   // This message should only be sent for top-level frames.
   if (!is_main_frame())
@@ -4746,7 +4746,7 @@
 }
 
 void RenderFrameHostImpl::DidChangeThemeColor(
-    base::Optional<SkColor> theme_color) {
+    absl::optional<SkColor> theme_color) {
   render_view_host_->OnThemeColorChanged(this, theme_color);
 }
 
@@ -5467,7 +5467,7 @@
 }
 
 void RenderFrameHostImpl::DidChangeOpener(
-    const base::Optional<blink::LocalFrameToken>& opener_frame_token) {
+    const absl::optional<blink::LocalFrameToken>& opener_frame_token) {
   frame_tree_node_->render_manager()->DidChangeOpener(opener_frame_token,
                                                       GetSiteInstance());
 }
@@ -6695,7 +6695,7 @@
   DCHECK(!source_proxy ||
          (source_proxy->GetProcess()->GetID() == GetProcess()->GetID()));
 
-  base::Optional<blink::RemoteFrameToken> frame_token;
+  absl::optional<blink::RemoteFrameToken> frame_token;
   if (source_proxy)
     frame_token = source_proxy->GetFrameToken();
 
@@ -6750,8 +6750,8 @@
     mojo::ScopedDataPipeConsumerHandle response_body,
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
     bool is_view_source,
-    base::Optional<SubresourceLoaderParams> subresource_loader_params,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<SubresourceLoaderParams> subresource_loader_params,
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
     const base::UnguessableToken& devtools_navigation_token,
@@ -6916,7 +6916,7 @@
               browser_context, this, GetProcess()->GetID(),
               ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
               main_world_origin_for_url_loader_factory,
-              base::nullopt /* navigation_id */, next_page_ukm_source_id,
+              absl::nullopt /* navigation_id */, next_page_ukm_source_id,
               &appcache_proxied_receiver, nullptr /* header_client */,
               nullptr /* bypass_redirect_checks */,
               nullptr /* disable_secure_dns */, nullptr /* factory_override */);
@@ -6947,7 +6947,7 @@
           browser_context, this, GetProcess()->GetID(),
           ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
           main_world_origin_for_url_loader_factory,
-          base::nullopt /* navigation_id */, next_page_ukm_source_id,
+          absl::nullopt /* navigation_id */, next_page_ukm_source_id,
           &factory_receiver, nullptr /* header_client */,
           nullptr /* bypass_redirect_checks */,
           nullptr /* disable_secure_dns */, nullptr /* factory_override */);
@@ -7255,7 +7255,7 @@
     bool has_stale_copy_in_cache,
     int error_code,
     int extended_error_code,
-    const base::Optional<std::string>& error_page_content) {
+    const absl::optional<std::string>& error_page_content) {
   TRACE_EVENT2("navigation", "RenderFrameHostImpl::FailedNavigation",
                "frame_tree_node", frame_tree_node_->frame_tree_node_id(),
                "error", error_code);
@@ -8075,7 +8075,7 @@
   GetContentClient()->browser()->WillCreateURLLoaderFactory(
       GetBrowserContext(), this, GetProcess()->GetID(),
       ContentBrowserClient::URLLoaderFactoryType::kDocumentSubResource,
-      request_initiator, base::nullopt /* navigation_id */, ukm_source_id,
+      request_initiator, absl::nullopt /* navigation_id */, ukm_source_id,
       factory_receiver, header_client, bypass_redirect_checks,
       disable_secure_dns, factory_override);
 
@@ -8483,7 +8483,7 @@
       std::make_unique<DedicatedWorkerHostFactoryImpl>(
           worker_process_id,
           /*creator_render_frame_host_id=*/GetGlobalFrameRoutingId(),
-          /*creator_worker_token=*/base::nullopt,
+          /*creator_worker_token=*/absl::nullopt,
           /*ancestor_render_frame_host_id=*/GetGlobalFrameRoutingId(),
           last_committed_origin_, isolation_info_,
           cross_origin_embedder_policy_,
@@ -9610,7 +9610,7 @@
       NavigationRequest::IsLoadDataWithBaseURL(
           navigation_request->common_params());
 
-  base::Optional<std::string> data_url_as_string;
+  absl::optional<std::string> data_url_as_string;
 #if defined(OS_ANDROID)
   data_url_as_string = navigation_request->commit_params().data_url_as_string;
 #endif
@@ -9732,7 +9732,7 @@
   // Send the crash report to the Reporting API.
   GetProcess()->GetStoragePartition()->GetNetworkContext()->QueueReport(
       "crash" /* type */, "default" /* group */, last_committed_url_,
-      isolation_info_.network_isolation_key(), base::nullopt, std::move(body));
+      isolation_info_.network_isolation_key(), absl::nullopt, std::move(body));
 }
 
 void RenderFrameHostImpl::SendCommitNavigation(
@@ -9745,7 +9745,7 @@
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     blink::mojom::ControllerServiceWorkerInfoPtr controller,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
@@ -9774,7 +9774,7 @@
     bool has_stale_copy_in_cache,
     int32_t error_code,
     int32_t extended_error_code,
-    const base::Optional<std::string>& error_page_content,
+    const absl::optional<std::string>& error_page_content,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
     blink::mojom::PolicyContainerPtr policy_container) {
@@ -10007,7 +10007,7 @@
 }
 
 void RenderFrameHostImpl::PostMessageEvent(
-    const base::Optional<blink::RemoteFrameToken>& source_token,
+    const absl::optional<blink::RemoteFrameToken>& source_token,
     const std::u16string& source_origin,
     const std::u16string& target_origin,
     blink::TransferableMessage message) {
@@ -10259,7 +10259,7 @@
 
   // For cross-document navigations, we can know by checking
   // NavigationRequest::IsLoadDataWithBaseURLAndUnreachableURL().
-  base::Optional<std::string> data_url_as_string;
+  absl::optional<std::string> data_url_as_string;
 #if defined(OS_ANDROID)
   data_url_as_string = request->commit_params().data_url_as_string;
 #endif
@@ -11259,7 +11259,7 @@
 void RenderFrameHostImpl::OpenChannelToPepperPlugin(
     const url::Origin& embedder_origin,
     const base::FilePath& path,
-    const base::Optional<url::Origin>& origin_lock,
+    const absl::optional<url::Origin>& origin_lock,
     OpenChannelToPepperPluginCallback callback) {
   RenderProcessHostImpl* process =
       static_cast<RenderProcessHostImpl*>(GetProcess());
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
index d4d425f6..fddc0daf 100644
--- a/content/browser/renderer_host/render_frame_host_impl.h
+++ b/content/browser/renderer_host/render_frame_host_impl.h
@@ -26,7 +26,6 @@
 #include "base/i18n/rtl.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/sequenced_task_runner.h"
 #include "base/strings/string_piece.h"
 #include "base/supports_user_data.h"
@@ -96,6 +95,7 @@
 #include "services/network/public/mojom/trust_tokens.mojom.h"
 #include "services/network/public/mojom/url_loader_network_service_observer.mojom-forward.h"
 #include "services/service_manager/public/mojom/interface_provider.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/permissions_policy/document_policy.h"
 #include "third_party/blink/public/common/permissions_policy/permissions_policy.h"
@@ -331,10 +331,10 @@
       FrameIterationAlwaysContinueCallback on_frame) override;
   int GetFrameTreeNodeId() override;
   base::UnguessableToken GetDevToolsFrameToken() override;
-  base::Optional<base::UnguessableToken> GetEmbeddingToken() override;
+  absl::optional<base::UnguessableToken> GetEmbeddingToken() override;
   const std::string& GetFrameName() override;
   bool IsFrameDisplayNone() override;
-  const base::Optional<gfx::Size>& GetFrameSize() override;
+  const absl::optional<gfx::Size>& GetFrameSize() override;
   size_t GetFrameDepth() override;
   bool IsCrossProcessSubframe() override;
   WebExposedIsolationLevel GetWebExposedIsolationLevel() override;
@@ -497,7 +497,7 @@
   // Creates a RenderFrame in the renderer process.
   bool CreateRenderFrame(
       int previous_routing_id,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int parent_routing_id,
       int previous_sibling_routing_id);
 
@@ -1059,8 +1059,8 @@
       mojo::ScopedDataPipeConsumerHandle response_body,
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       bool is_view_source,
-      base::Optional<SubresourceLoaderParams> subresource_loader_params,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<SubresourceLoaderParams> subresource_loader_params,
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
       const base::UnguessableToken& devtools_navigation_token,
@@ -1074,7 +1074,7 @@
                         bool has_stale_copy_in_cache,
                         int error_code,
                         int extended_error_code,
-                        const base::Optional<std::string>& error_page_content);
+                        const absl::optional<std::string>& error_page_content);
 
   // Sends a renderer-debug URL to the renderer process for handling.
   void HandleRendererDebugURL(const GURL& url);
@@ -1252,7 +1252,7 @@
   void MaybeIsolateForUserActivation();
 
   // Returns the current size for this frame.
-  const base::Optional<gfx::Size>& frame_size() const { return frame_size_; }
+  const absl::optional<gfx::Size>& frame_size() const { return frame_size_; }
 
   // Allow tests to override the timeout used to keep subframe processes alive
   // for unload handler processing.
@@ -1407,7 +1407,7 @@
 
   // Posts a message from a frame in another process to the current renderer.
   void PostMessageEvent(
-      const base::Optional<blink::RemoteFrameToken>& source_token,
+      const absl::optional<blink::RemoteFrameToken>& source_token,
       const std::u16string& source_origin,
       const std::u16string& target_origin,
       blink::TransferableMessage message);
@@ -1788,7 +1788,7 @@
   void SetVirtualKeyboardOverlayPolicy(bool vk_overlays_content) override;
   void EvictFromBackForwardCache(blink::mojom::RendererEvictionReason) override;
   void VisibilityChanged(blink::mojom::FrameVisibility) override;
-  void DidChangeThemeColor(base::Optional<SkColor> theme_color) override;
+  void DidChangeThemeColor(absl::optional<SkColor> theme_color) override;
   void DidChangeBackgroundColor(SkColor background_color,
                                 bool color_adjust) override;
   void DidFailLoadWithError(const GURL& url, int32_t error_code) override;
@@ -1817,7 +1817,7 @@
   void DidFinishLoad(const GURL& validated_url) override;
   void DispatchLoad() override;
   void GoToEntryAtOffset(int32_t offset, bool has_user_gesture) override;
-  void UpdateTitle(const base::Optional<::std::u16string>& title,
+  void UpdateTitle(const absl::optional<::std::u16string>& title,
                    base::i18n::TextDirection title_direction) override;
   void UpdateUserActivationState(
       blink::mojom::UserActivationUpdateType update_type,
@@ -1876,7 +1876,7 @@
       const blink::FrameToken& child_frame_token,
       blink::mojom::FrameOwnerPropertiesPtr frame_owner_properties) override;
   void DidChangeOpener(
-      const base::Optional<blink::LocalFrameToken>& opener_frame) override;
+      const absl::optional<blink::LocalFrameToken>& opener_frame) override;
   void DidChangeCSPAttribute(
       const blink::FrameToken& child_frame_token,
       network::mojom::ContentSecurityPolicyPtr parsed_csp_attribute) override;
@@ -1892,8 +1892,8 @@
       blink::mojom::ConsoleMessageLevel log_level,
       const std::u16string& message,
       int32_t line_no,
-      const base::Optional<std::u16string>& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace) override;
+      const absl::optional<std::u16string>& source_id,
+      const absl::optional<std::u16string>& untrusted_stack_trace) override;
   void FrameSizeChanged(const gfx::Size& frame_size) override;
   void DidActivateForPrerendering() override;
 
@@ -1916,7 +1916,7 @@
   void SetWindowRect(const gfx::Rect& bounds,
                      SetWindowRectCallback callback) override;
 
-  void UpdateManifestURL(const base::Optional<GURL>& manifest_url);
+  void UpdateManifestURL(const absl::optional<GURL>& manifest_url);
 
   void ReportNoBinderForInterface(const std::string& error);
 
@@ -2152,7 +2152,7 @@
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ControllerServiceWorkerInfoPtr
           controller_service_worker_info,
@@ -2169,7 +2169,7 @@
       bool has_stale_copy_in_cache,
       int32_t error_code,
       int32_t extended_error_code,
-      const base::Optional<std::string>& error_page_content,
+      const absl::optional<std::string>& error_page_content,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
       blink::mojom::PolicyContainerPtr policy_container);
@@ -2405,7 +2405,7 @@
   void OpenChannelToPepperPlugin(
       const url::Origin& embedder_origin,
       const base::FilePath& path,
-      const base::Optional<url::Origin>& origin_lock,
+      const absl::optional<url::Origin>& origin_lock,
       OpenChannelToPepperPluginCallback callback) override;
 
   // mojom::PepperHungDetectorHost overrides:
@@ -3241,7 +3241,7 @@
   bool has_pending_lifecycle_state_update_ = false;
 
   // Used for tracking the latest size of the RenderFrame.
-  base::Optional<gfx::Size> frame_size_;
+  absl::optional<gfx::Size> frame_size_;
 
   // The Previews state of the last navigation. This is used during history
   // navigation of subframes to ensure that subframes navigate with the same
@@ -3291,9 +3291,9 @@
   bool has_pagehide_handler_ = false;
   bool has_visibilitychange_handler_ = false;
 
-  base::Optional<RenderFrameAudioOutputStreamFactory>
+  absl::optional<RenderFrameAudioOutputStreamFactory>
       audio_service_audio_output_stream_factory_;
-  base::Optional<RenderFrameAudioInputStreamFactory>
+  absl::optional<RenderFrameAudioInputStreamFactory>
       audio_service_audio_input_stream_factory_;
 
   // Hosts media::mojom::InterfaceFactory for the RenderFrame and forwards
@@ -3629,7 +3629,7 @@
   // corresponding RenderFrameHostImpl, and is intended to be used for IPCs for
   // identifying frames just like routing IDs. |embedding_token_| has a document
   // scoped lifetime and changes on cross-document navigations.
-  base::Optional<base::UnguessableToken> embedding_token_;
+  absl::optional<base::UnguessableToken> embedding_token_;
 
   // Observers listening to cookie access notifications for the current document
   // in this RenderFrameHost.
diff --git a/content/browser/renderer_host/render_frame_host_impl_browsertest.cc b/content/browser/renderer_host/render_frame_host_impl_browsertest.cc
index 7104882..e5eb8ad 100644
--- a/content/browser/renderer_host/render_frame_host_impl_browsertest.cc
+++ b/content/browser/renderer_host/render_frame_host_impl_browsertest.cc
@@ -13,7 +13,6 @@
 #include "base/callback_helpers.h"
 #include "base/files/file_path.h"
 #include "base/memory/ptr_util.h"
-#include "base/optional.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/strcat.h"
@@ -80,6 +79,7 @@
 #include "services/network/test/test_url_loader_factory.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/browser_interface_broker.mojom-test-utils.h"
 #include "third_party/blink/public/mojom/frame/frame.mojom-test-utils.h"
 #include "url/gurl.h"
@@ -3423,11 +3423,11 @@
   ASSERT_EQ(22, child_count);
 
   // innermost frame navigation.
-  EXPECT_EQ(base::nullopt, child->current_frame_host()
+  EXPECT_EQ(absl::nullopt, child->current_frame_host()
                                ->ComputeIsolationInfoForNavigation(b_url)
                                .party_context());
   // innermost frame subresource.
-  EXPECT_EQ(base::nullopt, child->current_frame_host()
+  EXPECT_EQ(absl::nullopt, child->current_frame_host()
                                ->GetIsolationInfoForSubresources()
                                .party_context());
 
@@ -3437,7 +3437,7 @@
                      .party_context()
                      ->size());
   // parent of innermost frame subresource.
-  EXPECT_EQ(base::nullopt,
+  EXPECT_EQ(absl::nullopt,
             child->parent()->GetIsolationInfoForSubresources().party_context());
 }
 
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 840fefc..6d84bf9 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -450,7 +450,7 @@
 }
 
 void RenderFrameHostManager::DidChangeOpener(
-    const base::Optional<blink::LocalFrameToken>& opener_frame_token,
+    const absl::optional<blink::LocalFrameToken>& opener_frame_token,
     SiteInstance* source_site_instance) {
   FrameTreeNode* opener = nullptr;
   if (opener_frame_token) {
@@ -712,7 +712,7 @@
   BackForwardCacheMetrics* back_forward_cache_metrics =
       render_frame_host_->GetBackForwardCacheMetrics();
   if (back_forward_cache_metrics)
-    back_forward_cache_metrics->SetBrowsingInstanceSwapResult(base::nullopt);
+    back_forward_cache_metrics->SetBrowsingInstanceSwapResult(absl::nullopt);
 
   RestoreFromBackForwardCache(std::move(entry));
 }
@@ -2952,7 +2952,7 @@
 
   SiteInstance* site_instance = render_frame_host->GetSiteInstance();
 
-  base::Optional<blink::FrameToken> opener_frame_token;
+  absl::optional<blink::FrameToken> opener_frame_token;
   if (frame_tree_node_->opener())
     opener_frame_token = GetOpenerFrameToken(site_instance);
 
@@ -3082,7 +3082,7 @@
   return MSG_ROUTING_NONE;
 }
 
-base::Optional<blink::FrameToken>
+absl::optional<blink::FrameToken>
 RenderFrameHostManager::GetFrameTokenForSiteInstance(
     SiteInstance* site_instance) {
   if (render_frame_host_->GetSiteInstance() == site_instance)
@@ -3092,7 +3092,7 @@
   if (proxy)
     return proxy->GetFrameToken();
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 void RenderFrameHostManager::CommitPending(
@@ -3310,7 +3310,7 @@
 
   // Store the old_render_frame_host's current frame size so that it can be used
   // to initialize the child RWHV.
-  base::Optional<gfx::Size> old_size = old_render_frame_host->frame_size();
+  absl::optional<gfx::Size> old_size = old_render_frame_host->frame_size();
 
   // Unload the old frame now that the new one is visible.
   // This will unload it and schedule it for deletion when the unload ack
@@ -3559,10 +3559,10 @@
   frame_tree->CreateProxiesForSiteInstance(skip_this_node, instance);
 }
 
-base::Optional<blink::FrameToken> RenderFrameHostManager::GetOpenerFrameToken(
+absl::optional<blink::FrameToken> RenderFrameHostManager::GetOpenerFrameToken(
     SiteInstance* instance) {
   if (!frame_tree_node_->opener())
-    return base::nullopt;
+    return absl::nullopt;
 
   return frame_tree_node_->opener()
       ->render_manager()
diff --git a/content/browser/renderer_host/render_frame_host_manager.h b/content/browser/renderer_host/render_frame_host_manager.h
index 5b5149e..b99ae9b 100644
--- a/content/browser/renderer_host/render_frame_host_manager.h
+++ b/content/browser/renderer_host/render_frame_host_manager.h
@@ -17,7 +17,6 @@
 #include "base/containers/unique_ptr_adapters.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/back_forward_cache_impl.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/browser/renderer_host/should_swap_browsing_instance.h"
@@ -26,6 +25,7 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/global_request_id.h"
 #include "content/public/common/referrer.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/frame/frame_owner_properties.mojom-forward.h"
 #include "third_party/blink/public/mojom/frame/user_activation_update_types.mojom.h"
@@ -125,7 +125,7 @@
     // automatically called from LoadURL.
     virtual bool CreateRenderViewForRenderManager(
         RenderViewHost* render_view_host,
-        const base::Optional<blink::FrameToken>& opener_frame_token,
+        const absl::optional<blink::FrameToken>& opener_frame_token,
         RenderFrameProxyHost* proxy_host) = 0;
     virtual void CreateRenderWidgetHostViewForRenderManager(
         RenderViewHost* render_view_host) = 0;
@@ -263,7 +263,7 @@
   // updated opener will be forwarded to any other RenderFrameProxies and
   // RenderFrames for this FrameTreeNode.
   void DidChangeOpener(
-      const base::Optional<blink::LocalFrameToken>& opener_frame_token,
+      const absl::optional<blink::LocalFrameToken>& opener_frame_token,
       SiteInstance* source_site_instance);
 
   // Creates and initializes a RenderFrameHost. If |for_early_commit| is true
@@ -322,11 +322,11 @@
 
   // Returns the frame token for a RenderFrameHost or RenderFrameProxyHost
   // that has the given SiteInstance and is associated with this
-  // RenderFrameHostManager. Returns base::nullopt if none is found. Note that
+  // RenderFrameHostManager. Returns absl::nullopt if none is found. Note that
   // the FrameToken will internally be either a LocalFrameToken (if the frame is
   // a RenderFrameHost in the given |site_instance|) or a RemoteFrameToken (if
   // it is a RenderFrameProxyHost).
-  base::Optional<blink::FrameToken> GetFrameTokenForSiteInstance(
+  absl::optional<blink::FrameToken> GetFrameTokenForSiteInstance(
       SiteInstance* site_instance);
 
   // Notifies the RenderFrameHostManager that a new NavigationRequest has been
@@ -426,9 +426,9 @@
   // Returns a blink::FrameToken for the current FrameTreeNode's opener
   // node in the given SiteInstance.  May return a frame token of either a
   // RenderFrameHost (if opener's current or pending RFH has SiteInstance
-  // |instance|) or a RenderFrameProxyHost.  Returns base::nullopt if there is
+  // |instance|) or a RenderFrameProxyHost.  Returns absl::nullopt if there is
   // no opener, or if the opener node doesn't have a proxy for |instance|.
-  base::Optional<blink::FrameToken> GetOpenerFrameToken(SiteInstance* instance);
+  absl::optional<blink::FrameToken> GetOpenerFrameToken(SiteInstance* instance);
 
   // Called on the RFHM of the inner WebContents to create a
   // RenderFrameProxyHost in its outer WebContents's SiteInstance,
diff --git a/content/browser/renderer_host/render_frame_host_manager_browsertest.cc b/content/browser/renderer_host/render_frame_host_manager_browsertest.cc
index 9de6b99..f1c520a 100644
--- a/content/browser/renderer_host/render_frame_host_manager_browsertest.cc
+++ b/content/browser/renderer_host/render_frame_host_manager_browsertest.cc
@@ -3001,7 +3001,7 @@
   std::unique_ptr<NavigationEntryImpl> cloned_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              url1, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              url1, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(),
               shell()->web_contents()->GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
diff --git a/content/browser/renderer_host/render_frame_host_manager_unittest.cc b/content/browser/renderer_host/render_frame_host_manager_unittest.cc
index 35f0483a..be6de0ae 100644
--- a/content/browser/renderer_host/render_frame_host_manager_unittest.cc
+++ b/content/browser/renderer_host/render_frame_host_manager_unittest.cc
@@ -412,7 +412,7 @@
             nullptr /* initiator_frame_token */,
             ChildProcessHost::kInvalidUniqueID /* initiator_process_id */,
             entry->extra_headers(), frame_entry, entry, request_body,
-            nullptr /* navigation_ui_data */, base::nullopt /* impression */);
+            nullptr /* navigation_ui_data */, absl::nullopt /* impression */);
 
     // Simulates request creation that triggers the 1st internal call to
     // GetFrameHostForNavigation.
@@ -886,7 +886,7 @@
   // 1) The first navigation. --------------------------
   const GURL kUrl1("http://www.google.com/");
   NavigationEntryImpl entry1(
-      nullptr /* instance */, kUrl1, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl1, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   host = NavigateToEntry(manager, &entry1);
@@ -934,7 +934,7 @@
   const GURL kUrl3("http://webkit.org/");
   NavigationEntryImpl entry3(
       nullptr /* instance */, kUrl3,
-      Referrer(kUrl2, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrl2, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   host = NavigateToEntry(manager, &entry3);
@@ -977,7 +977,7 @@
 
   const GURL kUrl(GetWebUIURL("foo"));
   NavigationEntryImpl entry(
-      nullptr /* instance */, kUrl, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* host = NavigateToEntry(manager, &entry);
@@ -1021,14 +1021,14 @@
       web_contents1->GetRenderManagerForTesting();
   // Test the case that new RVH is considered live.
   RenderViewHostImpl* rvh1 = manager1->current_frame_host()->render_view_host();
-  rvh1->CreateRenderView(base::nullopt, MSG_ROUTING_NONE, false);
+  rvh1->CreateRenderView(absl::nullopt, MSG_ROUTING_NONE, false);
   EXPECT_TRUE(rvh1->IsRenderViewLive());
   EXPECT_TRUE(manager1->current_frame_host()->IsRenderFrameLive());
 
   // Navigate to a WebUI page.
   const GURL kUrl1(GetWebUIURL("foo"));
   NavigationEntryImpl entry1(
-      nullptr /* instance */, kUrl1, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl1, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* host1 = NavigateToEntry(manager1, &entry1);
@@ -1053,7 +1053,7 @@
   // Make sure the new RVH is considered live.  This is usually done in
   // RenderWidgetHost::Init when opening a new tab from a link.
   RenderViewHostImpl* rvh2 = manager2->current_frame_host()->render_view_host();
-  rvh2->CreateRenderView(base::nullopt, MSG_ROUTING_NONE, false);
+  rvh2->CreateRenderView(absl::nullopt, MSG_ROUTING_NONE, false);
   EXPECT_TRUE(rvh2->IsRenderViewLive());
 
   const GURL kUrl2(GetWebUIURL("foo/bar"));
@@ -1243,7 +1243,7 @@
   EXPECT_NE(site_instance1, rfh2->GetSiteInstance());
 
   // Disown the opener from rfh2.
-  rfh2->SimulateDidChangeOpener(base::nullopt);
+  rfh2->SimulateDidChangeOpener(absl::nullopt);
 
   // Ensure the opener is cleared.
   EXPECT_FALSE(contents()->HasOpener());
@@ -1264,7 +1264,7 @@
   EXPECT_TRUE(contents()->HasOpener());
 
   // Disown the opener from rfh1.
-  rfh1->SimulateDidChangeOpener(base::nullopt);
+  rfh1->SimulateDidChangeOpener(absl::nullopt);
 
   // Ensure the opener is cleared even if it is in the same process.
   EXPECT_FALSE(contents()->HasOpener());
@@ -1300,7 +1300,7 @@
   contents()->GetMainFrame()->PrepareForCommit();
 
   // Disown the opener from rfh2.
-  rfh2->SimulateDidChangeOpener(base::nullopt);
+  rfh2->SimulateDidChangeOpener(absl::nullopt);
 
   // Ensure the opener is cleared.
   EXPECT_FALSE(contents()->HasOpener());
@@ -1349,7 +1349,7 @@
       entry1->GetTransitionType());
 
   // Disown the opener from rfh2.
-  rfh2->SimulateDidChangeOpener(base::nullopt);
+  rfh2->SimulateDidChangeOpener(absl::nullopt);
   EXPECT_FALSE(contents()->HasOpener());
 }
 
@@ -1373,7 +1373,7 @@
   // Make sure the new opener RVH is considered live.
   RenderViewHostImpl* opener_rvh =
       opener1_manager->current_frame_host()->render_view_host();
-  opener_rvh->CreateRenderView(base::nullopt, MSG_ROUTING_NONE, false);
+  opener_rvh->CreateRenderView(absl::nullopt, MSG_ROUTING_NONE, false);
   EXPECT_TRUE(opener_rvh->IsRenderViewLive());
   EXPECT_TRUE(opener1_manager->current_frame_host()->IsRenderFrameLive());
 
@@ -1435,7 +1435,7 @@
   // 1) The first navigation. --------------------------
   const GURL kUrl1("http://www.google.com/");
   NavigationEntryImpl entry1(
-      nullptr /* instance */, kUrl1, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl1, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   host = NavigateToEntry(manager, &entry1);
@@ -1511,7 +1511,7 @@
   // 1) The first navigation. --------------------------
   const GURL kUrl1("http://www.google.com/");
   NavigationEntryImpl entry1(
-      nullptr /* instance */, kUrl1, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl1, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* host = NavigateToEntry(manager, &entry1);
@@ -1534,7 +1534,7 @@
   // 2) Cross-site navigate to next site. -------------------------
   const GURL kUrl2("http://www.example.com");
   NavigationEntryImpl entry2(
-      nullptr /* instance */, kUrl2, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl2, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* host2 = NavigateToEntry(manager, &entry2);
@@ -1835,7 +1835,7 @@
 
   // 1) The first navigation.
   NavigationEntryImpl entryA(
-      nullptr /* instance */, kUrlA, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrlA, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* host1 = NavigateToEntry(iframe1, &entryA);
@@ -1854,7 +1854,7 @@
   // 2) Cross-site navigate both frames to next site.
   NavigationEntryImpl entryB(
       nullptr /* instance */, kUrlB,
-      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   host1 = NavigateToEntry(iframe1, &entryB);
@@ -1989,7 +1989,7 @@
       contents()->GetFrameTree()->root()->child_at(0)->render_manager();
   NavigationEntryImpl entry(
       nullptr /* instance */, kUrl2,
-      Referrer(kUrl1, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrl1, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* cross_site = NavigateToEntry(iframe, &entry);
@@ -2044,7 +2044,7 @@
   // pending RVH has bindings.
   const GURL kWebUIUrl(GetWebUIURL("foo"));
   NavigationEntryImpl webui_entry(
-      nullptr /* instance */, kWebUIUrl, Referrer(), base::nullopt,
+      nullptr /* instance */, kWebUIUrl, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostManager* main_rfhm = contents()->GetRenderManagerForTesting();
@@ -2056,7 +2056,7 @@
   // should not grant WebUI bindings to the subframe's RVH.
   const GURL kSubframeUrl("http://bar.com");
   NavigationEntryImpl subframe_entry(
-      nullptr /* instance */, kSubframeUrl, Referrer(), base::nullopt,
+      nullptr /* instance */, kSubframeUrl, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   RenderFrameHostImpl* bar_rfh =
@@ -2078,7 +2078,7 @@
     RenderFrameProxyHost::SetCreatedCallbackForTesting(
         RenderFrameProxyHost::CreatedCallback());
   }
-  base::Optional<blink::FrameToken> OpenerFrameToken(
+  absl::optional<blink::FrameToken> OpenerFrameToken(
       RenderFrameProxyHost* proxy) {
     return remote_frames_[proxy]->opener_frame_token();
   }
@@ -2090,15 +2090,15 @@
       Init(proxy->GetRemoteAssociatedInterfacesTesting());
     }
     void UpdateOpener(
-        const base::Optional<blink::FrameToken>& frame_token) override {
+        const absl::optional<blink::FrameToken>& frame_token) override {
       frame_token_ = frame_token;
     }
-    base::Optional<blink::FrameToken> opener_frame_token() {
+    absl::optional<blink::FrameToken> opener_frame_token() {
       return frame_token_;
     }
 
    private:
-    base::Optional<blink::FrameToken> frame_token_;
+    absl::optional<blink::FrameToken> frame_token_;
   };
 
   void RenderFrameProxyHostCreatedCallback(RenderFrameProxyHost* proxy_host) {
@@ -2396,7 +2396,7 @@
   // Navigate first two subframes to B.
   NavigationEntryImpl entryB(
       nullptr /* instance */, kUrlB,
-      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   TestRenderFrameHost* host1 =
@@ -2419,7 +2419,7 @@
   // Navigate the third subframe to C.
   NavigationEntryImpl entryC(
       nullptr /* instance */, kUrlC,
-      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   TestRenderFrameHost* host3 =
@@ -2502,7 +2502,7 @@
   // Navigate subframe to B.
   NavigationEntryImpl entryB(
       nullptr /* instance */, kUrlB,
-      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   TestRenderFrameHost* hostB =
@@ -2518,7 +2518,7 @@
   // Navigate the subframe to C.
   NavigationEntryImpl entryC(
       nullptr /* instance */, kUrlC,
-      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), base::nullopt,
+      Referrer(kUrlA, network::mojom::ReferrerPolicy::kDefault), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_LINK,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   TestRenderFrameHost* hostC =
@@ -2557,7 +2557,7 @@
   std::vector<std::unique_ptr<NavigationEntry>> entries;
   std::unique_ptr<NavigationEntry> new_entry =
       NavigationController::CreateNavigationEntry(
-          kInitUrl, Referrer(), base::nullopt, ui::PAGE_TRANSITION_TYPED, false,
+          kInitUrl, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_TYPED, false,
           std::string(), browser_context(),
           nullptr /* blob_url_loader_factory */);
   entries.push_back(std::move(new_entry));
@@ -2572,7 +2572,7 @@
 
   // Navigation request to an entry from a previous browsing session.
   NavigationEntryImpl entry(
-      nullptr /* instance */, kInitUrl, Referrer(), base::nullopt,
+      nullptr /* instance */, kInitUrl, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_RELOAD,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   entry.set_restore_type(RestoreType::kRestored);
@@ -2866,7 +2866,7 @@
   // Navigation request.
   const GURL kUrl(GetWebUIURL("foo"));
   NavigationEntryImpl entry(
-      nullptr /* instance */, kUrl, Referrer(), base::nullopt,
+      nullptr /* instance */, kUrl, Referrer(), absl::nullopt,
       std::u16string() /* title */, ui::PAGE_TRANSITION_TYPED,
       false /* is_renderer_init */, nullptr /* blob_url_loader_factory */);
   FrameNavigationEntry* frame_entry = entry.root_node()->frame_entry.get();
@@ -2899,7 +2899,7 @@
           ChildProcessHost::kInvalidUniqueID /* initiator_process_id */,
           entry.extra_headers(), frame_entry, &entry,
           nullptr /* request_body */, nullptr /* navigation_ui_data */,
-          base::nullopt /* impression */);
+          absl::nullopt /* impression */);
   manager->DidCreateNavigationRequest(navigation_request.get());
 
   // As the initial RenderFrame was not live, the new RenderFrameHost should be
diff --git a/content/browser/renderer_host/render_frame_metadata_provider_impl.h b/content/browser/renderer_host/render_frame_metadata_provider_impl.h
index 390e405..bfcd03de 100644
--- a/content/browser/renderer_host/render_frame_metadata_provider_impl.h
+++ b/content/browser/renderer_host/render_frame_metadata_provider_impl.h
@@ -88,7 +88,7 @@
 
   cc::RenderFrameMetadata last_render_frame_metadata_;
 
-  base::Optional<viz::LocalSurfaceId> last_local_surface_id_;
+  absl::optional<viz::LocalSurfaceId> last_local_surface_id_;
 
   scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
 
@@ -101,9 +101,9 @@
       render_frame_metadata_observer_remote_;
 
 #if defined(OS_ANDROID)
-  base::Optional<bool> pending_report_all_root_scrolls_;
+  absl::optional<bool> pending_report_all_root_scrolls_;
 #endif
-  base::Optional<bool> pending_report_all_frame_submission_for_testing_;
+  absl::optional<bool> pending_report_all_frame_submission_for_testing_;
 
   base::WeakPtrFactory<RenderFrameMetadataProviderImpl> weak_factory_{this};
 
diff --git a/content/browser/renderer_host/render_frame_proxy_host.cc b/content/browser/renderer_host/render_frame_proxy_host.cc
index 5dd7f71..cd86b1a 100644
--- a/content/browser/renderer_host/render_frame_proxy_host.cc
+++ b/content/browser/renderer_host/render_frame_proxy_host.cc
@@ -287,7 +287,7 @@
     CHECK_NE(parent_routing_id, MSG_ROUTING_NONE);
   }
 
-  base::Optional<blink::FrameToken> opener_frame_token;
+  absl::optional<blink::FrameToken> opener_frame_token;
   if (frame_tree_node_->opener()) {
     opener_frame_token =
         frame_tree_node_->render_manager()->GetOpenerFrameToken(
@@ -504,7 +504,7 @@
 }
 
 void RenderFrameProxyHost::RouteMessageEvent(
-    const base::Optional<blink::LocalFrameToken>& source_frame_token,
+    const absl::optional<blink::LocalFrameToken>& source_frame_token,
     const std::u16string& source_origin,
     const std::u16string& target_origin,
     blink::TransferableMessage message) {
@@ -567,7 +567,7 @@
 
   // If there is a |source_frame_token|, translate it to the frame token of the
   // equivalent RenderFrameProxyHost in the target process.
-  base::Optional<blink::RemoteFrameToken> translated_source_token;
+  absl::optional<blink::RemoteFrameToken> translated_source_token;
   ukm::SourceId source_page_ukm_source_id = ukm::kInvalidSourceId;
   if (source_frame_token) {
     RenderFrameHostImpl* source_rfh = RenderFrameHostImpl::FromFrameToken(
@@ -736,13 +736,13 @@
 
 void RenderFrameProxyHost::UpdateViewportIntersection(
     blink::mojom::ViewportIntersectionStatePtr intersection_state,
-    const base::Optional<blink::FrameVisualProperties>& visual_properties) {
+    const absl::optional<blink::FrameVisualProperties>& visual_properties) {
   cross_process_frame_connector_->UpdateViewportIntersection(
       *intersection_state, visual_properties);
 }
 
 void RenderFrameProxyHost::DidChangeOpener(
-    const base::Optional<blink::LocalFrameToken>& opener_frame_token) {
+    const absl::optional<blink::LocalFrameToken>& opener_frame_token) {
   frame_tree_node_->render_manager()->DidChangeOpener(opener_frame_token,
                                                       GetSiteInstance());
 }
diff --git a/content/browser/renderer_host/render_frame_proxy_host.h b/content/browser/renderer_host/render_frame_proxy_host.h
index f84ad83..b0445a40 100644
--- a/content/browser/renderer_host/render_frame_proxy_host.h
+++ b/content/browser/renderer_host/render_frame_proxy_host.h
@@ -181,12 +181,12 @@
       const gfx::Rect& clip_rect,
       const base::UnguessableToken& guid) override;
   void SetIsInert(bool inert) override;
-  void DidChangeOpener(const base::Optional<blink::LocalFrameToken>&
+  void DidChangeOpener(const absl::optional<blink::LocalFrameToken>&
                            opener_frame_token) override;
   void AdvanceFocus(blink::mojom::FocusType focus_type,
                     const blink::LocalFrameToken& source_frame_token) override;
   void RouteMessageEvent(
-      const base::Optional<blink::LocalFrameToken>& source_frame_token,
+      const absl::optional<blink::LocalFrameToken>& source_frame_token,
       const std::u16string& source_origin,
       const std::u16string& target_origin,
       blink::TransferableMessage message) override;
@@ -195,7 +195,7 @@
   void Detach() override;
   void UpdateViewportIntersection(
       blink::mojom::ViewportIntersectionStatePtr intersection_state,
-      const base::Optional<blink::FrameVisualProperties>& visual_properties)
+      const absl::optional<blink::FrameVisualProperties>& visual_properties)
       override;
   void SynchronizeVisualProperties(
       const blink::FrameVisualProperties& frame_visual_properties) override;
diff --git a/content/browser/renderer_host/render_process_host_browsertest.cc b/content/browser/renderer_host/render_process_host_browsertest.cc
index 969b63e..97b5919 100644
--- a/content/browser/renderer_host/render_process_host_browsertest.cc
+++ b/content/browser/renderer_host/render_process_host_browsertest.cc
@@ -5,7 +5,6 @@
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/scoped_observation.h"
 #include "base/synchronization/waitable_event.h"
@@ -48,6 +47,7 @@
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "net/test/embedded_test_server/http_request.h"
 #include "net/test/embedded_test_server/http_response.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/chrome_debug_urls.h"
 
 #if defined(OS_WIN)
@@ -1282,15 +1282,15 @@
 
   // Returns the latest recorded value if there was one and resets the recorded
   // value to |nullopt|.
-  base::Optional<bool> TakeValue() {
+  absl::optional<bool> TakeValue() {
     auto value = backgrounded_;
-    backgrounded_ = base::nullopt;
+    backgrounded_ = absl::nullopt;
     return value;
   }
 
  private:
   // Stores the last observed value of IsProcessBackgrounded for a host.
-  base::Optional<bool> backgrounded_;
+  absl::optional<bool> backgrounded_;
   base::ScopedObservation<RenderProcessHostImpl,
                           RenderProcessHostInternalObserver,
                           &RenderProcessHostImpl::AddInternalObserver,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index a138892..243df52 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2683,7 +2683,7 @@
                 GetMemoryInstrumentationRegistry()->RegisterClientProcess(
                     std::move(receiver), std::move(client_process),
                     memory_instrumentation::mojom::ProcessType::RENDERER, pid,
-                    /*service_name=*/base::nullopt);
+                    /*service_name=*/absl::nullopt);
               },
               std::move(receiver), std::move(client_process),
               GetProcess().Pid()));
diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
index b9f707c2..7170be23f 100644
--- a/content/browser/renderer_host/render_process_host_impl.h
+++ b/content/browser/renderer_host/render_process_host_impl.h
@@ -23,7 +23,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "base/sequenced_task_runner.h"
 #include "base/single_thread_task_runner.h"
@@ -70,6 +69,7 @@
 #include "services/service_manager/public/cpp/binder_registry.h"
 #include "services/tracing/public/mojom/traced_process.mojom-forward.h"
 #include "services/viz/public/mojom/compositing/compositing_mode_watcher.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/associated_interfaces/associated_interfaces.mojom-forward.h"
@@ -993,7 +993,7 @@
   // ignored, and an externally computed process priority is used. Set to true
   // and the process will stay foreground priority; set to false and it will
   // stay background priority.
-  base::Optional<bool> priority_override_;
+  absl::optional<bool> priority_override_;
 
   // Used to allow a RenderWidgetHost to intercept various messages on the
   // IO thread.
@@ -1124,7 +1124,7 @@
 
   // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend
   // WeakPtrs which are invalidated any time the RenderProcessHost is recycled.
-  base::Optional<base::WeakPtrFactory<RenderProcessHostImpl>>
+  absl::optional<base::WeakPtrFactory<RenderProcessHostImpl>>
       instance_weak_factory_;
 
   std::unique_ptr<mojo::Receiver<viz::mojom::CompositingModeReporter>>
@@ -1174,7 +1174,7 @@
   // destruction.
   class IOThreadHostImpl;
   friend class IOThreadHostImpl;
-  base::Optional<base::SequenceBound<IOThreadHostImpl>> io_thread_host_impl_;
+  absl::optional<base::SequenceBound<IOThreadHostImpl>> io_thread_host_impl_;
 
   base::WeakPtrFactory<RenderProcessHostImpl> weak_factory_{this};
 };
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index ba94f41..e38a3a0 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -384,7 +384,7 @@
 }
 
 bool RenderViewHostImpl::CreateRenderView(
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int proxy_route_id,
     bool window_was_created_with_opener) {
   TRACE_EVENT0("renderer_host,navigation",
@@ -922,7 +922,7 @@
 
 void RenderViewHostImpl::OnThemeColorChanged(
     RenderFrameHostImpl* rfh,
-    const base::Optional<SkColor>& theme_color) {
+    const absl::optional<SkColor>& theme_color) {
   if (GetMainFrame() != rfh)
     return;
   main_frame_theme_color_ = theme_color;
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index 4085504..8926801 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -18,7 +18,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/process/kill.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -35,6 +34,7 @@
 #include "content/public/browser/render_view_host.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "net/base/load_states.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/page/page.mojom.h"
@@ -155,7 +155,7 @@
   // |proxy_route_id| is only used when creating a RenderView in an inactive
   //   state.
   virtual bool CreateRenderView(
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int proxy_route_id,
       bool window_was_created_with_opener);
 
@@ -263,17 +263,17 @@
   }
 
   void OnThemeColorChanged(RenderFrameHostImpl* rfh,
-                           const base::Optional<SkColor>& theme_color);
+                           const absl::optional<SkColor>& theme_color);
 
   void DidChangeBackgroundColor(RenderFrameHostImpl* rfh,
                                 const SkColor& background_color,
                                 bool color_adjust);
 
-  base::Optional<SkColor> theme_color() const {
+  absl::optional<SkColor> theme_color() const {
     return main_frame_theme_color_;
   }
 
-  base::Optional<SkColor> background_color() const {
+  absl::optional<SkColor> background_color() const {
     return main_frame_background_color_;
   }
 
@@ -446,10 +446,10 @@
 
   // The theme color for the underlying document as specified
   // by theme-color meta tag.
-  base::Optional<SkColor> main_frame_theme_color_;
+  absl::optional<SkColor> main_frame_theme_color_;
 
   // The background color for the underlying document as computed by CSS.
-  base::Optional<SkColor> main_frame_background_color_;
+  absl::optional<SkColor> main_frame_background_color_;
 
   // Contents MIME type for the main document. It can be used to check whether
   // we can do something for special contents.
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
index fb25b91..c3032fa8 100644
--- a/content/browser/renderer_host/render_widget_host_delegate.h
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -136,7 +136,7 @@
   // Send OS Cut/Copy/Paste actions to the focused frame.
   virtual void ExecuteEditCommand(
       const std::string& command,
-      const base::Optional<std::u16string>& value) = 0;
+      const absl::optional<std::u16string>& value) = 0;
   virtual void Undo() = 0;
   virtual void Redo() = 0;
   virtual void Cut() = 0;
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 2dc0eb92..31ddf3d 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -29,7 +29,6 @@
 #include "base/macros.h"
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/single_thread_task_runner.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
@@ -114,6 +113,7 @@
 #include "skia/ext/platform_canvas.h"
 #include "skia/ext/skia_utils_base.h"
 #include "storage/browser/file_system/isolated_context.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/synthetic_web_input_event_builders.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
 #include "third_party/blink/public/common/widget/visual_properties.h"
@@ -1014,7 +1014,7 @@
   // The root widget's window segments are computed here - child frames just
   // use the value provided from the parent.
   if (is_top_most_widget) {
-    base::Optional<DisplayFeature> display_feature = view_->GetDisplayFeature();
+    absl::optional<DisplayFeature> display_feature = view_->GetDisplayFeature();
     if (display_feature) {
       visual_properties.root_widget_window_segments =
           display_feature->ComputeWindowSegments(
@@ -1824,7 +1824,7 @@
   return GetScaleFactorForView(view_.get());
 }
 
-base::Optional<cc::TouchAction> RenderWidgetHostImpl::GetAllowedTouchAction() {
+absl::optional<cc::TouchAction> RenderWidgetHostImpl::GetAllowedTouchAction() {
   return input_router_->AllowedTouchAction();
 }
 
@@ -2905,7 +2905,7 @@
 }
 
 bool RenderWidgetHostImpl::RequestKeyboardLock(
-    base::Optional<base::flat_set<ui::DomCode>> codes) {
+    absl::optional<base::flat_set<ui::DomCode>> codes) {
   if (!delegate_) {
     CancelKeyboardLock();
     return false;
@@ -3091,10 +3091,10 @@
   return frame_widget_input_handler_.get();
 }
 
-base::Optional<blink::VisualProperties>
+absl::optional<blink::VisualProperties>
 RenderWidgetHostImpl::LastComputedVisualProperties() const {
   if (!old_visual_properties_)
-    return base::nullopt;
+    return absl::nullopt;
   return *old_visual_properties_;
 }
 
@@ -3534,7 +3534,7 @@
   // KeyboardLock can be activated and deactivated several times per request,
   // for example when a fullscreen tab loses and gains focus multiple times,
   // so we need to retain a copy of the keys requested.
-  base::Optional<base::flat_set<ui::DomCode>> copy = keyboard_keys_to_lock_;
+  absl::optional<base::flat_set<ui::DomCode>> copy = keyboard_keys_to_lock_;
   return view_->LockKeyboard(std::move(copy));
 }
 
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 20aaa6fe..1490224 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -24,7 +24,6 @@
 #include "base/memory/read_only_shared_memory_region.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/process/kill.h"
 #include "base/time/tick_clock.h"
 #include "base/time/time.h"
@@ -58,6 +57,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/viz/public/mojom/compositing/compositor_frame_sink.mojom.h"
 #include "services/viz/public/mojom/hit_test/input_target_client.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/input/input_event_result.mojom-shared.h"
 #include "third_party/blink/public/mojom/input/input_handler.mojom.h"
 #include "third_party/blink/public/mojom/input/pointer_lock_context.mojom.h"
@@ -249,7 +249,7 @@
   void RemoveObserver(RenderWidgetHostObserver* observer) override;
   void GetScreenInfo(blink::ScreenInfo* result) override;
   float GetDeviceScaleFactor() override;
-  base::Optional<cc::TouchAction> GetAllowedTouchAction() override;
+  absl::optional<cc::TouchAction> GetAllowedTouchAction() override;
   void WriteIntoTrace(perfetto::TracedValue context) override;
   using DragOperationCallback =
       base::OnceCallback<void(::ui::mojom::DragOperation)>;
@@ -772,7 +772,7 @@
   // If |codes| has no value then all keys will be locked, otherwise only the
   // keys specified will be intercepted and routed to the web page.
   // Returns true if the lock request was successfully registered.
-  bool RequestKeyboardLock(base::Optional<base::flat_set<ui::DomCode>> codes);
+  bool RequestKeyboardLock(absl::optional<base::flat_set<ui::DomCode>> codes);
 
   // Cancels a previous keyboard lock request.
   void CancelKeyboardLock();
@@ -834,10 +834,10 @@
   }
 
   // Returns the visual properties that were last sent to the renderer.
-  base::Optional<blink::VisualProperties>
+  absl::optional<blink::VisualProperties>
   GetLastVisualPropertiesSentToRendererForTesting();
 
-  base::Optional<blink::VisualProperties> LastComputedVisualProperties() const;
+  absl::optional<blink::VisualProperties> LastComputedVisualProperties() const;
 
   // Generates widget creation params that will be passed to the renderer to
   // create a new widget. As a side effect, this resets various widget and frame
@@ -1292,7 +1292,7 @@
   bool pending_mouse_lock_request_ = false;
   bool mouse_lock_raw_movement_ = false;
   // Stores the keyboard keys to lock while waiting for a pending lock request.
-  base::Optional<base::flat_set<ui::DomCode>> keyboard_keys_to_lock_;
+  absl::optional<base::flat_set<ui::DomCode>> keyboard_keys_to_lock_;
   bool keyboard_lock_requested_ = false;
   bool keyboard_lock_allowed_ = false;
 
@@ -1361,8 +1361,8 @@
       frame_widget_input_handler_;
   mojo::Remote<viz::mojom::InputTargetClient> input_target_client_;
 
-  base::Optional<uint16_t> screen_orientation_angle_for_testing_;
-  base::Optional<blink::mojom::ScreenOrientation>
+  absl::optional<uint16_t> screen_orientation_angle_for_testing_;
+  absl::optional<blink::mojom::ScreenOrientation>
       screen_orientation_type_for_testing_;
 
   bool force_enable_zoom_ = false;
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.cc b/content/browser/renderer_host/render_widget_host_input_event_router.cc
index 114e0740..29e9128 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.cc
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.cc
@@ -493,7 +493,7 @@
   if (needs_transform_point) {
     if (!root_view->TransformPointToCoordSpaceForView(
             event.PositionInWidget(), target, &transformed_point)) {
-      return {nullptr, false, base::nullopt, latched_target};
+      return {nullptr, false, absl::nullopt, latched_target};
     }
   }
   return {target, false, transformed_point, latched_target};
@@ -509,7 +509,7 @@
     target = root_view->host()->delegate()->GetMouseLockWidget()->GetView();
     if (!root_view->TransformPointToCoordSpaceForView(
             event.PositionInWidget(), target, &transformed_point)) {
-      return {nullptr, false, base::nullopt, true};
+      return {nullptr, false, absl::nullopt, true};
     }
     return {target, false, transformed_point, true};
   }
@@ -522,7 +522,7 @@
   }
   // For non-begin events, the target found for the previous phaseBegan is
   // used.
-  return {nullptr, false, base::nullopt, true};
+  return {nullptr, false, absl::nullopt, true};
 }
 
 RenderWidgetTargetResult RenderWidgetHostInputEventRouter::FindViewAtLocation(
@@ -592,7 +592,7 @@
     RenderWidgetHostViewBase* target,
     const blink::WebMouseEvent& mouse_event,
     const ui::LatencyInfo& latency,
-    const base::Optional<gfx::PointF>& target_location) {
+    const absl::optional<gfx::PointF>& target_location) {
   // TODO(wjmaclean): Should we be sending a no-consumer ack to the root_view
   // if there is no target?
   if (!target)
@@ -672,7 +672,7 @@
     RenderWidgetHostViewBase* target,
     const blink::WebMouseWheelEvent& mouse_wheel_event,
     const ui::LatencyInfo& latency,
-    const base::Optional<gfx::PointF>& target_location) {
+    const absl::optional<gfx::PointF>& target_location) {
   if (!root_view->IsMouseLocked()) {
     if (mouse_wheel_event.phase == blink::WebMouseWheelEvent::kPhaseBegan) {
       wheel_target_ = target;
@@ -804,7 +804,7 @@
   // explicitly here.
   if (active_touches_ ||
       event.GetType() != blink::WebInputEvent::Type::kTouchStart)
-    return {nullptr, false, base::nullopt, true};
+    return {nullptr, false, absl::nullopt, true};
 
   active_touches_ += CountChangedTouchPoints(event);
   gfx::PointF original_point = gfx::PointF(event.touches[0].PositionInWidget());
@@ -819,7 +819,7 @@
     RenderWidgetHostViewBase* target,
     const blink::WebTouchEvent& touch_event,
     const ui::LatencyInfo& latency,
-    const base::Optional<gfx::PointF>& target_location,
+    const absl::optional<gfx::PointF>& target_location,
     bool is_emulated_touchevent) {
   DCHECK(blink::WebInputEvent::IsTouchEventType(touch_event.GetType()) &&
          touch_event.GetType() !=
@@ -1416,7 +1416,7 @@
 
   // Remaining gesture events will defer to the gesture event target queue
   // during dispatch.
-  return {nullptr, false, base::nullopt, true};
+  return {nullptr, false, absl::nullopt, true};
 }
 
 bool RenderWidgetHostInputEventRouter::IsViewInMap(
@@ -1433,7 +1433,7 @@
 namespace {
 
 bool IsPinchCurrentlyAllowedInTarget(RenderWidgetHostViewBase* target) {
-  base::Optional<cc::TouchAction> target_active_touch_action(
+  absl::optional<cc::TouchAction> target_active_touch_action(
       cc::TouchAction::kNone);
   if (target) {
     target_active_touch_action =
@@ -1459,7 +1459,7 @@
     RenderWidgetHostViewBase* target,
     const blink::WebGestureEvent& gesture_event,
     const ui::LatencyInfo& latency,
-    const base::Optional<gfx::PointF>& target_location) {
+    const absl::optional<gfx::PointF>& target_location) {
   if (gesture_event.GetType() ==
       blink::WebInputEvent::Type::kGesturePinchBegin) {
     if (root_view == touchscreen_gesture_target_) {
@@ -1527,7 +1527,7 @@
   const bool is_gesture_start =
       gesture_event.GetType() == blink::WebInputEvent::Type::kGestureTapDown;
 
-  base::Optional<gfx::PointF> fallback_target_location;
+  absl::optional<gfx::PointF> fallback_target_location;
 
   if (gesture_event.unique_touch_event_id == 0) {
     // On Android it is possible for touchscreen gesture events to arrive that
@@ -1648,7 +1648,7 @@
   if (event.GetType() != blink::WebInputEvent::Type::kGesturePinchBegin &&
       event.GetType() != blink::WebInputEvent::Type::kGestureFlingCancel &&
       event.GetType() != blink::WebInputEvent::Type::kGestureDoubleTap) {
-    return {nullptr, false, base::nullopt, true};
+    return {nullptr, false, absl::nullopt, true};
   }
 
   gfx::PointF transformed_point;
@@ -1669,7 +1669,7 @@
     RenderWidgetHostViewBase* target,
     const blink::WebGestureEvent& touchpad_gesture_event,
     const ui::LatencyInfo& latency,
-    const base::Optional<gfx::PointF>& target_location) {
+    const absl::optional<gfx::PointF>& target_location) {
   // Touchpad gesture flings should be treated as mouse wheels for the purpose
   // of routing.
   if (touchpad_gesture_event.GetType() ==
@@ -1838,7 +1838,7 @@
     RenderWidgetHostViewBase* target,
     blink::WebInputEvent* event,
     const ui::LatencyInfo& latency,
-    const base::Optional<gfx::PointF>& target_location) {
+    const absl::optional<gfx::PointF>& target_location) {
   DCHECK(event);
   if (target && target->ScreenRectIsUnstableFor(*event))
     event->SetTargetFrameMovedRecently();
diff --git a/content/browser/renderer_host/render_widget_host_input_event_router.h b/content/browser/renderer_host/render_widget_host_input_event_router.h
index 54bf997..3550833 100644
--- a/content/browser/renderer_host/render_widget_host_input_event_router.h
+++ b/content/browser/renderer_host/render_widget_host_input_event_router.h
@@ -222,7 +222,7 @@
       RenderWidgetHostViewBase* target,
       const blink::WebGestureEvent& touchpad_gesture_event,
       const ui::LatencyInfo& latency,
-      const base::Optional<gfx::PointF>& target_location);
+      const absl::optional<gfx::PointF>& target_location);
 
   // MouseMove/Enter/Leave events might need to be processed by multiple frames
   // in different processes for MouseEnter and MouseLeave event handlers to
@@ -280,20 +280,20 @@
                           RenderWidgetHostViewBase* target,
                           const blink::WebMouseEvent& mouse_event,
                           const ui::LatencyInfo& latency,
-                          const base::Optional<gfx::PointF>& target_location);
+                          const absl::optional<gfx::PointF>& target_location);
   // |mouse_wheel_event| is in the coord-space of |root_view|.
   void DispatchMouseWheelEvent(
       RenderWidgetHostViewBase* root_view,
       RenderWidgetHostViewBase* target,
       const blink::WebMouseWheelEvent& mouse_wheel_event,
       const ui::LatencyInfo& latency,
-      const base::Optional<gfx::PointF>& target_location);
+      const absl::optional<gfx::PointF>& target_location);
   // Assumes |touch_event| has coordinates in the root view's coordinate space.
   void DispatchTouchEvent(RenderWidgetHostViewBase* root_view,
                           RenderWidgetHostViewBase* target,
                           const blink::WebTouchEvent& touch_event,
                           const ui::LatencyInfo& latency,
-                          const base::Optional<gfx::PointF>& target_location,
+                          const absl::optional<gfx::PointF>& target_location,
                           bool is_emulated);
   // Assumes |gesture_event| has coordinates in root view's coordinate space.
   void DispatchTouchscreenGestureEvent(
@@ -301,7 +301,7 @@
       RenderWidgetHostViewBase* target,
       const blink::WebGestureEvent& gesture_event,
       const ui::LatencyInfo& latency,
-      const base::Optional<gfx::PointF>& target_location);
+      const absl::optional<gfx::PointF>& target_location);
 
   // TODO(828422): Remove once this issue no longer occurs.
   void ReportBubblingScrollToSameView(const blink::WebGestureEvent& event,
@@ -320,7 +320,7 @@
       RenderWidgetHostViewBase* target,
       blink::WebInputEvent* event,
       const ui::LatencyInfo& latency,
-      const base::Optional<gfx::PointF>& target_location) override;
+      const absl::optional<gfx::PointF>& target_location) override;
   // Notify whether the events in the queue are being flushed due to touch ack
   // timeout, or the flushing has completed.
   void SetEventsBeingFlushed(bool events_being_flushed) override;
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 5347b87..d2088066 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -445,7 +445,7 @@
 
   void ExecuteEditCommand(
       const std::string& command,
-      const base::Optional<std::u16string>& value) override {}
+      const absl::optional<std::u16string>& value) override {}
 
   void Undo() override {}
   void Redo() override {}
@@ -877,7 +877,7 @@
   EXPECT_EQ(original_size.size(), host_->old_visual_properties_->new_size);
   cc::RenderFrameMetadata metadata;
   metadata.viewport_size_in_pixels = original_size.size();
-  metadata.local_surface_id = base::nullopt;
+  metadata.local_surface_id = absl::nullopt;
   static_cast<RenderFrameMetadataProvider::Observer&>(*host_)
       .OnLocalSurfaceIdChanged(metadata);
   EXPECT_FALSE(host_->visual_properties_ack_pending_);
@@ -910,7 +910,7 @@
   // sent. Since this isn't the second_size, the message handler should
   // immediately send a new resize message for the new size to the renderer.
   metadata.viewport_size_in_pixels = original_size.size();
-  metadata.local_surface_id = base::nullopt;
+  metadata.local_surface_id = absl::nullopt;
   static_cast<RenderFrameMetadataProvider::Observer&>(*host_)
       .OnLocalSurfaceIdChanged(metadata);
   EXPECT_TRUE(host_->visual_properties_ack_pending_);
@@ -922,7 +922,7 @@
 
   // Send the visual properties ACK for the latest size.
   metadata.viewport_size_in_pixels = third_size.size();
-  metadata.local_surface_id = base::nullopt;
+  metadata.local_surface_id = absl::nullopt;
   static_cast<RenderFrameMetadataProvider::Observer&>(*host_)
       .OnLocalSurfaceIdChanged(metadata);
   EXPECT_FALSE(host_->visual_properties_ack_pending_);
@@ -1313,7 +1313,7 @@
   process_->sink().ClearMessages();
   cc::RenderFrameMetadata metadata;
   metadata.viewport_size_in_pixels = gfx::Size(100, 100);
-  metadata.local_surface_id = base::nullopt;
+  metadata.local_surface_id = absl::nullopt;
   static_cast<RenderFrameMetadataProvider::Observer&>(*host_)
       .OnLocalSurfaceIdChanged(metadata);
 
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index e2cd83e..98135d86 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -350,7 +350,7 @@
 
 bool RenderWidgetHostViewAndroid::SynchronizeVisualProperties(
     const cc::DeadlinePolicy& deadline_policy,
-    const base::Optional<viz::LocalSurfaceId>& child_local_surface_id) {
+    const absl::optional<viz::LocalSurfaceId>& child_local_surface_id) {
   if (child_local_surface_id) {
     local_surface_id_allocator_.UpdateFromChild(*child_local_surface_id);
   } else {
@@ -554,7 +554,7 @@
 jint RenderWidgetHostViewAndroid::GetBackgroundColor(
     JNIEnv* env,
     const base::android::JavaParamRef<jobject>& obj) {
-  base::Optional<SkColor> color =
+  absl::optional<SkColor> color =
       RenderWidgetHostViewAndroid::GetCachedBackgroundColor();
   if (!color)
     return SK_ColorTRANSPARENT;
@@ -576,7 +576,7 @@
     JNIEnv* env,
     const base::android::JavaParamRef<jobject>& obj) {
   SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                              base::nullopt);
+                              absl::nullopt);
 }
 
 void RenderWidgetHostViewAndroid::WriteContentBitmapToDiskAsync(
@@ -1128,7 +1128,7 @@
 void RenderWidgetHostViewAndroid::EnsureSurfaceSynchronizedForWebTest() {
   ++latest_capture_sequence_number_;
   SynchronizeVisualProperties(cc::DeadlinePolicy::UseInfiniteDeadline(),
-                              base::nullopt);
+                              absl::nullopt);
 }
 
 uint32_t RenderWidgetHostViewAndroid::GetCaptureSequenceNumber() const {
@@ -1171,7 +1171,7 @@
 
 bool RenderWidgetHostViewAndroid::RequestRepaintForTesting() {
   return SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                                     base::nullopt);
+                                     absl::nullopt);
 }
 
 
@@ -1505,7 +1505,7 @@
             ? cc::DeadlinePolicy::UseSpecifiedDeadline(
                   ui::DelegatedFrameHostAndroid::FirstFrameTimeoutFrames())
             : cc::DeadlinePolicy::UseDefaultDeadline(),
-        base::nullopt);
+        absl::nullopt);
     // If we navigated while hidden, we need to update the fallback surface only
     // after we've completed navigation, and embedded the new surface. The
     // |delegated_frame_host_| is always valid when |navigation_while_hidden_|
@@ -1956,7 +1956,7 @@
   SetTextHandlesHiddenInternal();
 }
 
-base::Optional<SkColor>
+absl::optional<SkColor>
 RenderWidgetHostViewAndroid::GetCachedBackgroundColor() {
   return RenderWidgetHostViewBase::GetBackgroundColor();
 }
@@ -2053,7 +2053,7 @@
     SynchronizeVisualProperties(
         cc::DeadlinePolicy::UseSpecifiedDeadline(
             ui::DelegatedFrameHostAndroid::ResizeTimeoutFrames()),
-        base::nullopt);
+        absl::nullopt);
   }
 
   if (!touch_selection_controller_) {
@@ -2148,7 +2148,7 @@
 }
 
 void RenderWidgetHostViewAndroid::OnPhysicalBackingSizeChanged(
-    base::Optional<base::TimeDelta> deadline_override) {
+    absl::optional<base::TimeDelta> deadline_override) {
   // We may need to update the background color to match pre-surface-sync
   // behavior of EvictFrameIfNecessary.
   UpdateWebViewBackgroundColorIfNecessary();
@@ -2171,7 +2171,7 @@
 
   SynchronizeVisualProperties(
       cc::DeadlinePolicy::UseSpecifiedDeadline(deadline_in_frames),
-      base::nullopt);
+      absl::nullopt);
   if (in_rotation) {
     DCHECK(!rotation_metrics_.empty());
     rotation_metrics_.back().second =
@@ -2410,10 +2410,10 @@
         TRACE_ID_LOCAL(delta.InNanoseconds()));
   }
   SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                              base::nullopt);
+                              absl::nullopt);
 }
 
-base::Optional<SkColor> RenderWidgetHostViewAndroid::GetBackgroundColor() {
+absl::optional<SkColor> RenderWidgetHostViewAndroid::GetBackgroundColor() {
   return default_background_color_;
 }
 
@@ -2435,7 +2435,7 @@
           local_surface_id_allocator_.GetCurrentLocalSurfaceId());
     } else {
       SynchronizeVisualProperties(cc::DeadlinePolicy::UseExistingDeadline(),
-                                  base::nullopt);
+                                  absl::nullopt);
     }
     // Only notify of navigation once a surface has been embedded.
     delegated_frame_host_->DidNavigate();
@@ -2482,18 +2482,18 @@
   // Touch transfer for Android is not implemented in content/.
 }
 
-base::Optional<DisplayFeature>
+absl::optional<DisplayFeature>
 RenderWidgetHostViewAndroid::GetDisplayFeature() {
   gfx::Size view_size(view_.GetSize());
   if (view_size.IsEmpty())
-    return base::nullopt;
+    return absl::nullopt;
 
   // On Android, the display feature is exposed as a rectangle as a generic
   // concept. Here in the content layer, we translate that to a more
   // constrained concept, see content::DisplayFeature.
-  base::Optional<gfx::Rect> display_feature_rect = view_.GetDisplayFeature();
+  absl::optional<gfx::Rect> display_feature_rect = view_.GetDisplayFeature();
   if (!display_feature_rect)
-    return base::nullopt;
+    return absl::nullopt;
 
   // The display feature and view location are both provided in device pixels,
   // relative to the window. Convert this to DIP and view relative coordinates,
@@ -2525,7 +2525,7 @@
                        transformed_display_feature.x(),
                        transformed_display_feature.width()};
   } else {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return display_feature;
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h
index eed7289..221bd27 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.h
+++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -180,7 +180,7 @@
   void OnRendererWidgetCreated() override;
   void TakeFallbackContentFrom(RenderWidgetHostView* view) override;
   void OnSynchronizedDisplayPropertiesChanged(bool rotation) override;
-  base::Optional<SkColor> GetBackgroundColor() override;
+  absl::optional<SkColor> GetBackgroundColor() override;
   void DidNavigate() override;
   WebContentsAccessibility* GetWebContentsAccessibility() override;
   viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(
@@ -197,7 +197,7 @@
   bool OnMouseWheelEvent(const ui::MotionEventAndroid& event) override;
   bool OnGestureEvent(const ui::GestureEventAndroid& event) override;
   void OnPhysicalBackingSizeChanged(
-      base::Optional<base::TimeDelta> deadline_override) override;
+      absl::optional<base::TimeDelta> deadline_override) override;
   void NotifyVirtualKeyboardOverlayRect(
       const gfx::Rect& keyboard_rect) override;
 
@@ -248,7 +248,7 @@
 
   // Returns the temporary background color of the underlaying document, for
   // example, returns black during screen rotation.
-  base::Optional<SkColor> GetCachedBackgroundColor();
+  absl::optional<SkColor> GetCachedBackgroundColor();
   void SendKeyEvent(const NativeWebKeyboardEvent& event);
   void SendMouseEvent(const ui::MotionEventAndroid&, int action_button);
   void SendMouseWheelEvent(const blink::WebMouseWheelEvent& event);
@@ -281,7 +281,7 @@
 
   bool SynchronizeVisualProperties(
       const cc::DeadlinePolicy& deadline_policy,
-      const base::Optional<viz::LocalSurfaceId>& child_local_surface_id);
+      const absl::optional<viz::LocalSurfaceId>& child_local_surface_id);
 
   bool HasValidFrame() const;
 
@@ -389,7 +389,7 @@
   // RenderWidgetHostViewBase:
   void UpdateBackgroundColor() override;
   bool HasFallbackSurface() const override;
-  base::Optional<DisplayFeature> GetDisplayFeature() override;
+  absl::optional<DisplayFeature> GetDisplayFeature() override;
   void SetDisplayFeatureForTesting(
       const DisplayFeature* display_feature) override;
 
@@ -590,7 +590,7 @@
   bool swipe_to_move_cursor_activated_ = false;
 
   // A cached copy of the most up to date RenderFrameMetadata.
-  base::Optional<cc::RenderFrameMetadata> last_render_frame_metadata_;
+  absl::optional<cc::RenderFrameMetadata> last_render_frame_metadata_;
 
   WebContentsAccessibilityAndroid* web_contents_accessibility_ = nullptr;
 
diff --git a/content/browser/renderer_host/render_widget_host_view_android_unittest.cc b/content/browser/renderer_host/render_widget_host_view_android_unittest.cc
index de1a645..df644ed 100644
--- a/content/browser/renderer_host/render_widget_host_view_android_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android_unittest.cc
@@ -34,7 +34,7 @@
   // Directly map to RenderWidgetHostViewAndroid methods.
   bool SynchronizeVisualProperties(
       const cc::DeadlinePolicy& deadline_policy,
-      const base::Optional<viz::LocalSurfaceId>& child_local_surface_id);
+      const absl::optional<viz::LocalSurfaceId>& child_local_surface_id);
   void WasEvicted();
   ui::ViewAndroid* GetViewAndroid() { return &native_view_; }
 
@@ -70,7 +70,7 @@
 
 bool RenderWidgetHostViewAndroidTest::SynchronizeVisualProperties(
     const cc::DeadlinePolicy& deadline_policy,
-    const base::Optional<viz::LocalSurfaceId>& child_local_surface_id) {
+    const absl::optional<viz::LocalSurfaceId>& child_local_surface_id) {
   return render_widget_host_view_android_->SynchronizeVisualProperties(
       deadline_policy, child_local_surface_id);
 }
@@ -204,7 +204,7 @@
   RenderWidgetHostViewBase* rwhv = rwhva;
   rwhva->GetNativeView()->SetLayoutForTesting(0, 0, 200, 400);
   test_view_android_delegate_->SetupTestDelegate(GetViewAndroid());
-  EXPECT_EQ(base::nullopt, rwhv->GetDisplayFeature());
+  EXPECT_EQ(absl::nullopt, rwhv->GetDisplayFeature());
 
   // Set a vertical display feature, and verify this is reflected in the
   // computed display feature.
@@ -222,7 +222,7 @@
   rwhva->GetNativeView()->SetLayoutForTesting(0, 0, 400, 200);
   test_view_android_delegate_->SetDisplayFeatureForTesting(
       gfx::Rect(200, 100, 100, 200));
-  EXPECT_EQ(base::nullopt, rwhv->GetDisplayFeature());
+  EXPECT_EQ(absl::nullopt, rwhv->GetDisplayFeature());
 
   // Verify that horizontal display feature is correctly validated.
   test_view_android_delegate_->SetDisplayFeatureForTesting(
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 1208c4d..b8ae3c5 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -530,7 +530,7 @@
 void RenderWidgetHostViewAura::EnsureSurfaceSynchronizedForWebTest() {
   ++latest_capture_sequence_number_;
   SynchronizeVisualProperties(cc::DeadlinePolicy::UseInfiniteDeadline(),
-                              base::nullopt);
+                              absl::nullopt);
 }
 
 bool RenderWidgetHostViewAura::IsShowing() {
@@ -652,7 +652,7 @@
   window_->layer()->SetColor(color);
 }
 
-base::Optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
+absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() {
   return display_feature_;
 }
 
@@ -661,7 +661,7 @@
   if (display_feature)
     display_feature_ = *display_feature;
   else
-    display_feature_ = base::nullopt;
+    display_feature_ = absl::nullopt;
 }
 
 void RenderWidgetHostViewAura::WindowTitleChanged() {
@@ -837,7 +837,7 @@
 
 bool RenderWidgetHostViewAura::RequestRepaintForTesting() {
   return SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                                     base::nullopt);
+                                     absl::nullopt);
 }
 
 void RenderWidgetHostViewAura::DidStopFlinging() {
@@ -1098,7 +1098,7 @@
 }
 
 bool RenderWidgetHostViewAura::LockKeyboard(
-    base::Optional<base::flat_set<ui::DomCode>> codes) {
+    absl::optional<base::flat_set<ui::DomCode>> codes) {
   return event_handler_->LockKeyboard(std::move(codes));
 }
 
@@ -1554,10 +1554,10 @@
   return true;
 }
 
-base::Optional<ui::GrammarFragment>
+absl::optional<ui::GrammarFragment>
 RenderWidgetHostViewAura::GetGrammarFragment(const gfx::Range& range) {
   if (!text_input_manager_ || !text_input_manager_->GetActiveWidget())
-    return base::nullopt;
+    return absl::nullopt;
   return text_input_manager_->GetGrammarFragment(range);
 }
 
@@ -1605,8 +1605,8 @@
 
 #if defined(OS_WIN)
 void RenderWidgetHostViewAura::GetActiveTextInputControlLayoutBounds(
-    base::Optional<gfx::Rect>* control_bounds,
-    base::Optional<gfx::Rect>* selection_bounds) {
+    absl::optional<gfx::Rect>* control_bounds,
+    absl::optional<gfx::Rect>* selection_bounds) {
   if (text_input_manager_) {
     const ui::mojom::TextInputState* state =
         text_input_manager_->GetTextInputState();
@@ -2156,7 +2156,7 @@
 
 bool RenderWidgetHostViewAura::SynchronizeVisualProperties(
     const cc::DeadlinePolicy& deadline_policy,
-    const base::Optional<viz::LocalSurfaceId>& child_local_surface_id) {
+    const absl::optional<viz::LocalSurfaceId>& child_local_surface_id) {
   DCHECK(window_);
   DCHECK(delegated_frame_host_) << "Cannot be invoked during destruction.";
 
@@ -2604,7 +2604,7 @@
 void RenderWidgetHostViewAura::OnSynchronizedDisplayPropertiesChanged(
     bool rotation) {
   SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                              base::nullopt);
+                              absl::nullopt);
 }
 
 viz::ScopedSurfaceIdAllocator
@@ -2632,7 +2632,7 @@
                                   window_->GetLocalSurfaceId());
     } else {
       SynchronizeVisualProperties(cc::DeadlinePolicy::UseExistingDeadline(),
-                                  base::nullopt);
+                                  absl::nullopt);
     }
   }
     delegated_frame_host_->DidNavigate();
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index b4058ec7..fa9154a 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -161,7 +161,7 @@
       bool request_unadjusted_movement) override;
   void UnlockMouse() override;
   bool GetIsMouseLockedUnadjustedMovementForTesting() override;
-  bool LockKeyboard(base::Optional<base::flat_set<ui::DomCode>> codes) override;
+  bool LockKeyboard(absl::optional<base::flat_set<ui::DomCode>> codes) override;
   void UnlockKeyboard() override;
   bool IsKeyboardLocked() override;
   base::flat_map<std::string, std::string> GetKeyboardLayoutMap() override;
@@ -238,7 +238,7 @@
   gfx::Range GetAutocorrectRange() const override;
   gfx::Rect GetAutocorrectCharacterBounds() const override;
   bool SetAutocorrectRange(const gfx::Range& range) override;
-  base::Optional<ui::GrammarFragment> GetGrammarFragment(
+  absl::optional<ui::GrammarFragment> GetGrammarFragment(
       const gfx::Range& range) override;
   bool ClearGrammarFragments(const gfx::Range& range) override;
   bool AddGrammarFragments(
@@ -250,8 +250,8 @@
   // bounds of the active editable element. This is used to report the layout
   // bounds of the text input control to TSF on Windows.
   void GetActiveTextInputControlLayoutBounds(
-      base::Optional<gfx::Rect>* control_bounds,
-      base::Optional<gfx::Rect>* selection_bounds) override;
+      absl::optional<gfx::Rect>* control_bounds,
+      absl::optional<gfx::Rect>* selection_bounds) override;
   // API to notify accessibility whether there is an active composition
   // from TSF or not.
   // It notifies the composition range, composition text and whether the
@@ -384,7 +384,7 @@
   // RenderWidgetHostViewBase:
   void UpdateBackgroundColor() override;
   bool HasFallbackSurface() const override;
-  base::Optional<DisplayFeature> GetDisplayFeature() override;
+  absl::optional<DisplayFeature> GetDisplayFeature() override;
   void SetDisplayFeatureForTesting(
       const DisplayFeature* display_feature) override;
 
@@ -508,7 +508,7 @@
 
   bool SynchronizeVisualProperties(
       const cc::DeadlinePolicy& deadline_policy,
-      const base::Optional<viz::LocalSurfaceId>& child_local_surface_id);
+      const absl::optional<viz::LocalSurfaceId>& child_local_surface_id);
 
   void OnDidUpdateVisualPropertiesComplete(
       const cc::RenderFrameMetadata& metadata);
@@ -726,7 +726,7 @@
   // Represents a feature of the physical display whose offset and mask_length
   // are expressed in DIPs relative to the view. See display_feature.h for more
   // details.
-  base::Optional<DisplayFeature> display_feature_;
+  absl::optional<DisplayFeature> display_feature_;
 
   base::WeakPtrFactory<RenderWidgetHostViewAura> weak_ptr_factory_{this};
 };
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 5e5daf29..466e96ff 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -365,8 +365,8 @@
     last_forwarded_gesture_event_ = gesture_event;
   }
 
-  base::Optional<WebGestureEvent> GetAndResetLastForwardedGestureEvent() {
-    base::Optional<WebGestureEvent> ret;
+  absl::optional<WebGestureEvent> GetAndResetLastForwardedGestureEvent() {
+    absl::optional<WebGestureEvent> ret;
     last_forwarded_gesture_event_.swap(ret);
     return ret;
   }
@@ -448,7 +448,7 @@
   bool new_content_rendering_timeout_fired_ = false;
   MockWidgetInputHandler input_handler_;
   MockWidget widget_;
-  base::Optional<WebGestureEvent> last_forwarded_gesture_event_;
+  absl::optional<WebGestureEvent> last_forwarded_gesture_event_;
 };
 
 class TestScopedKeyboardHook : public aura::ScopedKeyboardHook {
@@ -466,7 +466,7 @@
 
  private:
   bool keyboard_lock_active_ = false;
-  base::Optional<ui::DomCode> locked_key_;
+  absl::optional<ui::DomCode> locked_key_;
 
   DISALLOW_COPY_AND_ASSIGN(TestScopedKeyboardHook);
 };
@@ -2372,7 +2372,7 @@
   // cancel to cancel any ongoing flings before the start of this scroll.
   view_->OnScrollEvent(&scroll_event);
   base::RunLoop().RunUntilIdle();
-  base::Optional<WebGestureEvent> last_gesture =
+  absl::optional<WebGestureEvent> last_gesture =
       widget_host_->GetAndResetLastForwardedGestureEvent();
   ASSERT_TRUE(last_gesture);
   EXPECT_EQ(WebInputEvent::Type::kGestureFlingCancel, last_gesture->GetType());
@@ -6795,7 +6795,7 @@
 
  private:
   mojo::Receiver<gfx::mojom::DelegatedInkPointRenderer> receiver_;
-  base::Optional<gfx::DelegatedInkPoint> delegated_ink_point_;
+  absl::optional<gfx::DelegatedInkPoint> delegated_ink_point_;
   bool prediction_reset_ = false;
 };
 
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 890aa9ee..3f877e2 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -329,14 +329,14 @@
   }
 }
 
-base::Optional<SkColor> RenderWidgetHostViewBase::GetBackgroundColor() {
+absl::optional<SkColor> RenderWidgetHostViewBase::GetBackgroundColor() {
   if (content_background_color_)
     return content_background_color_;
   return default_background_color_;
 }
 
 bool RenderWidgetHostViewBase::IsBackgroundColorOpaque() {
-  base::Optional<SkColor> bg_color = GetBackgroundColor();
+  absl::optional<SkColor> bg_color = GetBackgroundColor();
   return bg_color ? SkColorGetA(*bg_color) == SK_AlphaOPAQUE : true;
 }
 
@@ -371,7 +371,7 @@
 }
 
 bool RenderWidgetHostViewBase::LockKeyboard(
-    base::Optional<base::flat_set<ui::DomCode>> codes) {
+    absl::optional<base::flat_set<ui::DomCode>> codes) {
   NOTIMPLEMENTED_LOG_ONCE();
   return false;
 }
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index 885d2f0..f7d24ea5 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -16,7 +16,6 @@
 #include "base/i18n/rtl.h"
 #include "base/macros.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/process/kill.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -31,6 +30,7 @@
 #include "content/public/browser/visibility.h"
 #include "content/public/common/widget_type.h"
 #include "services/viz/public/mojom/hit_test/hit_test_region_list.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/page/content_to_visible_time_reporter.h"
 #include "third_party/blink/public/mojom/frame/intrinsic_sizing_info.mojom-forward.h"
 #include "third_party/blink/public/mojom/input/input_event_result.mojom-shared.h"
@@ -117,9 +117,9 @@
   std::u16string GetSelectedText() override;
   bool IsMouseLocked() override;
   bool GetIsMouseLockedUnadjustedMovementForTesting() override;
-  bool LockKeyboard(base::Optional<base::flat_set<ui::DomCode>> codes) override;
+  bool LockKeyboard(absl::optional<base::flat_set<ui::DomCode>> codes) override;
   void SetBackgroundColor(SkColor color) override;
-  base::Optional<SkColor> GetBackgroundColor() override;
+  absl::optional<SkColor> GetBackgroundColor() override;
   void CopyBackgroundColorIfPresentFrom(
       const RenderWidgetHostView& other) override;
   void UnlockKeyboard() override;
@@ -483,7 +483,7 @@
 
   // Gets the DisplayFeature whose offset and mask_length are expressed in DIPs
   // relative to the view. See display_feature.h for more details.
-  virtual base::Optional<DisplayFeature> GetDisplayFeature() = 0;
+  virtual absl::optional<DisplayFeature> GetDisplayFeature() = 0;
 
   virtual void SetDisplayFeatureForTesting(
       const DisplayFeature* display_feature) = 0;
@@ -539,7 +539,7 @@
   // SetContentBackgroundColor is called when the renderer wants to update the
   // view's background color.
   void SetContentBackgroundColor(SkColor color);
-  base::Optional<SkColor> content_background_color() const {
+  absl::optional<SkColor> content_background_color() const {
     return content_background_color_;
   }
 
@@ -599,11 +599,11 @@
   TextInputManager* text_input_manager_ = nullptr;
 
   // The background color used in the current renderer.
-  base::Optional<SkColor> content_background_color_;
+  absl::optional<SkColor> content_background_color_;
 
   // The default background color used before getting the
   // |content_background_color|.
-  base::Optional<SkColor> default_background_color_;
+  absl::optional<SkColor> default_background_color_;
 
   bool is_currently_scrolling_viewport_ = false;
 
@@ -657,7 +657,7 @@
 
   base::ObserverList<RenderWidgetHostViewBaseObserver>::Unchecked observers_;
 
-  base::Optional<blink::WebGestureEvent> pending_touchpad_pinch_begin_;
+  absl::optional<blink::WebGestureEvent> pending_touchpad_pinch_begin_;
 
   // The last tab switch processing start request. This should only be set and
   // retrieved using SetRecordContentToVisibleTimeRequest and
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
index 6028a87..48f1b17 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
@@ -316,10 +316,10 @@
   }
 }
 
-base::Optional<DisplayFeature>
+absl::optional<DisplayFeature>
 RenderWidgetHostViewChildFrame::GetDisplayFeature() {
   NOTREACHED();
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 void RenderWidgetHostViewChildFrame::SetDisplayFeatureForTesting(
@@ -353,7 +353,7 @@
   if (initial_properties_sent_ || !frame_connector_)
     return;
   UpdateViewportIntersection(frame_connector_->intersection_state(),
-                             base::nullopt);
+                             absl::nullopt);
   SetIsInert();
   UpdateInheritedEffectiveTouchAction();
   UpdateRenderThrottlingStatus();
@@ -442,7 +442,7 @@
 
 void RenderWidgetHostViewChildFrame::UpdateViewportIntersection(
     const blink::mojom::ViewportIntersectionState& intersection_state,
-    const base::Optional<blink::VisualProperties>& visual_properties) {
+    const absl::optional<blink::VisualProperties>& visual_properties) {
   if (host()) {
     host()->SetIntersectsViewport(
         !intersection_state.viewport_intersection.IsEmpty());
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
index cc669874..97d6d92d 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
@@ -196,7 +196,7 @@
 
   void UpdateViewportIntersection(
       const blink::mojom::ViewportIntersectionState& intersection_state,
-      const base::Optional<blink::VisualProperties>& visual_properties);
+      const absl::optional<blink::VisualProperties>& visual_properties);
 
   // TODO(sunxd): Rename SetIsInert to UpdateIsInert.
   void SetIsInert();
@@ -229,7 +229,7 @@
 
   // RenderWidgetHostViewBase:
   void UpdateBackgroundColor() override;
-  base::Optional<DisplayFeature> GetDisplayFeature() override;
+  absl::optional<DisplayFeature> GetDisplayFeature() override;
   void SetDisplayFeatureForTesting(
       const DisplayFeature* display_feature) override;
 
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc b/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc
index a4e6212..3848e84 100644
--- a/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame_browsertest.cc
@@ -231,7 +231,7 @@
 
     // Wait to see the size sent to the child RenderWidget.
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           child_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == initial_size)
         break;
@@ -248,7 +248,7 @@
 
     // Wait to see the size sent to the child RenderWidget.
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           nested_child_rwh->LastComputedVisualProperties();
       if (properties &&
           properties->visible_viewport_size == nested_initial_size)
@@ -277,14 +277,14 @@
 
     // Wait to see both RenderWidgets receive the message.
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           root_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == resize_to)
         break;
       base::RunLoop().RunUntilIdle();
     }
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           child_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == resize_to)
         break;
@@ -308,14 +308,14 @@
 
     // Wait to see both RenderWidgets receive the message.
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           nested_root_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == resize_to)
         break;
       base::RunLoop().RunUntilIdle();
     }
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           nested_child_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == resize_to)
         break;
@@ -348,14 +348,14 @@
     // Wait for the renderer side to resize itself and the RenderWidget
     // waterfall to pass the new |visible_viewport_size| down.
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           root_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == auto_resize_to)
         break;
       base::RunLoop().RunUntilIdle();
     }
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           child_rwh->LastComputedVisualProperties();
       if (properties && properties->visible_viewport_size == auto_resize_to)
         break;
@@ -552,7 +552,7 @@
                                  root_view_size.width() - second_segment_offset,
                                  root_view_size.height());
 
-  base::Optional<blink::VisualProperties> properties =
+  absl::optional<blink::VisualProperties> properties =
       oopchild->current_frame_host()
           ->GetRenderWidgetHost()
           ->LastComputedVisualProperties();
@@ -579,7 +579,7 @@
     root_widget->SynchronizeVisualProperties();
 
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           oopchild->current_frame_host()
               ->GetRenderWidgetHost()
               ->LastComputedVisualProperties();
@@ -591,7 +591,7 @@
       base::RunLoop().RunUntilIdle();
     }
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           oopdescendant->current_frame_host()
               ->GetRenderWidgetHost()
               ->LastComputedVisualProperties();
@@ -613,7 +613,7 @@
     EXPECT_TRUE(NavigateToURLFromRenderer(root->child_at(1), new_frame_url));
 
     while (true) {
-      base::Optional<blink::VisualProperties> properties =
+      absl::optional<blink::VisualProperties> properties =
           oopdescendant->current_frame_host()
               ->GetRenderWidgetHost()
               ->LastComputedVisualProperties();
diff --git a/content/browser/renderer_host/render_widget_host_view_event_handler.cc b/content/browser/renderer_host/render_widget_host_view_event_handler.cc
index f199aefe0..713c464 100644
--- a/content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ b/content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -267,7 +267,7 @@
 }
 
 bool RenderWidgetHostViewEventHandler::LockKeyboard(
-    base::Optional<base::flat_set<ui::DomCode>> codes) {
+    absl::optional<base::flat_set<ui::DomCode>> codes) {
   aura::Window* root_window = window_->GetRootWindow();
   if (!root_window)
     return false;
@@ -526,7 +526,7 @@
     mouse_wheel_phase_handler_.AddPhaseIfNeededAndScheduleEndEvent(
         mouse_wheel_event, should_route_event);
 
-    base::Optional<blink::WebGestureEvent> maybe_synthetic_fling_cancel;
+    absl::optional<blink::WebGestureEvent> maybe_synthetic_fling_cancel;
     if (mouse_wheel_event.phase == blink::WebMouseWheelEvent::kPhaseBegan) {
       maybe_synthetic_fling_cancel =
           ui::MakeWebGestureEventFlingCancel(mouse_wheel_event);
diff --git a/content/browser/renderer_host/render_widget_host_view_event_handler.h b/content/browser/renderer_host/render_widget_host_view_event_handler.h
index d9b3750..65dbc6313 100644
--- a/content/browser/renderer_host/render_widget_host_view_event_handler.h
+++ b/content/browser/renderer_host/render_widget_host_view_event_handler.h
@@ -9,11 +9,11 @@
 
 #include "base/containers/flat_set.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/input/mouse_wheel_phase_handler.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/native_web_keyboard_event.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/input/pointer_lock_result.mojom.h"
 #include "ui/aura/scoped_enable_unadjusted_mouse_events.h"
 #include "ui/aura/scoped_keyboard_hook.h"
@@ -151,7 +151,7 @@
   void UnlockMouse();
 
   // Start/Stop processing of future system keyboard events.
-  bool LockKeyboard(base::Optional<base::flat_set<ui::DomCode>> codes);
+  bool LockKeyboard(absl::optional<base::flat_set<ui::DomCode>> codes);
   void UnlockKeyboard();
   bool IsKeyboardLocked() const;
 
@@ -304,7 +304,7 @@
   // of the window when it reaches the window borders to avoid it going outside.
   // This value is used to differentiate between these synthetic mouse move
   // events vs. normal mouse move events.
-  base::Optional<gfx::Point> synthetic_move_position_;
+  absl::optional<gfx::Point> synthetic_move_position_;
 
   bool enable_consolidated_movement_;
 
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index f46b1d4..192bfc0 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -147,7 +147,7 @@
   gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() override;
   gfx::NativeViewAccessible AccessibilityGetNativeViewAccessibleForWindow()
       override;
-  base::Optional<SkColor> GetBackgroundColor() override;
+  absl::optional<SkColor> GetBackgroundColor() override;
   void OnSynchronizedDisplayPropertiesChanged(bool rotation) override;
 
   void TransformPointToRootSurface(gfx::PointF* point) override;
@@ -163,7 +163,7 @@
   // Returns true when running on a recent enough OS for unaccelerated pointer
   // events.
   static bool IsUnadjustedMouseMovementSupported();
-  bool LockKeyboard(base::Optional<base::flat_set<ui::DomCode>> codes) override;
+  bool LockKeyboard(absl::optional<base::flat_set<ui::DomCode>> codes) override;
   void UnlockKeyboard() override;
   bool IsKeyboardLocked() override;
   base::flat_map<std::string, std::string> GetKeyboardLayoutMap() override;
@@ -519,7 +519,7 @@
   // RenderWidgetHostViewBase:
   void UpdateBackgroundColor() override;
   bool HasFallbackSurface() const override;
-  base::Optional<DisplayFeature> GetDisplayFeature() override;
+  absl::optional<DisplayFeature> GetDisplayFeature() override;
   void SetDisplayFeatureForTesting(
       const DisplayFeature* display_feature) override;
 
@@ -671,7 +671,7 @@
   // Represents a feature of the physical display whose offset and mask_length
   // are expressed in DIPs relative to the view. See display_feature.h for more
   // details.
-  base::Optional<DisplayFeature> display_feature_;
+  absl::optional<DisplayFeature> display_feature_;
 
   // Factory used to safely scope delayed calls to ShutdownHost().
   base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index 9a6df39..40d14dd 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -18,7 +18,6 @@
 #include "base/mac/mac_util.h"
 #include "base/mac/scoped_cftyperef.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/time/time.h"
@@ -48,6 +47,7 @@
 #include "content/public/browser/web_contents.h"
 #include "skia/ext/platform_canvas.h"
 #include "skia/ext/skia_utils_mac.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #import "ui/base/clipboard/clipboard_util_mac.h"
 #include "ui/base/cocoa/animation_utils.h"
@@ -895,7 +895,7 @@
   RenderWidgetHostViewMac* view_mac =
       static_cast<RenderWidgetHostViewMac*>(view);
   ScopedCAActionDisabler disabler;
-  base::Optional<SkColor> color = view_mac->GetBackgroundColor();
+  absl::optional<SkColor> color = view_mac->GetBackgroundColor();
   if (color)
     SetBackgroundColor(*color);
 
@@ -1167,8 +1167,8 @@
 }
 
 bool RenderWidgetHostViewMac::LockKeyboard(
-    base::Optional<base::flat_set<ui::DomCode>> dom_codes) {
-  base::Optional<std::vector<uint32_t>> uint_dom_codes;
+    absl::optional<base::flat_set<ui::DomCode>> dom_codes) {
+  absl::optional<std::vector<uint32_t>> uint_dom_codes;
   if (dom_codes) {
     uint_dom_codes.emplace();
     for (const auto& dom_code : *dom_codes)
@@ -1362,13 +1362,13 @@
   browser_compositor_->SetBackgroundColor(color);
 }
 
-base::Optional<SkColor> RenderWidgetHostViewMac::GetBackgroundColor() {
+absl::optional<SkColor> RenderWidgetHostViewMac::GetBackgroundColor() {
   // This is used to specify a color to temporarily show while waiting for web
   // content. This should never return transparent, since that will cause bugs
   // where views are initialized as having a transparent background
   // inappropriately.
   // https://crbug.com/735407
-  base::Optional<SkColor> color =
+  absl::optional<SkColor> color =
       RenderWidgetHostViewBase::GetBackgroundColor();
   return (color && *color == SK_ColorTRANSPARENT) ? SK_ColorWHITE : color;
 }
@@ -1380,7 +1380,7 @@
   ns_view_->SetBackgroundColor(color);
 }
 
-base::Optional<DisplayFeature> RenderWidgetHostViewMac::GetDisplayFeature() {
+absl::optional<DisplayFeature> RenderWidgetHostViewMac::GetDisplayFeature() {
   return display_feature_;
 }
 
@@ -1389,7 +1389,7 @@
   if (display_feature)
     display_feature_ = *display_feature;
   else
-    display_feature_ = base::nullopt;
+    display_feature_ = absl::nullopt;
 }
 
 gfx::NativeViewAccessible
@@ -1849,7 +1849,7 @@
 
 void RenderWidgetHostViewMac::ExecuteEditCommand(const std::string& command) {
   if (host()->delegate()) {
-    host()->delegate()->ExecuteEditCommand(command, base::nullopt);
+    host()->delegate()->ExecuteEditCommand(command, absl::nullopt);
   }
 }
 
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
index 3cb67e6..7dfbb68b 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_editcommand_helper_unittest.mm
@@ -88,7 +88,7 @@
  private:
   void ExecuteEditCommand(
       const std::string& command,
-      const base::Optional<std::u16string>& value) override {
+      const absl::optional<std::u16string>& value) override {
     edit_command_message_count_++;
   }
   void Undo() override {}
diff --git a/content/browser/renderer_host/render_widget_targeter.cc b/content/browser/renderer_host/render_widget_targeter.cc
index 6dd45c4..10eb52cb 100644
--- a/content/browser/renderer_host/render_widget_targeter.cc
+++ b/content/browser/renderer_host/render_widget_targeter.cc
@@ -96,7 +96,7 @@
 RenderWidgetTargetResult::RenderWidgetTargetResult(
     RenderWidgetHostViewBase* in_view,
     bool in_should_query_view,
-    base::Optional<gfx::PointF> in_location,
+    absl::optional<gfx::PointF> in_location,
     bool in_latched_target)
     : view(in_view),
       should_query_view(in_should_query_view),
@@ -134,7 +134,7 @@
 
 void RenderWidgetTargeter::TargetingRequest::RunCallback(
     RenderWidgetHostViewBase* target,
-    base::Optional<gfx::PointF> point) {
+    absl::optional<gfx::PointF> point) {
   if (!callback.is_null()) {
     std::move(callback).Run(target ? target->GetWeakPtr() : nullptr, point);
   }
@@ -424,7 +424,7 @@
 
 void RenderWidgetTargeter::FoundTarget(
     RenderWidgetHostViewBase* target,
-    const base::Optional<gfx::PointF>& target_location,
+    const absl::optional<gfx::PointF>& target_location,
     bool latched_target,
     TargetingRequest* request) {
   DCHECK(request);
diff --git a/content/browser/renderer_host/render_widget_targeter.h b/content/browser/renderer_host/render_widget_targeter.h
index f10c18b..6280579 100644
--- a/content/browser/renderer_host/render_widget_targeter.h
+++ b/content/browser/renderer_host/render_widget_targeter.h
@@ -8,11 +8,11 @@
 #include <queue>
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "content/browser/renderer_host/render_widget_host_view_base.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/events/blink/web_input_event_traits.h"
 #include "ui/latency/latency_info.h"
 
@@ -37,13 +37,13 @@
   RenderWidgetTargetResult(const RenderWidgetTargetResult&);
   RenderWidgetTargetResult(RenderWidgetHostViewBase* view,
                            bool should_query_view,
-                           base::Optional<gfx::PointF> location,
+                           absl::optional<gfx::PointF> location,
                            bool latched_target);
   ~RenderWidgetTargetResult();
 
   RenderWidgetHostViewBase* view = nullptr;
   bool should_query_view = false;
-  base::Optional<gfx::PointF> target_location = base::nullopt;
+  absl::optional<gfx::PointF> target_location = absl::nullopt;
   // When |latched_target| is false, we explicitly hit-tested events instead of
   // using a known target.
   bool latched_target = false;
@@ -55,7 +55,7 @@
  public:
   using RenderWidgetHostAtPointCallback =
       base::OnceCallback<void(base::WeakPtr<RenderWidgetHostViewBase>,
-                              base::Optional<gfx::PointF>)>;
+                              absl::optional<gfx::PointF>)>;
 
   class Delegate {
    public:
@@ -75,7 +75,7 @@
         RenderWidgetHostViewBase* target,
         blink::WebInputEvent* event,
         const ui::LatencyInfo& latency,
-        const base::Optional<gfx::PointF>& target_location) = 0;
+        const absl::optional<gfx::PointF>& target_location) = 0;
 
     virtual void SetEventsBeingFlushed(bool events_being_flushed) = 0;
 
@@ -145,7 +145,7 @@
     ~TargetingRequest();
 
     void RunCallback(RenderWidgetHostViewBase* target,
-                     base::Optional<gfx::PointF> point);
+                     absl::optional<gfx::PointF> point);
 
     bool MergeEventIfPossible(const blink::WebInputEvent& event);
     bool IsWebInputEventRequest() const;
@@ -205,7 +205,7 @@
   // false, we explicitly did hit-testing for this event, instead of using a
   // known target.
   void FoundTarget(RenderWidgetHostViewBase* target,
-                   const base::Optional<gfx::PointF>& target_location,
+                   const absl::optional<gfx::PointF>& target_location,
                    bool latched_target,
                    TargetingRequest* request);
 
@@ -228,7 +228,7 @@
     return async_hit_test_timeout_delay_;
   }
 
-  base::Optional<TargetingRequest> request_in_flight_;
+  absl::optional<TargetingRequest> request_in_flight_;
   uint32_t last_request_id_ = 0;
   std::queue<TargetingRequest> requests_;
 
diff --git a/content/browser/renderer_host/text_input_client_mac_unittest.mm b/content/browser/renderer_host/text_input_client_mac_unittest.mm
index bd3e92b..6fb1e1c 100644
--- a/content/browser/renderer_host/text_input_client_mac_unittest.mm
+++ b/content/browser/renderer_host/text_input_client_mac_unittest.mm
@@ -8,7 +8,6 @@
 #include <stdint.h>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread.h"
@@ -22,6 +21,7 @@
 #include "content/public/test/test_renderer_host.h"
 #include "ipc/ipc_test_sink.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/renderer_host/text_input_manager.cc b/content/browser/renderer_host/text_input_manager.cc
index 6bb0e3c..707d5d7 100644
--- a/content/browser/renderer_host/text_input_manager.cc
+++ b/content/browser/renderer_host/text_input_manager.cc
@@ -88,10 +88,10 @@
   return gfx::Range();
 }
 
-base::Optional<ui::GrammarFragment> TextInputManager::GetGrammarFragment(
+absl::optional<ui::GrammarFragment> TextInputManager::GetGrammarFragment(
     gfx::Range range) const {
   if (!active_view_)
-    return base::nullopt;
+    return absl::nullopt;
 
   for (const auto& ime_text_span_info :
        text_input_state_map_.at(active_view_)->ime_text_spans_info) {
@@ -106,7 +106,7 @@
       }
     }
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 const TextInputManager::SelectionRegion* TextInputManager::GetSelectionRegion(
diff --git a/content/browser/renderer_host/text_input_manager.h b/content/browser/renderer_host/text_input_manager.h
index f7c12ec..f1cc556 100644
--- a/content/browser/renderer_host/text_input_manager.h
+++ b/content/browser/renderer_host/text_input_manager.h
@@ -159,7 +159,7 @@
 
   // Returns the grammar fragment which contains |range|. If non-existent,
   // returns an empty Fragment.
-  base::Optional<ui::GrammarFragment> GetGrammarFragment(
+  absl::optional<ui::GrammarFragment> GetGrammarFragment(
       gfx::Range range) const;
 
   // Returns the selection bounds information for |view|. If |view| == nullptr,
diff --git a/content/browser/sandbox_parameters_mac.mm b/content/browser/sandbox_parameters_mac.mm
index a5110a3..b9e6d18a 100644
--- a/content/browser/sandbox_parameters_mac.mm
+++ b/content/browser/sandbox_parameters_mac.mm
@@ -15,7 +15,6 @@
 #include "base/mac/mac_util.h"
 #include "base/no_destructor.h"
 #include "base/numerics/checked_math.h"
-#include "base/optional.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/sys_string_conversions.h"
@@ -31,6 +30,7 @@
 #include "sandbox/policy/mac/sandbox_mac.h"
 #include "sandbox/policy/sandbox_type.h"
 #include "sandbox/policy/switches.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if BUILDFLAG(ENABLE_PLUGINS)
 #include "content/public/common/pepper_plugin_info.h"
@@ -40,9 +40,9 @@
 
 namespace {
 
-base::Optional<base::FilePath>& GetNetworkTestCertsDirectory() {
+absl::optional<base::FilePath>& GetNetworkTestCertsDirectory() {
   // Set by SetNetworkTestCertsDirectoryForTesting().
-  static base::NoDestructor<base::Optional<base::FilePath>>
+  static base::NoDestructor<absl::optional<base::FilePath>>
       network_test_certs_dir;
   return *network_test_certs_dir;
 }
diff --git a/content/browser/scheduler/responsiveness/jank_monitor_impl.cc b/content/browser/scheduler/responsiveness/jank_monitor_impl.cc
index 5a202a6..aaee26a 100644
--- a/content/browser/scheduler/responsiveness/jank_monitor_impl.cc
+++ b/content/browser/scheduler/responsiveness/jank_monitor_impl.cc
@@ -293,7 +293,7 @@
 
 JankMonitorImpl::ThreadExecutionState::~ThreadExecutionState() = default;
 
-base::Optional<const void*>
+absl::optional<const void*>
 JankMonitorImpl::ThreadExecutionState::CheckJankiness() {
   DCHECK_CALLED_ON_VALID_SEQUENCE(monitor_sequence_checker_);
 
@@ -306,7 +306,7 @@
              (now - task_execution_metadata_.back().execution_start_time) <
                  jank_threshold)) {
     // Most tasks are unlikely to be janky.
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   // Mark that the target thread is janky and notify the monitor thread.
diff --git a/content/browser/scheduler/responsiveness/jank_monitor_impl.h b/content/browser/scheduler/responsiveness/jank_monitor_impl.h
index a7b790d..0dc461a 100644
--- a/content/browser/scheduler/responsiveness/jank_monitor_impl.h
+++ b/content/browser/scheduler/responsiveness/jank_monitor_impl.h
@@ -9,7 +9,6 @@
 
 #include "base/gtest_prod_util.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/synchronization/lock.h"
 #include "base/task/post_task.h"
@@ -18,6 +17,7 @@
 #include "base/timer/timer.h"
 #include "content/browser/scheduler/responsiveness/metric_source.h"
 #include "content/public/browser/jank_monitor.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 namespace responsiveness {
@@ -71,8 +71,8 @@
     void DidRunTaskOrEvent(const void* opaque_identifier);
 
     // Checks the jankiness of the target thread. Returns the opaque identifier
-    // of the janky task or base::nullopt if the current task is not janky.
-    base::Optional<const void*> CheckJankiness();
+    // of the janky task or absl::nullopt if the current task is not janky.
+    absl::optional<const void*> CheckJankiness();
     void AssertOnTargetThread();
 
    private:
diff --git a/content/browser/screen_orientation/screen_orientation_provider.h b/content/browser/screen_orientation/screen_orientation_provider.h
index c0ec6c5c..3999176 100644
--- a/content/browser/screen_orientation/screen_orientation_provider.h
+++ b/content/browser/screen_orientation/screen_orientation_provider.h
@@ -8,12 +8,12 @@
 #include "base/callback.h"
 #include "base/compiler_specific.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_receiver_set.h"
 #include "services/device/public/mojom/screen_orientation.mojom.h"
 #include "services/device/public/mojom/screen_orientation_lock_types.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -72,7 +72,7 @@
 
   // Lock that require orientation changes are not completed until
   // OnOrientationChange.
-  base::Optional<device::mojom::ScreenOrientationLockType>
+  absl::optional<device::mojom::ScreenOrientationLockType>
       pending_lock_orientation_;
 
   LockOrientationCallback pending_callback_;
diff --git a/content/browser/screen_orientation/screen_orientation_provider_unittest.cc b/content/browser/screen_orientation/screen_orientation_provider_unittest.cc
index 7b8d968..95282b3 100644
--- a/content/browser/screen_orientation/screen_orientation_provider_unittest.cc
+++ b/content/browser/screen_orientation/screen_orientation_provider_unittest.cc
@@ -6,12 +6,12 @@
 
 #include "base/bind.h"
 #include "base/callback_helpers.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "content/public/browser/screen_orientation_delegate.h"
 #include "content/public/browser/web_contents_delegate.h"
 #include "content/test/test_render_view_host.h"
 #include "content/test/test_web_contents.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
 
 namespace content {
@@ -81,7 +81,7 @@
   DISALLOW_COPY_AND_ASSIGN(FakeWebContentsDelegate);
 };
 
-void LockResultCallback(base::Optional<ScreenOrientationLockResult>* out_result,
+void LockResultCallback(absl::optional<ScreenOrientationLockResult>* out_result,
                         ScreenOrientationLockResult result) {
   *out_result = result;
 }
@@ -101,7 +101,7 @@
   // Helpers for testing ScreenOrientationProvider methods.
   void CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType orientation,
-      base::Optional<ScreenOrientationLockResult>* out_result) {
+      absl::optional<ScreenOrientationLockResult>* out_result) {
     contents()->GetScreenOrientationProviderForTesting()->LockOrientation(
         orientation, base::BindOnce(&LockResultCallback, out_result));
 
@@ -119,7 +119,7 @@
 // Lock operation is not available.
 TEST_F(ScreenOrientationProviderTest, DelegateNotAvailableLockOnce) {
   // No ScreenOrientationDelegate.
-  base::Optional<ScreenOrientationLockResult> result_1;
+  absl::optional<ScreenOrientationLockResult> result_1;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_1);
   EXPECT_EQ(ScreenOrientationLockResult::
@@ -128,7 +128,7 @@
 
   // ScreenOrientationDelegate not supported.
   FakeScreenOrientationDelegate delegate(false, false);
-  base::Optional<ScreenOrientationLockResult> result_2;
+  absl::optional<ScreenOrientationLockResult> result_2;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_2);
   EXPECT_EQ(ScreenOrientationLockResult::
@@ -146,7 +146,7 @@
   controller().LoadURL(url, Referrer(), ui::PAGE_TRANSITION_TYPED,
                        std::string());
 
-  base::Optional<ScreenOrientationLockResult> result_1;
+  absl::optional<ScreenOrientationLockResult> result_1;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_1);
   // Lock request is pending.
@@ -167,7 +167,7 @@
 
   // Current web contents is not in full screen.
   ASSERT_FALSE(contents()->IsFullscreen());
-  base::Optional<ScreenOrientationLockResult> result_1;
+  absl::optional<ScreenOrientationLockResult> result_1;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_1);
   EXPECT_EQ(ScreenOrientationLockResult::
@@ -182,7 +182,7 @@
                                    base::DoNothing());
   ASSERT_TRUE(contents()->IsFullscreen());
 
-  base::Optional<ScreenOrientationLockResult> result_2;
+  absl::optional<ScreenOrientationLockResult> result_2;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_2);
   // Lock request is pending.
@@ -200,7 +200,7 @@
   controller().LoadURL(url, Referrer(), ui::PAGE_TRANSITION_TYPED,
                        std::string());
 
-  base::Optional<ScreenOrientationLockResult> result_1;
+  absl::optional<ScreenOrientationLockResult> result_1;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_1);
   // The lock request will be pending.
@@ -227,7 +227,7 @@
   controller().LoadURL(url, Referrer(), ui::PAGE_TRANSITION_TYPED,
                        std::string());
 
-  base::Optional<ScreenOrientationLockResult> result_1;
+  absl::optional<ScreenOrientationLockResult> result_1;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_1);
   // The lock request will be pending.
@@ -236,7 +236,7 @@
   EXPECT_EQ(1, delegate.lock_count());
   EXPECT_EQ(0, delegate.unlock_count());
 
-  base::Optional<ScreenOrientationLockResult> result_2;
+  absl::optional<ScreenOrientationLockResult> result_2;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result_2);
   // The pending lock request is cancelled.
@@ -282,7 +282,7 @@
                                    base::DoNothing());
   ASSERT_TRUE(contents()->IsFullscreen());
 
-  base::Optional<ScreenOrientationLockResult> result;
+  absl::optional<ScreenOrientationLockResult> result;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result);
   // The lock request will be pending.
@@ -313,7 +313,7 @@
   controller().LoadURL(url, Referrer(), ui::PAGE_TRANSITION_TYPED,
                        std::string());
 
-  base::Optional<ScreenOrientationLockResult> result;
+  absl::optional<ScreenOrientationLockResult> result;
   CallLockAndGetResult(
       device::mojom::ScreenOrientationLockType::LANDSCAPE_SECONDARY, &result);
   // The lock request will be pending.
diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc
index 75b6bc2f..d2a187e5 100644
--- a/content/browser/security_exploit_browsertest.cc
+++ b/content/browser/security_exploit_browsertest.cc
@@ -10,7 +10,6 @@
 #include "base/files/file_util.h"
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_feature_list.h"
@@ -81,6 +80,7 @@
 #include "storage/browser/blob/blob_registry_impl.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/blob/blob_utils.h"
 #include "third_party/blink/public/common/navigation/navigation_policy.h"
 #include "third_party/blink/public/mojom/appcache/appcache.mojom.h"
@@ -149,7 +149,7 @@
       url::Origin::Create(foo), nullptr, std::string(), Referrer(),
       WindowOpenDisposition::CURRENT_TAB, false, true,
       blink::mojom::TriggeringEventInfo::kFromTrustedEvent, std::string(),
-      nullptr /* blob_url_loader_factory */, base::nullopt /* impression */);
+      nullptr /* blob_url_loader_factory */, absl::nullopt /* impression */);
 
   // Since the navigation above requires a cross-process swap, there will be a
   // speculative/pending RenderFrameHost. Ensure it exists and is in a different
@@ -816,7 +816,7 @@
   }
 
   void RouteMessageEvent(
-      const base::Optional<blink::LocalFrameToken>& source_frame_token,
+      const absl::optional<blink::LocalFrameToken>& source_frame_token,
       const std::u16string& source_origin,
       const std::u16string& target_origin,
       blink::TransferableMessage message) override {
@@ -946,7 +946,7 @@
  public:
   BeginNavigationInitiatorReplacer(
       WebContents* web_contents,
-      base::Optional<url::Origin> initiator_to_inject)
+      absl::optional<url::Origin> initiator_to_inject)
       : FrameHostInterceptor(web_contents),
         initiator_to_inject_(initiator_to_inject) {}
 
@@ -968,7 +968,7 @@
   void Activate() { is_activated_ = true; }
 
  private:
-  base::Optional<url::Origin> initiator_to_inject_;
+  absl::optional<url::Origin> initiator_to_inject_;
   bool is_activated_ = false;
 
   DISALLOW_COPY_AND_ASSIGN(BeginNavigationInitiatorReplacer);
@@ -1011,7 +1011,7 @@
   // Prepare to intercept BeginNavigation mojo IPC.  This has to be done before
   // the test creates the RenderFrameHostImpl that is the target of the IPC.
   WebContents* web_contents = shell()->web_contents();
-  BeginNavigationInitiatorReplacer injector(web_contents, base::nullopt);
+  BeginNavigationInitiatorReplacer injector(web_contents, absl::nullopt);
 
   // Navigate to a test page.
   GURL main_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
@@ -1334,7 +1334,7 @@
           base::TimeTicks() /* input_start */);
   mojom::BeginNavigationParamsPtr begin_params =
       mojom::BeginNavigationParams::New(
-          base::nullopt /* initiator_frame_token */,
+          absl::nullopt /* initiator_frame_token */,
           std::string() /* headers */, net::LOAD_NORMAL,
           false /* skip_service_worker */,
           blink::mojom::RequestContextType::LOCATION,
@@ -1345,11 +1345,11 @@
           GURL() /* searchable_form_url */,
           std::string() /* searchable_form_encoding */,
           GURL() /* client_side_redirect_url */,
-          base::nullopt /* devtools_initiator_info */,
-          nullptr /* trust_token_params */, base::nullopt /* impression */,
+          absl::nullopt /* devtools_initiator_info */,
+          nullptr /* trust_token_params */, absl::nullopt /* impression */,
           base::TimeTicks() /* renderer_before_unload_start */,
           base::TimeTicks() /* renderer_before_unload_end */,
-          base::nullopt /* web_bundle_token */);
+          absl::nullopt /* web_bundle_token */);
 
   // Receiving the invalid IPC message should lead to renderer process
   // termination.
diff --git a/content/browser/service_process_host_browsertest.cc b/content/browser/service_process_host_browsertest.cc
index 05e745e2..a6fa2c5 100644
--- a/content/browser/service_process_host_browsertest.cc
+++ b/content/browser/service_process_host_browsertest.cc
@@ -6,7 +6,6 @@
 
 #include "base/memory/shared_memory_mapping.h"
 #include "base/memory/unsafe_shared_memory_region.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "base/test/bind.h"
@@ -17,6 +16,7 @@
 #include "content/public/test/content_browser_test.h"
 #include "services/test/echo/public/mojom/echo.mojom.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/service_process_host_impl.cc b/content/browser/service_process_host_impl.cc
index f459422..0e4df44f 100644
--- a/content/browser/service_process_host_impl.cc
+++ b/content/browser/service_process_host_impl.cc
@@ -189,7 +189,7 @@
 
  private:
   const std::string service_interface_name_;
-  base::Optional<ServiceProcessInfo> process_info_;
+  absl::optional<ServiceProcessInfo> process_info_;
 
   DISALLOW_COPY_AND_ASSIGN(UtilityProcessClient);
 };
@@ -260,7 +260,7 @@
       service_name, std::move(service_pipe),
       base::BindOnce(
           [](base::OnceCallback<void(base::ProcessId)> callback,
-             const base::Optional<base::ProcessId> pid) {
+             const absl::optional<base::ProcessId> pid) {
             std::move(callback).Run(pid.value_or(base::kNullProcessId));
           },
           std::move(callback)));
diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
index 4a1b904..4cb5e4c 100644
--- a/content/browser/service_worker/embedded_worker_instance.cc
+++ b/content/browser/service_worker/embedded_worker_instance.cc
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/metrics/histogram_macros.h"
 #include "base/no_destructor.h"
-#include "base/optional.h"
 #include "base/trace_event/trace_event.h"
 #include "content/browser/bad_message.h"
 #include "content/browser/data_url_loader_factory.h"
@@ -47,6 +46,7 @@
 #include "net/base/network_isolation_key.h"
 #include "net/cookies/site_for_cookies.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/loader/url_loader_factory_bundle.mojom.h"
 #include "third_party/blink/public/mojom/renderer_preference_watcher.mojom.h"
@@ -762,7 +762,7 @@
     RenderProcessHost* rph,
     int routing_id,
     const url::Origin& origin,
-    const base::Optional<network::CrossOriginEmbedderPolicy>&
+    const absl::optional<network::CrossOriginEmbedderPolicy>&
         cross_origin_embedder_policy,
     mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
         coep_reporter,
@@ -795,7 +795,7 @@
   // See if the default factory needs to be tweaked by the embedder.
   GetContentClient()->browser()->WillCreateURLLoaderFactory(
       rph->GetBrowserContext(), nullptr /* frame_host */, rph->GetID(),
-      factory_type, origin, base::nullopt /* navigation_id */,
+      factory_type, origin, absl::nullopt /* navigation_id */,
       ukm::kInvalidSourceIdObj, &default_factory_receiver,
       &factory_params->header_client, &bypass_redirect_checks,
       nullptr /* disable_secure_dns */, &factory_params->factory_override);
@@ -1010,7 +1010,7 @@
   status_ = EmbeddedWorkerStatus::STOPPED;
   starting_phase_ = NOT_STARTING;
   thread_id_ = ServiceWorkerConsts::kInvalidEmbeddedWorkerThreadId;
-  token_ = base::nullopt;
+  token_ = absl::nullopt;
 }
 
 void EmbeddedWorkerInstance::OnSetupFailed(
diff --git a/content/browser/service_worker/embedded_worker_instance.h b/content/browser/service_worker/embedded_worker_instance.h
index c5badf84..1837ff9 100644
--- a/content/browser/service_worker/embedded_worker_instance.h
+++ b/content/browser/service_worker/embedded_worker_instance.h
@@ -17,7 +17,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/threading/sequence_bound.h"
 #include "base/unguessable_token.h"
 #include "content/browser/service_worker/embedded_worker_status.h"
@@ -29,6 +28,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/bindings/self_owned_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h"
@@ -235,7 +235,7 @@
       RenderProcessHost* rph,
       int routing_id,
       const url::Origin& origin,
-      const base::Optional<network::CrossOriginEmbedderPolicy>&
+      const absl::optional<network::CrossOriginEmbedderPolicy>&
           cross_origin_embedder_policy,
       mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
           coep_reporter,
@@ -256,8 +256,8 @@
 
   // Returns the unique token that has been generated to identify this worker
   // instance, and its corresponding GlobalScope in the renderer process. If the
-  // service worker is not currently running, this is base::nullopt.
-  const base::Optional<blink::ServiceWorkerToken>& token() const {
+  // service worker is not currently running, this is absl::nullopt.
+  const absl::optional<blink::ServiceWorkerToken>& token() const {
     return token_;
   }
 
@@ -399,7 +399,7 @@
   // the browser process, but not persistent across service worker restarts.
   // This token is set every time the worker starts, and is plumbed through to
   // the corresponding ServiceWorkerGlobalScope in the renderer process.
-  base::Optional<blink::ServiceWorkerToken> token_;
+  absl::optional<blink::ServiceWorkerToken> token_;
 
   base::WeakPtrFactory<EmbeddedWorkerInstance> weak_factory_{this};
 
diff --git a/content/browser/service_worker/embedded_worker_instance_unittest.cc b/content/browser/service_worker/embedded_worker_instance_unittest.cc
index 9169024..4aee24f 100644
--- a/content/browser/service_worker/embedded_worker_instance_unittest.cc
+++ b/content/browser/service_worker/embedded_worker_instance_unittest.cc
@@ -43,10 +43,10 @@
 namespace {
 
 EmbeddedWorkerInstance::StatusCallback ReceiveStatus(
-    base::Optional<blink::ServiceWorkerStatusCode>* out_status,
+    absl::optional<blink::ServiceWorkerStatusCode>* out_status,
     base::OnceClosure quit) {
   return base::BindOnce(
-      [](base::Optional<blink::ServiceWorkerStatusCode>* out_status,
+      [](absl::optional<blink::ServiceWorkerStatusCode>* out_status,
          base::OnceClosure quit, blink::ServiceWorkerStatusCode status) {
         *out_status = status;
         std::move(quit).Run();
@@ -74,14 +74,14 @@
 
   struct EventLog {
     EventType type;
-    base::Optional<EmbeddedWorkerStatus> status;
-    base::Optional<blink::mojom::ServiceWorkerStartStatus> start_status;
+    absl::optional<EmbeddedWorkerStatus> status;
+    absl::optional<blink::mojom::ServiceWorkerStartStatus> start_status;
   };
 
   void RecordEvent(EventType type,
-                   base::Optional<EmbeddedWorkerStatus> status = base::nullopt,
-                   base::Optional<blink::mojom::ServiceWorkerStartStatus>
-                       start_status = base::nullopt) {
+                   absl::optional<EmbeddedWorkerStatus> status = absl::nullopt,
+                   absl::optional<blink::mojom::ServiceWorkerStartStatus>
+                       start_status = absl::nullopt) {
     EventLog log = {type, status, start_status};
     events_.push_back(log);
   }
@@ -93,7 +93,7 @@
   void OnStarted(blink::mojom::ServiceWorkerStartStatus status,
                  bool has_fetch_handler) override {
     has_fetch_handler_ = has_fetch_handler;
-    RecordEvent(STARTED, base::nullopt, status);
+    RecordEvent(STARTED, absl::nullopt, status);
   }
   void OnStopped(EmbeddedWorkerStatus old_status) override {
     RecordEvent(STOPPED, old_status);
@@ -132,7 +132,7 @@
   void StartWorkerUntilStartSent(
       EmbeddedWorkerInstance* worker,
       blink::mojom::EmbeddedWorkerStartParamsPtr params) {
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop loop;
     worker->Start(std::move(params),
                   ReceiveStatus(&status, loop.QuitClosure()));
@@ -437,7 +437,7 @@
 
   // Attempt to start the worker. From the browser process's point of view, the
   // start IPC was sent.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop loop;
   worker->Start(CreateStartParams(pair.second),
                 ReceiveStatus(&status, loop.QuitClosure()));
@@ -465,7 +465,7 @@
   worker->AddObserver(this);
 
   // Attempt to start the worker.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop loop;
   auto* client = helper_->AddNewPendingInstanceClient<
       DelayedFakeEmbeddedWorkerInstanceClient>(helper_.get());
diff --git a/content/browser/service_worker/fake_service_worker.cc b/content/browser/service_worker/fake_service_worker.cc
index 4e4ede30..7bba20a 100644
--- a/content/browser/service_worker/fake_service_worker.cc
+++ b/content/browser/service_worker/fake_service_worker.cc
@@ -139,7 +139,7 @@
     const std::string& notification_id,
     const blink::PlatformNotificationData& notification_data,
     int action_index,
-    const base::Optional<std::u16string>& reply,
+    const absl::optional<std::u16string>& reply,
     DispatchNotificationClickEventCallback callback) {
   std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
@@ -152,7 +152,7 @@
 }
 
 void FakeServiceWorker::DispatchPushEvent(
-    const base::Optional<std::string>& payload,
+    const absl::optional<std::string>& payload,
     DispatchPushEventCallback callback) {
   std::move(callback).Run(blink::mojom::ServiceWorkerEventStatus::COMPLETED);
 }
diff --git a/content/browser/service_worker/fake_service_worker.h b/content/browser/service_worker/fake_service_worker.h
index c63ded7a..3fd464c5 100644
--- a/content/browser/service_worker/fake_service_worker.h
+++ b/content/browser/service_worker/fake_service_worker.h
@@ -40,7 +40,7 @@
   // Returns after InitializeGlobalScope() is called.
   void RunUntilInitializeGlobalScope();
 
-  const base::Optional<base::TimeDelta>& idle_delay() const {
+  const absl::optional<base::TimeDelta>& idle_delay() const {
     return idle_delay_;
   }
 
@@ -89,13 +89,13 @@
       const std::string& notification_id,
       const blink::PlatformNotificationData& notification_data,
       int action_index,
-      const base::Optional<std::u16string>& reply,
+      const absl::optional<std::u16string>& reply,
       DispatchNotificationClickEventCallback callback) override;
   void DispatchNotificationCloseEvent(
       const std::string& notification_id,
       const blink::PlatformNotificationData& notification_data,
       DispatchNotificationCloseEventCallback callback) override;
-  void DispatchPushEvent(const base::Optional<std::string>& payload,
+  void DispatchPushEvent(const absl::optional<std::string>& payload,
                          DispatchPushEventCallback callback) override;
   void DispatchPushSubscriptionChangeEvent(
       blink::mojom::PushSubscriptionPtr old_subscription,
@@ -151,8 +151,8 @@
 
   mojo::Receiver<blink::mojom::ServiceWorker> receiver_{this};
 
-  // base::nullopt means SetIdleDelay() is not called.
-  base::Optional<base::TimeDelta> idle_delay_;
+  // absl::nullopt means SetIdleDelay() is not called.
+  absl::optional<base::TimeDelta> idle_delay_;
 };
 
 }  // namespace content
diff --git a/content/browser/service_worker/service_worker_browsertest.cc b/content/browser/service_worker/service_worker_browsertest.cc
index 4ed67de8..380bb048 100644
--- a/content/browser/service_worker/service_worker_browsertest.cc
+++ b/content/browser/service_worker/service_worker_browsertest.cc
@@ -2183,7 +2183,7 @@
     blob_handle->get()->ReadSideData(base::BindOnce(
         [](scoped_refptr<storage::BlobHandle> blob_handle, int* result,
            base::OnceClosure continuation,
-           const base::Optional<mojo_base::BigBuffer> data) {
+           const absl::optional<mojo_base::BigBuffer> data) {
           *result = data ? data->size() : 0;
           std::move(continuation).Run();
         },
@@ -2191,7 +2191,7 @@
   }
 
   mojo::Remote<blink::mojom::CacheStorage> cache_storage_;
-  base::Optional<mojo::AssociatedRemote<blink::mojom::CacheStorageCache>>
+  absl::optional<mojo::AssociatedRemote<blink::mojom::CacheStorageCache>>
       cache_storage_cache_;
   const std::string cache_name_;
   const GURL url_;
diff --git a/content/browser/service_worker/service_worker_cache_writer.cc b/content/browser/service_worker/service_worker_cache_writer.cc
index 10dfd44..7b0e90c 100644
--- a/content/browser/service_worker/service_worker_cache_writer.cc
+++ b/content/browser/service_worker/service_worker_cache_writer.cc
@@ -67,7 +67,7 @@
 
   void DidReadResponseHead(int result,
                            network::mojom::URLResponseHeadPtr response_head,
-                           base::Optional<mojo_base::BigBuffer>) {
+                           absl::optional<mojo_base::BigBuffer>) {
     result_ = result;
     if (!owner_)
       return;
diff --git a/content/browser/service_worker/service_worker_client_utils.cc b/content/browser/service_worker/service_worker_client_utils.cc
index 2394313..1ceb5a15 100644
--- a/content/browser/service_worker/service_worker_client_utils.cc
+++ b/content/browser/service_worker/service_worker_client_utils.cc
@@ -13,7 +13,6 @@
 #include "base/callback_helpers.h"
 #include "base/location.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/single_thread_task_runner.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "components/services/storage/public/cpp/storage_key.h"
@@ -40,6 +39,7 @@
 #include "content/public/common/child_process_host.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/page_visibility_state.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/loader/request_context_frame_type.mojom.h"
 #include "ui/base/window_open_disposition.h"
 #include "url/gurl.h"
@@ -311,7 +311,7 @@
       false /* should_replace_current_entry */, false /* user_gesture */,
       blink::mojom::TriggeringEventInfo::kUnknown,
       std::string() /* href_translate */, nullptr /* blob_url_loader_factory */,
-      base::nullopt);
+      absl::nullopt);
   new OpenURLObserver(web_contents, frame_tree_node_id, std::move(callback));
 }
 
diff --git a/content/browser/service_worker/service_worker_clients_api_browsertest.cc b/content/browser/service_worker/service_worker_clients_api_browsertest.cc
index 809aa38a9..26915db 100644
--- a/content/browser/service_worker/service_worker_clients_api_browsertest.cc
+++ b/content/browser/service_worker/service_worker_clients_api_browsertest.cc
@@ -9,7 +9,6 @@
 #include "base/callback_helpers.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/task/post_task.h"
 #include "base/task/task_traits.h"
@@ -34,6 +33,7 @@
 #include "content/shell/browser/shell_content_browser_client.h"
 #include "content/test/test_content_browser_client.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom.h"
 #include "url/gurl.h"
 
diff --git a/content/browser/service_worker/service_worker_container_host.cc b/content/browser/service_worker/service_worker_container_host.cc
index 5edde3d..0c724ca1 100644
--- a/content/browser/service_worker/service_worker_container_host.cc
+++ b/content/browser/service_worker/service_worker_container_host.cc
@@ -260,7 +260,7 @@
   if (!CanServeContainerHostMethods(
           &callback, url_, GURL(),
           ServiceWorkerConsts::kServiceWorkerGetRegistrationsErrorPrefix,
-          base::nullopt)) {
+          absl::nullopt)) {
     return;
   }
 
@@ -270,7 +270,7 @@
     // ReportBadMessage() will kill the renderer process, but Mojo complains if
     // the callback is not run. Just run it with nonsense arguments.
     std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kUnknown,
-                            std::string(), base::nullopt);
+                            std::string(), absl::nullopt);
     return;
   }
 
@@ -551,7 +551,7 @@
   // is no controller, at least, until we can fix the extension bug.
   if (controller_ && fetch_request_window_id_) {
     controller_info->fetch_request_window_id =
-        base::make_optional(fetch_request_window_id_);
+        absl::make_optional(fetch_request_window_id_);
   }
 
   if (!controller_) {
@@ -709,12 +709,12 @@
 
 bool ServiceWorkerContainerHost::IsContainerForServiceWorker() const {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  return client_info_ == base::nullopt;
+  return client_info_ == absl::nullopt;
 }
 
 bool ServiceWorkerContainerHost::IsContainerForClient() const {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
-  return client_info_ != base::nullopt;
+  return client_info_ != absl::nullopt;
 }
 
 blink::mojom::ServiceWorkerClientType
@@ -836,7 +836,7 @@
 void ServiceWorkerContainerHost::UpdateUrls(
     const GURL& url,
     const net::SiteForCookies& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
   GURL previous_url = url_;
 
@@ -1387,7 +1387,7 @@
   DCHECK(registration);
 
   std::move(callback).Run(
-      blink::mojom::ServiceWorkerErrorType::kNone, base::nullopt,
+      blink::mojom::ServiceWorkerErrorType::kNone, absl::nullopt,
       CreateServiceWorkerRegistrationObjectInfo(
           scoped_refptr<ServiceWorkerRegistration>(registration)));
 }
@@ -1437,7 +1437,7 @@
   }
 
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt, std::move(info));
+                          absl::nullopt, std::move(info));
 }
 
 void ServiceWorkerContainerHost::GetRegistrationsComplete(
@@ -1458,7 +1458,7 @@
         std::string(
             ServiceWorkerConsts::kServiceWorkerGetRegistrationsErrorPrefix) +
             std::string(ServiceWorkerConsts::kShutdownErrorMessage),
-        base::nullopt);
+        absl::nullopt);
     return;
   }
 
@@ -1471,7 +1471,7 @@
         error_type,
         ServiceWorkerConsts::kServiceWorkerGetRegistrationsErrorPrefix +
             error_message,
-        base::nullopt);
+        absl::nullopt);
     return;
   }
 
@@ -1496,7 +1496,7 @@
       });
 
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt, std::move(object_infos));
+                          absl::nullopt, std::move(object_infos));
 }
 
 bool ServiceWorkerContainerHost::IsValidGetRegistrationMessage(
diff --git a/content/browser/service_worker/service_worker_container_host.h b/content/browser/service_worker/service_worker_container_host.h
index 1faae9a9..1d68143 100644
--- a/content/browser/service_worker/service_worker_container_host.h
+++ b/content/browser/service_worker/service_worker_container_host.h
@@ -12,7 +12,6 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/renderer_host/back_forward_cache_metrics.h"
 #include "content/browser/service_worker/service_worker_registration.h"
@@ -24,6 +23,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "net/cookies/site_for_cookies.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_client.mojom.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_container.mojom.h"
@@ -288,7 +288,7 @@
   // worker clients, updates the client uuid if it's a cross-origin transition.
   void UpdateUrls(const GURL& url,
                   const net::SiteForCookies& site_for_cookies,
-                  const base::Optional<url::Origin>& top_frame_origin);
+                  const absl::optional<url::Origin>& top_frame_origin);
 
   // For service worker clients. Makes this client be controlled by
   // |registration|'s active worker, or makes this client be not
@@ -368,7 +368,7 @@
   // For shared worker it is the origin of the document that created the worker.
   // For dedicated worker it is the top-frame origin of the document that owns
   // the worker.
-  base::Optional<url::Origin> top_frame_origin() const {
+  absl::optional<url::Origin> top_frame_origin() const {
     return top_frame_origin_;
   }
 
@@ -576,7 +576,7 @@
   // See comments for the getter functions.
   GURL url_;
   net::SiteForCookies site_for_cookies_;
-  base::Optional<url::Origin> top_frame_origin_;
+  absl::optional<url::Origin> top_frame_origin_;
 
   // Contains all ServiceWorkerRegistrationObjectHost instances corresponding to
   // the service worker registration JavaScript objects for the hosted execution
@@ -671,7 +671,7 @@
   mojo::AssociatedRemote<blink::mojom::ServiceWorkerContainer> container_;
 
   // The type of client.
-  const base::Optional<ServiceWorkerClientInfo> client_info_;
+  const absl::optional<ServiceWorkerClientInfo> client_info_;
 
   // The source id of the client's ExecutionContext, set on response commit.
   ukm::SourceId ukm_source_id_ = ukm::kInvalidSourceId;
@@ -697,7 +697,7 @@
   int frame_id_ = MSG_ROUTING_NONE;
 
   // The embedder policy of the client. Set on response commit.
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
       cross_origin_embedder_policy_;
 
   // An endpoint connected to the COEP reporter. A clone of this connection is
diff --git a/content/browser/service_worker/service_worker_container_host_unittest.cc b/content/browser/service_worker/service_worker_container_host_unittest.cc
index de336cc..81dcca39 100644
--- a/content/browser/service_worker/service_worker_container_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_container_host_unittest.cc
@@ -66,7 +66,7 @@
     AllowServiceWorkerCallLog(
         const GURL& scope,
         const GURL& site_for_cookies,
-        const base::Optional<url::Origin>& top_frame_origin,
+        const absl::optional<url::Origin>& top_frame_origin,
         const GURL& script_url)
         : scope(scope),
           site_for_cookies(site_for_cookies),
@@ -74,7 +74,7 @@
           script_url(script_url) {}
     const GURL scope;
     const GURL site_for_cookies;
-    const base::Optional<url::Origin> top_frame_origin;
+    const absl::optional<url::Origin> top_frame_origin;
     const GURL script_url;
   };
 
@@ -83,7 +83,7 @@
   AllowServiceWorkerResult AllowServiceWorker(
       const GURL& scope,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       const GURL& script_url,
       content::BrowserContext* context) override {
     logs_.emplace_back(scope, site_for_cookies, top_frame_origin, script_url);
@@ -157,7 +157,7 @@
   PrepareServiceWorkerContainerHostWithSiteForCookies(
       const GURL& document_url,
       const net::SiteForCookies& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin) {
+      const absl::optional<url::Origin>& top_frame_origin) {
     ServiceWorkerRemoteContainerEndpoint remote_endpoint;
     CreateContainerHostInternal(document_url, site_for_cookies,
                                 top_frame_origin, &remote_endpoint);
@@ -221,7 +221,7 @@
         blink::mojom::FetchClientSettingsObject::New(),
         base::BindOnce([](blink::mojom::ServiceWorkerErrorType* out_error,
                           blink::mojom::ServiceWorkerErrorType error,
-                          const base::Optional<std::string>& error_msg,
+                          const absl::optional<std::string>& error_msg,
                           blink::mojom::ServiceWorkerRegistrationObjectInfoPtr
                               registration) { *out_error = error; },
                        &error));
@@ -242,7 +242,7 @@
             [](blink::mojom::ServiceWorkerErrorType* out_error,
                blink::mojom::ServiceWorkerRegistrationObjectInfoPtr* out_info,
                blink::mojom::ServiceWorkerErrorType error,
-               const base::Optional<std::string>& error_msg,
+               const absl::optional<std::string>& error_msg,
                blink::mojom::ServiceWorkerRegistrationObjectInfoPtr
                    registration) {
               *out_error = error;
@@ -261,8 +261,8 @@
     container_host->GetRegistrations(base::BindOnce(
         [](blink::mojom::ServiceWorkerErrorType* out_error,
            blink::mojom::ServiceWorkerErrorType error,
-           const base::Optional<std::string>& error_msg,
-           base::Optional<std::vector<
+           const absl::optional<std::string>& error_msg,
+           absl::optional<std::vector<
                blink::mojom::ServiceWorkerRegistrationObjectInfoPtr>> infos) {
           *out_error = error;
         },
@@ -328,7 +328,7 @@
   base::WeakPtr<ServiceWorkerContainerHost> CreateContainerHostInternal(
       const GURL& document_url,
       const net::SiteForCookies& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       ServiceWorkerRemoteContainerEndpoint* remote_endpoint) {
     base::WeakPtr<ServiceWorkerContainerHost> container_host =
         CreateContainerHostForWindow(helper_->mock_render_process_id(),
diff --git a/content/browser/service_worker/service_worker_context_unittest.cc b/content/browser/service_worker/service_worker_context_unittest.cc
index ace666e..6194f96 100644
--- a/content/browser/service_worker/service_worker_context_unittest.cc
+++ b/content/browser/service_worker/service_worker_context_unittest.cc
@@ -280,10 +280,10 @@
   };
   struct EventLog {
     EventType type;
-    base::Optional<GURL> url;
-    base::Optional<int64_t> version_id;
-    base::Optional<int64_t> registration_id;
-    base::Optional<bool> is_running;
+    absl::optional<GURL> url;
+    absl::optional<int64_t> version_id;
+    absl::optional<int64_t> registration_id;
+    absl::optional<bool> is_running;
   };
 
   explicit TestServiceWorkerContextObserver(ServiceWorkerContext* context) {
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index ff08f117..74172e6 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1688,7 +1688,7 @@
       storage_partition_->browser_context(), /*frame=*/nullptr,
       ChildProcessHost::kInvalidUniqueID,
       ContentBrowserClient::URLLoaderFactoryType::kServiceWorkerScript,
-      url::Origin::Create(scope), /*navigation_id=*/base::nullopt,
+      url::Origin::Create(scope), /*navigation_id=*/absl::nullopt,
       ukm::kInvalidSourceIdObj, &pending_receiver, &header_client,
       &bypass_redirect_checks,
       /*disable_secure_dns=*/nullptr,
@@ -1743,7 +1743,7 @@
 // static
 void ServiceWorkerContextWrapper::
     DidGetRegisteredOriginsForGetInstalledRegistrationOrigins(
-        base::Optional<std::string> host_filter,
+        absl::optional<std::string> host_filter,
         GetInstalledRegistrationOriginsCallback callback,
         scoped_refptr<base::SingleThreadTaskRunner> task_runner_for_callback,
         const std::vector<url::Origin>& origins) {
diff --git a/content/browser/service_worker/service_worker_context_wrapper.h b/content/browser/service_worker/service_worker_context_wrapper.h
index c617da7..cf9a098 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.h
+++ b/content/browser/service_worker/service_worker_context_wrapper.h
@@ -459,7 +459,7 @@
   void DidGetRegisteredOrigins(const std::vector<url::Origin>& origins);
 
   static void DidGetRegisteredOriginsForGetInstalledRegistrationOrigins(
-      base::Optional<std::string> host_filter,
+      absl::optional<std::string> host_filter,
       GetInstalledRegistrationOriginsCallback callback,
       scoped_refptr<base::SingleThreadTaskRunner> task_runner_for_callback,
       const std::vector<url::Origin>& origins);
@@ -509,7 +509,7 @@
       const std::string& key_prefix,
       StatusCallback callback);
   void GetInstalledRegistrationOriginsOnUIThread(
-      base::Optional<std::string> host_filter,
+      absl::optional<std::string> host_filter,
       GetInstalledRegistrationOriginsCallback callback,
       scoped_refptr<base::SingleThreadTaskRunner> task_runner_for_callback);
 
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler.cc b/content/browser/service_worker/service_worker_controllee_request_handler.cc
index 866c5159..d4752e9 100644
--- a/content/browser/service_worker/service_worker_controllee_request_handler.cc
+++ b/content/browser/service_worker/service_worker_controllee_request_handler.cc
@@ -8,7 +8,6 @@
 #include <utility>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/trace_event/trace_event.h"
 #include "components/offline_pages/buildflags/buildflags.h"
 #include "components/services/storage/public/cpp/storage_key.h"
@@ -30,6 +29,7 @@
 #include "net/base/load_flags.h"
 #include "net/base/url_util.h"
 #include "services/network/public/cpp/resource_request_body.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/resource_type_util.h"
 
 #if BUILDFLAG(ENABLE_OFFLINE_PAGES)
@@ -188,7 +188,7 @@
                               tentative_resource_request.trusted_params
                                   ? tentative_resource_request.trusted_params
                                         ->isolation_info.top_frame_origin()
-                                  : base::nullopt);
+                                  : absl::nullopt);
 }
 
 void ServiceWorkerControlleeRequestHandler::ContinueWithRegistration(
diff --git a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
index 9a060be3..3fd8114 100644
--- a/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
+++ b/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
@@ -151,7 +151,7 @@
   AllowServiceWorkerResult AllowServiceWorker(
       const GURL& scope,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       const GURL& script_url,
       content::BrowserContext* context) override {
     return AllowServiceWorkerResult::No();
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.cc b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
index 3ac606b..1537640 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.cc
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.cc
@@ -214,7 +214,7 @@
   const GURL url_;
   const bool devtools_enabled_;
 
-  base::Optional<std::pair<int, int>> worker_id_;
+  absl::optional<std::pair<int, int>> worker_id_;
   std::string devtools_request_id_;
   base::queue<base::OnceCallback<void(const WorkerId&, const std::string&)>>
       devtools_callbacks;
@@ -408,7 +408,7 @@
   static void HandleResponse(
       base::WeakPtr<ServiceWorkerFetchDispatcher> fetch_dispatcher,
       ServiceWorkerVersion* version,
-      base::Optional<int> fetch_event_id,
+      absl::optional<int> fetch_event_id,
       blink::mojom::FetchAPIResponsePtr response,
       blink::mojom::ServiceWorkerStreamHandlePtr body_as_stream,
       FetchEventResult fetch_result,
@@ -431,7 +431,7 @@
   // Must be set to a non-nullopt value before the corresponding mojo
   // handle is passed to the other end (i.e. before any of OnResponse*
   // is called).
-  base::Optional<int> fetch_event_id_;
+  absl::optional<int> fetch_event_id_;
 
   DISALLOW_COPY_AND_ASSIGN(ResponseCallback);
 };
diff --git a/content/browser/service_worker/service_worker_fetch_dispatcher.h b/content/browser/service_worker/service_worker_fetch_dispatcher.h
index bd48e47..c847fdc 100644
--- a/content/browser/service_worker/service_worker_fetch_dispatcher.h
+++ b/content/browser/service_worker/service_worker_fetch_dispatcher.h
@@ -12,12 +12,12 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/service_worker/service_worker_metrics.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/web_contents.h"
 #include "mojo/public/cpp/system/data_pipe.h"
 #include "services/network/public/mojom/fetch_api.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h"
 #include "third_party/blink/public/mojom/fetch/fetch_api_response.mojom.h"
diff --git a/content/browser/service_worker/service_worker_installed_script_loader.cc b/content/browser/service_worker/service_worker_installed_script_loader.cc
index cd08dac..c606625 100644
--- a/content/browser/service_worker/service_worker_installed_script_loader.cc
+++ b/content/browser/service_worker/service_worker_installed_script_loader.cc
@@ -53,7 +53,7 @@
 
 void ServiceWorkerInstalledScriptLoader::OnStarted(
     network::mojom::URLResponseHeadPtr response_head,
-    base::Optional<mojo_base::BigBuffer> metadata,
+    absl::optional<mojo_base::BigBuffer> metadata,
     mojo::ScopedDataPipeConsumerHandle body_handle,
     mojo::ScopedDataPipeConsumerHandle metadata_handle) {
   DCHECK(response_head);
@@ -112,7 +112,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   // This class never returns a redirect response to its client, so should never
   // be asked to follow one.
   NOTREACHED();
diff --git a/content/browser/service_worker/service_worker_installed_script_loader.h b/content/browser/service_worker/service_worker_installed_script_loader.h
index d25545f..3575b09 100644
--- a/content/browser/service_worker/service_worker_installed_script_loader.h
+++ b/content/browser/service_worker/service_worker_installed_script_loader.h
@@ -42,7 +42,7 @@
 
   // ServiceWorkerInstalledScriptReader::Client overrides:
   void OnStarted(network::mojom::URLResponseHeadPtr response_head,
-                 base::Optional<mojo_base::BigBuffer> metadata,
+                 absl::optional<mojo_base::BigBuffer> metadata,
                  mojo::ScopedDataPipeConsumerHandle body_handle,
                  mojo::ScopedDataPipeConsumerHandle meta_data_handle) override;
   void OnFinished(
@@ -53,7 +53,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
diff --git a/content/browser/service_worker/service_worker_installed_script_reader.cc b/content/browser/service_worker/service_worker_installed_script_reader.cc
index 0fdc50f9..2cc4594 100644
--- a/content/browser/service_worker/service_worker_installed_script_reader.cc
+++ b/content/browser/service_worker/service_worker_installed_script_reader.cc
@@ -113,7 +113,7 @@
 void ServiceWorkerInstalledScriptReader::OnReadResponseHeadComplete(
     int result,
     network::mojom::URLResponseHeadPtr response_head,
-    base::Optional<mojo_base::BigBuffer> metadata) {
+    absl::optional<mojo_base::BigBuffer> metadata) {
   DCHECK(client_);
   TRACE_EVENT0(
       "ServiceWorker",
@@ -140,7 +140,7 @@
 
 void ServiceWorkerInstalledScriptReader::OnReadDataStarted(
     network::mojom::URLResponseHeadPtr response_head,
-    base::Optional<mojo_base::BigBuffer> metadata,
+    absl::optional<mojo_base::BigBuffer> metadata,
     mojo::ScopedDataPipeConsumerHandle body_consumer_handle) {
   if (!body_consumer_handle) {
     CompleteSendIfNeeded(FinishedReason::kCreateDataPipeError);
diff --git a/content/browser/service_worker/service_worker_installed_script_reader.h b/content/browser/service_worker/service_worker_installed_script_reader.h
index 6f76c8a..9891ee1 100644
--- a/content/browser/service_worker/service_worker_installed_script_reader.h
+++ b/content/browser/service_worker/service_worker_installed_script_reader.h
@@ -45,7 +45,7 @@
    public:
     virtual void OnStarted(
         network::mojom::URLResponseHeadPtr response_head,
-        base::Optional<mojo_base::BigBuffer> metadata,
+        absl::optional<mojo_base::BigBuffer> metadata,
         mojo::ScopedDataPipeConsumerHandle body_handle,
         mojo::ScopedDataPipeConsumerHandle meta_data_handle) = 0;
     // Called after both body and metadata have finished being written to the
@@ -68,10 +68,10 @@
   void OnReadResponseHeadComplete(
       int result,
       network::mojom::URLResponseHeadPtr response_head,
-      base::Optional<mojo_base::BigBuffer> metadata);
+      absl::optional<mojo_base::BigBuffer> metadata);
   void OnReadDataStarted(
       network::mojom::URLResponseHeadPtr response_head,
-      base::Optional<mojo_base::BigBuffer> metadata,
+      absl::optional<mojo_base::BigBuffer> metadata,
       mojo::ScopedDataPipeConsumerHandle body_consumer_handle);
   void OnMetaDataSent(bool success);
   void OnReaderDisconnected();
diff --git a/content/browser/service_worker/service_worker_installed_scripts_sender.cc b/content/browser/service_worker/service_worker_installed_scripts_sender.cc
index ef01e645..8085fad6 100644
--- a/content/browser/service_worker/service_worker_installed_scripts_sender.cc
+++ b/content/browser/service_worker/service_worker_installed_scripts_sender.cc
@@ -89,7 +89,7 @@
 
 void ServiceWorkerInstalledScriptsSender::OnStarted(
     network::mojom::URLResponseHeadPtr response_head,
-    base::Optional<mojo_base::BigBuffer> metadata,
+    absl::optional<mojo_base::BigBuffer> metadata,
     mojo::ScopedDataPipeConsumerHandle body_handle,
     mojo::ScopedDataPipeConsumerHandle meta_data_handle) {
   DCHECK(response_head);
diff --git a/content/browser/service_worker/service_worker_installed_scripts_sender.h b/content/browser/service_worker/service_worker_installed_scripts_sender.h
index 35811b6..cb194d3 100644
--- a/content/browser/service_worker/service_worker_installed_scripts_sender.h
+++ b/content/browser/service_worker/service_worker_installed_scripts_sender.h
@@ -76,7 +76,7 @@
 
   // Implements ServiceWorkerInstalledScriptReader::Client.
   void OnStarted(network::mojom::URLResponseHeadPtr response_head,
-                 base::Optional<mojo_base::BigBuffer> metadata,
+                 absl::optional<mojo_base::BigBuffer> metadata,
                  mojo::ScopedDataPipeConsumerHandle body_handle,
                  mojo::ScopedDataPipeConsumerHandle meta_data_handle) override;
   void OnFinished(
diff --git a/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc b/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc
index fcc61e5..755835d 100644
--- a/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc
+++ b/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc
@@ -7,7 +7,6 @@
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/containers/contains.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/task/post_task.h"
 #include "base/test/metrics/histogram_tester.h"
@@ -20,6 +19,7 @@
 #include "net/base/io_buffer.h"
 #include "net/base/test_completion_callback.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/blob/blob_utils.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h"
 
diff --git a/content/browser/service_worker/service_worker_job_unittest.cc b/content/browser/service_worker/service_worker_job_unittest.cc
index 33f31686..a94e64e 100644
--- a/content/browser/service_worker/service_worker_job_unittest.cc
+++ b/content/browser/service_worker/service_worker_job_unittest.cc
@@ -12,7 +12,6 @@
 #include "base/callback_helpers.h"
 #include "base/check.h"
 #include "base/files/scoped_temp_dir.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "base/test/bind.h"
@@ -48,6 +47,7 @@
 #include "net/http/http_response_headers.h"
 #include "services/network/public/cpp/features.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/service_worker/embedded_worker.mojom.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker.mojom.h"
@@ -1439,7 +1439,7 @@
   bool update_found_ = false;
   bool registration_failed_ = false;
   bool force_start_worker_failure_ = false;
-  base::Optional<bool> will_be_terminated_;
+  absl::optional<bool> will_be_terminated_;
 
   // These are used only when ServiceWorkerImportedScriptUpdateCheck is enabled.
   FakeNetwork fake_network_;
diff --git a/content/browser/service_worker/service_worker_main_resource_loader.cc b/content/browser/service_worker/service_worker_main_resource_loader.cc
index a7fb9bec..850b27d3 100644
--- a/content/browser/service_worker/service_worker_main_resource_loader.cc
+++ b/content/browser/service_worker/service_worker_main_resource_loader.cc
@@ -12,7 +12,6 @@
 #include "base/callback_helpers.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/strings/strcat.h"
 #include "base/trace_event/trace_event.h"
 #include "content/browser/service_worker/service_worker_container_host.h"
@@ -25,6 +24,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "services/network/public/cpp/features.h"
 #include "services/network/public/mojom/fetch_api.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_loader_helpers.h"
 
 namespace content {
@@ -126,7 +126,7 @@
   resource_request_ = resource_request;
   if (container_host_ && container_host_->fetch_request_window_id()) {
     resource_request_.fetch_window_id =
-        base::make_optional(container_host_->fetch_request_window_id());
+        absl::make_optional(container_host_->fetch_request_window_id());
   }
 
   DCHECK(!receiver_.is_bound());
@@ -363,7 +363,7 @@
 
   // Handle a redirect response. ComputeRedirectInfo returns non-null redirect
   // info if the given response is a redirect.
-  base::Optional<net::RedirectInfo> redirect_info =
+  absl::optional<net::RedirectInfo> redirect_info =
       blink::ServiceWorkerLoaderHelpers::ComputeRedirectInfo(resource_request_,
                                                              *response_head_);
   if (redirect_info) {
@@ -435,7 +435,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   NOTIMPLEMENTED();
 }
 
diff --git a/content/browser/service_worker/service_worker_main_resource_loader.h b/content/browser/service_worker/service_worker_main_resource_loader.h
index 48ebd46..39cc01f 100644
--- a/content/browser/service_worker/service_worker_main_resource_loader.h
+++ b/content/browser/service_worker/service_worker_main_resource_loader.h
@@ -139,7 +139,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
diff --git a/content/browser/service_worker/service_worker_main_resource_loader_interceptor.cc b/content/browser/service_worker/service_worker_main_resource_loader_interceptor.cc
index dbfc70ea..9779776 100644
--- a/content/browser/service_worker/service_worker_main_resource_loader_interceptor.cc
+++ b/content/browser/service_worker/service_worker_main_resource_loader_interceptor.cc
@@ -8,7 +8,6 @@
 #include <utility>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/stl_util.h"
 #include "build/chromeos_buildflags.h"
 #include "content/browser/renderer_host/frame_tree_node.h"
@@ -23,6 +22,7 @@
 #include "content/public/common/url_constants.h"
 #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
 #include "mojo/public/cpp/bindings/pending_associated_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -210,11 +210,11 @@
       std::move(fallback_callback));
 }
 
-base::Optional<SubresourceLoaderParams>
+absl::optional<SubresourceLoaderParams>
 ServiceWorkerMainResourceLoaderInterceptor::
     MaybeCreateSubresourceLoaderParams() {
   if (!handle_) {
-    return base::nullopt;
+    return absl::nullopt;
   }
   base::WeakPtr<ServiceWorkerContainerHost> container_host =
       handle_->container_host();
@@ -222,7 +222,7 @@
   // We didn't find a matching service worker for this request, and
   // ServiceWorkerContainerHost::SetControllerRegistration() was not called.
   if (!container_host || !container_host->controller()) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   // Otherwise let's send the controller service worker information along
@@ -244,7 +244,7 @@
   controller_info->client_id = container_host->client_uuid();
   if (container_host->fetch_request_window_id()) {
     controller_info->fetch_request_window_id =
-        base::make_optional(container_host->fetch_request_window_id());
+        absl::make_optional(container_host->fetch_request_window_id());
   }
   base::WeakPtr<ServiceWorkerObjectHost> object_host =
       container_host->GetOrCreateServiceWorkerObjectHost(
@@ -257,7 +257,7 @@
     controller_info->used_features.push_back(feature);
   }
   params.controller_service_worker_info = std::move(controller_info);
-  return base::Optional<SubresourceLoaderParams>(std::move(params));
+  return absl::optional<SubresourceLoaderParams>(std::move(params));
 }
 
 ServiceWorkerMainResourceLoaderInterceptor::
diff --git a/content/browser/service_worker/service_worker_main_resource_loader_interceptor.h b/content/browser/service_worker/service_worker_main_resource_loader_interceptor.h
index 67a2447d..df5873f 100644
--- a/content/browser/service_worker/service_worker_main_resource_loader_interceptor.h
+++ b/content/browser/service_worker/service_worker_main_resource_loader_interceptor.h
@@ -9,7 +9,6 @@
 
 #include "base/gtest_prod_util.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/browser/loader/navigation_loader_interceptor.h"
 #include "content/browser/loader/single_request_url_loader_factory.h"
 #include "content/browser/navigation_subresource_loader_params.h"
@@ -21,6 +20,7 @@
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "services/network/public/mojom/fetch_api.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom.h"
 
@@ -69,8 +69,8 @@
                          FallbackCallback fallback_callback) override;
   // Returns params with the ControllerServiceWorkerInfoPtr if we have found
   // a matching controller service worker for the |request| that is given
-  // to MaybeCreateLoader(). Otherwise this returns base::nullopt.
-  base::Optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams()
+  // to MaybeCreateLoader(). Otherwise this returns absl::nullopt.
+  absl::optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams()
       override;
 
  private:
@@ -117,7 +117,7 @@
   const bool are_ancestors_secure_;
   // If the intercepted resource load is on behalf
   // of a window, the |frame_tree_node_id_| will be set, |worker_token_| will be
-  // base::nullopt, and |process_id_| will be invalid.
+  // absl::nullopt, and |process_id_| will be invalid.
   const int frame_tree_node_id_;
 
   // For web worker clients:
@@ -125,7 +125,7 @@
   // |frame_tree_node_id_| will be invalid, and both |process_id_| and
   // |worker_token_| will be set.
   const int process_id_;
-  const base::Optional<DedicatedOrSharedWorkerToken> worker_token_;
+  const absl::optional<DedicatedOrSharedWorkerToken> worker_token_;
 
   // Handles a single request. Set to a new instance on redirects.
   std::unique_ptr<ServiceWorkerControlleeRequestHandler> request_handler_;
diff --git a/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc b/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc
index ca9b7326..35db8a1 100644
--- a/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc
+++ b/content/browser/service_worker/service_worker_main_resource_loader_unittest.cc
@@ -435,7 +435,7 @@
 
     // Make the registration findable via storage functions.
     registration_->set_last_update_check(base::Time::Now());
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
     registry()->StoreRegistration(
         registration_.get(), version_.get(),
@@ -457,7 +457,7 @@
     // create a response. The main script response is set when the first
     // TransferInstalledScript().
     {
-      base::Optional<blink::ServiceWorkerStatusCode> status;
+      absl::optional<blink::ServiceWorkerStatusCode> status;
       base::RunLoop loop;
       version_->StartWorker(
           ServiceWorkerMetrics::EventType::UNKNOWN,
diff --git a/content/browser/service_worker/service_worker_new_script_loader.cc b/content/browser/service_worker/service_worker_new_script_loader.cc
index 0c53e8b..daa30b92 100644
--- a/content/browser/service_worker/service_worker_new_script_loader.cc
+++ b/content/browser/service_worker/service_worker_new_script_loader.cc
@@ -179,7 +179,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   // Resource requests for service worker scripts should not follow redirects.
   // See comments in OnReceiveRedirect().
   NOTREACHED();
diff --git a/content/browser/service_worker/service_worker_new_script_loader.h b/content/browser/service_worker/service_worker_new_script_loader.h
index a373320..3d7e346 100644
--- a/content/browser/service_worker/service_worker_new_script_loader.h
+++ b/content/browser/service_worker/service_worker_new_script_loader.h
@@ -103,7 +103,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
diff --git a/content/browser/service_worker/service_worker_object_host.cc b/content/browser/service_worker/service_worker_object_host.cc
index c707dc7..564e255 100644
--- a/content/browser/service_worker/service_worker_object_host.cc
+++ b/content/browser/service_worker/service_worker_object_host.cc
@@ -29,7 +29,7 @@
     scoped_refptr<ServiceWorkerVersion> worker,
     blink::TransferableMessage message,
     const url::Origin& source_origin,
-    const base::Optional<base::TimeDelta>& timeout,
+    const absl::optional<base::TimeDelta>& timeout,
     StatusCallback callback,
     PrepareExtendableMessageEventCallback prepare_callback,
     blink::ServiceWorkerStatusCode start_worker_status) {
@@ -64,7 +64,7 @@
     scoped_refptr<ServiceWorkerVersion> worker,
     blink::TransferableMessage message,
     const url::Origin& source_origin,
-    const base::Optional<base::TimeDelta>& timeout,
+    const absl::optional<base::TimeDelta>& timeout,
     StatusCallback callback,
     PrepareExtendableMessageEventCallback prepare_callback) {
   // If not enough time is left to actually process the event don't even
@@ -165,7 +165,7 @@
   }
 
   StartWorkerToDispatchExtendableMessageEvent(
-      worker, std::move(message), source_origin, base::nullopt /* timeout */,
+      worker, std::move(message), source_origin, absl::nullopt /* timeout */,
       std::move(callback),
       base::BindOnce(&PrepareExtendableMessageEventFromClient, context,
                      worker->registration_id(), std::move(source_client_info)));
@@ -175,7 +175,7 @@
     scoped_refptr<ServiceWorkerVersion> worker,
     blink::TransferableMessage message,
     const url::Origin& source_origin,
-    const base::Optional<base::TimeDelta>& timeout,
+    const absl::optional<base::TimeDelta>& timeout,
     StatusCallback callback,
     base::WeakPtr<ServiceWorkerContainerHost> source_container_host) {
   if (!source_container_host) {
@@ -295,7 +295,7 @@
         FROM_HERE,
         base::BindOnce(&DispatchExtendableMessageEventFromServiceWorker,
                        version_, std::move(message), container_origin_,
-                       base::make_optional(timeout), std::move(callback),
+                       absl::make_optional(timeout), std::move(callback),
                        container_host_->GetWeakPtr()));
   } else if (container_host_->IsContainerForWindowClient()) {
     service_worker_client_utils::GetClient(
diff --git a/content/browser/service_worker/service_worker_object_host_unittest.cc b/content/browser/service_worker/service_worker_object_host_unittest.cc
index f732a4b..a15d319f6 100644
--- a/content/browser/service_worker/service_worker_object_host_unittest.cc
+++ b/content/browser/service_worker/service_worker_object_host_unittest.cc
@@ -132,7 +132,7 @@
     version_->SetStatus(ServiceWorkerVersion::INSTALLING);
 
     // Make the registration findable via storage functions.
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
     helper_->context()->registry()->StoreRegistration(
         registration_.get(), version_.get(),
@@ -185,7 +185,7 @@
                       blink::mojom::ServiceWorkerRegistrationObjectInfoPtr*
                           out_registration_info,
                       blink::mojom::ServiceWorkerErrorType error,
-                      const base::Optional<std::string>& error_msg,
+                      const absl::optional<std::string>& error_msg,
                       blink::mojom::ServiceWorkerRegistrationObjectInfoPtr
                           registration) {
                      ASSERT_EQ(blink::mojom::ServiceWorkerErrorType::kNone,
diff --git a/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc b/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc
index c3a5b61..9d493590 100644
--- a/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc
+++ b/content/browser/service_worker/service_worker_offline_capability_check_browsertest.cc
@@ -8,7 +8,6 @@
 #include "base/guid.h"
 #include "base/macros.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/task/post_task.h"
 #include "base/task/task_traits.h"
 #include "base/test/bind.h"
@@ -26,6 +25,7 @@
 #include "content/shell/browser/shell.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "services/network/public/mojom/fetch_api.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "url/gurl.h"
 
@@ -64,7 +64,7 @@
     for (const FetchEventDispatchParamAndExpectedResult&
              param_and_expected_result : test_inputs) {
       fetch_event_dispatches_.push_back(
-          FetchEventDispatch{param_and_expected_result, base::nullopt});
+          FetchEventDispatch{param_and_expected_result, absl::nullopt});
     }
   }
 
@@ -103,7 +103,7 @@
  private:
   struct FetchEventDispatch {
     FetchEventDispatchParamAndExpectedResult param_and_expected_result;
-    base::Optional<FetchResult> fetch_result;
+    absl::optional<FetchResult> fetch_result;
     std::unique_ptr<ServiceWorkerFetchDispatcher> fetch_dispatcher;
   };
 
@@ -281,7 +281,7 @@
 
   OfflineCapability CheckOfflineCapability(const std::string& path) {
     base::RunLoop fetch_run_loop;
-    base::Optional<OfflineCapability> out_offline_capability;
+    absl::optional<OfflineCapability> out_offline_capability;
     RunOrPostTaskOnThread(
         FROM_HERE, ServiceWorkerContext::GetCoreThreadId(),
         base::BindOnce(
diff --git a/content/browser/service_worker/service_worker_process_manager.cc b/content/browser/service_worker/service_worker_process_manager.cc
index 7a5a45f..fd4bf22 100644
--- a/content/browser/service_worker/service_worker_process_manager.cc
+++ b/content/browser/service_worker/service_worker_process_manager.cc
@@ -85,7 +85,7 @@
 ServiceWorkerProcessManager::AllocateWorkerProcess(
     int embedded_worker_id,
     const GURL& script_url,
-    const base::Optional<network::CrossOriginEmbedderPolicy>&
+    const absl::optional<network::CrossOriginEmbedderPolicy>&
         cross_origin_embedder_policy,
     bool can_use_existing_process,
     AllocatedProcessInfo* out_info) {
diff --git a/content/browser/service_worker/service_worker_process_manager.h b/content/browser/service_worker/service_worker_process_manager.h
index 4b051057..49bab08 100644
--- a/content/browser/service_worker/service_worker_process_manager.h
+++ b/content/browser/service_worker/service_worker_process_manager.h
@@ -73,7 +73,7 @@
   blink::ServiceWorkerStatusCode AllocateWorkerProcess(
       int embedded_worker_id,
       const GURL& script_url,
-      const base::Optional<network::CrossOriginEmbedderPolicy>&
+      const absl::optional<network::CrossOriginEmbedderPolicy>&
           cross_origin_embedder_policy,
       bool can_use_existing_process,
       AllocatedProcessInfo* out_info);
diff --git a/content/browser/service_worker/service_worker_process_manager_unittest.cc b/content/browser/service_worker/service_worker_process_manager_unittest.cc
index 1595c65..4bd09fb 100644
--- a/content/browser/service_worker/service_worker_process_manager_unittest.cc
+++ b/content/browser/service_worker/service_worker_process_manager_unittest.cc
@@ -122,7 +122,7 @@
   blink::ServiceWorkerStatusCode status =
       process_manager_->AllocateWorkerProcess(
           kEmbeddedWorkerId, script_url_,
-          base::nullopt /* cross_origin_embedder_policy */,
+          absl::nullopt /* cross_origin_embedder_policy */,
           true /* can_use_existing_process */, &process_info);
 
   // An existing process should be allocated to the worker.
@@ -166,7 +166,7 @@
   blink::ServiceWorkerStatusCode status =
       process_manager_->AllocateWorkerProcess(
           kEmbeddedWorkerId, script_url_,
-          base::nullopt /* cross_origin_embedder_policy */,
+          absl::nullopt /* cross_origin_embedder_policy */,
           false /* can_use_existing_process */, &process_info);
 
   // A new process should be allocated to the worker.
@@ -195,7 +195,7 @@
   ServiceWorkerProcessManager::AllocatedProcessInfo process_info;
   blink::ServiceWorkerStatusCode status =
       process_manager_->AllocateWorkerProcess(
-          1, script_url_, base::nullopt /* cross_origin_embedder_policy */,
+          1, script_url_, absl::nullopt /* cross_origin_embedder_policy */,
           true /* can_use_existing_process */, &process_info);
 
   // Allocating a process in shutdown should abort.
@@ -221,7 +221,7 @@
     blink::ServiceWorkerStatusCode status =
         process_manager_->AllocateWorkerProcess(
             kEmbeddedWorkerId, script_url_,
-            base::nullopt /* cross_origin_embedder_policy */,
+            absl::nullopt /* cross_origin_embedder_policy */,
             true /* can_use_existing_process */, &process_info);
     EXPECT_EQ(blink::ServiceWorkerStatusCode::kOk, status);
     // Instead of testing the input to the CreateRenderProcessHost(), it'd be
@@ -264,7 +264,7 @@
     blink::ServiceWorkerStatusCode status =
         process_manager_->AllocateWorkerProcess(
             kEmbeddedWorkerId, script_url_,
-            base::nullopt /* cross_origin_embedder_policy */,
+            absl::nullopt /* cross_origin_embedder_policy */,
             true /* can_use_existing_process */, &process_info);
     EXPECT_EQ(blink::ServiceWorkerStatusCode::kOk, status);
     EXPECT_EQ(
diff --git a/content/browser/service_worker/service_worker_registration_object_host.cc b/content/browser/service_worker/service_worker_registration_object_host.cc
index 9860a2b5..b1a930a 100644
--- a/content/browser/service_worker/service_worker_registration_object_host.cc
+++ b/content/browser/service_worker/service_worker_registration_object_host.cc
@@ -306,7 +306,7 @@
   }
 
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt,
+                          absl::nullopt,
                           registration_->navigation_preload_state().Clone());
 }
 
@@ -362,7 +362,7 @@
   }
 
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt);
+                          absl::nullopt);
 }
 
 void ServiceWorkerRegistrationObjectHost::UnregistrationComplete(
@@ -380,7 +380,7 @@
   }
 
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt);
+                          absl::nullopt);
 }
 
 void ServiceWorkerRegistrationObjectHost::DidUpdateNavigationPreloadEnabled(
@@ -398,7 +398,7 @@
   if (registration_)
     registration_->EnableNavigationPreload(enable);
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt);
+                          absl::nullopt);
 }
 
 void ServiceWorkerRegistrationObjectHost::DidUpdateNavigationPreloadHeader(
@@ -417,7 +417,7 @@
   if (registration_)
     registration_->SetNavigationPreloadHeader(value);
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt);
+                          absl::nullopt);
 }
 
 void ServiceWorkerRegistrationObjectHost::SetServiceWorkerObjects(
diff --git a/content/browser/service_worker/service_worker_registration_unittest.cc b/content/browser/service_worker/service_worker_registration_unittest.cc
index d67b754a..0c3c6c5 100644
--- a/content/browser/service_worker/service_worker_registration_unittest.cc
+++ b/content/browser/service_worker/service_worker_registration_unittest.cc
@@ -14,7 +14,6 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/memory/weak_ptr.h"
 #include "base/notreached.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/test/bind.h"
 #include "base/test/simple_test_tick_clock.h"
@@ -47,6 +46,7 @@
 #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
 #include "mojo/public/cpp/system/functions.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_object.mojom.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h"
@@ -80,7 +80,7 @@
   AllowServiceWorkerResult AllowServiceWorker(
       const GURL& scope,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       const GURL& script_url,
       content::BrowserContext* context) override {
     return AllowServiceWorkerResult::No();
@@ -403,7 +403,7 @@
     version_1->script_cache_map()->SetResources(records_1);
     version_1->SetMainScriptResponse(
         EmbeddedWorkerTestHelper::CreateMainScriptResponse());
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
     context()->registry()->StoreRegistration(
         registration_.get(), version_1.get(),
@@ -506,15 +506,15 @@
   // |out_result| is generally true but false in case of a fatal/unexpected
   // error like ServiceWorkerContext shutdown.
   void SimulateSkipWaiting(ServiceWorkerVersion* version,
-                           base::Optional<bool>* out_result) {
+                           absl::optional<bool>* out_result) {
     SimulateSkipWaitingWithCallback(version, out_result, base::DoNothing());
   }
 
   void SimulateSkipWaitingWithCallback(ServiceWorkerVersion* version,
-                                       base::Optional<bool>* out_result,
+                                       absl::optional<bool>* out_result,
                                        base::OnceClosure done_callback) {
     version->SkipWaiting(base::BindOnce(
-        [](base::OnceClosure done_callback, base::Optional<bool>* out_result,
+        [](base::OnceClosure done_callback, absl::optional<bool>* out_result,
            bool success) {
           *out_result = success;
           std::move(done_callback).Run();
@@ -587,7 +587,7 @@
   scoped_refptr<ServiceWorkerVersion> version_1 = reg->active_version();
   scoped_refptr<ServiceWorkerVersion> version_2 = reg->waiting_version();
 
-  base::Optional<bool> result;
+  absl::optional<bool> result;
   base::RunLoop skip_waiting_loop;
   // Set skip waiting flag. Since there is still an in-flight request,
   // activation should not happen.
@@ -627,7 +627,7 @@
   EXPECT_EQ(version_1.get(), reg->active_version());
 
   // Call skipWaiting. Activation happens after RequestTermination is triggered.
-  base::Optional<bool> result;
+  absl::optional<bool> result;
   base::RunLoop skip_waiting_loop;
   SimulateSkipWaitingWithCallback(version_2.get(), &result,
                                   skip_waiting_loop.QuitClosure());
@@ -657,7 +657,7 @@
   reg->UnsetVersion(version.get());
   version->SetStatus(ServiceWorkerVersion::INSTALLING);
 
-  base::Optional<bool> result;
+  absl::optional<bool> result;
   // Call skipWaiting(). The time ticks since skip waiting shouldn't start
   // since the version is not yet installed.
   SimulateSkipWaiting(version.get(), &result);
@@ -692,7 +692,7 @@
   version_1->SetTickClockForTesting(&clock_1);
   version_2->SetTickClockForTesting(&clock_2);
 
-  base::Optional<bool> result;
+  absl::optional<bool> result;
   // Set skip waiting flag. Since there is still an in-flight request,
   // activation should not happen. But the lame duck timer should start.
   EXPECT_FALSE(IsLameDuckTimerRunning());
@@ -805,7 +805,7 @@
         base::BindLambdaForTesting(
             [&out_error, &out_error_msg](
                 blink::mojom::ServiceWorkerErrorType error,
-                const base::Optional<std::string>& error_msg) {
+                const absl::optional<std::string>& error_msg) {
               out_error = error;
               if (out_error_msg) {
                 *out_error_msg = error_msg ? *error_msg : "";
@@ -819,7 +819,7 @@
       blink::mojom::ServiceWorkerContainerType provider_type,
       ServiceWorkerRegistration* registration,
       ServiceWorkerVersion* version) {
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
     const bool is_container_for_client =
         provider_type !=
@@ -827,7 +827,7 @@
     ServiceWorkerRegistrationObjectHost::DelayUpdate(
         is_container_for_client, registration, version,
         base::BindOnce(
-            [](base::Optional<blink::ServiceWorkerStatusCode>* out_status,
+            [](absl::optional<blink::ServiceWorkerStatusCode>* out_status,
                base::OnceClosure callback,
                blink::ServiceWorkerStatusCode status) {
               *out_status = status;
@@ -845,7 +845,7 @@
     registration_host->Unregister(base::BindOnce(
         [](blink::mojom::ServiceWorkerErrorType* out_error,
            blink::mojom::ServiceWorkerErrorType error,
-           const base::Optional<std::string>& error_msg) {
+           const absl::optional<std::string>& error_msg) {
           *out_error = error;
         },
         &error));
@@ -856,11 +856,11 @@
   blink::ServiceWorkerStatusCode FindRegistrationInStorage(
       int64_t registration_id,
       const storage::StorageKey& key) {
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     registry()->FindRegistrationForId(
         registration_id, key,
         base::BindOnce(
-            [](base::Optional<blink::ServiceWorkerStatusCode>* out_status,
+            [](absl::optional<blink::ServiceWorkerStatusCode>* out_status,
                blink::ServiceWorkerStatusCode status,
                scoped_refptr<ServiceWorkerRegistration> registration) {
               *out_status = status;
@@ -942,7 +942,7 @@
                  [](blink::mojom::ServiceWorkerRegistrationObjectInfoPtr*
                         out_registration_info,
                     blink::mojom::ServiceWorkerErrorType error,
-                    const base::Optional<std::string>& error_msg,
+                    const absl::optional<std::string>& error_msg,
                     blink::mojom::ServiceWorkerRegistrationObjectInfoPtr
                         registration) {
                    ASSERT_EQ(blink::mojom::ServiceWorkerErrorType::kNone,
diff --git a/content/browser/service_worker/service_worker_registry.cc b/content/browser/service_worker/service_worker_registry.cc
index a5f879d..8db1998 100644
--- a/content/browser/service_worker/service_worker_registry.cc
+++ b/content/browser/service_worker/service_worker_registry.cc
@@ -247,7 +247,7 @@
 void ServiceWorkerRegistry::FindRegistrationForIdOnly(
     int64_t registration_id,
     FindRegistrationCallback callback) {
-  FindRegistrationForIdInternal(registration_id, /*origin=*/base::nullopt,
+  FindRegistrationForIdInternal(registration_id, /*origin=*/absl::nullopt,
                                 std::move(callback));
 }
 
@@ -724,7 +724,7 @@
 
 void ServiceWorkerRegistry::FindRegistrationForIdInternal(
     int64_t registration_id,
-    const base::Optional<storage::StorageKey>& key,
+    const absl::optional<storage::StorageKey>& key,
     FindRegistrationCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   // Registration lookup is expected to abort when storage is disabled.
@@ -735,7 +735,7 @@
   }
 
   // Lookup live registration first.
-  base::Optional<scoped_refptr<ServiceWorkerRegistration>> registration =
+  absl::optional<scoped_refptr<ServiceWorkerRegistration>> registration =
       FindFromLiveRegistrationsForId(registration_id);
   if (registration) {
     blink::ServiceWorkerStatusCode status =
@@ -868,7 +868,7 @@
   return registration;
 }
 
-base::Optional<scoped_refptr<ServiceWorkerRegistration>>
+absl::optional<scoped_refptr<ServiceWorkerRegistration>>
 ServiceWorkerRegistry::FindFromLiveRegistrationsForId(int64_t registration_id) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   scoped_refptr<ServiceWorkerRegistration> registration =
@@ -886,7 +886,7 @@
   }
   // There is no live registration. Storage lookup is required. Returning
   // nullopt results in storage lookup.
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 void ServiceWorkerRegistry::DoomUncommittedResources(
diff --git a/content/browser/service_worker/service_worker_registry.h b/content/browser/service_worker/service_worker_registry.h
index fc0e2c3..bd0116e4 100644
--- a/content/browser/service_worker/service_worker_registry.h
+++ b/content/browser/service_worker/service_worker_registry.h
@@ -276,7 +276,7 @@
   void Start();
   void FindRegistrationForIdInternal(
       int64_t registration_id,
-      const base::Optional<storage::StorageKey>& key,
+      const absl::optional<storage::StorageKey>& key,
       FindRegistrationCallback callback);
   ServiceWorkerRegistration* FindInstallingRegistrationForClientUrl(
       const GURL& client_url,
@@ -296,7 +296,7 @@
   // Looks up live registrations and returns an optional value which may contain
   // a "findable" registration. See the implementation of this method for
   // what "findable" means and when a registration is returned.
-  base::Optional<scoped_refptr<ServiceWorkerRegistration>>
+  absl::optional<scoped_refptr<ServiceWorkerRegistration>>
   FindFromLiveRegistrationsForId(int64_t registration_id);
 
   void DoomUncommittedResources(const std::vector<int64_t>& resource_ids);
@@ -467,7 +467,7 @@
   // ServiceWorkerStorage once QuotaManager gets mojofied.
   const scoped_refptr<storage::QuotaManagerProxy> quota_manager_proxy_;
   const scoped_refptr<storage::SpecialStoragePolicy> special_storage_policy_;
-  base::Optional<storage::StoragePolicyObserver> storage_policy_observer_;
+  absl::optional<storage::StoragePolicyObserver> storage_policy_observer_;
 
   // For finding registrations being installed or uninstalled.
   using RegistrationRefsById =
diff --git a/content/browser/service_worker/service_worker_registry_unittest.cc b/content/browser/service_worker/service_worker_registry_unittest.cc
index 8183f52..a5d30cf 100644
--- a/content/browser/service_worker/service_worker_registry_unittest.cc
+++ b/content/browser/service_worker/service_worker_registry_unittest.cc
@@ -30,7 +30,7 @@
 struct ReadResponseHeadResult {
   int result;
   network::mojom::URLResponseHeadPtr response_head;
-  base::Optional<mojo_base::BigBuffer> metadata;
+  absl::optional<mojo_base::BigBuffer> metadata;
 };
 
 struct GetStorageUsageForStorageKeyResult {
@@ -138,7 +138,7 @@
   base::RunLoop loop;
   reader->ReadResponseHead(base::BindLambdaForTesting(
       [&](int result, network::mojom::URLResponseHeadPtr response_head,
-          base::Optional<mojo_base::BigBuffer> metadata) {
+          absl::optional<mojo_base::BigBuffer> metadata) {
         out.result = result;
         out.response_head = std::move(response_head);
         out.metadata = std::move(metadata);
@@ -476,7 +476,7 @@
 
   blink::ServiceWorkerStatusCode GetAllRegistrationsInfos(
       std::vector<ServiceWorkerRegistrationInfo>* registrations) {
-    base::Optional<blink::ServiceWorkerStatusCode> result;
+    absl::optional<blink::ServiceWorkerStatusCode> result;
     base::RunLoop loop;
     registry()->GetAllRegistrationsInfos(base::BindLambdaForTesting(
         [&](blink::ServiceWorkerStatusCode status,
diff --git a/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc b/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc
index 710181512..b3237456 100644
--- a/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc
+++ b/content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc
@@ -86,7 +86,7 @@
       std::unique_ptr<MockServiceWorkerResourceReader> copy_reader,
       std::unique_ptr<MockServiceWorkerResourceWriter> writer,
       network::TestURLLoaderFactory* loader_factory,
-      base::Optional<CheckResult>* out_check_result) {
+      absl::optional<CheckResult>* out_check_result) {
     return CreateSingleScriptUpdateChecker(
         url, url, scope, false /* force_bypass_cache */,
         blink::mojom::ScriptType::kClassic,
@@ -135,7 +135,7 @@
       std::unique_ptr<MockServiceWorkerResourceReader> copy_reader,
       std::unique_ptr<MockServiceWorkerResourceWriter> writer,
       network::TestURLLoaderFactory* loader_factory,
-      base::Optional<CheckResult>* out_check_result) {
+      absl::optional<CheckResult>* out_check_result) {
     auto fetch_client_settings_object =
         blink::mojom::FetchClientSettingsObject::New(
             network::mojom::ReferrerPolicy::kDefault, GURL(main_script_url),
@@ -151,7 +151,7 @@
         WrapReader(std::move(copy_reader)), WrapWriter(std::move(writer)),
         /*writer_resource_id=*/0,
         base::BindOnce(
-            [](base::Optional<CheckResult>* out_check_result_param,
+            [](absl::optional<CheckResult>* out_check_result_param,
                const GURL& script_url,
                ServiceWorkerSingleScriptUpdateChecker::Result result,
                std::unique_ptr<
@@ -209,7 +209,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -255,7 +255,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -306,7 +306,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -350,7 +350,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -403,7 +403,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -454,7 +454,7 @@
                                TotalBytes(body_from_storage));
 
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -541,7 +541,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -588,7 +588,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -647,7 +647,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -703,7 +703,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -753,7 +753,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateCheckerWithoutHttpCache(
           kScriptURL, GURL(kScope), std::move(compare_reader),
@@ -820,7 +820,7 @@
 // Tests cache validation behavior when updateViaCache is 'all'.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, UpdateViaCache_All) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load the main script. Should not validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -854,7 +854,7 @@
 // Tests cache validation behavior when updateViaCache is 'none'.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, UpdateViaCache_None) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load the main script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -888,7 +888,7 @@
 // Tests cache validation behavior when updateViaCache is 'imports'.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, UpdateViaCache_Imports) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load main script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -923,7 +923,7 @@
 // Tests attributions of the resource request for kClassic script.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, ScriptType_Classic_Main) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load main script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -956,7 +956,7 @@
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest,
        ScriptType_Classic_StaticImport) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load imported script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -985,7 +985,7 @@
 // Tests attributions of the resource request for kModule script.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, ScriptType_Module_Main) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load main script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -1017,7 +1017,7 @@
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest,
        ScriptType_Module_StaticImport) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load imported script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -1047,7 +1047,7 @@
 // |force_bypass_cache_for_scripts_| is true.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, ForceBypassCache) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load main script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -1081,7 +1081,7 @@
 // Tests cache validation behavior when more than 24 hours passed.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, MoreThan24Hours) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load main script. Should validate the cache.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -1135,7 +1135,7 @@
     auto copy_reader = std::make_unique<MockServiceWorkerResourceReader>();
     auto writer = std::make_unique<MockServiceWorkerResourceWriter>();
 
-    base::Optional<CheckResult> check_result;
+    absl::optional<CheckResult> check_result;
     std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
         CreateSingleScriptUpdateChecker(
             kScriptURL, kScriptURL, GURL(kScope),
@@ -1172,7 +1172,7 @@
   auto copy_reader = std::make_unique<MockServiceWorkerResourceReader>();
   auto writer = std::make_unique<MockServiceWorkerResourceWriter>();
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateChecker(
           kMainScriptURL, kMainScriptURL, GURL(kOutScope),
@@ -1216,7 +1216,7 @@
   compare_reader->ExpectReadOk(body_from_storage,
                                TotalBytes(body_from_storage));
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateChecker(
           kMainScriptURL, kMainScriptURL, GURL(kOutScope),
@@ -1257,7 +1257,7 @@
   auto copy_reader = std::make_unique<MockServiceWorkerResourceReader>();
   auto writer = std::make_unique<MockServiceWorkerResourceWriter>();
 
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
       CreateSingleScriptUpdateChecker(
           kScriptURL, kScriptURL, GURL(kScope), false /* force_bypass_cache */,
@@ -1278,7 +1278,7 @@
 // by the service worker can use the SSL info served for the main script.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, RequestSSLInfo_Classic) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load the main script. It needs a SSL info.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
@@ -1325,7 +1325,7 @@
 // by the service worker can use the SSL info served for the module script.
 TEST_F(ServiceWorkerSingleScriptUpdateCheckerTest, RequestSSLInfo_Module) {
   auto loader_factory = std::make_unique<network::TestURLLoaderFactory>();
-  base::Optional<CheckResult> check_result;
+  absl::optional<CheckResult> check_result;
 
   // Load the main script. It needs a SSL info.
   std::unique_ptr<ServiceWorkerSingleScriptUpdateChecker> checker =
diff --git a/content/browser/service_worker/service_worker_test_utils.cc b/content/browser/service_worker/service_worker_test_utils.cc
index 4f6fcd3d..77934cc 100644
--- a/content/browser/service_worker/service_worker_test_utils.cc
+++ b/content/browser/service_worker/service_worker_test_utils.cc
@@ -73,7 +73,7 @@
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ControllerServiceWorkerInfoPtr
           controller_service_worker_info,
@@ -93,7 +93,7 @@
       int error_code,
       int extended_error_code,
       const net::ResolveErrorInfo& resolve_error_info,
-      const base::Optional<std::string>& error_page_content,
+      const absl::optional<std::string>& error_page_content,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle> subresource_loaders,
       blink::mojom::PolicyContainerPtr policy_container,
       CommitFailedNavigationCallback callback) override {
@@ -238,7 +238,7 @@
   navigation_client_->CommitNavigation(
       CreateCommonNavigationParams(), CreateCommitNavigationParams(),
       network::mojom::URLResponseHead::New(),
-      mojo::ScopedDataPipeConsumerHandle(), nullptr, nullptr, base::nullopt,
+      mojo::ScopedDataPipeConsumerHandle(), nullptr, nullptr, absl::nullopt,
       nullptr, std::move(info), mojo::NullRemote(),
       base::UnguessableToken::Create(), CreateStubPolicyContainer(),
       base::BindOnce(
@@ -307,11 +307,11 @@
 }
 
 base::OnceCallback<void(blink::ServiceWorkerStatusCode)>
-ReceiveServiceWorkerStatus(base::Optional<blink::ServiceWorkerStatusCode>* out,
+ReceiveServiceWorkerStatus(absl::optional<blink::ServiceWorkerStatusCode>* out,
                            base::OnceClosure quit_closure) {
   return base::BindOnce(
       [](base::OnceClosure quit_closure,
-         base::Optional<blink::ServiceWorkerStatusCode>* out,
+         absl::optional<blink::ServiceWorkerStatusCode>* out,
          blink::ServiceWorkerStatusCode result) {
         *out = result;
         std::move(quit_closure).Run();
@@ -580,7 +580,7 @@
     response_head->content_length = expected.len;
     std::move(pending_read_response_head_callback_)
         .Run(expected.result, std::move(response_head),
-             /*metadata=*/base::nullopt);
+             /*metadata=*/absl::nullopt);
   } else {
     if (expected.len == 0) {
       body_.reset();
@@ -854,7 +854,7 @@
     base::RunLoop loop;
     reader->ReadResponseHead(base::BindLambdaForTesting(
         [&](int status, network::mojom::URLResponseHeadPtr response_head,
-            base::Optional<mojo_base::BigBuffer> metadata) {
+            absl::optional<mojo_base::BigBuffer> metadata) {
           rv = status;
           status_text = response_head->headers->GetStatusText();
           response_data_size = response_head->content_length;
diff --git a/content/browser/service_worker/service_worker_test_utils.h b/content/browser/service_worker/service_worker_test_utils.h
index 77566645..0ddb5064 100644
--- a/content/browser/service_worker/service_worker_test_utils.h
+++ b/content/browser/service_worker/service_worker_test_utils.h
@@ -39,7 +39,7 @@
 template <typename Arg>
 void ReceiveResult(BrowserThread::ID run_quit_thread,
                    base::OnceClosure quit,
-                   base::Optional<Arg>* out,
+                   absl::optional<Arg>* out,
                    Arg actual) {
   *out = actual;
   if (!quit.is_null()) {
@@ -51,13 +51,13 @@
 template <typename Arg>
 base::OnceCallback<void(Arg)> CreateReceiver(BrowserThread::ID run_quit_thread,
                                              base::OnceClosure quit,
-                                             base::Optional<Arg>* out) {
+                                             absl::optional<Arg>* out) {
   return base::BindOnce(&ReceiveResult<Arg>, run_quit_thread, std::move(quit),
                         out);
 }
 
 base::OnceCallback<void(blink::ServiceWorkerStatusCode)>
-ReceiveServiceWorkerStatus(base::Optional<blink::ServiceWorkerStatusCode>* out,
+ReceiveServiceWorkerStatus(absl::optional<blink::ServiceWorkerStatusCode>* out,
                            base::OnceClosure quit_closure);
 
 blink::ServiceWorkerStatusCode StartServiceWorker(
@@ -383,7 +383,7 @@
   // storage::mojom::ServiceWorkerDataPipeStateNotifier implementations:
   void OnComplete(int32_t status) override;
 
-  base::Optional<int32_t> complete_status_;
+  absl::optional<int32_t> complete_status_;
   base::OnceClosure on_complete_callback_;
   mojo::Receiver<storage::mojom::ServiceWorkerDataPipeStateNotifier> receiver_{
       this};
diff --git a/content/browser/service_worker/service_worker_updated_script_loader.cc b/content/browser/service_worker/service_worker_updated_script_loader.cc
index 8d0ae3a..bf1ac8e 100644
--- a/content/browser/service_worker/service_worker_updated_script_loader.cc
+++ b/content/browser/service_worker/service_worker_updated_script_loader.cc
@@ -134,7 +134,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   // Resource requests for service worker scripts should not follow redirects.
   // See comments in OnReceiveRedirect().
   NOTREACHED();
diff --git a/content/browser/service_worker/service_worker_updated_script_loader.h b/content/browser/service_worker/service_worker_updated_script_loader.h
index 49073a7..eae8049d 100644
--- a/content/browser/service_worker/service_worker_updated_script_loader.h
+++ b/content/browser/service_worker/service_worker_updated_script_loader.h
@@ -86,7 +86,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
diff --git a/content/browser/service_worker/service_worker_version.cc b/content/browser/service_worker/service_worker_version.cc
index 4f10416..39fc6c7 100644
--- a/content/browser/service_worker/service_worker_version.cc
+++ b/content/browser/service_worker/service_worker_version.cc
@@ -150,7 +150,7 @@
     blink::mojom::ServiceWorkerClientInfoPtr client_info) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
   const bool success = (status == blink::ServiceWorkerStatusCode::kOk);
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   if (!success) {
     DCHECK(!client_info);
     error_msg.emplace("Something went wrong while trying to open the window.");
@@ -184,7 +184,7 @@
     blink::mojom::ServiceWorkerClientInfoPtr client) {
   DCHECK_CURRENTLY_ON(ServiceWorkerContext::GetCoreThreadId());
   const bool success = (status == blink::ServiceWorkerStatusCode::kOk);
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   if (!success) {
     DCHECK(!client);
     error_msg.emplace("Cannot navigate to URL: " + url.spec());
@@ -1346,7 +1346,7 @@
 
   registration->ClaimClients();
   std::move(callback).Run(blink::mojom::ServiceWorkerErrorType::kNone,
-                          base::nullopt);
+                          absl::nullopt);
 }
 
 void ServiceWorkerVersion::GetClients(
diff --git a/content/browser/service_worker/service_worker_version.h b/content/browser/service_worker/service_worker_version.h
index 1db322a..54f27ccd 100644
--- a/content/browser/service_worker/service_worker_version.h
+++ b/content/browser/service_worker/service_worker_version.h
@@ -22,7 +22,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/time/clock.h"
 #include "base/time/tick_clock.h"
@@ -50,6 +49,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "services/network/public/cpp/cross_origin_embedder_policy.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/origin_trials/trial_token_validator.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/loader/fetch_client_settings_object.mojom.h"
@@ -541,7 +541,7 @@
 
   void set_cross_origin_embedder_policy(
       network::CrossOriginEmbedderPolicy cross_origin_embedder_policy);
-  const base::Optional<network::CrossOriginEmbedderPolicy>&
+  const absl::optional<network::CrossOriginEmbedderPolicy>&
   cross_origin_embedder_policy() const {
     return cross_origin_embedder_policy_;
   }
@@ -934,9 +934,9 @@
   // by the renderer process.
   //
   // PlzServiceWorker(https://crbug.com/996511):
-  // Once landed, there is no more need to use an base::Optional here. The COEP
+  // Once landed, there is no more need to use an absl::optional here. The COEP
   // header is going to be known from the beginning and can be mark as 'const'.
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
       cross_origin_embedder_policy_;
 
   Status status_ = NEW;
diff --git a/content/browser/service_worker/service_worker_version_browsertest.cc b/content/browser/service_worker/service_worker_version_browsertest.cc
index a122d6b8..a5d2d2b 100644
--- a/content/browser/service_worker/service_worker_version_browsertest.cc
+++ b/content/browser/service_worker/service_worker_version_browsertest.cc
@@ -77,7 +77,7 @@
   base::RunLoop run_loop;
   actual_blob->ReadSideData(base::BindOnce(
       [](size_t* result, base::OnceClosure continuation,
-         const base::Optional<mojo_base::BigBuffer> data) {
+         const absl::optional<mojo_base::BigBuffer> data) {
         *result = data ? data->size() : 0;
         std::move(continuation).Run();
       },
@@ -272,7 +272,7 @@
 // |coep|.
 std::unique_ptr<net::test_server::HttpResponse>
 RequestHandlerForWorkerScriptWithCoep(
-    base::Optional<network::mojom::CrossOriginEmbedderPolicyValue> coep,
+    absl::optional<network::mojom::CrossOriginEmbedderPolicyValue> coep,
     const net::test_server::HttpRequest& request) {
   static int counter = 0;
   if (request.relative_url != "/service_worker/generated")
@@ -361,7 +361,7 @@
     SetUpRegistrationWithScriptType(worker_url, script_type);
 
     // Dispatch install on a worker.
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop install_run_loop;
     Install(install_run_loop.QuitClosure(), &status);
     install_run_loop.Run();
@@ -374,7 +374,7 @@
   }
 
   void ActivateTestHelper(blink::ServiceWorkerStatusCode expected_status) {
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
     Activate(run_loop.QuitClosure(), &status);
     run_loop.Run();
@@ -460,7 +460,7 @@
 
   void StartWorker(blink::ServiceWorkerStatusCode expected_status) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop start_run_loop;
     StartWorker(start_run_loop.QuitClosure(), &status);
     start_run_loop.Run();
@@ -477,7 +477,7 @@
   void StoreRegistration(int64_t version_id,
                          blink::ServiceWorkerStatusCode expected_status) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop store_run_loop;
     ServiceWorkerVersion* version =
         wrapper()->context()->GetLiveVersion(version_id);
@@ -519,7 +519,7 @@
   }
 
   void StartWorker(base::OnceClosure done,
-                   base::Optional<blink::ServiceWorkerStatusCode>* result) {
+                   absl::optional<blink::ServiceWorkerStatusCode>* result) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
     version_->SetMainScriptResponse(CreateMainScriptResponse());
     version_->StartWorker(
@@ -528,7 +528,7 @@
   }
 
   void Install(const base::RepeatingClosure& done,
-               base::Optional<blink::ServiceWorkerStatusCode>* result) {
+               absl::optional<blink::ServiceWorkerStatusCode>* result) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
     version_->RunAfterStartWorker(
         ServiceWorkerMetrics::EventType::INSTALL,
@@ -538,7 +538,7 @@
 
   void DispatchInstallEvent(
       base::OnceClosure done,
-      base::Optional<blink::ServiceWorkerStatusCode>* result,
+      absl::optional<blink::ServiceWorkerStatusCode>* result,
       blink::ServiceWorkerStatusCode start_worker_status) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
     ASSERT_EQ(blink::ServiceWorkerStatusCode::kOk, start_worker_status);
@@ -555,7 +555,7 @@
 
   void ReceiveInstallEvent(
       base::OnceClosure done,
-      base::Optional<blink::ServiceWorkerStatusCode>* out_result,
+      absl::optional<blink::ServiceWorkerStatusCode>* out_result,
       int request_id,
       blink::mojom::ServiceWorkerEventStatus status,
       uint32_t fetch_count) {
@@ -569,13 +569,13 @@
   }
 
   void Store(base::OnceClosure done,
-             base::Optional<blink::ServiceWorkerStatusCode>* result,
+             absl::optional<blink::ServiceWorkerStatusCode>* result,
              int64_t version_id) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
   }
 
   void Activate(base::OnceClosure done,
-                base::Optional<blink::ServiceWorkerStatusCode>* result) {
+                absl::optional<blink::ServiceWorkerStatusCode>* result) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
     version_->RunAfterStartWorker(
         ServiceWorkerMetrics::EventType::ACTIVATE,
@@ -585,7 +585,7 @@
 
   void DispatchActivateEvent(
       base::OnceClosure done,
-      base::Optional<blink::ServiceWorkerStatusCode>* result,
+      absl::optional<blink::ServiceWorkerStatusCode>* result,
       blink::ServiceWorkerStatusCode start_worker_status) {
     ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
     ASSERT_EQ(blink::ServiceWorkerStatusCode::kOk, start_worker_status);
@@ -800,7 +800,7 @@
   SetUpRegistration("/service_worker/worker.js");
 
   // Start a worker.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop start_run_loop;
   StartWorker(start_run_loop.QuitClosure(), &status);
   start_run_loop.Run();
@@ -819,7 +819,7 @@
   StartServerAndNavigateToSetup();
   SetUpRegistration("/service_worker/worker.js");
   // Start a worker.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop start_run_loop;
   StartWorker(start_run_loop.QuitClosure(), &status);
   start_run_loop.Run();
@@ -1005,7 +1005,7 @@
   version_->embedded_worker()->AddObserver(&console_listener);
 
   // Dispatch install on a worker.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop install_run_loop;
   Install(install_run_loop.QuitClosure(), &status);
   install_run_loop.Run();
@@ -1062,7 +1062,7 @@
   SetUpRegistration("/service_worker/while_true_worker.js");
 
   // Start a worker, waiting until the script is loaded.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop start_run_loop;
   base::RunLoop load_run_loop;
   WaitForLoaded wait_for_load(load_run_loop.QuitClosure());
@@ -1090,7 +1090,7 @@
   SetUpRegistration("/service_worker/while_true_in_install_worker.js");
 
   // Start a worker.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop start_run_loop;
   StartWorker(start_run_loop.QuitClosure(), &status);
   start_run_loop.Run();
diff --git a/content/browser/service_worker/service_worker_version_unittest.cc b/content/browser/service_worker/service_worker_version_unittest.cc
index 02521228..25dc19a 100644
--- a/content/browser/service_worker/service_worker_version_unittest.cc
+++ b/content/browser/service_worker/service_worker_version_unittest.cc
@@ -116,7 +116,7 @@
     }
 
     // Make the registration findable via storage functions.
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
     helper_->context()->registry()->StoreRegistration(
         registration_.get(), version_.get(),
@@ -144,7 +144,7 @@
   }
 
   void SimulateDispatchEvent(ServiceWorkerMetrics::EventType event_type) {
-    base::Optional<blink::ServiceWorkerStatusCode> status;
+    absl::optional<blink::ServiceWorkerStatusCode> status;
     base::RunLoop run_loop;
 
     // Make sure worker is running.
@@ -219,9 +219,9 @@
 
 TEST_F(ServiceWorkerVersionTest, ConcurrentStartAndStop) {
   // Call StartWorker() multiple times.
-  base::Optional<blink::ServiceWorkerStatusCode> status1;
-  base::Optional<blink::ServiceWorkerStatusCode> status2;
-  base::Optional<blink::ServiceWorkerStatusCode> status3;
+  absl::optional<blink::ServiceWorkerStatusCode> status1;
+  absl::optional<blink::ServiceWorkerStatusCode> status2;
+  absl::optional<blink::ServiceWorkerStatusCode> status3;
   base::RunLoop run_loop_1;
   base::RunLoop run_loop_2;
   base::RunLoop run_loop_3;
@@ -346,7 +346,7 @@
   version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
 
   // Delete the registration.
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   helper_->context()->registry()->DeleteRegistration(
       registration_,
@@ -453,7 +453,7 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, SetDevToolsAttached) {
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   version_->StartWorker(
       ServiceWorkerMetrics::EventType::UNKNOWN,
@@ -490,7 +490,7 @@
 
   version_->SetDevToolsAttached(true);
 
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   version_->StartWorker(
       ServiceWorkerMetrics::EventType::UNKNOWN,
@@ -686,7 +686,7 @@
   version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
   bool has_stopped = false;
 
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   version_->StartRequest(
       ServiceWorkerMetrics::EventType::FETCH_MAIN_FRAME,
@@ -753,7 +753,7 @@
   auto* worker =
       helper_->AddNewPendingServiceWorker<DelayMessageWorker>(helper_.get());
 
-  base::Optional<blink::ServiceWorkerStatusCode> error_status;
+  absl::optional<blink::ServiceWorkerStatusCode> error_status;
   base::RunLoop run_loop;
   version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
   client->UnblockStartWorker();
@@ -800,7 +800,7 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, RequestNowTimeout) {
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
   ASSERT_EQ(blink::ServiceWorkerStatusCode::kOk,
@@ -825,7 +825,7 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, RequestNowTimeoutKill) {
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   version_->SetStatus(ServiceWorkerVersion::ACTIVATED);
   ASSERT_EQ(blink::ServiceWorkerStatusCode::kOk,
@@ -851,8 +851,8 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, RequestCustomizedTimeout) {
-  base::Optional<blink::ServiceWorkerStatusCode> first_status;
-  base::Optional<blink::ServiceWorkerStatusCode> second_status;
+  absl::optional<blink::ServiceWorkerStatusCode> first_status;
+  absl::optional<blink::ServiceWorkerStatusCode> second_status;
   base::RunLoop first_run_loop;
   base::RunLoop second_run_loop;
 
@@ -916,8 +916,8 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, MixedRequestTimeouts) {
-  base::Optional<blink::ServiceWorkerStatusCode> sync_status;
-  base::Optional<blink::ServiceWorkerStatusCode> fetch_status;
+  absl::optional<blink::ServiceWorkerStatusCode> sync_status;
+  absl::optional<blink::ServiceWorkerStatusCode> fetch_status;
   base::RunLoop sync_run_loop;
   base::RunLoop fetch_run_loop;
 
@@ -966,7 +966,7 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, FailToStart_RendererCrash) {
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   auto* client = helper_->AddNewPendingInstanceClient<
       DelayedFakeEmbeddedWorkerInstanceClient>(helper_.get());
@@ -990,7 +990,7 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, FailToStart_Timeout) {
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
 
   // Start starting the worker.
@@ -1075,7 +1075,7 @@
   EXPECT_EQ(EmbeddedWorkerStatus::STOPPING, version_->running_status());
 
   // Worker is now stalled in stopping. Add a start worker request.
-  base::Optional<blink::ServiceWorkerStatusCode> start_status;
+  absl::optional<blink::ServiceWorkerStatusCode> start_status;
   base::RunLoop run_loop;
   version_->StartWorker(
       ServiceWorkerMetrics::EventType::UNKNOWN,
@@ -1369,7 +1369,7 @@
 }
 
 TEST_F(ServiceWorkerVersionTest, FailToStart_RestartStalledWorker) {
-  base::Optional<blink::ServiceWorkerStatusCode> status;
+  absl::optional<blink::ServiceWorkerStatusCode> status;
   base::RunLoop run_loop;
   // Stall in starting.
   auto* client = helper_->AddNewPendingInstanceClient<
diff --git a/content/browser/site_instance_impl_unittest.cc b/content/browser/site_instance_impl_unittest.cc
index 98c3b2a..0290f65 100644
--- a/content/browser/site_instance_impl_unittest.cc
+++ b/content/browser/site_instance_impl_unittest.cc
@@ -410,7 +410,7 @@
   EXPECT_EQ(0, browser_client()->GetAndClearSiteInstanceDeleteCount());
 
   NavigationEntryImpl* e1 = new NavigationEntryImpl(
-      instance, url, Referrer(), base::nullopt, std::u16string(),
+      instance, url, Referrer(), absl::nullopt, std::u16string(),
       ui::PAGE_TRANSITION_LINK, false, nullptr /* blob_url_loader_factory */);
 
   // Redundantly setting e1's SiteInstance shouldn't affect the ref count.
@@ -420,7 +420,7 @@
 
   // Add a second reference
   NavigationEntryImpl* e2 = new NavigationEntryImpl(
-      instance, url, Referrer(), base::nullopt, std::u16string(),
+      instance, url, Referrer(), absl::nullopt, std::u16string(),
       ui::PAGE_TRANSITION_LINK, false, nullptr /* blob_url_loader_factory */);
 
   instance = nullptr;
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 8fe0360..0f9d984 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -464,13 +464,13 @@
 };
 
 bool ConvertJSONToPoint(const std::string& str, gfx::PointF* point) {
-  base::Optional<base::Value> value = base::JSONReader::Read(str);
+  absl::optional<base::Value> value = base::JSONReader::Read(str);
   if (!value.has_value())
     return false;
   if (!value->is_dict())
     return false;
-  base::Optional<double> x = value->FindDoubleKey("x");
-  base::Optional<double> y = value->FindDoubleKey("y");
+  absl::optional<double> x = value->FindDoubleKey("x");
+  absl::optional<double> y = value->FindDoubleKey("y");
   if (!x.has_value())
     return false;
   if (!y.has_value())
@@ -620,7 +620,7 @@
 
   void UpdateViewportIntersection(
       blink::mojom::ViewportIntersectionStatePtr intersection_state,
-      const base::Optional<blink::FrameVisualProperties>& visual_properties)
+      const absl::optional<blink::FrameVisualProperties>& visual_properties)
       override {
     intersection_state_ = std::move(intersection_state);
     msg_received_ = true;
@@ -989,8 +989,8 @@
     return render_frame_host_;
   }
 
-  void WaitForPageInfo(base::Optional<int> target_main_frame_width,
-                       base::Optional<float> target_device_scale_adjustment) {
+  void WaitForPageInfo(absl::optional<int> target_main_frame_width,
+                       absl::optional<float> target_device_scale_adjustment) {
     if (remote_page_info_seen_)
       return;
     target_main_frame_width_ = target_main_frame_width;
@@ -1029,8 +1029,8 @@
                                                /*main_frame_layout_width=*/0,
                                                /*device_scale_adjustment=*/1.f);
   std::unique_ptr<base::RunLoop> run_loop_;
-  base::Optional<int> target_main_frame_width_;
-  base::Optional<float> target_device_scale_adjustment_;
+  absl::optional<int> target_main_frame_width_;
+  absl::optional<float> target_device_scale_adjustment_;
 };
 
 // TODO(tonikitoo): Move to fake_remote_frame.h|cc in case it is useful
@@ -1181,7 +1181,7 @@
   // Change the device scale adjustment to trigger a RemotePageInfo update.
   web_contents()->SetWebPreferences(prefs);
   // Make sure we receive a ViewHostMsg from the main frame's renderer.
-  interceptor->WaitForPageInfo(base::Optional<int>(),
+  interceptor->WaitForPageInfo(absl::optional<int>(),
                                prefs.device_scale_adjustment);
   // Make sure the correct page message is sent to the child.
   base::RunLoop().RunUntilIdle();
@@ -1199,7 +1199,7 @@
 
   view->SetBounds(new_bounds);
   // Make sure we receive a ViewHostMsg from the main frame's renderer.
-  interceptor->WaitForPageInfo(new_bounds.width(), base::Optional<float>());
+  interceptor->WaitForPageInfo(new_bounds.width(), absl::optional<float>());
   // Make sure the correct page message is sent to the child.
   base::RunLoop().RunUntilIdle();
   received_page_info = interceptor->GetTextAutosizerPageInfo();
@@ -6221,7 +6221,7 @@
   // used to crash, as parent_routing_id refers to a proxy that doesn't exist
   // anymore.
   agent_scheduling_group_a->CreateFrameProxy(
-      blink::RemoteFrameToken(), new_routing_id, base::nullopt, view_routing_id,
+      blink::RemoteFrameToken(), new_routing_id, absl::nullopt, view_routing_id,
       parent_routing_id, blink::mojom::FrameReplicationState::New(),
       base::UnguessableToken::Create());
 
@@ -6291,7 +6291,7 @@
     params->frame = pending_frame.InitWithNewEndpointAndPassReceiver();
     ignore_result(params->interface_broker.InitWithNewPipeAndPassReceiver());
     params->previous_routing_id = previous_routing_id;
-    params->opener_frame_token = base::nullopt;
+    params->opener_frame_token = absl::nullopt;
     params->parent_routing_id =
         shell()->web_contents()->GetMainFrame()->GetRoutingID();
     params->previous_sibling_routing_id = IPC::mojom::kRoutingIdNone;
@@ -6374,7 +6374,7 @@
     params->frame = pending_frame.InitWithNewEndpointAndPassReceiver();
     ignore_result(params->interface_broker.InitWithNewPipeAndPassReceiver());
     params->previous_routing_id = IPC::mojom::kRoutingIdNone;
-    params->opener_frame_token = base::nullopt;
+    params->opener_frame_token = absl::nullopt;
     params->parent_routing_id = parent_routing_id;
     params->previous_sibling_routing_id = IPC::mojom::kRoutingIdNone;
     params->frame_owner_properties = blink::mojom::FrameOwnerProperties::New();
@@ -7809,7 +7809,7 @@
   std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              main_url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              main_url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(), controller.GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
   EXPECT_EQ(0U, restored_entry->root_node()->children.size());
@@ -7914,7 +7914,7 @@
   std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              main_url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              main_url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(), controller.GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
   EXPECT_EQ(0U, restored_entry->root_node()->children.size());
@@ -8012,7 +8012,7 @@
   std::unique_ptr<NavigationEntryImpl> restored_entry =
       NavigationEntryImpl::FromNavigationEntry(
           NavigationController::CreateNavigationEntry(
-              main_url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_RELOAD,
+              main_url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_RELOAD,
               false, std::string(), controller.GetBrowserContext(),
               nullptr /* blob_url_loader_factory */));
   EXPECT_EQ(0U, restored_entry->root_node()->children.size());
@@ -13184,7 +13184,7 @@
   // which is the scale factor for b.com's iframe element in the main frame.
   while (true) {
     auto* rwh_b = child_b->current_frame_host()->GetRenderWidgetHost();
-    base::Optional<blink::VisualProperties> properties =
+    absl::optional<blink::VisualProperties> properties =
         rwh_b->LastComputedVisualProperties();
     if (properties && cc::MathUtil::IsFloatNearlyTheSame(
                           properties->compositing_scale_factor, 0.5f)) {
@@ -13200,7 +13200,7 @@
   // parent frame b.com (0.5).
   while (true) {
     auto* rwh_c = child_c->current_frame_host()->GetRenderWidgetHost();
-    base::Optional<blink::VisualProperties> properties =
+    absl::optional<blink::VisualProperties> properties =
         rwh_c->LastComputedVisualProperties();
     if (properties && cc::MathUtil::IsFloatNearlyTheSame(
                           properties->compositing_scale_factor, 0.5f)) {
@@ -13215,7 +13215,7 @@
   // scale factor of its parent d.com (0.5).
   while (true) {
     auto* rwh_d = child_d->current_frame_host()->GetRenderWidgetHost();
-    base::Optional<blink::VisualProperties> properties =
+    absl::optional<blink::VisualProperties> properties =
         rwh_d->LastComputedVisualProperties();
     if (properties && cc::MathUtil::IsFloatNearlyTheSame(
                           properties->compositing_scale_factor, 0.25f)) {
@@ -13255,7 +13255,7 @@
   // which is the scale factor for b.com's iframe element in the main frame.
   while (true) {
     auto* rwh_b = child_b->current_frame_host()->GetRenderWidgetHost();
-    base::Optional<blink::VisualProperties> properties =
+    absl::optional<blink::VisualProperties> properties =
         rwh_b->LastComputedVisualProperties();
     if (properties && cc::MathUtil::IsFloatNearlyTheSame(
                           properties->compositing_scale_factor, 0.5f)) {
@@ -13274,7 +13274,7 @@
   // the final value is non-zero.
   while (true) {
     auto* rwh_b = child_b->current_frame_host()->GetRenderWidgetHost();
-    base::Optional<blink::VisualProperties> properties =
+    absl::optional<blink::VisualProperties> properties =
         rwh_b->LastComputedVisualProperties();
     if (properties && !cc::MathUtil::IsFloatNearlyTheSame(
                           properties->compositing_scale_factor, 0.5f)) {
@@ -13684,8 +13684,8 @@
       RenderWidgetHostViewBase* rwhv_root,
       RenderWidgetHostViewBase* rwhv_child,
       const gfx::Point& event_position,
-      base::Optional<cc::TouchAction>& effective_touch_action,
-      base::Optional<cc::TouchAction>& allowed_touch_action) {
+      absl::optional<cc::TouchAction>& effective_touch_action,
+      absl::optional<cc::TouchAction>& allowed_touch_action) {
     InputEventAckWaiter ack_observer(
         rwhv_child->GetRenderWidgetHost(),
         base::BindRepeating([](blink::mojom::InputEventResultSource source,
@@ -13898,8 +13898,8 @@
 
   WaitForTouchActionUpdated(root_thread_observer.get(),
                             child_thread_observer.get());
-  base::Optional<cc::TouchAction> effective_touch_action;
-  base::Optional<cc::TouchAction> allowed_touch_action;
+  absl::optional<cc::TouchAction> effective_touch_action;
+  absl::optional<cc::TouchAction> allowed_touch_action;
   cc::TouchAction expected_touch_action = cc::TouchAction::kPan;
   // Gestures are filtered by the intersection of touch-action values of the
   // touched element and all its ancestors up to the one that implements the
@@ -13977,8 +13977,8 @@
   // Child should inherit effective touch action none from root.
   WaitForTouchActionUpdated(root_thread_observer.get(),
                             child_thread_observer.get());
-  base::Optional<cc::TouchAction> effective_touch_action;
-  base::Optional<cc::TouchAction> allowed_touch_action;
+  absl::optional<cc::TouchAction> effective_touch_action;
+  absl::optional<cc::TouchAction> allowed_touch_action;
   cc::TouchAction expected_touch_action = cc::TouchAction::kPan;
   GetTouchActionsForChild(router, rwhv_root, rwhv_child, point_inside_child,
                           effective_touch_action, allowed_touch_action);
@@ -14064,8 +14064,8 @@
   // Child should inherit effective touch action none from root.
   WaitForTouchActionUpdated(root_thread_observer.get(),
                             child_thread_observer.get());
-  base::Optional<cc::TouchAction> effective_touch_action;
-  base::Optional<cc::TouchAction> allowed_touch_action;
+  absl::optional<cc::TouchAction> effective_touch_action;
+  absl::optional<cc::TouchAction> allowed_touch_action;
   cc::TouchAction expected_touch_action =
       cc::TouchAction::kPan | cc::TouchAction::kInternalPanXScrolls;
   GetTouchActionsForChild(router, rwhv_root, rwhv_child, point_inside_child,
diff --git a/content/browser/site_per_process_hit_test_browsertest.cc b/content/browser/site_per_process_hit_test_browsertest.cc
index 9e88faa..05e9add2 100644
--- a/content/browser/site_per_process_hit_test_browsertest.cc
+++ b/content/browser/site_per_process_hit_test_browsertest.cc
@@ -4345,12 +4345,12 @@
 
   void Wait() { run_loop_.Run(); }
 
-  base::Optional<ui::Cursor> cursor() const { return cursor_; }
+  absl::optional<ui::Cursor> cursor() const { return cursor_; }
 
  private:
   base::RunLoop run_loop_;
   RenderWidgetHostImpl* render_widget_host_;
-  base::Optional<ui::Cursor> cursor_;
+  absl::optional<ui::Cursor> cursor_;
 };
 
 // Verify that we receive a mouse cursor update message when we mouse over
diff --git a/content/browser/sms/sms_browsertest.cc b/content/browser/sms/sms_browsertest.cc
index 32d252c1..f9cf9d9 100644
--- a/content/browser/sms/sms_browsertest.cc
+++ b/content/browser/sms/sms_browsertest.cc
@@ -735,13 +735,13 @@
       }));
 
   service->Receive(base::BindLambdaForTesting(
-      [](SmsStatus status, const base::Optional<std::string>& otp) {
+      [](SmsStatus status, const absl::optional<std::string>& otp) {
         EXPECT_EQ(SmsStatus::kSuccess, status);
         EXPECT_EQ("ABC234", otp);
       }));
 
   service2->Receive(base::BindLambdaForTesting(
-      [&navigate](SmsStatus status, const base::Optional<std::string>& otp) {
+      [&navigate](SmsStatus status, const absl::optional<std::string>& otp) {
         EXPECT_EQ(SmsStatus::kSuccess, status);
         EXPECT_EQ("DEF567", otp);
         navigate.Quit();
diff --git a/content/browser/sms/sms_fetcher_impl.cc b/content/browser/sms/sms_fetcher_impl.cc
index e97f18c5..11b4c14 100644
--- a/content/browser/sms/sms_fetcher_impl.cc
+++ b/content/browser/sms/sms_fetcher_impl.cc
@@ -109,9 +109,9 @@
   return true;
 }
 
-void SmsFetcherImpl::OnRemote(base::Optional<OriginList> origin_list,
-                              base::Optional<std::string> one_time_code,
-                              base::Optional<FailureType> failure_type) {
+void SmsFetcherImpl::OnRemote(absl::optional<OriginList> origin_list,
+                              absl::optional<std::string> one_time_code,
+                              absl::optional<FailureType> failure_type) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
   if (failure_type) {
diff --git a/content/browser/sms/sms_fetcher_impl.h b/content/browser/sms/sms_fetcher_impl.h
index bddc962..14a0e170 100644
--- a/content/browser/sms/sms_fetcher_impl.h
+++ b/content/browser/sms/sms_fetcher_impl.h
@@ -10,13 +10,13 @@
 
 #include "base/callback_forward.h"
 #include "base/containers/flat_map.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/supports_user_data.h"
 #include "content/browser/sms/sms_provider.h"
 #include "content/browser/sms/sms_queue.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/sms_fetcher.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
@@ -56,9 +56,9 @@
   bool HasSubscribers() override;
 
  private:
-  void OnRemote(base::Optional<OriginList>,
-                base::Optional<std::string> one_time_code,
-                base::Optional<FailureType> failure_type);
+  void OnRemote(absl::optional<OriginList>,
+                absl::optional<std::string> one_time_code,
+                absl::optional<FailureType> failure_type);
 
   bool Notify(const OriginList& origin_list,
               const std::string& one_time_code,
diff --git a/content/browser/sms/sms_fetcher_impl_unittest.cc b/content/browser/sms/sms_fetcher_impl_unittest.cc
index 9848ab3..6ec67c8 100644
--- a/content/browser/sms/sms_fetcher_impl_unittest.cc
+++ b/content/browser/sms/sms_fetcher_impl_unittest.cc
@@ -36,9 +36,9 @@
       FetchRemoteSms,
       base::OnceClosure(WebContents*,
                         const url::Origin&,
-                        base::OnceCallback<void(base::Optional<OriginList>,
-                                                base::Optional<std::string>,
-                                                base::Optional<FailureType>)>));
+                        base::OnceCallback<void(absl::optional<OriginList>,
+                                                absl::optional<std::string>,
+                                                absl::optional<FailureType>)>));
 
  private:
   DISALLOW_COPY_AND_ASSIGN(MockContentBrowserClient);
@@ -112,12 +112,12 @@
   EXPECT_CALL(*client(), FetchRemoteSms(_, _, _))
       .WillOnce(Invoke(
           [&](WebContents*, const url::Origin&,
-              base::OnceCallback<void(base::Optional<OriginList>,
-                                      base::Optional<std::string>,
-                                      base::Optional<FailureType>)> callback) {
+              base::OnceCallback<void(absl::optional<OriginList>,
+                                      absl::optional<std::string>,
+                                      absl::optional<FailureType>)> callback) {
             std::move(callback).Run(
                 OriginList{url::Origin::Create(GURL("https://a.com"))}, "123",
-                base::nullopt);
+                absl::nullopt);
             return base::NullCallback();
           }));
 
@@ -134,11 +134,11 @@
   EXPECT_CALL(*client(), FetchRemoteSms(_, _, _))
       .WillOnce(Invoke(
           [&](WebContents*, const url::Origin&,
-              base::OnceCallback<void(base::Optional<OriginList>,
-                                      base::Optional<std::string>,
-                                      base::Optional<FailureType>)> callback) {
-            std::move(callback).Run(base::nullopt, base::nullopt,
-                                    base::nullopt);
+              base::OnceCallback<void(absl::optional<OriginList>,
+                                      absl::optional<std::string>,
+                                      absl::optional<FailureType>)> callback) {
+            std::move(callback).Run(absl::nullopt, absl::nullopt,
+                                    absl::nullopt);
             return base::NullCallback();
           }));
 
@@ -155,12 +155,12 @@
   EXPECT_CALL(*client(), FetchRemoteSms(_, _, _))
       .WillOnce(Invoke(
           [&](WebContents*, const url::Origin&,
-              base::OnceCallback<void(base::Optional<OriginList>,
-                                      base::Optional<std::string>,
-                                      base::Optional<FailureType>)> callback) {
+              base::OnceCallback<void(absl::optional<OriginList>,
+                                      absl::optional<std::string>,
+                                      absl::optional<FailureType>)> callback) {
             std::move(callback).Run(
                 OriginList{url::Origin::Create(GURL("b.com"))}, "123",
-                base::nullopt);
+                absl::nullopt);
             return base::NullCallback();
           }));
 
@@ -180,12 +180,12 @@
   EXPECT_CALL(*client(), FetchRemoteSms(_, _, _))
       .WillOnce(Invoke(
           [&](WebContents*, const url::Origin&,
-              base::OnceCallback<void(base::Optional<OriginList>,
-                                      base::Optional<std::string>,
-                                      base::Optional<FailureType>)> callback) {
+              base::OnceCallback<void(absl::optional<OriginList>,
+                                      absl::optional<std::string>,
+                                      absl::optional<FailureType>)> callback) {
             std::move(callback).Run(
                 OriginList{url::Origin::Create(GURL("https://a.com"))}, "123",
-                base::nullopt);
+                absl::nullopt);
             return base::NullCallback();
           }));
 
@@ -262,11 +262,11 @@
   EXPECT_CALL(*client(), FetchRemoteSms(_, _, _))
       .WillOnce(Invoke(
           [&](WebContents*, const url::Origin&,
-              base::OnceCallback<void(base::Optional<OriginList>,
-                                      base::Optional<std::string>,
-                                      base::Optional<FailureType>)> callback) {
+              base::OnceCallback<void(absl::optional<OriginList>,
+                                      absl::optional<std::string>,
+                                      absl::optional<FailureType>)> callback) {
             std::move(callback).Run(
-                base::nullopt, base::nullopt,
+                absl::nullopt, absl::nullopt,
                 static_cast<FailureType>(FailureType::kPromptCancelled));
             return base::NullCallback();
           }));
@@ -285,9 +285,9 @@
   EXPECT_CALL(*client(), FetchRemoteSms(_, _, _))
       .WillOnce(Invoke(
           [&](WebContents*, const url::Origin&,
-              base::OnceCallback<void(base::Optional<OriginList>,
-                                      base::Optional<std::string>,
-                                      base::Optional<FailureType>)> callback) {
+              base::OnceCallback<void(absl::optional<OriginList>,
+                                      absl::optional<std::string>,
+                                      absl::optional<FailureType>)> callback) {
             return cancel_callback.Get();
           }));
 
diff --git a/content/browser/sms/sms_parser.cc b/content/browser/sms/sms_parser.cc
index fe8b502..99b5992 100644
--- a/content/browser/sms/sms_parser.cc
+++ b/content/browser/sms/sms_parser.cc
@@ -7,9 +7,9 @@
 
 #include "content/browser/sms/sms_parser.h"
 
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "net/base/url_util.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/re2/src/re2/re2.h"
 #include "url/gurl.h"
 #include "url/origin.h"
diff --git a/content/browser/sms/sms_parser.h b/content/browser/sms/sms_parser.h
index 9715bac..f344902 100644
--- a/content/browser/sms/sms_parser.h
+++ b/content/browser/sms/sms_parser.h
@@ -5,9 +5,9 @@
 #ifndef CONTENT_BROWSER_SMS_SMS_PARSER_H_
 #define CONTENT_BROWSER_SMS_SMS_PARSER_H_
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/sms_fetcher.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
diff --git a/content/browser/sms/sms_parser_unittest.cc b/content/browser/sms/sms_parser_unittest.cc
index 4ab3dda..a481f270 100644
--- a/content/browser/sms/sms_parser_unittest.cc
+++ b/content/browser/sms/sms_parser_unittest.cc
@@ -6,9 +6,9 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
diff --git a/content/browser/sms/sms_queue.cc b/content/browser/sms/sms_queue.cc
index f478ac45..f43cdfa 100644
--- a/content/browser/sms/sms_queue.cc
+++ b/content/browser/sms/sms_queue.cc
@@ -6,7 +6,7 @@
 
 #include "base/callback.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/sms/webotp_service.cc b/content/browser/sms/webotp_service.cc
index 45fa320..7f9c000 100644
--- a/content/browser/sms/webotp_service.cc
+++ b/content/browser/sms/webotp_service.cc
@@ -15,7 +15,6 @@
 #include "base/check_op.h"
 #include "base/command_line.h"
 #include "base/metrics/histogram_functions.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/browser/sms/sms_metrics.h"
 #include "content/browser/sms/user_consent_handler.h"
@@ -27,6 +26,7 @@
 #include "content/public/common/content_features.h"
 #include "content/public/common/content_switches.h"
 #include "services/metrics/public/cpp/ukm_builders.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/sms/webotp_constants.h"
 #include "third_party/blink/public/mojom/sms/webotp_service.mojom-shared.h"
 
@@ -141,14 +141,14 @@
   WebContents* web_contents =
       content::WebContents::FromRenderFrameHost(render_frame_host());
   if (!web_contents->GetDelegate()) {
-    std::move(callback).Run(SmsStatus::kCancelled, base::nullopt);
+    std::move(callback).Run(SmsStatus::kCancelled, absl::nullopt);
     return;
   }
 
   DCHECK(!origin_list_.empty());
   // Abort the last request if there is we have not yet handled it.
   if (callback_) {
-    std::move(callback_).Run(SmsStatus::kCancelled, base::nullopt);
+    std::move(callback_).Run(SmsStatus::kCancelled, absl::nullopt);
     fetcher_->Unsubscribe(origin_list_, this);
   }
 
@@ -281,7 +281,7 @@
 void WebOTPService::CompleteRequest(blink::mojom::SmsStatus status) {
   DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
-  base::Optional<std::string> code = base::nullopt;
+  absl::optional<std::string> code = absl::nullopt;
   if (status == SmsStatus::kSuccess) {
     DCHECK(one_time_code_);
     code = one_time_code_;
diff --git a/content/browser/sms/webotp_service.h b/content/browser/sms/webotp_service.h
index d99fd9e..4c3c757 100644
--- a/content/browser/sms/webotp_service.h
+++ b/content/browser/sms/webotp_service.h
@@ -93,13 +93,13 @@
 
   const OriginList origin_list_;
   ReceiveCallback callback_;
-  base::Optional<std::string> one_time_code_;
+  absl::optional<std::string> one_time_code_;
   base::TimeTicks start_time_;
   base::TimeTicks receive_time_;
   // Timer to trigger timeout for any pending request. We (re)arm the timer
   // every time we receive a new request.
   base::DelayTimer timeout_timer_;
-  base::Optional<FailureType> prompt_failure_;
+  absl::optional<FailureType> prompt_failure_;
 
   // The ptr is valid only when we are handling an incoming otp response.
   std::unique_ptr<UserConsentHandler> consent_handler_;
diff --git a/content/browser/sms/webotp_service_unittest.cc b/content/browser/sms/webotp_service_unittest.cc
index 2252050..ad5e6ca2 100644
--- a/content/browser/sms/webotp_service_unittest.cc
+++ b/content/browser/sms/webotp_service_unittest.cc
@@ -36,13 +36,14 @@
 #include "services/service_manager/public/cpp/bind_source_info.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/sms/webotp_service_destroyed_reason.h"
 #include "third_party/blink/public/common/sms/webotp_service_outcome.h"
 #include "third_party/blink/public/mojom/sms/webotp_service.mojom-shared.h"
 #include "third_party/blink/public/mojom/sms/webotp_service.mojom.h"
 
 using base::BindLambdaForTesting;
-using base::Optional;
+using absl::optional;
 using blink::WebOTPServiceDestroyedReason;
 using blink::mojom::SmsStatus;
 using blink::mojom::WebOTPService;
@@ -207,7 +208,7 @@
           [&service]() { service.NotifyReceive(GURL(kTestUrl), "hi"); }));
 
   service.MakeRequest(BindLambdaForTesting(
-      [&loop](SmsStatus status, const Optional<string>& otp) {
+      [&loop](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kSuccess, status);
         EXPECT_EQ("hi", otp.value());
         loop.Quit();
@@ -231,7 +232,7 @@
             [&service]() { service.NotifyReceive(GURL(kTestUrl), "first"); }));
 
     service.MakeRequest(BindLambdaForTesting(
-        [&loop](SmsStatus status, const Optional<string>& otp) {
+        [&loop](SmsStatus status, const optional<string>& otp) {
           EXPECT_EQ("first", otp.value());
           EXPECT_EQ(SmsStatus::kSuccess, status);
           loop.Quit();
@@ -248,7 +249,7 @@
             [&service]() { service.NotifyReceive(GURL(kTestUrl), "second"); }));
 
     service.MakeRequest(BindLambdaForTesting(
-        [&loop](SmsStatus status, const Optional<string>& otp) {
+        [&loop](SmsStatus status, const optional<string>& otp) {
           EXPECT_EQ("second", otp.value());
           EXPECT_EQ(SmsStatus::kSuccess, status);
           loop.Quit();
@@ -264,7 +265,7 @@
   Service service(web_contents());
 
   SmsStatus sms_status;
-  Optional<string> response;
+  optional<string> response;
 
   base::RunLoop sms_loop;
 
@@ -278,7 +279,7 @@
 
   service.MakeRequest(
       BindLambdaForTesting([&sms_status, &response, &sms_loop](
-                               SmsStatus status, const Optional<string>& otp) {
+                               SmsStatus status, const optional<string>& otp) {
         sms_status = status;
         response = otp;
         sms_loop.Quit();
@@ -296,7 +297,7 @@
   Service service(web_contents());
 
   SmsStatus sms_status;
-  Optional<string> response;
+  optional<string> response;
 
   base::RunLoop sms_loop;
 
@@ -312,7 +313,7 @@
 
   service.MakeRequest(
       BindLambdaForTesting([&sms_status, &response, &sms_loop](
-                               SmsStatus status, const Optional<string>& otp) {
+                               SmsStatus status, const optional<string>& otp) {
         sms_status = status;
         response = otp;
         sms_loop.Quit();
@@ -330,9 +331,9 @@
   Service service(web_contents());
 
   SmsStatus sms_status1;
-  Optional<string> response1;
+  optional<string> response1;
   SmsStatus sms_status2;
-  Optional<string> response2;
+  optional<string> response2;
 
   base::RunLoop sms1_loop, sms2_loop;
 
@@ -343,7 +344,7 @@
 
   service.MakeRequest(
       BindLambdaForTesting([&sms_status1, &response1, &sms1_loop](
-                               SmsStatus status, const Optional<string>& otp) {
+                               SmsStatus status, const optional<string>& otp) {
         sms_status1 = status;
         response1 = otp;
         sms1_loop.Quit();
@@ -353,7 +354,7 @@
   // one request can be pending per origin per tab.
   service.MakeRequest(
       BindLambdaForTesting([&sms_status2, &response2, &sms2_loop](
-                               SmsStatus status, const Optional<string>& otp) {
+                               SmsStatus status, const optional<string>& otp) {
         sms_status2 = status;
         response2 = otp;
         sms2_loop.Quit();
@@ -362,7 +363,7 @@
   sms1_loop.Run();
   sms2_loop.Run();
 
-  EXPECT_EQ(base::nullopt, response1);
+  EXPECT_EQ(absl::nullopt, response1);
   EXPECT_EQ(SmsStatus::kCancelled, sms_status1);
 
   EXPECT_EQ("second", response2.value());
@@ -392,9 +393,9 @@
   base::RunLoop reload;
 
   service->Receive(base::BindLambdaForTesting(
-      [&reload](SmsStatus status, const Optional<string>& otp) {
+      [&reload](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kUnhandledRequest, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         reload.Quit();
       }));
 
@@ -421,9 +422,9 @@
   base::RunLoop loop;
 
   service->Receive(base::BindLambdaForTesting(
-      [&loop](SmsStatus status, const Optional<string>& otp) {
+      [&loop](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kCancelled, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         loop.Quit();
       }));
 
@@ -444,9 +445,9 @@
   base::RunLoop loop;
 
   service.MakeRequest(BindLambdaForTesting(
-      [&loop](SmsStatus status, const Optional<string>& otp) {
+      [&loop](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kAborted, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         loop.Quit();
       }));
 
@@ -482,9 +483,9 @@
   base::RunLoop reload;
 
   service->Receive(base::BindLambdaForTesting(
-      [&reload](SmsStatus status, const Optional<string>& otp) {
+      [&reload](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kUnhandledRequest, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         reload.Quit();
       }));
 
@@ -520,9 +521,9 @@
   base::RunLoop reload;
 
   service->Receive(base::BindLambdaForTesting(
-      [&reload](SmsStatus status, const Optional<string>& otp) {
+      [&reload](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kUnhandledRequest, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         reload.Quit();
       }));
 
@@ -600,9 +601,9 @@
   ServiceWithPrompt service(web_contents());
 
   SmsStatus sms_status1;
-  Optional<string> response1;
+  optional<string> response1;
   SmsStatus sms_status2;
-  Optional<string> response2;
+  optional<string> response2;
 
   base::RunLoop sms_loop;
 
@@ -618,7 +619,7 @@
   // First request.
   service.MakeRequest(
       BindLambdaForTesting([&sms_status1, &response1, &service](
-                               SmsStatus status, const Optional<string>& otp) {
+                               SmsStatus status, const optional<string>& otp) {
         sms_status1 = status;
         response1 = otp;
         service.ConfirmPrompt();
@@ -627,7 +628,7 @@
   // Make second request before confirming prompt.
   service.MakeRequest(
       BindLambdaForTesting([&sms_status2, &response2, &sms_loop](
-                               SmsStatus status, const Optional<string>& otp) {
+                               SmsStatus status, const optional<string>& otp) {
         sms_status2 = status;
         response2 = otp;
         sms_loop.Quit();
@@ -635,7 +636,7 @@
 
   sms_loop.Run();
 
-  EXPECT_EQ(base::nullopt, response1);
+  EXPECT_EQ(absl::nullopt, response1);
   EXPECT_EQ(SmsStatus::kCancelled, sms_status1);
 
   EXPECT_EQ("second", response2.value());
@@ -652,9 +653,9 @@
   service.ExpectRequestUserConsent();
 
   service.MakeRequest(BindLambdaForTesting(
-      [&loop](SmsStatus status, const Optional<string>& otp) {
+      [&loop](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kAborted, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         loop.Quit();
       }));
 
@@ -683,9 +684,9 @@
     service.ExpectRequestUserConsent();
 
     service.MakeRequest(BindLambdaForTesting(
-        [&loop](SmsStatus status, const Optional<string>& otp) {
+        [&loop](SmsStatus status, const optional<string>& otp) {
           EXPECT_EQ(SmsStatus::kAborted, status);
-          EXPECT_EQ(base::nullopt, otp);
+          EXPECT_EQ(absl::nullopt, otp);
           loop.Quit();
         }));
 
@@ -711,7 +712,7 @@
     service.ExpectRequestUserConsent();
 
     service.MakeRequest(BindLambdaForTesting(
-        [&loop](SmsStatus status, const Optional<string>& otp) {
+        [&loop](SmsStatus status, const optional<string>& otp) {
           // Verify that the 2nd request completes successfully after prompt
           // confirmation.
           EXPECT_EQ(SmsStatus::kSuccess, status);
@@ -740,9 +741,9 @@
   service.ExpectRequestUserConsent();
 
   service.MakeRequest(BindLambdaForTesting(
-      [&callback_loop1](SmsStatus status, const Optional<string>& otp) {
+      [&callback_loop1](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kAborted, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         callback_loop1.Quit();
       }));
 
@@ -757,7 +758,7 @@
   base::ThreadTaskRunnerHandle::Get()->PostTaskAndReply(
       FROM_HERE, BindLambdaForTesting([&]() {
         service.MakeRequest(BindLambdaForTesting(
-            [&callback_loop2](SmsStatus status, const Optional<string>& otp) {
+            [&callback_loop2](SmsStatus status, const optional<string>& otp) {
               EXPECT_EQ(SmsStatus::kSuccess, status);
               EXPECT_EQ("hi", otp.value());
               callback_loop2.Quit();
@@ -791,7 +792,7 @@
       }));
 
   service.MakeRequest(BindLambdaForTesting(
-      [&loop](SmsStatus status, const Optional<string>& otp) { loop.Quit(); }));
+      [&loop](SmsStatus status, const optional<string>& otp) { loop.Quit(); }));
 
   loop.Run();
 
@@ -817,7 +818,7 @@
       }));
 
   service.MakeRequest(BindLambdaForTesting(
-      [&loop](SmsStatus status, const Optional<string>& otp) { loop.Quit(); }));
+      [&loop](SmsStatus status, const optional<string>& otp) { loop.Quit(); }));
 
   loop.Run();
 
@@ -853,9 +854,9 @@
   base::RunLoop reload;
 
   service->Receive(base::BindLambdaForTesting(
-      [&reload](SmsStatus status, const Optional<string>& otp) {
+      [&reload](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kUnhandledRequest, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         reload.Quit();
       }));
 
@@ -1012,9 +1013,9 @@
   base::RunLoop reload;
 
   service->Receive(base::BindLambdaForTesting(
-      [&reload](SmsStatus status, const Optional<string>& otp) {
+      [&reload](SmsStatus status, const optional<string>& otp) {
         EXPECT_EQ(SmsStatus::kUnhandledRequest, status);
-        EXPECT_EQ(base::nullopt, otp);
+        EXPECT_EQ(absl::nullopt, otp);
         reload.Quit();
       }));
 
@@ -1088,7 +1089,7 @@
       }));
 
   service1.MakeRequest(BindLambdaForTesting(
-      [&loop1](SmsStatus status, const Optional<string>& otp) {
+      [&loop1](SmsStatus status, const optional<string>& otp) {
         loop1.Quit();
       }));
 
@@ -1111,7 +1112,7 @@
       }));
 
   service2.MakeRequest(BindLambdaForTesting(
-      [&loop2](SmsStatus status, const Optional<string>& otp) {
+      [&loop2](SmsStatus status, const optional<string>& otp) {
         loop2.Quit();
       }));
 
diff --git a/content/browser/speech/speech_recognizer_impl.cc b/content/browser/speech/speech_recognizer_impl.cc
index 010a455..87e8906 100644
--- a/content/browser/speech/speech_recognizer_impl.cc
+++ b/content/browser/speech/speech_recognizer_impl.cc
@@ -536,7 +536,7 @@
 }
 
 void SpeechRecognizerImpl::OnDeviceInfo(
-    const base::Optional<media::AudioParameters>& params) {
+    const absl::optional<media::AudioParameters>& params) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   device_params_ = params.value_or(AudioParameters());
   DVLOG(1) << "Device parameters: " << device_params_.AsHumanReadableString();
diff --git a/content/browser/speech/speech_recognizer_impl.h b/content/browser/speech/speech_recognizer_impl.h
index c3f699b..43bfbd8 100644
--- a/content/browser/speech/speech_recognizer_impl.h
+++ b/content/browser/speech/speech_recognizer_impl.h
@@ -113,7 +113,7 @@
   void ProcessAudioPipeline(const AudioChunk& raw_audio);
 
   // Callback from AudioSystem.
-  void OnDeviceInfo(const base::Optional<media::AudioParameters>& params);
+  void OnDeviceInfo(const absl::optional<media::AudioParameters>& params);
 
   // The methods below handle transitions of the recognizer FSM.
   FSMState PrepareRecognition(const FSMEventArgs&);
diff --git a/content/browser/speech/tts_controller_impl.cc b/content/browser/speech/tts_controller_impl.cc
index 1cd6f66..6237279 100644
--- a/content/browser/speech/tts_controller_impl.cc
+++ b/content/browser/speech/tts_controller_impl.cc
@@ -43,7 +43,7 @@
 
 #if BUILDFLAG(IS_CHROMEOS_ASH)
 bool VoiceIdMatches(
-    const base::Optional<TtsControllerDelegate::PreferredVoiceId>& id,
+    const absl::optional<TtsControllerDelegate::PreferredVoiceId>& id,
     const content::VoiceData& voice) {
   if (!id.has_value() || voice.name.empty() ||
       (voice.engine_id.empty() && !voice.native))
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index 5fe7df9..bb9873b97 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -395,7 +395,7 @@
   // necessarily have site instances.  Without a process, the entry can't
   // possibly have insecure content.  See bug https://crbug.com/12423.
   if (site_instance && ssl_host_state_delegate_) {
-    const base::Optional<url::Origin>& entry_origin =
+    const absl::optional<url::Origin>& entry_origin =
         entry->root_node()->frame_entry->committed_origin();
     // In some cases (e.g., unreachable URLs), navigation entries might not have
     // origins attached to them. We don't care about tracking mixed content for
diff --git a/content/browser/storage_partition_impl.cc b/content/browser/storage_partition_impl.cc
index f2193d2..73dbd97f0 100644
--- a/content/browser/storage_partition_impl.cc
+++ b/content/browser/storage_partition_impl.cc
@@ -23,7 +23,6 @@
 #include "base/memory/ptr_util.h"
 #include "base/memory/weak_ptr.h"
 #include "base/metrics/histogram_functions.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/sequenced_task_runner.h"
 #include "base/single_thread_task_runner.h"
@@ -116,6 +115,7 @@
 #include "storage/browser/quota/quota_client_type.h"
 #include "storage/browser/quota/quota_manager.h"
 #include "storage/browser/quota/quota_settings.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-shared.h"
 #include "third_party/blink/public/mojom/quota/quota_types.mojom.h"
@@ -484,7 +484,7 @@
 
   void ContinueAfterInterceptor(
       bool use_fallback,
-      const base::Optional<net::AuthCredentials>& auth_credentials) {
+      const absl::optional<net::AuthCredentials>& auth_credentials) {
     DCHECK_CURRENTLY_ON(BrowserThread::UI);
     DCHECK(!(use_fallback && auth_credentials.has_value()));
     if (!use_fallback) {
@@ -494,7 +494,7 @@
 
     WebContents* web_contents = web_contents_getter_.Run();
     if (!web_contents) {
-      OnAuthCredentials(base::nullopt);
+      OnAuthCredentials(absl::nullopt);
       return;
     }
 
@@ -507,13 +507,13 @@
                        weak_factory_.GetWeakPtr()));
     creating_login_delegate_ = false;
     if (!login_delegate_) {
-      OnAuthCredentials(base::nullopt);
+      OnAuthCredentials(absl::nullopt);
       return;
     }
   }
 
   void OnAuthCredentials(
-      const base::Optional<net::AuthCredentials>& auth_credentials) {
+      const absl::optional<net::AuthCredentials>& auth_credentials) {
     DCHECK_CURRENTLY_ON(BrowserThread::UI);
     // CreateLoginDelegate must not call the callback reentrantly. For
     // robustness, detect this mistake.
@@ -552,7 +552,7 @@
   if (!web_contents_getter || !web_contents_getter.Run()) {
     mojo::Remote<network::mojom::AuthChallengeResponder>
         auth_challenge_responder_remote(std::move(auth_challenge_responder));
-    auth_challenge_responder_remote->OnAuthCredentials(base::nullopt);
+    auth_challenge_responder_remote->OnAuthCredentials(absl::nullopt);
     return;
   }
   new LoginHandlerDelegate(std::move(auth_challenge_responder),
@@ -843,7 +843,7 @@
   QuotaManagedDataDeletionHelper(
       uint32_t remove_mask,
       uint32_t quota_storage_remove_mask,
-      const base::Optional<url::Origin>& storage_origin,
+      const absl::optional<url::Origin>& storage_origin,
       base::OnceClosure callback)
       : remove_mask_(remove_mask),
         quota_storage_remove_mask_(quota_storage_remove_mask),
@@ -880,7 +880,7 @@
   // All of these data are accessed on IO thread.
   uint32_t remove_mask_;
   uint32_t quota_storage_remove_mask_;
-  base::Optional<url::Origin> storage_origin_;
+  absl::optional<url::Origin> storage_origin_;
   base::OnceClosure callback_;
   int task_count_;
 
@@ -985,8 +985,8 @@
       new StoragePartitionImpl::QuotaManagedDataDeletionHelper(
           remove_mask_, quota_storage_remove_mask_,
           storage_origin.is_empty()
-              ? base::nullopt
-              : base::make_optional(url::Origin::Create(storage_origin)),
+              ? absl::nullopt
+              : absl::make_optional(url::Origin::Create(storage_origin)),
           std::move(callback));
   helper->ClearDataOnIOThread(quota_manager, begin, end, special_storage_policy,
                               std::move(origin_matcher),
@@ -1683,7 +1683,7 @@
 }
 
 void StoragePartitionImpl::OnAuthRequired(
-    const base::Optional<base::UnguessableToken>& window_id,
+    const absl::optional<base::UnguessableToken>& window_id,
     uint32_t request_id,
     const GURL& url,
     bool first_auth_attempt,
@@ -1724,7 +1724,7 @@
 }
 
 void StoragePartitionImpl::OnCertificateRequested(
-    const base::Optional<base::UnguessableToken>& window_id,
+    const absl::optional<base::UnguessableToken>& window_id,
     const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
     mojo::PendingRemote<network::mojom::ClientCertificateResponder>
         cert_responder) {
@@ -2457,7 +2457,7 @@
 
 storage::mojom::Partition* StoragePartitionImpl::GetStorageServicePartition() {
   if (!remote_partition_) {
-    base::Optional<base::FilePath> storage_path;
+    absl::optional<base::FilePath> storage_path;
     if (!is_in_memory_) {
       storage_path =
           browser_context_->GetPath().Append(relative_partition_path_);
diff --git a/content/browser/storage_partition_impl.h b/content/browser/storage_partition_impl.h
index 7bcc0371..5133113 100644
--- a/content/browser/storage_partition_impl.h
+++ b/content/browser/storage_partition_impl.h
@@ -279,7 +279,7 @@
                              bool fatal,
                              OnSSLCertificateErrorCallback response) override;
   void OnCertificateRequested(
-      const base::Optional<base::UnguessableToken>& window_id,
+      const absl::optional<base::UnguessableToken>& window_id,
       const scoped_refptr<net::SSLCertRequestInfo>& cert_info,
       mojo::PendingRemote<network::mojom::ClientCertificateResponder>
           cert_responder) override;
@@ -287,7 +287,7 @@
       mojo::PendingReceiver<network::mojom::URLLoaderNetworkServiceObserver>
           listener) override;
   void OnAuthRequired(
-      const base::Optional<base::UnguessableToken>& window_id,
+      const absl::optional<base::UnguessableToken>& window_id,
       uint32_t request_id,
       const GURL& url,
       bool first_auth_attempt,
diff --git a/content/browser/storage_partition_impl_map.cc b/content/browser/storage_partition_impl_map.cc
index dbfc7b6..8210f87 100644
--- a/content/browser/storage_partition_impl_map.cc
+++ b/content/browser/storage_partition_impl_map.cc
@@ -339,7 +339,7 @@
   base::FilePath relative_partition_path = GetStoragePartitionPath(
       partition_config.partition_domain(), partition_config.partition_name());
 
-  base::Optional<StoragePartitionConfig> fallback_config =
+  absl::optional<StoragePartitionConfig> fallback_config =
       partition_config.GetFallbackForBlobUrls();
   StoragePartitionImpl* fallback_for_blob_urls =
       fallback_config.has_value() ? Get(*fallback_config, /*can_create=*/false)
diff --git a/content/browser/storage_partition_impl_unittest.cc b/content/browser/storage_partition_impl_unittest.cc
index ab7cf844..f74c286 100644
--- a/content/browser/storage_partition_impl_unittest.cc
+++ b/content/browser/storage_partition_impl_unittest.cc
@@ -166,7 +166,7 @@
     net::CookieInclusionStatus status;
     std::unique_ptr<net::CanonicalCookie> cc(
         net::CanonicalCookie::Create(origin.GetURL(), "A=1", base::Time::Now(),
-                                     base::nullopt /* server_time */, &status));
+                                     absl::nullopt /* server_time */, &status));
     storage_partition_->GetCookieManagerForBrowserProcess()->SetCanonicalCookie(
         *cc, origin.GetURL(), net::CookieOptions::MakeAllInclusive(),
         base::BindOnce(&RemoveCookieTester::SetCookieCallback,
@@ -283,7 +283,7 @@
     auto database = storage::AsyncDomStorageDatabase::OpenDirectory(
         std::move(options),
         storage_partition_->GetPath().Append(storage::kLocalStoragePath),
-        storage::kLocalStorageLeveldbName, base::nullopt,
+        storage::kLocalStorageLeveldbName, absl::nullopt,
         base::ThreadTaskRunnerHandle::Get(),
         base::BindLambdaForTesting([&](leveldb::Status status) {
           ASSERT_TRUE(status.ok());
@@ -1762,7 +1762,7 @@
   GURL url2("https://www.example.com/");
   GURL url3("https://www.google.com/");
 
-  base::Optional<base::Time> server_time = base::nullopt;
+  absl::optional<base::Time> server_time = absl::nullopt;
   CookieDeletionFilterPtr deletion_filter = CookieDeletionFilter::New();
   deletion_filter->host_name = url.host();
 
diff --git a/content/browser/tracing/background_tracing_config_impl.cc b/content/browser/tracing/background_tracing_config_impl.cc
index b295dea..79aa4fd1 100644
--- a/content/browser/tracing/background_tracing_config_impl.cc
+++ b/content/browser/tracing/background_tracing_config_impl.cc
@@ -91,7 +91,7 @@
   if (category_preset_ == CUSTOM_CATEGORY_PRESET) {
     dict->SetString(kConfigCustomCategoriesKey, custom_categories_);
   } else if (category_preset_ == CUSTOM_TRACE_CONFIG) {
-    base::Optional<base::Value> trace_config =
+    absl::optional<base::Value> trace_config =
         base::JSONReader::Read(trace_config_.ToString());
     if (trace_config) {
       dict->SetKey(kConfigTraceConfigKey, std::move(*trace_config));
diff --git a/content/browser/tracing/background_tracing_manager_browsertest.cc b/content/browser/tracing/background_tracing_manager_browsertest.cc
index 9cbcb58b..2ab9f53 100644
--- a/content/browser/tracing/background_tracing_manager_browsertest.cc
+++ b/content/browser/tracing/background_tracing_manager_browsertest.cc
@@ -1026,7 +1026,7 @@
 
   EXPECT_TRUE(trace_receiver_helper.trace_received());
 
-  base::Optional<base::Value> trace_json =
+  absl::optional<base::Value> trace_json =
       base::JSONReader::Read(trace_receiver_helper.file_contents());
   ASSERT_TRUE(trace_json);
   auto* metadata_json = static_cast<base::DictionaryValue*>(
@@ -1091,7 +1091,7 @@
 
   EXPECT_TRUE(trace_receiver_helper.trace_received());
 
-  base::Optional<base::Value> trace_json =
+  absl::optional<base::Value> trace_json =
       base::JSONReader::Read(trace_receiver_helper.file_contents());
   ASSERT_TRUE(trace_json);
   auto* metadata_json = static_cast<base::DictionaryValue*>(
diff --git a/content/browser/tracing/memory_instrumentation_util.cc b/content/browser/tracing/memory_instrumentation_util.cc
index bc8067c..98647a4d 100644
--- a/content/browser/tracing/memory_instrumentation_util.cc
+++ b/content/browser/tracing/memory_instrumentation_util.cc
@@ -27,7 +27,7 @@
   GetMemoryInstrumentationRegistry()->RegisterClientProcess(
       coordinator.InitWithNewPipeAndPassReceiver(), std::move(process),
       memory_instrumentation::mojom::ProcessType::BROWSER,
-      base::GetCurrentProcId(), /*service_name=*/base::nullopt);
+      base::GetCurrentProcId(), /*service_name=*/absl::nullopt);
   memory_instrumentation::ClientProcessImpl::CreateInstance(
       std::move(process_receiver), std::move(coordinator),
       /*is_browser_process=*/true);
diff --git a/content/browser/tracing/startup_tracing_controller.cc b/content/browser/tracing/startup_tracing_controller.cc
index 1503399..7cc95b6 100644
--- a/content/browser/tracing/startup_tracing_controller.cc
+++ b/content/browser/tracing/startup_tracing_controller.cc
@@ -139,7 +139,7 @@
     EmergencyTraceFinalisationCoordinator::GetInstance().OnTracingStarted(
         task_runner_,
         base::BindOnce(&BackgroundTracer::Stop, weak_ptr_factory_.GetWeakPtr(),
-                       base::nullopt));
+                       absl::nullopt));
 
     tracing_session_->SetOnStopCallback([&]() { OnTracingStopped(); });
     tracing_session_->StartBlocking();
@@ -147,7 +147,7 @@
     TRACE_EVENT("startup", "StartupTracingController::Start");
   }
 
-  void Stop(base::Optional<base::FilePath> output_file) {
+  void Stop(absl::optional<base::FilePath> output_file) {
     DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
 
     // Tracing might have already been finished due to a timeout.
diff --git a/content/browser/tracing/tracing_controller_browsertest.cc b/content/browser/tracing/tracing_controller_browsertest.cc
index 32e1d97..71abd2a6 100644
--- a/content/browser/tracing/tracing_controller_browsertest.cc
+++ b/content/browser/tracing/tracing_controller_browsertest.cc
@@ -390,7 +390,7 @@
   TestStartAndStopTracingString();
   // Check that a number of important keys exist in the metadata dictionary. The
   // values are not checked to ensure the test is robust.
-  base::Optional<base::Value> trace_json = base::JSONReader::Read(last_data());
+  absl::optional<base::Value> trace_json = base::JSONReader::Read(last_data());
   ASSERT_TRUE(trace_json);
   auto* metadata_json = static_cast<base::DictionaryValue*>(
       trace_json->FindKeyOfType("metadata", base::Value::Type::DICTIONARY));
@@ -422,7 +422,7 @@
                        MAYBE_NotWhitelistedMetadataStripped) {
   TestStartAndStopTracingStringWithFilter();
   // Check that a number of important keys exist in the metadata dictionary.
-  base::Optional<base::Value> trace_json = base::JSONReader::Read(last_data());
+  absl::optional<base::Value> trace_json = base::JSONReader::Read(last_data());
   ASSERT_TRUE(trace_json);
   const base::Value* metadata_json =
       trace_json->FindKeyOfType("metadata", base::Value::Type::DICTIONARY);
diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc
index 3f9925b6..0f097b6c 100644
--- a/content/browser/tracing/tracing_controller_impl.cc
+++ b/content/browser/tracing/tracing_controller_impl.cc
@@ -265,7 +265,7 @@
   // obtained from process maps since library can be mapped from apk directly.
   // This is not added as part of memory-infra os dumps since it is special case
   // only for chrome library.
-  base::Optional<base::StringPiece> soname =
+  absl::optional<base::StringPiece> soname =
       base::debug::ReadElfLibraryName(&__ehdr_start);
   if (soname)
     metadata_dict->SetString("chrome-library-name", *soname);
diff --git a/content/browser/url_loader_factory_params_helper.cc b/content/browser/url_loader_factory_params_helper.cc
index bb8587f..8d0ad93 100644
--- a/content/browser/url_loader_factory_params_helper.cc
+++ b/content/browser/url_loader_factory_params_helper.cc
@@ -5,7 +5,6 @@
 #include "content/browser/url_loader_factory_params_helper.h"
 
 #include "base/command_line.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "content/browser/devtools/network_service_devtools_observer.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
@@ -22,6 +21,7 @@
 #include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
 #include "services/network/public/mojom/network_context.mojom.h"
 #include "services/network/public/mojom/url_loader.mojom-shared.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
 
@@ -41,7 +41,7 @@
     const url::Origin& origin,
     const url::Origin& request_initiator_origin_lock,
     bool is_trusted,
-    const base::Optional<blink::LocalFrameToken>& top_frame_token,
+    const absl::optional<blink::LocalFrameToken>& top_frame_token,
     const net::IsolationInfo& isolation_info,
     network::mojom::ClientSecurityStatePtr client_security_state,
     mojo::PendingRemote<network::mojom::CrossOriginEmbedderPolicyReporter>
@@ -214,7 +214,7 @@
       request_initiator,  // origin
       request_initiator,  // request_initiator_origin_lock
       false,              // is_trusted
-      base::nullopt,      // top_frame_token
+      absl::nullopt,      // top_frame_token
       isolation_info,
       nullptr,  // client_security_state
       std::move(coep_reporter),
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
index 948bd4a..545aad0 100644
--- a/content/browser/utility_process_host.cc
+++ b/content/browser/utility_process_host.cc
@@ -125,7 +125,7 @@
     mojo::ScopedMessagePipeHandle service_pipe,
     RunServiceDeprecatedCallback callback) {
   if (launch_state_ == LaunchState::kLaunchFailed) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
 
@@ -358,7 +358,7 @@
 void UtilityProcessHost::OnProcessLaunchFailed(int error_code) {
   launch_state_ = LaunchState::kLaunchFailed;
   for (auto& callback : pending_run_service_callbacks_)
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
   pending_run_service_callbacks_.clear();
 }
 
@@ -381,7 +381,7 @@
   client->OnProcessCrashed();
 }
 
-base::Optional<std::string> UtilityProcessHost::GetServiceName() {
+absl::optional<std::string> UtilityProcessHost::GetServiceName() {
   return metrics_name_;
 }
 
diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h
index 15d5ed0..5c39d5b 100644
--- a/content/browser/utility_process_host.h
+++ b/content/browser/utility_process_host.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/process/launch.h"
 #include "build/build_config.h"
 #include "content/common/child_process.mojom.h"
@@ -25,6 +24,7 @@
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "sandbox/policy/sandbox_type.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class Thread;
@@ -91,7 +91,7 @@
   // Instructs the utility process to run an instance of the named service,
   // bound to |service_pipe|. This is DEPRECATED and should never be used.
   using RunServiceDeprecatedCallback =
-      base::OnceCallback<void(base::Optional<base::ProcessId>)>;
+      base::OnceCallback<void(absl::optional<base::ProcessId>)>;
   void RunServiceDeprecated(const std::string& service_name,
                             mojo::ScopedMessagePipeHandle service_pipe,
                             RunServiceDeprecatedCallback callback);
@@ -124,7 +124,7 @@
   void OnProcessLaunched() override;
   void OnProcessLaunchFailed(int error_code) override;
   void OnProcessCrashed(int exit_code) override;
-  base::Optional<std::string> GetServiceName() override;
+  absl::optional<std::string> GetServiceName() override;
   void BindHostReceiver(mojo::GenericPendingReceiver receiver) override;
 
   // Launch the child process with switches that will setup this sandbox type.
diff --git a/content/browser/web_contents/aura/gesture_nav_simple.cc b/content/browser/web_contents/aura/gesture_nav_simple.cc
index 20f9dc29..d4cf72e 100644
--- a/content/browser/web_contents/aura/gesture_nav_simple.cc
+++ b/content/browser/web_contents/aura/gesture_nav_simple.cc
@@ -594,10 +594,10 @@
   parent->StackAtTop(affordance_->root_layer());
 }
 
-base::Optional<float> GestureNavSimple::GetMaxOverscrollDelta() const {
+absl::optional<float> GestureNavSimple::GetMaxOverscrollDelta() const {
   if (affordance_)
     return max_delta_;
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace content
diff --git a/content/browser/web_contents/aura/gesture_nav_simple.h b/content/browser/web_contents/aura/gesture_nav_simple.h
index 0ede7b9..0a6c281 100644
--- a/content/browser/web_contents/aura/gesture_nav_simple.h
+++ b/content/browser/web_contents/aura/gesture_nav_simple.h
@@ -38,7 +38,7 @@
                               OverscrollMode new_mode,
                               OverscrollSource source,
                               cc::OverscrollBehavior behavior) override;
-  base::Optional<float> GetMaxOverscrollDelta() const override;
+  absl::optional<float> GetMaxOverscrollDelta() const override;
 
   WebContentsImpl* web_contents_ = nullptr;
 
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc
index d4548ab..c67e4391 100644
--- a/content/browser/web_contents/web_contents_android.cc
+++ b/content/browser/web_contents/web_contents_android.cc
@@ -846,7 +846,7 @@
     // |SendScreenRects()| indirectly calls GetViewSize() that asks Java layer.
     web_contents_->SendScreenRects();
     rwhva->SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                                       base::nullopt);
+                                       absl::nullopt);
   }
 }
 
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index cce0e569..a0a4ef84 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -30,7 +30,6 @@
 #include "base/metrics/histogram_macros.h"
 #include "base/metrics/user_metrics.h"
 #include "base/no_destructor.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
@@ -162,6 +161,7 @@
 #include "services/network/public/mojom/web_sandbox_flags.mojom.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
 #include "skia/ext/skia_utils_base.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/common/loader/resource_type_util.h"
@@ -1388,11 +1388,11 @@
   screen_orientation_provider_->OnOrientationChange();
 }
 
-base::Optional<SkColor> WebContentsImpl::GetThemeColor() {
+absl::optional<SkColor> WebContentsImpl::GetThemeColor() {
   return GetRenderViewHost()->theme_color();
 }
 
-base::Optional<SkColor> WebContentsImpl::GetBackgroundColor() {
+absl::optional<SkColor> WebContentsImpl::GetBackgroundColor() {
   return GetRenderViewHost()->background_color();
 }
 
@@ -1580,7 +1580,7 @@
 
 void WebContentsImpl::NotifyManifestUrlChanged(
     RenderFrameHost* rfh,
-    const base::Optional<GURL>& manifest_url) {
+    const absl::optional<GURL>& manifest_url) {
   // TODO(crbug.com/1201237): update the app manifest code for MPArch.
   OPTIONAL_TRACE_EVENT2("content", "WebContentsImpl::NotifyManifestUrlChanged",
                         "render_frame_host", rfh, "manifest_url", manifest_url);
@@ -3815,7 +3815,7 @@
   // TODO(danakj): Why do we defer this show step until the renderer asks for it
   // when it will always do so. What needs to happen in the renderer before we
   // reach here?
-  base::Optional<CreatedWindow> owned_created = GetCreatedWindow(
+  absl::optional<CreatedWindow> owned_created = GetCreatedWindow(
       opener->GetProcess()->GetID(), main_frame_widget_route_id);
 
   // The browser may have rejected the request to make a new window, or the
@@ -3907,7 +3907,7 @@
   render_widget_host_impl->Init();
 }
 
-base::Optional<CreatedWindow> WebContentsImpl::GetCreatedWindow(
+absl::optional<CreatedWindow> WebContentsImpl::GetCreatedWindow(
     int process_id,
     int main_frame_widget_route_id) {
   OPTIONAL_TRACE_EVENT2("content", "WebContentsImpl::GetCreatedWindow",
@@ -3920,7 +3920,7 @@
   // Certain systems can block the creation of new windows. If we didn't succeed
   // in creating one, just return NULL.
   if (iter == pending_contents_.end())
-    return base::nullopt;
+    return absl::nullopt;
 
   CreatedWindow result = std::move(iter->second);
   WebContentsImpl* new_contents = result.contents.get();
@@ -3933,7 +3933,7 @@
 
   if (!new_contents->GetMainFrame()->GetProcess()->IsInitializedAndNotDead() ||
       !new_contents->GetMainFrame()->GetView()) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return result;
@@ -4101,7 +4101,7 @@
 
 void WebContentsImpl::RecordAccessibilityEvents(
     bool start_recording,
-    base::Optional<ui::AXEventCallback> callback) {
+    absl::optional<ui::AXEventCallback> callback) {
   OPTIONAL_TRACE_EVENT0("content",
                         "WebContentsImpl::RecordAccessibilityEvents");
   // Only pass a callback to RecordAccessibilityEvents when starting to record.
@@ -4209,7 +4209,7 @@
 
 void WebContentsImpl::ExecuteEditCommand(
     const std::string& command,
-    const base::Optional<std::u16string>& value) {
+    const absl::optional<std::u16string>& value) {
   OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::ExecuteEditCommand");
   auto* input_handler = GetFocusedFrameWidgetInputHandler();
   if (!input_handler)
@@ -4450,11 +4450,11 @@
 }
 
 void WebContentsImpl::ScrollToTopOfDocument() {
-  ExecuteEditCommand("ScrollToBeginningOfDocument", base::nullopt);
+  ExecuteEditCommand("ScrollToBeginningOfDocument", absl::nullopt);
 }
 
 void WebContentsImpl::ScrollToBottomOfDocument() {
-  ExecuteEditCommand("ScrollToEndOfDocument", base::nullopt);
+  ExecuteEditCommand("ScrollToEndOfDocument", absl::nullopt);
 }
 
 void WebContentsImpl::Replace(const std::u16string& word) {
@@ -5575,7 +5575,7 @@
   // Referrer and initiator are not important, because view-source should not
   // hit the network, but should be served from the cache instead.
   Referrer referrer_for_view_source;
-  base::Optional<url::Origin> initiator_for_view_source = base::nullopt;
+  absl::optional<url::Origin> initiator_for_view_source = absl::nullopt;
   // Do not restore title, derive it from the url.
   std::u16string title_for_view_source;
   auto navigation_entry = std::make_unique<NavigationEntryImpl>(
@@ -7404,7 +7404,7 @@
     const std::u16string& message,
     int32_t line_no,
     const std::u16string& source_id,
-    const base::Optional<std::u16string>& untrusted_stack_trace) {
+    const absl::optional<std::u16string>& untrusted_stack_trace) {
   OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::DidAddMessageToConsole",
                         "message", message);
 
@@ -7648,7 +7648,7 @@
 
 bool WebContentsImpl::CreateRenderViewForRenderManager(
     RenderViewHost* render_view_host,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     RenderFrameProxyHost* proxy_host) {
   TRACE_EVENT1("browser,navigation",
                "WebContentsImpl::CreateRenderViewForRenderManager",
@@ -8351,12 +8351,12 @@
   return currently_playing_video_count_;
 }
 
-base::Optional<gfx::Size> WebContentsImpl::GetFullscreenVideoSize() {
-  base::Optional<MediaPlayerId> id =
+absl::optional<gfx::Size> WebContentsImpl::GetFullscreenVideoSize() {
+  absl::optional<MediaPlayerId> id =
       media_web_contents_observer_->GetFullscreenVideoMediaPlayerId();
   if (id && base::Contains(cached_video_sizes_, id.value()))
-    return base::Optional<gfx::Size>(cached_video_sizes_[id.value()]);
-  return base::nullopt;
+    return absl::optional<gfx::Size>(cached_video_sizes_[id.value()]);
+  return absl::nullopt;
 }
 
 void WebContentsImpl::AudioContextPlaybackStarted(RenderFrameHostImpl* host,
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
index 6d8dfd9..6e731f4 100644
--- a/content/browser/web_contents/web_contents_impl.h
+++ b/content/browser/web_contents/web_contents_impl.h
@@ -21,7 +21,6 @@
 #include "base/gtest_prod_util.h"
 #include "base/macros.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "base/scoped_observation.h"
 #include "base/time/time.h"
@@ -63,6 +62,7 @@
 #include "services/device/public/mojom/geolocation_context.mojom.h"
 #include "services/metrics/public/cpp/ukm_recorder.h"
 #include "services/network/public/mojom/fetch_api.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/frame/transient_allow_fullscreen.h"
 #include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
@@ -319,7 +319,7 @@
   std::vector<WebContentsImpl*> GetWebContentsAndAllInner();
 
   void NotifyManifestUrlChanged(RenderFrameHost* rfh,
-                                const base::Optional<GURL>& manifest_url);
+                                const absl::optional<GURL>& manifest_url);
 
   // Returns the primary FrameTree for this WebContents (as opposed to the
   // ones held by MPArch features like Prerender or Portal).
@@ -357,8 +357,8 @@
   RenderWidgetHostView* GetRenderWidgetHostView() override;
   RenderWidgetHostView* GetTopLevelRenderWidgetHostView() override;
   void ClosePage() override;
-  base::Optional<SkColor> GetThemeColor() override;
-  base::Optional<SkColor> GetBackgroundColor() override;
+  absl::optional<SkColor> GetThemeColor() override;
+  absl::optional<SkColor> GetBackgroundColor() override;
   WebUI* GetWebUI() override;
   WebUI* GetCommittedWebUI() override;
   void SetUserAgentOverride(const blink::UserAgentOverride& ua_override,
@@ -632,7 +632,7 @@
       std::vector<ui::AXPropertyFilter> property_filters) override;
   void RecordAccessibilityEvents(
       bool start_recording,
-      base::Optional<ui::AXEventCallback> callback) override;
+      absl::optional<ui::AXEventCallback> callback) override;
   device::mojom::GeolocationContext* GetGeolocationContext() override;
   device::mojom::WakeLockContext* GetWakeLockContext() override;
 #if defined(OS_ANDROID)
@@ -821,7 +821,7 @@
       const std::u16string& message,
       int32_t line_no,
       const std::u16string& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace) override;
+      const absl::optional<std::u16string>& untrusted_stack_trace) override;
   const blink::RendererPreferences& GetRendererPrefs() const override;
   void DidReceiveInputEvent(RenderWidgetHostImpl* render_widget_host,
                             const blink::WebInputEvent& event) override;
@@ -924,7 +924,7 @@
   // void Paste() override;
   // void SelectAll() override;
   void ExecuteEditCommand(const std::string& command,
-                          const base::Optional<std::u16string>& value) override;
+                          const absl::optional<std::u16string>& value) override;
   void MoveRangeSelectionExtent(const gfx::Point& extent) override;
   void SelectRange(const gfx::Point& base, const gfx::Point& extent) override;
   void MoveCaret(const gfx::Point& extent) override;
@@ -970,7 +970,7 @@
 
   bool CreateRenderViewForRenderManager(
       RenderViewHost* render_view_host,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       RenderFrameProxyHost* proxy_host) override;
   void ReattachOuterDelegateIfNeeded() override;
   void CreateRenderWidgetHostViewForRenderManager(
@@ -1066,7 +1066,7 @@
   void MediaDestroyed(const MediaPlayerId& id);
 
   int GetCurrentlyPlayingVideoCount() override;
-  base::Optional<gfx::Size> GetFullscreenVideoSize() override;
+  absl::optional<gfx::Size> GetFullscreenVideoSize() override;
 
   MediaWebContentsObserver* media_web_contents_observer() {
     return media_web_contents_observer_.get();
@@ -1610,7 +1610,7 @@
   // Finds the new CreatedWindow by |main_frame_widget_route_id|, initializes
   // it for renderer-initiated creation, and returns it. Note that this can only
   // be called once as this call also removes it from the internal map.
-  base::Optional<CreatedWindow> GetCreatedWindow(
+  absl::optional<CreatedWindow> GetCreatedWindow(
       int process_id,
       int main_frame_widget_route_id);
 
@@ -1850,10 +1850,10 @@
   std::u16string page_title_when_no_navigation_entry_;
 
   // The last published theme color.
-  base::Optional<SkColor> last_sent_theme_color_;
+  absl::optional<SkColor> last_sent_theme_color_;
 
   // The last published background color.
-  base::Optional<SkColor> last_sent_background_color_;
+  absl::optional<SkColor> last_sent_background_color_;
 
   // SourceId of the last committed navigation, either a cross-document or
   // same-document navigation.
@@ -2026,7 +2026,7 @@
   AudioStreamMonitor audio_stream_monitor_;
 
   // Coordinates all the audio streams for this WebContents. Lazily initialized.
-  base::Optional<ForwardingAudioStreamFactory> audio_stream_factory_;
+  absl::optional<ForwardingAudioStreamFactory> audio_stream_factory_;
 
   size_t bluetooth_connected_device_count_ = 0;
   size_t bluetooth_scanning_sessions_count_ = 0;
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index 7e0fbd7..817edfa 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -15,7 +15,6 @@
 #include "base/macros.h"
 #include "base/memory/ptr_util.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/pattern.h"
@@ -86,6 +85,7 @@
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "services/network/public/mojom/web_client_hints_types.mojom.h"
 #include "testing/gmock/include/gmock/gmock.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/client_hints/client_hints.h"
 #include "third_party/blink/public/common/features.h"
 #include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
@@ -2693,7 +2693,7 @@
       runner_->QuitClosure().Run();
   }
 
-  base::Optional<GURL> updated_target_url_;
+  absl::optional<GURL> updated_target_url_;
   scoped_refptr<MessageLoopRunner> runner_;
 
   DISALLOW_COPY_AND_ASSIGN(UpdateTargetURLWaiter);
@@ -4041,7 +4041,7 @@
   EXPECT_EQ(shell()->web_contents()->GetThemeColor(), 0xFFFF0000u);
 
   EXPECT_TRUE(NavigateToURL(shell(), url_b));
-  EXPECT_EQ(shell()->web_contents()->GetThemeColor(), base::nullopt);
+  EXPECT_EQ(shell()->web_contents()->GetThemeColor(), absl::nullopt);
 
   shell()->web_contents()->GetController().GoBack();
   EXPECT_TRUE(WaitForLoadStop(shell()->web_contents()));
diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc
index 0bdbdc3..a6159ca 100644
--- a/content/browser/web_contents/web_contents_impl_unittest.cc
+++ b/content/browser/web_contents/web_contents_impl_unittest.cc
@@ -178,7 +178,7 @@
 
   const GURL& last_url() const { return last_url_; }
   int theme_color_change_calls() const { return theme_color_change_calls_; }
-  base::Optional<viz::VerticalScrollDirection> last_vertical_scroll_direction()
+  absl::optional<viz::VerticalScrollDirection> last_vertical_scroll_direction()
       const {
     return last_vertical_scroll_direction_;
   }
@@ -195,7 +195,7 @@
  private:
   GURL last_url_;
   int theme_color_change_calls_ = 0;
-  base::Optional<viz::VerticalScrollDirection> last_vertical_scroll_direction_;
+  absl::optional<viz::VerticalScrollDirection> last_vertical_scroll_direction_;
   bool observed_did_first_visually_non_empty_paint_ = false;
   int num_is_connected_to_bluetooth_device_changed_ = 0;
   bool last_is_connected_to_bluetooth_device_ = false;
@@ -812,7 +812,7 @@
   std::vector<std::unique_ptr<NavigationEntry>> entries;
   std::unique_ptr<NavigationEntry> new_entry =
       NavigationController::CreateNavigationEntry(
-          native_url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_LINK,
+          native_url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_LINK,
           false, std::string(), browser_context(),
           nullptr /* blob_url_loader_factory */);
   entries.push_back(std::move(new_entry));
@@ -853,7 +853,7 @@
   std::vector<std::unique_ptr<NavigationEntry>> entries;
   std::unique_ptr<NavigationEntry> new_entry =
       NavigationController::CreateNavigationEntry(
-          regular_url, Referrer(), base::nullopt, ui::PAGE_TRANSITION_LINK,
+          regular_url, Referrer(), absl::nullopt, ui::PAGE_TRANSITION_LINK,
           false, std::string(), browser_context(),
           nullptr /* blob_url_loader_factory */);
   entries.push_back(std::move(new_entry));
@@ -1691,7 +1691,7 @@
   int widget_id = widget->GetRoutingID();
 
   // The first call to GetCreatedWindow pops it off the pending list.
-  base::Optional<CreatedWindow> created_window =
+  absl::optional<CreatedWindow> created_window =
       contents()->GetCreatedWindow(process_id, widget_id);
   EXPECT_TRUE(created_window.has_value());
   EXPECT_EQ(test_web_contents, created_window->contents.get());
@@ -2478,7 +2478,7 @@
   TestRenderFrameHost* rfh = main_test_rfh();
   rfh->InitializeRenderFrameIfNeeded();
 
-  EXPECT_EQ(base::nullopt, contents()->GetThemeColor());
+  EXPECT_EQ(absl::nullopt, contents()->GetThemeColor());
   EXPECT_EQ(0, observer.theme_color_change_calls());
 
   // Theme color changes should not propagate past the WebContentsImpl before
diff --git a/content/browser/web_contents/web_contents_observer_browsertest.cc b/content/browser/web_contents/web_contents_observer_browsertest.cc
index 987b8bcc..7b1c175 100644
--- a/content/browser/web_contents/web_contents_observer_browsertest.cc
+++ b/content/browser/web_contents/web_contents_observer_browsertest.cc
@@ -129,7 +129,7 @@
   AllowServiceWorkerResult AllowServiceWorker(
       const GURL& scope,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       const GURL& script_url,
       BrowserContext* context) override {
     return AllowServiceWorkerResult::FromPolicy(!javascript_allowed_,
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc
index 402366a..8e5eca0 100644
--- a/content/browser/web_contents/web_contents_view_android.cc
+++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -9,7 +9,6 @@
 #include "base/android/jni_string.h"
 #include "base/check.h"
 #include "base/notreached.h"
-#include "base/optional.h"
 #include "cc/layers/layer.h"
 #include "content/browser/accessibility/browser_accessibility_manager_android.h"
 #include "content/browser/android/content_ui_event_handler.h"
@@ -27,6 +26,7 @@
 #include "content/public/browser/web_contents_delegate.h"
 #include "content/public/common/content_client.h"
 #include "content/public/common/drop_data.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/android/overscroll_refresh_handler.h"
 #include "ui/base/clipboard/clipboard.h"
 #include "ui/base/clipboard/clipboard_constants.h"
@@ -576,12 +576,12 @@
   if (rwhv) {
     web_contents_->SendScreenRects();
     rwhv->SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                                      base::nullopt);
+                                      absl::nullopt);
   }
 }
 
 void WebContentsViewAndroid::OnPhysicalBackingSizeChanged(
-    base::Optional<base::TimeDelta> deadline_override) {
+    absl::optional<base::TimeDelta> deadline_override) {
   if (web_contents_->GetRenderWidgetHostView())
     web_contents_->SendScreenRects();
 }
@@ -590,14 +590,14 @@
   auto* rwhv = GetRenderWidgetHostViewAndroid();
   if (rwhv)
     rwhv->SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                                      base::nullopt);
+                                      absl::nullopt);
 }
 
 void WebContentsViewAndroid::OnControlsResizeViewChanged() {
   auto* rwhv = GetRenderWidgetHostViewAndroid();
   if (rwhv)
     rwhv->SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(),
-                                      base::nullopt);
+                                      absl::nullopt);
 }
 
 void WebContentsViewAndroid::NotifyVirtualKeyboardOverlayRect(
diff --git a/content/browser/web_contents/web_contents_view_android.h b/content/browser/web_contents/web_contents_view_android.h
index 291b0713..de59b65 100644
--- a/content/browser/web_contents/web_contents_view_android.h
+++ b/content/browser/web_contents/web_contents_view_android.h
@@ -122,7 +122,7 @@
   bool ScrollTo(float x, float y) override;
   void OnSizeChanged() override;
   void OnPhysicalBackingSizeChanged(
-      base::Optional<base::TimeDelta> deadline_override) override;
+      absl::optional<base::TimeDelta> deadline_override) override;
   void OnBrowserControlsHeightChanged() override;
   void OnControlsResizeViewChanged() override;
   void NotifyVirtualKeyboardOverlayRect(
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index ae7539c..c649194 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -161,7 +161,7 @@
 // necessary.
 void PrepareDragForFileContents(const DropData& drop_data,
                                 ui::OSExchangeDataProvider* provider) {
-  base::Optional<base::FilePath> filename =
+  absl::optional<base::FilePath> filename =
       drop_data.GetSafeFilenameForImageFileContents();
   if (filename)
     provider->SetFileContents(*filename, drop_data.file_contents);
@@ -396,7 +396,7 @@
     const ui::DropTargetEvent& event,
     std::unique_ptr<ui::OSExchangeData> data,
     base::ScopedClosureRunner end_drag_runner,
-    base::Optional<gfx::PointF> transformed_pt,
+    absl::optional<gfx::PointF> transformed_pt,
     gfx::PointF screen_pt)
     : target_rwh(target_rwh->GetWeakPtr()),
       event(event),
@@ -1227,7 +1227,7 @@
     ui::DropTargetEvent event,
     std::unique_ptr<DropData> drop_data,
     base::WeakPtr<RenderWidgetHostViewBase> target,
-    base::Optional<gfx::PointF> transformed_pt) {
+    absl::optional<gfx::PointF> transformed_pt) {
   drag_in_progress_ = true;
   if (!target)
     return;
@@ -1294,7 +1294,7 @@
     ui::DropTargetEvent event,
     std::unique_ptr<DropData> drop_data,
     base::WeakPtr<RenderWidgetHostViewBase> target,
-    base::Optional<gfx::PointF> transformed_pt) {
+    absl::optional<gfx::PointF> transformed_pt) {
   // If drag is not in progress it means drag has already finished and we get
   // this callback after that already. This happens for example when drag leaves
   // out window and we get the exit signal while still waiting for this
@@ -1405,7 +1405,7 @@
     ui::DropTargetEvent event,
     std::unique_ptr<ui::OSExchangeData> data,
     base::WeakPtr<RenderWidgetHostViewBase> target,
-    base::Optional<gfx::PointF> transformed_pt) {
+    absl::optional<gfx::PointF> transformed_pt) {
   drag_in_progress_ = false;
   base::ScopedClosureRunner end_drag_runner(std::move(end_drag_runner_));
 
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h
index ff31f7a9..98704ac 100644
--- a/content/browser/web_contents/web_contents_view_aura.h
+++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
 #include "content/browser/web_contents/web_contents_view.h"
@@ -25,6 +24,7 @@
 #include "content/public/browser/web_contents_view_delegate.h"
 #include "content/public/common/drop_data.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h"
 #include "ui/aura/client/drag_drop_delegate.h"
 #include "ui/aura/window.h"
@@ -79,7 +79,7 @@
                          const ui::DropTargetEvent& event,
                          std::unique_ptr<ui::OSExchangeData> data,
                          base::ScopedClosureRunner end_drag_runner,
-                         base::Optional<gfx::PointF> transformed_pt,
+                         absl::optional<gfx::PointF> transformed_pt,
                          gfx::PointF screen_pt);
     OnPerformDropContext(OnPerformDropContext&& other);
     ~OnPerformDropContext();
@@ -88,7 +88,7 @@
     ui::DropTargetEvent event;
     std::unique_ptr<ui::OSExchangeData> data;
     base::ScopedClosureRunner end_drag_runner;
-    base::Optional<gfx::PointF> transformed_pt;
+    absl::optional<gfx::PointF> transformed_pt;
     gfx::PointF screen_pt;
   };
 
@@ -228,15 +228,15 @@
   void DragEnteredCallback(ui::DropTargetEvent event,
                            std::unique_ptr<DropData> drop_data,
                            base::WeakPtr<RenderWidgetHostViewBase> target,
-                           base::Optional<gfx::PointF> transformed_pt);
+                           absl::optional<gfx::PointF> transformed_pt);
   void DragUpdatedCallback(ui::DropTargetEvent event,
                            std::unique_ptr<DropData> drop_data,
                            base::WeakPtr<RenderWidgetHostViewBase> target,
-                           base::Optional<gfx::PointF> transformed_pt);
+                           absl::optional<gfx::PointF> transformed_pt);
   void PerformDropCallback(ui::DropTargetEvent event,
                            std::unique_ptr<ui::OSExchangeData> data,
                            base::WeakPtr<RenderWidgetHostViewBase> target,
-                           base::Optional<gfx::PointF> transformed_pt);
+                           absl::optional<gfx::PointF> transformed_pt);
 
   // Completes a drag exit operation by communicating with the renderer process.
   void CompleteDragExit();
diff --git a/content/browser/web_contents/web_contents_view_aura_unittest.cc b/content/browser/web_contents/web_contents_view_aura_unittest.cc
index 9e967dd..b7bdd10 100644
--- a/content/browser/web_contents/web_contents_view_aura_unittest.cc
+++ b/content/browser/web_contents/web_contents_view_aura_unittest.cc
@@ -10,7 +10,6 @@
 #include "base/command_line.h"
 #include "base/files/file_util.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/test/scoped_command_line.h"
@@ -22,6 +21,7 @@
 #include "content/public/common/content_features.h"
 #include "content/public/test/test_renderer_host.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/aura/client/aura_constants.h"
 #include "ui/aura/client/drag_drop_client.h"
 #include "ui/aura/test/test_windows.h"
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 700cf862..9d2f771 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -7,7 +7,6 @@
 #import <Carbon/Carbon.h>
 
 #include "base/mac/scoped_nsobject.h"
-#include "base/optional.h"
 #include "base/strings/sys_string_conversions.h"
 #include "content/browser/renderer_host/render_view_host_impl.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
@@ -20,6 +19,7 @@
 #include "content/public/browser/web_drag_dest_delegate.h"
 #include "content/public/common/child_process_host.h"
 #include "content/public/common/drop_data.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #import "third_party/mozilla/NSPasteboard+Utils.h"
 #include "ui/base/clipboard/clipboard_constants.h"
diff --git a/content/browser/web_database/web_database_host_impl_unittest.cc b/content/browser/web_database/web_database_host_impl_unittest.cc
index 838ba31e..30f57e0 100644
--- a/content/browser/web_database/web_database_host_impl_unittest.cc
+++ b/content/browser/web_database/web_database_host_impl_unittest.cc
@@ -211,7 +211,7 @@
   bool success_callback_was_called = false;
   auto success_callback = base::BindLambdaForTesting(
       [&](base::File) { success_callback_was_called = true; });
-  base::Optional<std::string> error_callback_message;
+  absl::optional<std::string> error_callback_message;
 
   mojo::SetDefaultProcessErrorHandler(base::BindLambdaForTesting(
       [&](const std::string& message) { error_callback_message = message; }));
diff --git a/content/browser/web_exposed_isolation_info.cc b/content/browser/web_exposed_isolation_info.cc
index 47d1926..98c3d2a 100644
--- a/content/browser/web_exposed_isolation_info.cc
+++ b/content/browser/web_exposed_isolation_info.cc
@@ -8,7 +8,7 @@
 
 // static
 WebExposedIsolationInfo WebExposedIsolationInfo::CreateNonIsolated() {
-  return WebExposedIsolationInfo(base::nullopt /* origin */,
+  return WebExposedIsolationInfo(absl::nullopt /* origin */,
                                  false /* isolated_application */);
 }
 
@@ -23,7 +23,7 @@
 }
 
 WebExposedIsolationInfo::WebExposedIsolationInfo(
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     bool isolated_application)
     : origin_(origin), isolated_application_(isolated_application) {}
 
diff --git a/content/browser/web_exposed_isolation_info.h b/content/browser/web_exposed_isolation_info.h
index 76dcb97..703517c4 100644
--- a/content/browser/web_exposed_isolation_info.h
+++ b/content/browser/web_exposed_isolation_info.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_BROWSER_WEB_EXPOSED_ISOLATION_INFO_H_
 #define CONTENT_BROWSER_WEB_EXPOSED_ISOLATION_INFO_H_
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
@@ -74,14 +74,14 @@
   bool operator<(const WebExposedIsolationInfo& b) const;
 
  private:
-  WebExposedIsolationInfo(const base::Optional<url::Origin>& origin,
+  WebExposedIsolationInfo(const absl::optional<url::Origin>& origin,
                           bool isolated_application);
 
   // |origin_| serve two purposes. If null, it indicates that the page(s) it
   // refers to are not isolated, and that the crossOriginIsolated boolean is
   // false. If it has a value, all these page(s) share the same top level
   // origin. This ensure we can put them in the same process.
-  base::Optional<url::Origin> origin_;
+  absl::optional<url::Origin> origin_;
 
   // Some applications may require additional isolation above and beyond what
   // COOP/COEP-based COI provides. This boolean will be `true` for applications
diff --git a/content/browser/web_package/link_web_bundle_browsertest.cc b/content/browser/web_package/link_web_bundle_browsertest.cc
index a79d8bd..3dce4e0 100644
--- a/content/browser/web_package/link_web_bundle_browsertest.cc
+++ b/content/browser/web_package/link_web_bundle_browsertest.cc
@@ -4,7 +4,6 @@
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
-#include "base/optional.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
@@ -25,6 +24,7 @@
 #include "content/test/content_browser_test_utils_internal.h"
 #include "net/dns/mock_host_resolver.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 namespace {
@@ -45,7 +45,7 @@
       bool is_main_frame,
       ui::PageTransition page_transition,
       bool has_user_gesture,
-      const base::Optional<url::Origin>& initiating_origin,
+      const absl::optional<url::Origin>& initiating_origin,
       mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory)
       override {
     EXPECT_FALSE(observed_url_.has_value());
@@ -56,7 +56,7 @@
   GURL observed_url() const { return observed_url_ ? *observed_url_ : GURL(); }
 
  private:
-  base::Optional<GURL> observed_url_;
+  absl::optional<GURL> observed_url_;
 };
 
 class FinishNavigationObserver : public WebContentsObserver {
@@ -77,12 +77,12 @@
     }
   }
 
-  const base::Optional<net::Error>& error_code() const { return error_code_; }
+  const absl::optional<net::Error>& error_code() const { return error_code_; }
 
  private:
   GURL expected_url_;
   base::OnceClosure done_closure_;
-  base::Optional<net::Error> error_code_;
+  absl::optional<net::Error> error_code_;
 };
 
 int64_t GetTestDataFileSize(const base::FilePath::CharType* file_path) {
diff --git a/content/browser/web_package/mock_web_bundle_reader_factory.cc b/content/browser/web_package/mock_web_bundle_reader_factory.cc
index 8ea9b40..675f5c7 100644
--- a/content/browser/web_package/mock_web_bundle_reader_factory.cc
+++ b/content/browser/web_package/mock_web_bundle_reader_factory.cc
@@ -11,7 +11,6 @@
 #include "base/files/file_util.h"
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/test/bind.h"
 #include "components/web_package/mojom/web_bundle_parser.mojom.h"
@@ -24,6 +23,7 @@
 #include "net/base/filename_util.h"
 #include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/browser/web_package/prefetched_signed_exchange_cache.cc b/content/browser/web_package/prefetched_signed_exchange_cache.cc
index 7fa63eb..f6808d2 100644
--- a/content/browser/web_package/prefetched_signed_exchange_cache.cc
+++ b/content/browser/web_package/prefetched_signed_exchange_cache.cc
@@ -106,7 +106,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {
+      const absl::optional<GURL>& new_url) override {
     NOTREACHED();
   }
   void SetPriority(net::RequestPriority priority,
@@ -151,7 +151,7 @@
     // DevTools' Security panel.
     if (request.destination != network::mojom::RequestDestination::kDocument &&
         !request.report_raw_headers) {
-      response_->ssl_info = base::nullopt;
+      response_->ssl_info = absl::nullopt;
     }
     UpdateRequestResponseStartTime(response_.get());
     response_->encoded_data_length = 0;
@@ -187,13 +187,13 @@
   ~InnerResponseURLLoader() override {}
 
  private:
-  static base::Optional<std::string> GetHeaderString(
+  static absl::optional<std::string> GetHeaderString(
       const network::mojom::URLResponseHead& response,
       const std::string& header_name) {
     DCHECK(response.headers);
     std::string header_value;
     if (!response.headers->GetNormalizedHeader(header_name, &header_value))
-      return base::nullopt;
+      return absl::nullopt;
     return header_value;
   }
 
@@ -243,7 +243,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {
+      const absl::optional<GURL>& new_url) override {
     NOTREACHED();
   }
   void SetPriority(net::RequestPriority priority,
@@ -426,14 +426,14 @@
     NOTREACHED();
   }
 
-  base::Optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams()
+  absl::optional<SubresourceLoaderParams> MaybeCreateSubresourceLoaderParams()
       override {
     if (state_ != State::kInnerResponseRequested)
-      return base::nullopt;
+      return absl::nullopt;
 
     SubresourceLoaderParams params;
     params.prefetched_signed_exchanges = std::move(info_list_);
-    return base::make_optional(std::move(params));
+    return absl::make_optional(std::move(params));
   }
 
  private:
@@ -553,7 +553,7 @@
 
   for (const auto& value : link_header_util::SplitLinkHeader(link_header)) {
     std::string link_url;
-    std::unordered_map<std::string, base::Optional<std::string>> link_params;
+    std::unordered_map<std::string, absl::optional<std::string>> link_params;
     if (!link_header_util::ParseLinkHeaderValue(value.first, value.second,
                                                 &link_url, &link_params)) {
       continue;
diff --git a/content/browser/web_package/prefetched_signed_exchange_cache_adapter.h b/content/browser/web_package/prefetched_signed_exchange_cache_adapter.h
index 070f6f3..3eae2ad 100644
--- a/content/browser/web_package/prefetched_signed_exchange_cache_adapter.h
+++ b/content/browser/web_package/prefetched_signed_exchange_cache_adapter.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_BROWSER_WEB_PACKAGE_PREFETCHED_SIGNED_EXCHANGE_CACHE_ADAPTER_H_
 #define CONTENT_BROWSER_WEB_PACKAGE_PREFETCHED_SIGNED_EXCHANGE_CACHE_ADAPTER_H_
 
-#include "base/optional.h"
 #include "content/browser/web_package/prefetched_signed_exchange_cache.h"
 #include "content/public/browser/browser_context.h"
 #include "mojo/public/cpp/system/data_pipe.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class GURL;
 
diff --git a/content/browser/web_package/save_page_as_web_bundle_browsertest.cc b/content/browser/web_package/save_page_as_web_bundle_browsertest.cc
index 3783f5ef..1817ece 100644
--- a/content/browser/web_package/save_page_as_web_bundle_browsertest.cc
+++ b/content/browser/web_package/save_page_as_web_bundle_browsertest.cc
@@ -60,15 +60,15 @@
   return info_out;
 }
 
-base::Optional<mojo_base::BigBuffer> GetResourceBody(
+absl::optional<mojo_base::BigBuffer> GetResourceBody(
     mojo::Remote<data_decoder::mojom::ResourceSnapshotForWebBundle>& snapshot,
     uint64_t index) {
-  base::Optional<mojo_base::BigBuffer> data_out;
+  absl::optional<mojo_base::BigBuffer> data_out;
   base::RunLoop run_loop;
   snapshot->GetResourceBody(
       index,
       base::BindLambdaForTesting(
-          [&run_loop, &data_out](base::Optional<mojo_base::BigBuffer> data) {
+          [&run_loop, &data_out](absl::optional<mojo_base::BigBuffer> data) {
             data_out = std::move(data);
             run_loop.Quit();
           }));
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher.cc b/content/browser/web_package/signed_exchange_cert_fetcher.cc
index 9ebf91fe..deb1f5c9 100644
--- a/content/browser/web_package/signed_exchange_cert_fetcher.cc
+++ b/content/browser/web_package/signed_exchange_cert_fetcher.cc
@@ -80,7 +80,7 @@
     bool force_fetch,
     CertificateCallback callback,
     SignedExchangeDevToolsProxy* devtools_proxy,
-    const base::Optional<base::UnguessableToken>& throttling_profile_id,
+    const absl::optional<base::UnguessableToken>& throttling_profile_id,
     net::IsolationInfo isolation_info) {
   TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"),
                "SignedExchangeCertFetcher::CreateAndStart");
@@ -101,7 +101,7 @@
     bool force_fetch,
     CertificateCallback callback,
     SignedExchangeDevToolsProxy* devtools_proxy,
-    const base::Optional<base::UnguessableToken>& throttling_profile_id,
+    const absl::optional<base::UnguessableToken>& throttling_profile_id,
     net::IsolationInfo isolation_info)
     : shared_url_loader_factory_(std::move(shared_url_loader_factory)),
       throttles_(std::move(throttles)),
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher.h b/content/browser/web_package/signed_exchange_cert_fetcher.h
index 0731b1f..38ef1df 100644
--- a/content/browser/web_package/signed_exchange_cert_fetcher.h
+++ b/content/browser/web_package/signed_exchange_cert_fetcher.h
@@ -11,7 +11,6 @@
 #include "base/callback.h"
 #include "base/callback_helpers.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/web_package/signed_exchange_certificate_chain.h"
 #include "content/browser/web_package/signed_exchange_error.h"
@@ -20,6 +19,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "net/base/isolation_info.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace network {
 class SharedURLLoaderFactory;
@@ -61,7 +61,7 @@
       bool force_fetch,
       CertificateCallback callback,
       SignedExchangeDevToolsProxy* devtools_proxy,
-      const base::Optional<base::UnguessableToken>& throttling_profile_id,
+      const absl::optional<base::UnguessableToken>& throttling_profile_id,
       net::IsolationInfo isolation_info);
 
   ~SignedExchangeCertFetcher() override;
@@ -83,7 +83,7 @@
       bool force_fetch,
       CertificateCallback callback,
       SignedExchangeDevToolsProxy* devtools_proxy,
-      const base::Optional<base::UnguessableToken>& throttling_profile_id,
+      const absl::optional<base::UnguessableToken>& throttling_profile_id,
       net::IsolationInfo isolation_info);
   void Start();
   void Abort();
@@ -124,7 +124,7 @@
   // This is owned by SignedExchangeHandler which is the owner of |this|.
   SignedExchangeDevToolsProxy* devtools_proxy_;
   bool has_notified_completion_to_devtools_ = false;
-  base::Optional<base::UnguessableToken> cert_request_id_;
+  absl::optional<base::UnguessableToken> cert_request_id_;
 
   net::IPAddress cert_server_ip_address_;
 
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher_factory.cc b/content/browser/web_package/signed_exchange_cert_fetcher_factory.cc
index 6efdc9c..741adf0 100644
--- a/content/browser/web_package/signed_exchange_cert_fetcher_factory.cc
+++ b/content/browser/web_package/signed_exchange_cert_fetcher_factory.cc
@@ -22,7 +22,7 @@
   SignedExchangeCertFetcherFactoryImpl(
       scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
       URLLoaderThrottlesGetter url_loader_throttles_getter,
-      const base::Optional<base::UnguessableToken>& throttling_profile_id,
+      const absl::optional<base::UnguessableToken>& throttling_profile_id,
       net::IsolationInfo isolation_info)
       : url_loader_factory_(std::move(url_loader_factory)),
         url_loader_throttles_getter_(std::move(url_loader_throttles_getter)),
@@ -38,7 +38,7 @@
  private:
   scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
   URLLoaderThrottlesGetter url_loader_throttles_getter_;
-  const base::Optional<base::UnguessableToken> throttling_profile_id_;
+  const absl::optional<base::UnguessableToken> throttling_profile_id_;
   const net::IsolationInfo isolation_info_;
 };
 
@@ -63,7 +63,7 @@
 SignedExchangeCertFetcherFactory::Create(
     scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
     URLLoaderThrottlesGetter url_loader_throttles_getter,
-    const base::Optional<base::UnguessableToken>& throttling_profile_id,
+    const absl::optional<base::UnguessableToken>& throttling_profile_id,
     net::IsolationInfo isolation_info) {
   return std::make_unique<SignedExchangeCertFetcherFactoryImpl>(
       std::move(url_loader_factory), std::move(url_loader_throttles_getter),
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher_factory.h b/content/browser/web_package/signed_exchange_cert_fetcher_factory.h
index ceb80e4..a811e1c 100644
--- a/content/browser/web_package/signed_exchange_cert_fetcher_factory.h
+++ b/content/browser/web_package/signed_exchange_cert_fetcher_factory.h
@@ -44,7 +44,7 @@
   static std::unique_ptr<SignedExchangeCertFetcherFactory> Create(
       scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
       URLLoaderThrottlesGetter url_loader_throttles_getter,
-      const base::Optional<base::UnguessableToken>& throttling_profile_id,
+      const absl::optional<base::UnguessableToken>& throttling_profile_id,
       net::IsolationInfo isolation_info);
 };
 
diff --git a/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc b/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc
index 62c5c26..7c27efd 100644
--- a/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc
+++ b/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc
@@ -8,7 +8,6 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/callback_helpers.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/test/task_environment.h"
 #include "components/cbor/values.h"
@@ -29,6 +28,7 @@
 #include "services/network/public/mojom/url_response_head.mojom.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/url_loader_throttle.h"
 
 namespace content {
@@ -93,7 +93,7 @@
                void(const std::vector<std::string>&,
                     const net::HttpRequestHeaders&,
                     const net::HttpRequestHeaders&,
-                    const base::Optional<GURL>&));
+                    const absl::optional<GURL>&));
   MOCK_METHOD2(SetPriority,
                void(net::RequestPriority priority,
                     int32_t intra_priority_value));
@@ -136,14 +136,14 @@
   }
   void CloseClientPipe() { client_remote_.reset(); }
 
-  base::Optional<network::ResourceRequest> url_request() const {
+  absl::optional<network::ResourceRequest> url_request() const {
     return url_request_;
   }
 
  private:
   std::unique_ptr<MockURLLoader> loader_;
   mojo::Remote<network::mojom::URLLoaderClient> client_remote_;
-  base::Optional<network::ResourceRequest> url_request_;
+  absl::optional<network::ResourceRequest> url_request_;
 
   DISALLOW_COPY_AND_ASSIGN(URLLoaderFactoryForMockLoader);
 };
@@ -184,7 +184,7 @@
     cbor_array.push_back(cbor::Value(u8"\U0001F4DC\u26D3"));
     cbor_array.push_back(cbor::Value(std::move(cbor_map)));
 
-    base::Optional<std::vector<uint8_t>> serialized =
+    absl::optional<std::vector<uint8_t>> serialized =
         cbor::Writer::Write(cbor::Value(std::move(cbor_array)));
     if (!serialized)
       return std::string();
@@ -230,7 +230,7 @@
         base::MakeRefCounted<network::WeakWrapperSharedURLLoaderFactory>(
             &mock_loader_factory_),
         std::move(throttles_), url, force_fetch, std::move(callback),
-        nullptr /* devtools_proxy */, base::nullopt /* throttling_profile_id */,
+        nullptr /* devtools_proxy */, absl::nullopt /* throttling_profile_id */,
         net::IsolationInfo());
   }
 
diff --git a/content/browser/web_package/signed_exchange_certificate_chain.cc b/content/browser/web_package/signed_exchange_certificate_chain.cc
index 473032e..3209fe50 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain.cc
+++ b/content/browser/web_package/signed_exchange_certificate_chain.cc
@@ -32,7 +32,7 @@
     base::span<const uint8_t> message,
     SignedExchangeDevToolsProxy* devtools_proxy) {
   cbor::Reader::DecoderError error;
-  base::Optional<cbor::Value> value = cbor::Reader::Read(message, &error);
+  absl::optional<cbor::Value> value = cbor::Reader::Read(message, &error);
   if (!value.has_value()) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy,
diff --git a/content/browser/web_package/signed_exchange_certificate_chain.h b/content/browser/web_package/signed_exchange_certificate_chain.h
index 03e3159e..21009588 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain.h
+++ b/content/browser/web_package/signed_exchange_certificate_chain.h
@@ -10,11 +10,11 @@
 #include "base/containers/span.h"
 #include "base/gtest_prod_util.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/strings/string_piece_forward.h"
 #include "content/browser/web_package/signed_exchange_consts.h"
 #include "content/common/content_export.h"
 #include "services/network/public/cpp/spki_hash_set.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class CommandLine;
diff --git a/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc b/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc
index 0d93a8e..5f54d79 100644
--- a/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc
+++ b/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc
@@ -6,7 +6,6 @@
 
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
-#include "base/optional.h"
 #include "base/path_service.h"
 #include "base/strings/string_piece.h"
 #include "components/cbor/values.h"
@@ -17,6 +16,7 @@
 #include "net/test/cert_test_util.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -99,8 +99,8 @@
   EXPECT_EQ(cert_der, net::x509_util::CryptoBufferAsStringPiece(
                           parsed->cert()->cert_buffer()));
   ASSERT_EQ(0U, parsed->cert()->intermediate_buffers().size());
-  EXPECT_EQ(parsed->ocsp(), base::make_optional<std::string>("OCSP"));
-  EXPECT_EQ(parsed->sct(), base::make_optional<std::string>("SCT"));
+  EXPECT_EQ(parsed->ocsp(), absl::make_optional<std::string>("OCSP"));
+  EXPECT_EQ(parsed->sct(), absl::make_optional<std::string>("SCT"));
 }
 
 TEST(SignedExchangeCertificateParseTest, MissingOCSPInFirstCert) {
@@ -161,8 +161,8 @@
   ASSERT_EQ(1U, parsed->cert()->intermediate_buffers().size());
   EXPECT_EQ(cert2_der, net::x509_util::CryptoBufferAsStringPiece(
                            parsed->cert()->intermediate_buffers()[0].get()));
-  EXPECT_EQ(parsed->ocsp(), base::make_optional<std::string>("OCSP"));
-  EXPECT_EQ(parsed->sct(), base::make_optional<std::string>("SCT"));
+  EXPECT_EQ(parsed->ocsp(), absl::make_optional<std::string>("OCSP"));
+  EXPECT_EQ(parsed->sct(), absl::make_optional<std::string>("SCT"));
 }
 
 TEST(SignedExchangeCertificateParseTest, HavingOCSPInSecondCert) {
diff --git a/content/browser/web_package/signed_exchange_devtools_proxy.cc b/content/browser/web_package/signed_exchange_devtools_proxy.cc
index 3dbd5c5..b9a69af 100644
--- a/content/browser/web_package/signed_exchange_devtools_proxy.cc
+++ b/content/browser/web_package/signed_exchange_devtools_proxy.cc
@@ -23,7 +23,7 @@
     const GURL& outer_request_url,
     network::mojom::URLResponseHeadPtr outer_response,
     int frame_tree_node_id,
-    base::Optional<const base::UnguessableToken> devtools_navigation_token,
+    absl::optional<const base::UnguessableToken> devtools_navigation_token,
     bool report_raw_headers)
     : outer_request_url_(outer_request_url),
       outer_response_(std::move(outer_response)),
@@ -39,7 +39,7 @@
 
 void SignedExchangeDevToolsProxy::ReportError(
     const std::string& message,
-    base::Optional<SignedExchangeError::FieldIndexPair> error_field) {
+    absl::optional<SignedExchangeError::FieldIndexPair> error_field) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   errors_.push_back(SignedExchangeError(message, std::move(error_field)));
   WebContents* web_contents =
@@ -101,13 +101,13 @@
 }
 
 void SignedExchangeDevToolsProxy::OnSignedExchangeReceived(
-    const base::Optional<SignedExchangeEnvelope>& envelope,
+    const absl::optional<SignedExchangeEnvelope>& envelope,
     const scoped_refptr<net::X509Certificate>& certificate,
     const net::SSLInfo* ssl_info) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   if (!devtools_enabled_)
     return;
-  base::Optional<net::SSLInfo> ssl_info_opt;
+  absl::optional<net::SSLInfo> ssl_info_opt;
   if (ssl_info)
     ssl_info_opt = *ssl_info;
 
diff --git a/content/browser/web_package/signed_exchange_devtools_proxy.h b/content/browser/web_package/signed_exchange_devtools_proxy.h
index c90de7d..7755ead 100644
--- a/content/browser/web_package/signed_exchange_devtools_proxy.h
+++ b/content/browser/web_package/signed_exchange_devtools_proxy.h
@@ -10,11 +10,11 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/web_package/signed_exchange_error.h"
 #include "content/common/content_export.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class GURL;
 
@@ -49,13 +49,13 @@
       const GURL& outer_request_url,
       network::mojom::URLResponseHeadPtr outer_response_head,
       int frame_tree_node_id,
-      base::Optional<const base::UnguessableToken> devtools_navigation_token,
+      absl::optional<const base::UnguessableToken> devtools_navigation_token,
       bool report_raw_headers);
   ~SignedExchangeDevToolsProxy();
 
   void ReportError(
       const std::string& message,
-      base::Optional<SignedExchangeError::FieldIndexPair> error_field);
+      absl::optional<SignedExchangeError::FieldIndexPair> error_field);
 
   void CertificateRequestSent(const base::UnguessableToken& request_id,
                               const network::ResourceRequest& request);
@@ -67,7 +67,7 @@
       const network::URLLoaderCompletionStatus& status);
 
   void OnSignedExchangeReceived(
-      const base::Optional<SignedExchangeEnvelope>& envelope,
+      const absl::optional<SignedExchangeEnvelope>& envelope,
       const scoped_refptr<net::X509Certificate>& certificate,
       const net::SSLInfo* ssl_info);
 
@@ -75,7 +75,7 @@
   const GURL outer_request_url_;
   const network::mojom::URLResponseHeadPtr outer_response_;
   const int frame_tree_node_id_;
-  const base::Optional<const base::UnguessableToken> devtools_navigation_token_;
+  const absl::optional<const base::UnguessableToken> devtools_navigation_token_;
   const bool devtools_enabled_;
   std::vector<SignedExchangeError> errors_;
 
diff --git a/content/browser/web_package/signed_exchange_envelope.cc b/content/browser/web_package/signed_exchange_envelope.cc
index 05508dd..7a25781 100644
--- a/content/browser/web_package/signed_exchange_envelope.cc
+++ b/content/browser/web_package/signed_exchange_envelope.cc
@@ -285,7 +285,7 @@
 }  // namespace
 
 // static
-base::Optional<SignedExchangeEnvelope> SignedExchangeEnvelope::Parse(
+absl::optional<SignedExchangeEnvelope> SignedExchangeEnvelope::Parse(
     SignedExchangeVersion version,
     const signed_exchange_utils::URLWithRawString& fallback_url,
     base::StringPiece signature_header_field,
@@ -297,13 +297,13 @@
   const auto& request_url = fallback_url;
 
   cbor::Reader::DecoderError error;
-  base::Optional<cbor::Value> value = cbor::Reader::Read(cbor_header, &error);
+  absl::optional<cbor::Value> value = cbor::Reader::Read(cbor_header, &error);
   if (!value.has_value()) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy,
         base::StringPrintf("Failed to decode Value. CBOR error: %s",
                            cbor::Reader::ErrorCodeToString(error)));
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   SignedExchangeEnvelope ret;
@@ -313,16 +313,16 @@
   if (!ParseResponseMap(*value, &ret, devtools_proxy)) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy, "Failed to parse response map.");
-    return base::nullopt;
+    return absl::nullopt;
   }
 
-  base::Optional<std::vector<SignedExchangeSignatureHeaderField::Signature>>
+  absl::optional<std::vector<SignedExchangeSignatureHeaderField::Signature>>
       signatures = SignedExchangeSignatureHeaderField::ParseSignature(
           signature_header_field, devtools_proxy);
   if (!signatures || signatures->empty()) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy, "Failed to parse signature header field.");
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   // TODO(https://crbug.com/850475): Support multiple signatures.
@@ -336,7 +336,7 @@
   if (!url::IsSameOriginWith(request_url.url, validity_url)) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy, "Validity URL must be same-origin with request URL.");
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return std::move(ret);
diff --git a/content/browser/web_package/signed_exchange_envelope.h b/content/browser/web_package/signed_exchange_envelope.h
index ad2f2702..1b657137 100644
--- a/content/browser/web_package/signed_exchange_envelope.h
+++ b/content/browser/web_package/signed_exchange_envelope.h
@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/containers/span.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/strings/string_util.h"
 #include "content/browser/web_package/signed_exchange_signature_header_field.h"
@@ -17,6 +16,7 @@
 #include "crypto/sha2.h"
 #include "net/http/http_response_headers.h"
 #include "net/http/http_status_code.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -35,7 +35,7 @@
   //
   // This also performs the steps 1, 3 and 4 of "Cross-origin trust" validation.
   // https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#cross-origin-trust
-  static base::Optional<SignedExchangeEnvelope> Parse(
+  static absl::optional<SignedExchangeEnvelope> Parse(
       SignedExchangeVersion version,
       const signed_exchange_utils::URLWithRawString& fallback_url,
       base::StringPiece signature_header_field,
diff --git a/content/browser/web_package/signed_exchange_envelope_unittest.cc b/content/browser/web_package/signed_exchange_envelope_unittest.cc
index db21d9d..7bc672c 100644
--- a/content/browser/web_package/signed_exchange_envelope_unittest.cc
+++ b/content/browser/web_package/signed_exchange_envelope_unittest.cc
@@ -33,7 +33,7 @@
   return cbor::Value(str, cbor::Value::Type::BYTE_STRING);
 }
 
-base::Optional<SignedExchangeEnvelope> GenerateHeaderAndParse(
+absl::optional<SignedExchangeEnvelope> GenerateHeaderAndParse(
     SignedExchangeVersion version,
     base::StringPiece fallback_url,
     base::StringPiece signature,
@@ -95,7 +95,7 @@
       base::make_span(contents_bytes + signature_header_field_offset +
                           prologue_b.signature_header_field_length(),
                       prologue_b.cbor_header_length());
-  const base::Optional<SignedExchangeEnvelope> envelope =
+  const absl::optional<SignedExchangeEnvelope> envelope =
       SignedExchangeEnvelope::Parse(
           SignedExchangeVersion::kB3, prologue_b.fallback_url(),
           signature_header_field, cbor_bytes, nullptr /* devtools_proxy */);
diff --git a/content/browser/web_package/signed_exchange_error.cc b/content/browser/web_package/signed_exchange_error.cc
index 69fafe2..f46b0a8 100644
--- a/content/browser/web_package/signed_exchange_error.cc
+++ b/content/browser/web_package/signed_exchange_error.cc
@@ -9,12 +9,12 @@
 namespace content {
 
 // static
-base::Optional<SignedExchangeError::Field>
+absl::optional<SignedExchangeError::Field>
 SignedExchangeError::GetFieldFromSignatureVerifierResult(
     SignedExchangeSignatureVerifier::Result verify_result) {
   switch (verify_result) {
     case SignedExchangeSignatureVerifier::Result::kSuccess:
-      return base::nullopt;
+      return absl::nullopt;
     case SignedExchangeSignatureVerifier::Result::kErrCertificateSHA256Mismatch:
       return Field::kSignatureCertSha256;
     case SignedExchangeSignatureVerifier::Result::
@@ -41,11 +41,11 @@
   }
 
   NOTREACHED();
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 SignedExchangeError::SignedExchangeError(const std::string& message,
-                                         base::Optional<FieldIndexPair> field)
+                                         absl::optional<FieldIndexPair> field)
     : message(message), field(field) {}
 
 SignedExchangeError::SignedExchangeError(const SignedExchangeError& other) =
diff --git a/content/browser/web_package/signed_exchange_error.h b/content/browser/web_package/signed_exchange_error.h
index fee51314..51e7814 100644
--- a/content/browser/web_package/signed_exchange_error.h
+++ b/content/browser/web_package/signed_exchange_error.h
@@ -8,8 +8,8 @@
 #include <string>
 #include <utility>
 
-#include "base/optional.h"
 #include "content/browser/web_package/signed_exchange_signature_verifier.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -69,11 +69,11 @@
   // a signed exchange header to indicate which signature is causing the error.
   using FieldIndexPair = std::pair<int /* signature_index */, Field>;
 
-  static base::Optional<Field> GetFieldFromSignatureVerifierResult(
+  static absl::optional<Field> GetFieldFromSignatureVerifierResult(
       SignedExchangeSignatureVerifier::Result verify_result);
 
   SignedExchangeError(const std::string& message,
-                      base::Optional<FieldIndexPair> field);
+                      absl::optional<FieldIndexPair> field);
 
   // Copy constructor.
   SignedExchangeError(const SignedExchangeError& other);
@@ -83,7 +83,7 @@
   ~SignedExchangeError();
 
   std::string message;
-  base::Optional<FieldIndexPair> field;
+  absl::optional<FieldIndexPair> field;
 };
 
 }  // namespace content
diff --git a/content/browser/web_package/signed_exchange_handler.cc b/content/browser/web_package/signed_exchange_handler.cc
index 166033e..fe7fd4d 100644
--- a/content/browser/web_package/signed_exchange_handler.cc
+++ b/content/browser/web_package/signed_exchange_handler.cc
@@ -76,7 +76,7 @@
 bool g_should_ignore_cert_validity_period_error = false;
 
 bool IsSupportedSignedExchangeVersion(
-    const base::Optional<SignedExchangeVersion>& version) {
+    const absl::optional<SignedExchangeVersion>& version) {
   return version == SignedExchangeVersion::kB3;
 }
 
@@ -500,13 +500,13 @@
   UMA_HISTOGRAM_ENUMERATION(kHistogramSignatureVerificationResult,
                             verify_result);
   if (verify_result != SignedExchangeSignatureVerifier::Result::kSuccess) {
-    base::Optional<SignedExchangeError::Field> error_field =
+    absl::optional<SignedExchangeError::Field> error_field =
         SignedExchangeError::GetFieldFromSignatureVerifierResult(verify_result);
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy_.get(), "Failed to verify the signed exchange header.",
-        error_field ? base::make_optional(
+        error_field ? absl::make_optional(
                           std::make_pair(0 /* signature_index */, *error_field))
-                    : base::nullopt);
+                    : absl::nullopt);
     RunErrorCallback(
         signed_exchange_utils::GetLoadResultFromSignatureVerifierResult(
             verify_result),
diff --git a/content/browser/web_package/signed_exchange_handler.h b/content/browser/web_package/signed_exchange_handler.h
index dfb9ea4a..5075cc1 100644
--- a/content/browser/web_package/signed_exchange_handler.h
+++ b/content/browser/web_package/signed_exchange_handler.h
@@ -8,7 +8,6 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/browser/web_package/signed_exchange_consts.h"
 #include "content/browser/web_package/signed_exchange_envelope.h"
@@ -24,6 +23,7 @@
 #include "net/log/net_log_with_source.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -153,7 +153,7 @@
   const bool is_secure_transport_;
   const bool has_nosniff_;
   ExchangeHeadersCallback headers_callback_;
-  base::Optional<SignedExchangeVersion> version_;
+  absl::optional<SignedExchangeVersion> version_;
   std::unique_ptr<net::SourceStream> source_;
 
   State state_ = State::kReadingPrologueBeforeFallbackUrl;
@@ -166,7 +166,7 @@
   signed_exchange_prologue::BeforeFallbackUrl prologue_before_fallback_url_;
   signed_exchange_prologue::FallbackUrlAndAfter
       prologue_fallback_url_and_after_;
-  base::Optional<SignedExchangeEnvelope> envelope_;
+  absl::optional<SignedExchangeEnvelope> envelope_;
 
   std::unique_ptr<SignedExchangeCertFetcherFactory> cert_fetcher_factory_;
   std::unique_ptr<SignedExchangeCertFetcher> cert_fetcher_;
diff --git a/content/browser/web_package/signed_exchange_handler_unittest.cc b/content/browser/web_package/signed_exchange_handler_unittest.cc
index d0d0861..663758e 100644
--- a/content/browser/web_package/signed_exchange_handler_unittest.cc
+++ b/content/browser/web_package/signed_exchange_handler_unittest.cc
@@ -245,7 +245,7 @@
     SignedExchangeHandler::SetNetworkContextForTesting(nullptr);
     network::NetworkContext::SetCertVerifierForTesting(nullptr);
     signed_exchange_utils::SetVerificationTimeForTesting(
-        base::Optional<base::Time>());
+        absl::optional<base::Time>());
     SetBrowserClientForTesting(original_client_);
   }
 
@@ -383,12 +383,12 @@
   }
 
   void ExpectHistogramValues(
-      base::Optional<SignedExchangeSignatureVerifier::Result> signature_result,
-      base::Optional<int32_t> cert_result,
-      base::Optional<net::ct::CTPolicyCompliance> ct_result,
-      base::Optional<net::OCSPVerifyResult::ResponseStatus>
+      absl::optional<SignedExchangeSignatureVerifier::Result> signature_result,
+      absl::optional<int32_t> cert_result,
+      absl::optional<net::ct::CTPolicyCompliance> ct_result,
+      absl::optional<net::OCSPVerifyResult::ResponseStatus>
           ocsp_response_status,
-      base::Optional<net::OCSPRevocationStatus> ocsp_revocation_status) {
+      absl::optional<net::OCSPRevocationStatus> ocsp_revocation_status) {
     // CertVerificationResult histogram records negated net::Error code.
     if (cert_result.has_value())
       *cert_result = -*cert_result;
@@ -435,7 +435,7 @@
 
   template <typename T>
   void ExpectZeroOrUniqueSample(const std::string& histogram_name,
-                                base::Optional<T> expected_value) {
+                                absl::optional<T> expected_value) {
     if (expected_value.has_value())
       histogram_tester_.ExpectUniqueSample(histogram_name, *expected_value, 1);
     else
@@ -706,9 +706,9 @@
   EXPECT_EQ(kTestSxgInnerURL, inner_url());
   ExpectHistogramValues(
       SignedExchangeSignatureVerifier::Result::kErrCertificateSHA256Mismatch,
-      base::nullopt /* cert_result */, base::nullopt /* ct_result */,
-      base::nullopt /* ocsp_response_status */,
-      base::nullopt /* ocsp_revocation_status */);
+      absl::nullopt /* cert_result */, absl::nullopt /* ct_result */,
+      absl::nullopt /* ocsp_response_status */,
+      absl::nullopt /* ocsp_revocation_status */);
 
   // Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
   ReadStream(source_, nullptr);
@@ -736,8 +736,8 @@
   ExpectHistogramValues(
       SignedExchangeSignatureVerifier::Result::kSuccess, net::ERR_CERT_INVALID,
       net::ct::CTPolicyCompliance::CT_POLICY_COMPLIANCE_DETAILS_NOT_AVAILABLE,
-      base::nullopt /* ocsp_response_status */,
-      base::nullopt /* ocsp_revocation_status */);
+      absl::nullopt /* ocsp_response_status */,
+      absl::nullopt /* ocsp_revocation_status */);
 
   // Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
   ReadStream(source_, nullptr);
@@ -897,8 +897,8 @@
   ExpectHistogramValues(SignedExchangeSignatureVerifier::Result::kSuccess,
                         net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED,
                         net::ct::CTPolicyCompliance::CT_POLICY_NOT_ENOUGH_SCTS,
-                        base::nullopt /* ocsp_response_status */,
-                        base::nullopt /* ocsp_revocation_status */);
+                        absl::nullopt /* ocsp_response_status */,
+                        absl::nullopt /* ocsp_revocation_status */);
   // Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
   ReadStream(source_, nullptr);
 }
@@ -952,8 +952,8 @@
   ExpectHistogramValues(SignedExchangeSignatureVerifier::Result::kSuccess,
                         net::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED,
                         net::ct::CTPolicyCompliance::CT_POLICY_NOT_ENOUGH_SCTS,
-                        base::nullopt /* ocsp_response_status */,
-                        base::nullopt /* ocsp_revocation_status */);
+                        absl::nullopt /* ocsp_response_status */,
+                        absl::nullopt /* ocsp_revocation_status */);
   // Drain the MockSourceStream, otherwise its destructer causes DCHECK failure.
   ReadStream(source_, nullptr);
 
diff --git a/content/browser/web_package/signed_exchange_loader.cc b/content/browser/web_package/signed_exchange_loader.cc
index c4868b2..43488b89 100644
--- a/content/browser/web_package/signed_exchange_loader.cc
+++ b/content/browser/web_package/signed_exchange_loader.cc
@@ -203,7 +203,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   NOTREACHED();
 }
 
@@ -285,7 +285,7 @@
           *outer_response_head_, false /* is_fallback_redirect */));
   forwarding_client_.reset();
 
-  const base::Optional<net::SSLInfo>& ssl_info = resource_response->ssl_info;
+  const absl::optional<net::SSLInfo>& ssl_info = resource_response->ssl_info;
   if (ssl_info.has_value() &&
       (url_loader_options_ &
        network::mojom::kURLLoadOptionSendSSLInfoForCertificateError) &&
@@ -298,7 +298,7 @@
   if (ssl_info.has_value() &&
       !(url_loader_options_ &
         network::mojom::kURLLoadOptionSendSSLInfoWithResponse)) {
-    inner_response_head_shown_to_client->ssl_info = base::nullopt;
+    inner_response_head_shown_to_client->ssl_info = absl::nullopt;
   }
   inner_response_head_shown_to_client->was_fetched_via_cache =
       outer_response_head_->was_fetched_via_cache;
diff --git a/content/browser/web_package/signed_exchange_loader.h b/content/browser/web_package/signed_exchange_loader.h
index 11a5881..430e4082 100644
--- a/content/browser/web_package/signed_exchange_loader.h
+++ b/content/browser/web_package/signed_exchange_loader.h
@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/web_package/signed_exchange_error.h"
 #include "content/common/content_export.h"
@@ -24,6 +23,7 @@
 #include "services/network/public/cpp/net_adapters.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace blink {
@@ -105,7 +105,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
@@ -114,9 +114,9 @@
   void ConnectToClient(
       mojo::PendingRemote<network::mojom::URLLoaderClient> client);
 
-  const base::Optional<GURL>& fallback_url() const { return fallback_url_; }
+  const absl::optional<GURL>& fallback_url() const { return fallback_url_; }
 
-  const base::Optional<GURL>& inner_request_url() const {
+  const absl::optional<GURL>& inner_request_url() const {
     return inner_request_url_;
   }
 
@@ -181,22 +181,22 @@
   const int frame_tree_node_id_;
   scoped_refptr<SignedExchangePrefetchMetricRecorder> metric_recorder_;
 
-  base::Optional<net::SSLInfo> ssl_info_;
+  absl::optional<net::SSLInfo> ssl_info_;
 
   std::string content_type_;
 
-  base::Optional<GURL> fallback_url_;
-  base::Optional<GURL> inner_request_url_;
+  absl::optional<GURL> fallback_url_;
+  absl::optional<GURL> inner_request_url_;
 
   struct OuterResponseLengthInfo {
     int64_t encoded_data_length;
     int64_t decoded_body_length;
   };
   // Set when URLLoaderClient::OnComplete() is called.
-  base::Optional<OuterResponseLengthInfo> outer_response_length_info_;
+  absl::optional<OuterResponseLengthInfo> outer_response_length_info_;
 
   // Set when |body_data_pipe_adapter_| finishes loading the decoded body.
-  base::Optional<int> decoded_body_read_result_;
+  absl::optional<int> decoded_body_read_result_;
   const std::string accept_langs_;
 
   // Keep the signed exchange info to be stored to
diff --git a/content/browser/web_package/signed_exchange_loader_unittest.cc b/content/browser/web_package/signed_exchange_loader_unittest.cc
index ca79fac..da02b42 100644
--- a/content/browser/web_package/signed_exchange_loader_unittest.cc
+++ b/content/browser/web_package/signed_exchange_loader_unittest.cc
@@ -92,7 +92,7 @@
                  void(const std::vector<std::string>&,
                       const net::HttpRequestHeaders&,
                       const net::HttpRequestHeaders&,
-                      const base::Optional<GURL>&));
+                      const absl::optional<GURL>&));
     MOCK_METHOD2(SetPriority,
                  void(net::RequestPriority priority,
                       int32_t intra_priority_value));
diff --git a/content/browser/web_package/signed_exchange_prefetch_handler.cc b/content/browser/web_package/signed_exchange_prefetch_handler.cc
index f00fe74..e08fb75 100644
--- a/content/browser/web_package/signed_exchange_prefetch_handler.cc
+++ b/content/browser/web_package/signed_exchange_prefetch_handler.cc
@@ -46,7 +46,7 @@
       network_isolation_key, frame_tree_node_id);
   auto devtools_proxy = std::make_unique<SignedExchangeDevToolsProxy>(
       resource_request.url, response_head.Clone(), frame_tree_node_id,
-      base::nullopt /* devtools_navigation_token */,
+      absl::nullopt /* devtools_navigation_token */,
       resource_request.report_raw_headers);
   signed_exchange_loader_ = std::make_unique<SignedExchangeLoader>(
       resource_request, std::move(response_head), std::move(response_body),
diff --git a/content/browser/web_package/signed_exchange_prefetch_handler.h b/content/browser/web_package/signed_exchange_prefetch_handler.h
index 367ea34..156e53e 100644
--- a/content/browser/web_package/signed_exchange_prefetch_handler.h
+++ b/content/browser/web_package/signed_exchange_prefetch_handler.h
@@ -9,13 +9,13 @@
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace network {
 class NetworkIsolationKey;
diff --git a/content/browser/web_package/signed_exchange_prologue.h b/content/browser/web_package/signed_exchange_prologue.h
index 69fbaaee..169b323 100644
--- a/content/browser/web_package/signed_exchange_prologue.h
+++ b/content/browser/web_package/signed_exchange_prologue.h
@@ -7,9 +7,9 @@
 
 #include "base/containers/span.h"
 #include "base/gtest_prod_util.h"
-#include "base/optional.h"
 #include "content/browser/web_package/signed_exchange_utils.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
diff --git a/content/browser/web_package/signed_exchange_request_handler.h b/content/browser/web_package/signed_exchange_request_handler.h
index 39be78bb..e9e7f11 100644
--- a/content/browser/web_package/signed_exchange_request_handler.h
+++ b/content/browser/web_package/signed_exchange_request_handler.h
@@ -8,11 +8,11 @@
 #include <string>
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/loader/navigation_loader_interceptor.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace network {
diff --git a/content/browser/web_package/signed_exchange_request_handler_browsertest.cc b/content/browser/web_package/signed_exchange_request_handler_browsertest.cc
index a4c2bce..9b65ed8 100644
--- a/content/browser/web_package/signed_exchange_request_handler_browsertest.cc
+++ b/content/browser/web_package/signed_exchange_request_handler_browsertest.cc
@@ -100,10 +100,10 @@
       response_code_ = response->response_code();
   }
 
-  const base::Optional<int>& response_code() const { return response_code_; }
+  const absl::optional<int>& response_code() const { return response_code_; }
 
  private:
-  base::Optional<int> response_code_;
+  absl::optional<int> response_code_;
 
   DISALLOW_COPY_AND_ASSIGN(RedirectObserver);
 };
@@ -133,11 +133,11 @@
     std::move(done_closure_).Run();
   }
 
-  const base::Optional<net::Error>& error_code() const { return error_code_; }
+  const absl::optional<net::Error>& error_code() const { return error_code_; }
 
  private:
   base::OnceClosure done_closure_;
-  base::Optional<net::Error> error_code_;
+  absl::optional<net::Error> error_code_;
 
   DISALLOW_COPY_AND_ASSIGN(FinishNavigationObserver);
 };
@@ -1130,12 +1130,12 @@
     }
   }
 
-  base::Optional<std::string> GetInterceptedAcceptHeader(
+  absl::optional<std::string> GetInterceptedAcceptHeader(
       const GURL& url) const {
     base::AutoLock lock(url_accept_header_map_lock_);
     const auto it = url_accept_header_map_.find(url);
     if (it == url_accept_header_map_.end())
-      return base::nullopt;
+      return absl::nullopt;
     return it->second;
   }
 
@@ -1311,10 +1311,10 @@
         is_generated_scope
             ? (IsSignedExchangeEnabled() ? frame_accept_with_sxg : frame_accept)
             : "Done";
-    const base::Optional<std::string> expected_target_accept_header =
+    const absl::optional<std::string> expected_target_accept_header =
         is_generated_scope
-            ? base::nullopt
-            : base::Optional<std::string>(IsSignedExchangeEnabled()
+            ? absl::nullopt
+            : absl::optional<std::string>(IsSignedExchangeEnabled()
                                               ? frame_accept_with_sxg
                                               : frame_accept);
 
diff --git a/content/browser/web_package/signed_exchange_signature_header_field.cc b/content/browser/web_package/signed_exchange_signature_header_field.cc
index dd3ea0c..73d5012 100644
--- a/content/browser/web_package/signed_exchange_signature_header_field.cc
+++ b/content/browser/web_package/signed_exchange_signature_header_field.cc
@@ -15,19 +15,19 @@
 namespace content {
 
 // static
-base::Optional<std::vector<SignedExchangeSignatureHeaderField::Signature>>
+absl::optional<std::vector<SignedExchangeSignatureHeaderField::Signature>>
 SignedExchangeSignatureHeaderField::ParseSignature(
     base::StringPiece signature_str,
     SignedExchangeDevToolsProxy* devtools_proxy) {
   TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"),
                "SignedExchangeSignatureHeaderField::ParseSignature");
 
-  base::Optional<net::structured_headers::ParameterisedList> values =
+  absl::optional<net::structured_headers::ParameterisedList> values =
       net::structured_headers::ParseParameterisedList(signature_str);
   if (!values) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy, "Failed to parse signature header.");
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   std::vector<Signature> signatures;
@@ -36,7 +36,7 @@
     if (!value.identifier.is_token()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "Failed to parse signature header.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     signatures.push_back(Signature());
     Signature& sig = signatures.back();
@@ -46,33 +46,33 @@
     if (!sig_item.is_byte_sequence()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "Failed to parse 'sig' parameter.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     sig.sig = sig_item.GetString();
     if (sig.sig.empty()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'sig' parameter is not set,");
-      return base::nullopt;
+      return absl::nullopt;
     }
 
     const auto& integrity_item = value.params[kIntegrity];
     if (!integrity_item.is_string()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "Failed to parse 'integrity' parameter.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     sig.integrity = integrity_item.GetString();
     if (sig.integrity.empty()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'integrity' parameter is not set.");
-      return base::nullopt;
+      return absl::nullopt;
     }
 
     const auto& cert_url_item = value.params[kCertUrl];
     if (!cert_url_item.is_string()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "Failed to parse 'cert-url' parameter.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     sig.cert_url = GURL(cert_url_item.GetString());
     if (!sig.cert_url.is_valid() || sig.cert_url.has_ref()) {
@@ -80,19 +80,19 @@
       // params may not have "cert-url".
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'cert-url' parameter is not a valid URL.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     if (!sig.cert_url.SchemeIs("https") && !sig.cert_url.SchemeIs("data")) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'cert-url' should have 'https' or 'data' scheme.");
-      return base::nullopt;
+      return absl::nullopt;
     }
 
     const auto& cert_sha256_item = value.params[kCertSha256Key];
     if (!cert_sha256_item.is_byte_sequence()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "Failed to parse 'cert-sha256' parameter.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     const std::string& cert_sha256_string = cert_sha256_item.GetString();
     if (cert_sha256_string.size() != crypto::kSHA256Length) {
@@ -100,7 +100,7 @@
       // params may not have "cert-sha256".
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'cert-sha256' parameter is not a SHA-256 digest.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     net::SHA256HashValue cert_sha256;
     memcpy(&cert_sha256.data, cert_sha256_string.data(), crypto::kSHA256Length);
@@ -113,31 +113,31 @@
     if (!validity_url_item.is_string()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "Failed to parse 'validity-url' parameter.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     sig.validity_url =
         signed_exchange_utils::URLWithRawString(validity_url_item.GetString());
     if (!sig.validity_url.url.is_valid()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'validity-url' parameter is not a valid URL.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     if (sig.validity_url.url.has_ref()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'validity-url' parameter can't have a fragment.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     if (!sig.validity_url.url.SchemeIs("https")) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'validity-url' should have 'https' scheme.");
-      return base::nullopt;
+      return absl::nullopt;
     }
 
     const auto& date_item = value.params[kDateKey];
     if (!date_item.is_integer()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'date' parameter is not a number.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     sig.date = date_item.GetInteger();
 
@@ -145,7 +145,7 @@
     if (!expires_item.is_integer()) {
       signed_exchange_utils::ReportErrorAndTraceEvent(
           devtools_proxy, "'expires' parameter is not a number.");
-      return base::nullopt;
+      return absl::nullopt;
     }
     sig.expires = expires_item.GetInteger();
   }
diff --git a/content/browser/web_package/signed_exchange_signature_header_field.h b/content/browser/web_package/signed_exchange_signature_header_field.h
index 4682e576..a696315 100644
--- a/content/browser/web_package/signed_exchange_signature_header_field.h
+++ b/content/browser/web_package/signed_exchange_signature_header_field.h
@@ -10,11 +10,11 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "content/browser/web_package/signed_exchange_utils.h"
 #include "content/common/content_export.h"
 #include "net/base/hash_value.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -35,7 +35,7 @@
     std::string sig;
     std::string integrity;
     GURL cert_url;
-    base::Optional<net::SHA256HashValue> cert_sha256;
+    absl::optional<net::SHA256HashValue> cert_sha256;
     // TODO(https://crbug.com/819467): Support ed25519key.
     // std::string ed25519_key;
     signed_exchange_utils::URLWithRawString validity_url;
@@ -45,7 +45,7 @@
 
   // Parses a value of the Signature header.
   // https://wicg.github.io/webpackage/draft-yasskin-httpbis-origin-signed-exchanges-impl.html#signature-header
-  static base::Optional<std::vector<Signature>> ParseSignature(
+  static absl::optional<std::vector<Signature>> ParseSignature(
       base::StringPiece signature_str,
       SignedExchangeDevToolsProxy* devtools_proxy);
 };
diff --git a/content/browser/web_package/signed_exchange_signature_verifier.cc b/content/browser/web_package/signed_exchange_signature_verifier.cc
index bb2fb722..083f2160 100644
--- a/content/browser/web_package/signed_exchange_signature_verifier.cc
+++ b/content/browser/web_package/signed_exchange_signature_verifier.cc
@@ -53,7 +53,7 @@
 constexpr base::TimeDelta kOneWeek = base::TimeDelta::FromDays(7);
 constexpr base::TimeDelta kFourWeeks = base::TimeDelta::FromDays(4 * 7);
 
-base::Optional<crypto::SignatureVerifier::SignatureAlgorithm>
+absl::optional<crypto::SignatureVerifier::SignatureAlgorithm>
 GetSignatureAlgorithm(scoped_refptr<net::X509Certificate> cert,
                       SignedExchangeDevToolsProxy* devtools_proxy) {
   TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("loading"), "GetSignatureAlgorithm");
@@ -63,7 +63,7 @@
           &spki)) {
     signed_exchange_utils::ReportErrorAndTraceEvent(devtools_proxy,
                                                     "Failed to extract SPKI.");
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   CBS cbs;
@@ -72,7 +72,7 @@
   if (!pkey || CBS_len(&cbs) != 0) {
     signed_exchange_utils::ReportErrorAndTraceEvent(
         devtools_proxy, "Failed to parse public key.");
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   int pkey_id = EVP_PKEY_id(pkey.get());
@@ -82,7 +82,7 @@
         base::StringPrintf("Unsupported public key type: %d. Only ECDSA keys "
                            "on the secp256r1 curve are supported.",
                            pkey_id));
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   const EC_GROUP* group = EC_KEY_get0_group(EVP_PKEY_get0_EC_KEY(pkey.get()));
@@ -94,7 +94,7 @@
       base::StringPrintf("Unsupported EC group: %d. Only ECDSA keys on the "
                          "secp256r1 curve are supported.",
                          curve_name));
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool VerifySignature(base::span<const uint8_t> sig,
@@ -291,7 +291,7 @@
 
   auto message = GenerateSignedMessage(version, envelope);
 
-  base::Optional<crypto::SignatureVerifier::SignatureAlgorithm> algorithm =
+  absl::optional<crypto::SignatureVerifier::SignatureAlgorithm> algorithm =
       GetSignatureAlgorithm(certificate, devtools_proxy);
   if (!algorithm)
     return Result::kErrUnsupportedCertType;
diff --git a/content/browser/web_package/signed_exchange_signature_verifier.h b/content/browser/web_package/signed_exchange_signature_verifier.h
index e9f08ea..a6c9e16 100644
--- a/content/browser/web_package/signed_exchange_signature_verifier.h
+++ b/content/browser/web_package/signed_exchange_signature_verifier.h
@@ -6,10 +6,10 @@
 #define CONTENT_BROWSER_WEB_PACKAGE_SIGNED_EXCHANGE_SIGNATURE_VERIFIER_H_
 
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/browser/web_package/signed_exchange_consts.h"
 #include "content/common/content_export.h"
 #include "net/cert/x509_certificate.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class Time;
diff --git a/content/browser/web_package/signed_exchange_subresource_prefetch_browsertest.cc b/content/browser/web_package/signed_exchange_subresource_prefetch_browsertest.cc
index 9369ba4..01facd5 100644
--- a/content/browser/web_package/signed_exchange_subresource_prefetch_browsertest.cc
+++ b/content/browser/web_package/signed_exchange_subresource_prefetch_browsertest.cc
@@ -181,12 +181,12 @@
         navigation_handle->HasPrefetchedAlternativeSubresourceSignedExchange();
   }
 
-  const base::Optional<bool>& had_prefetched_alt_sxg() const {
+  const absl::optional<bool>& had_prefetched_alt_sxg() const {
     return had_prefetched_alt_sxg_;
   }
 
  private:
-  base::Optional<bool> had_prefetched_alt_sxg_;
+  absl::optional<bool> had_prefetched_alt_sxg_;
 
   DISALLOW_COPY_AND_ASSIGN(NavigationHandleSXGAttributeObserver);
 };
diff --git a/content/browser/web_package/signed_exchange_utils.cc b/content/browser/web_package/signed_exchange_utils.cc
index 600cfb10..ff01e25 100644
--- a/content/browser/web_package/signed_exchange_utils.cc
+++ b/content/browser/web_package/signed_exchange_utils.cc
@@ -29,13 +29,13 @@
 namespace signed_exchange_utils {
 
 namespace {
-base::Optional<base::Time> g_verification_time_for_testing;
+absl::optional<base::Time> g_verification_time_for_testing;
 }  // namespace
 
 void ReportErrorAndTraceEvent(
     SignedExchangeDevToolsProxy* devtools_proxy,
     const std::string& error_message,
-    base::Optional<SignedExchangeError::FieldIndexPair> error_field) {
+    absl::optional<SignedExchangeError::FieldIndexPair> error_field) {
   TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("loading"),
                        "SignedExchangeError", TRACE_EVENT_SCOPE_THREAD, "error",
                        error_message);
@@ -77,7 +77,7 @@
   return true;
 }
 
-base::Optional<SignedExchangeVersion> GetSignedExchangeVersion(
+absl::optional<SignedExchangeVersion> GetSignedExchangeVersion(
     const std::string& content_type) {
   // https://wicg.github.io/webpackage/loading.html#signed-exchange-version
   // Step 1. Let mimeType be the supplied MIME type of response. [spec text]
@@ -89,7 +89,7 @@
   const std::string essence = base::ToLowerASCII(base::TrimWhitespaceASCII(
       content_type.substr(0, semicolon), base::TRIM_ALL));
   if (essence != "application/signed-exchange")
-    return base::nullopt;
+    return absl::nullopt;
 
   // Step 4.Let params be mimeType's parameters. [spec text]
   std::map<std::string, std::string> params;
@@ -101,17 +101,17 @@
       params[base::ToLowerASCII(name)] = parser.value();
     }
     if (!parser.valid())
-      return base::nullopt;
+      return absl::nullopt;
   }
   // Step 5. If params["v"] exists, return it. Otherwise, return undefined.
   //        [spec text]
   auto iter = params.find("v");
   if (iter != params.end()) {
     if (iter->second == "b3")
-      return base::make_optional(SignedExchangeVersion::kB3);
-    return base::make_optional(SignedExchangeVersion::kUnknown);
+      return absl::make_optional(SignedExchangeVersion::kB3);
+    return absl::make_optional(SignedExchangeVersion::kUnknown);
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 SignedExchangeLoadResult GetLoadResultFromSignatureVerifierResult(
@@ -266,7 +266,7 @@
 }
 
 void SetVerificationTimeForTesting(
-    base::Optional<base::Time> verification_time_for_testing) {
+    absl::optional<base::Time> verification_time_for_testing) {
   g_verification_time_for_testing = verification_time_for_testing;
 }
 
diff --git a/content/browser/web_package/signed_exchange_utils.h b/content/browser/web_package/signed_exchange_utils.h
index 1e09a59..de6ed72 100644
--- a/content/browser/web_package/signed_exchange_utils.h
+++ b/content/browser/web_package/signed_exchange_utils.h
@@ -7,7 +7,6 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "content/browser/web_package/signed_exchange_consts.h"
 #include "content/browser/web_package/signed_exchange_error.h"
@@ -15,6 +14,7 @@
 #include "content/common/content_export.h"
 #include "net/url_request/redirect_util.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace network {
@@ -43,8 +43,8 @@
 void ReportErrorAndTraceEvent(
     SignedExchangeDevToolsProxy* devtools_proxy,
     const std::string& error_message,
-    base::Optional<SignedExchangeError::FieldIndexPair> error_field =
-        base::nullopt);
+    absl::optional<SignedExchangeError::FieldIndexPair> error_field =
+        absl::nullopt);
 
 // Returns true when SignedHTTPExchange feature is enabled. This must be called
 // on the UI thread.
@@ -65,7 +65,7 @@
 // of application/signed-exchange. Returns SignedExchangeVersion::kUnknown if an
 // unsupported signed exchange version is found.
 // [1] https://wicg.github.io/webpackage/loading.html#signed-exchange-version
-CONTENT_EXPORT base::Optional<SignedExchangeVersion> GetSignedExchangeVersion(
+CONTENT_EXPORT absl::optional<SignedExchangeVersion> GetSignedExchangeVersion(
     const std::string& content_type);
 
 // Returns the matching SignedExchangeLoadResult for the verifier's result.
@@ -99,7 +99,7 @@
 
 // Override the time which is used for verifying signed exchange.
 CONTENT_EXPORT void SetVerificationTimeForTesting(
-    base::Optional<base::Time> verification_time_for_testing);
+    absl::optional<base::Time> verification_time_for_testing);
 
 }  // namespace signed_exchange_utils
 }  // namespace content
diff --git a/content/browser/web_package/signed_exchange_utils_unittest.cc b/content/browser/web_package/signed_exchange_utils_unittest.cc
index 721b559..393866d2 100644
--- a/content/browser/web_package/signed_exchange_utils_unittest.cc
+++ b/content/browser/web_package/signed_exchange_utils_unittest.cc
@@ -10,109 +10,109 @@
 namespace signed_exchange_utils {
 
 TEST(SignedExchangeUtilsTest, VersionParam_WrongEssence) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-foo");
   EXPECT_FALSE(version.has_value());
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_None) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange");
   EXPECT_FALSE(version.has_value());
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_NoneWithSemicolon) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;");
   EXPECT_FALSE(version.has_value());
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_Empty) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=");
   EXPECT_FALSE(version.has_value());
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_EmptyString) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"\"");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_UnknownVersion) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=foobar");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_UnsupportedVersion) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=b2");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_Simple) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=b3");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_WithSpace) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange ; v=b3");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_ExtraParam) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=b3;foo=bar");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_Quoted) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"b3\"");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_QuotedNonB3) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"b32\"");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_QuotedLeadingWhitespace) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\" b3\"");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_QuotedTrailingWhitespace) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"b3 \"");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_QuotesOpen) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"b3");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_QuotesOpenNonV) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"b3;r=\"b3");
   EXPECT_EQ(version, SignedExchangeVersion::kUnknown);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_QuotesOpenNonV2) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("application/signed-exchange;v=\"b3\";r=\"b3");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
 
 TEST(SignedExchangeUtilsTest, VersionParam_UseCaseInsensitiveMatch) {
-  base::Optional<SignedExchangeVersion> version =
+  absl::optional<SignedExchangeVersion> version =
       GetSignedExchangeVersion("Application/Signed-Exchange;V=b3");
   EXPECT_EQ(version, SignedExchangeVersion::kB3);
 }
diff --git a/content/browser/web_package/signed_exchange_validity_pinger.cc b/content/browser/web_package/signed_exchange_validity_pinger.cc
index f1ec804a1..4d0a2cf 100644
--- a/content/browser/web_package/signed_exchange_validity_pinger.cc
+++ b/content/browser/web_package/signed_exchange_validity_pinger.cc
@@ -63,7 +63,7 @@
     const GURL& validity_url,
     scoped_refptr<network::SharedURLLoaderFactory> loader_factory,
     std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles,
-    const base::Optional<base::UnguessableToken>& throttling_profile_id,
+    const absl::optional<base::UnguessableToken>& throttling_profile_id,
     base::OnceClosure callback) {
   auto pinger = base::WrapUnique<SignedExchangeValidityPinger>(
       new SignedExchangeValidityPinger(std::move(callback)));
@@ -80,7 +80,7 @@
     const GURL& validity_url,
     scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory,
     std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles,
-    const base::Optional<base::UnguessableToken>& throttling_profile_id) {
+    const absl::optional<base::UnguessableToken>& throttling_profile_id) {
   DCHECK(
       base::FeatureList::IsEnabled(features::kSignedHTTPExchangePingValidity));
 
diff --git a/content/browser/web_package/signed_exchange_validity_pinger.h b/content/browser/web_package/signed_exchange_validity_pinger.h
index 56d58a4..da43ac4 100644
--- a/content/browser/web_package/signed_exchange_validity_pinger.h
+++ b/content/browser/web_package/signed_exchange_validity_pinger.h
@@ -6,12 +6,12 @@
 #define CONTENT_BROWSER_WEB_PACKAGE_SIGNED_EXCHANGE_VALIDITY_PINGER_H_
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "base/unguessable_token.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/system/data_pipe_drainer.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace network {
 class SharedURLLoaderFactory;
@@ -37,7 +37,7 @@
       const GURL& validity_url,
       scoped_refptr<network::SharedURLLoaderFactory> loader_factory,
       std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles,
-      const base::Optional<base::UnguessableToken>& throttling_profile_id,
+      const absl::optional<base::UnguessableToken>& throttling_profile_id,
       base::OnceClosure callback);
 
   ~SignedExchangeValidityPinger() override;
@@ -48,7 +48,7 @@
       const GURL& validity_url,
       scoped_refptr<network::SharedURLLoaderFactory> loader_factory,
       std::vector<std::unique_ptr<blink::URLLoaderThrottle>> throttles,
-      const base::Optional<base::UnguessableToken>& throttling_profile_id);
+      const absl::optional<base::UnguessableToken>& throttling_profile_id);
 
   // network::mojom::URLLoaderClient
   void OnReceiveEarlyHints(network::mojom::EarlyHintsPtr early_hints) override;
diff --git a/content/browser/web_package/web_bundle_blob_data_source.cc b/content/browser/web_package/web_bundle_blob_data_source.cc
index f217148f..1d82aeb 100644
--- a/content/browser/web_package/web_bundle_blob_data_source.cc
+++ b/content/browser/web_package/web_bundle_blob_data_source.cc
@@ -49,7 +49,7 @@
                     int bytes_read) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (bytes_read != io_buf->size()) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   std::vector<uint8_t> vec;
@@ -66,16 +66,16 @@
     int net_error) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (net_error != net::OK) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   if (offset >= blob_reader->total_size()) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   uint64_t offset_plus_length;
   if (!base::CheckAdd(offset, length).AssignIfValid(&offset_plus_length)) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   if (offset_plus_length > blob_reader->total_size())
@@ -84,7 +84,7 @@
   auto set_read_range_status = blob_reader->SetReadRange(offset, length);
   if (set_read_range_status != storage::BlobReader::Status::DONE) {
     DCHECK_EQ(set_read_range_status, storage::BlobReader::Status::NET_ERROR);
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   auto* raw_blob_reader = blob_reader.get();
@@ -335,7 +335,7 @@
     ReadCallback callback) {
   DCHECK_CURRENTLY_ON(BrowserThread::IO);
   if (!blob_) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   auto blob_reader = blob_->CreateReader();
diff --git a/content/browser/web_package/web_bundle_blob_data_source_unittest.cc b/content/browser/web_package/web_bundle_blob_data_source_unittest.cc
index 48b5192..1437fd3 100644
--- a/content/browser/web_package/web_bundle_blob_data_source_unittest.cc
+++ b/content/browser/web_package/web_bundle_blob_data_source_unittest.cc
@@ -49,7 +49,7 @@
   std::unique_ptr<WebBundleBlobDataSource> CreateTestDataSource(
       const std::string& test_data,
       mojo::Remote<web_package::mojom::BundleDataSource>* remote_source,
-      base::Optional<int64_t> content_length = base::nullopt) {
+      absl::optional<int64_t> content_length = absl::nullopt) {
     mojo::ScopedDataPipeProducerHandle producer;
     mojo::ScopedDataPipeConsumerHandle consumer;
     CHECK_EQ(MOJO_RESULT_OK, mojo::CreateDataPipe(nullptr, producer, consumer));
@@ -84,13 +84,13 @@
   auto source = CreateTestDataSource(kData, &remote_source);
 
   base::RunLoop run_loop;
-  base::Optional<std::vector<uint8_t>> read_result;
+  absl::optional<std::vector<uint8_t>> read_result;
   remote_source->Read(
       1, 3,
       base::BindOnce(
           [](base::OnceClosure closure,
-             base::Optional<std::vector<uint8_t>>* read_result,
-             const base::Optional<std::vector<uint8_t>>& result) {
+             absl::optional<std::vector<uint8_t>>* read_result,
+             const absl::optional<std::vector<uint8_t>>& result) {
             *read_result = result;
             std::move(closure).Run();
           },
@@ -109,13 +109,13 @@
   auto source = CreateTestDataSource(kData, &remote_source);
 
   base::RunLoop run_loop;
-  base::Optional<std::vector<uint8_t>> read_result;
+  absl::optional<std::vector<uint8_t>> read_result;
   remote_source->Read(
       6, 100,
       base::BindOnce(
           [](base::OnceClosure closure,
-             base::Optional<std::vector<uint8_t>>* read_result,
-             const base::Optional<std::vector<uint8_t>>& result) {
+             absl::optional<std::vector<uint8_t>>* read_result,
+             const absl::optional<std::vector<uint8_t>>& result) {
             *read_result = result;
             std::move(closure).Run();
           },
@@ -133,13 +133,13 @@
   auto source = CreateTestDataSource(kData, &remote_source);
 
   base::RunLoop run_loop;
-  base::Optional<std::vector<uint8_t>> read_result;
+  absl::optional<std::vector<uint8_t>> read_result;
   remote_source->Read(
       10, 100,
       base::BindOnce(
           [](base::OnceClosure closure,
-             base::Optional<std::vector<uint8_t>>* read_result,
-             const base::Optional<std::vector<uint8_t>>& result) {
+             absl::optional<std::vector<uint8_t>>* read_result,
+             const absl::optional<std::vector<uint8_t>>& result) {
             *read_result = result;
             std::move(closure).Run();
           },
@@ -154,13 +154,13 @@
   auto source = CreateTestDataSource(kData, &remote_source, kData.size() - 1);
 
   base::RunLoop run_loop;
-  base::Optional<std::vector<uint8_t>> read_result;
+  absl::optional<std::vector<uint8_t>> read_result;
   remote_source->Read(
       0, kData.size(),
       base::BindOnce(
           [](base::OnceClosure closure,
-             base::Optional<std::vector<uint8_t>>* read_result,
-             const base::Optional<std::vector<uint8_t>>& result) {
+             absl::optional<std::vector<uint8_t>>* read_result,
+             const absl::optional<std::vector<uint8_t>>& result) {
             *read_result = result;
             std::move(closure).Run();
           },
@@ -177,13 +177,13 @@
   auto source = CreateTestDataSource(kData, &remote_source, kData.size() + 1);
 
   base::RunLoop run_loop;
-  base::Optional<std::vector<uint8_t>> read_result;
+  absl::optional<std::vector<uint8_t>> read_result;
   remote_source->Read(
       0, kData.size() + 1,
       base::BindOnce(
           [](base::OnceClosure closure,
-             base::Optional<std::vector<uint8_t>>* read_result,
-             const base::Optional<std::vector<uint8_t>>& result) {
+             absl::optional<std::vector<uint8_t>>* read_result,
+             const absl::optional<std::vector<uint8_t>>& result) {
             *read_result = result;
             std::move(closure).Run();
           },
@@ -202,13 +202,13 @@
   auto source = CreateTestDataSource(content, &remote_source);
 
   base::RunLoop run_loop;
-  base::Optional<std::vector<uint8_t>> read_result;
+  absl::optional<std::vector<uint8_t>> read_result;
   remote_source->Read(
       1, 100,
       base::BindOnce(
           [](base::OnceClosure closure,
-             base::Optional<std::vector<uint8_t>>* read_result,
-             const base::Optional<std::vector<uint8_t>>& result) {
+             absl::optional<std::vector<uint8_t>>* read_result,
+             const absl::optional<std::vector<uint8_t>>& result) {
             *read_result = result;
             std::move(closure).Run();
           },
diff --git a/content/browser/web_package/web_bundle_browsertest.cc b/content/browser/web_package/web_bundle_browsertest.cc
index 792aa64..7fb2e50 100644
--- a/content/browser/web_package/web_bundle_browsertest.cc
+++ b/content/browser/web_package/web_bundle_browsertest.cc
@@ -5,7 +5,6 @@
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
 #include "base/format_macros.h"
-#include "base/optional.h"
 #include "base/path_service.h"
 #include "base/run_loop.h"
 #include "base/strings/string_piece.h"
@@ -41,6 +40,7 @@
 #include "net/test/embedded_test_server/http_request.h"
 #include "net/test/embedded_test_server/http_response.h"
 #include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if defined(OS_ANDROID)
 #include "base/android/content_uri_utils.h"
@@ -409,14 +409,14 @@
     navigations_remaining_ = navigations_remaining;
   }
 
-  const base::Optional<net::Error>& error_code() const { return error_code_; }
+  const absl::optional<net::Error>& error_code() const { return error_code_; }
   const std::vector<NavigationType>& navigation_types() const {
     return navigation_types_;
   }
 
  private:
   base::OnceClosure done_closure_;
-  base::Optional<net::Error> error_code_;
+  absl::optional<net::Error> error_code_;
 
   int navigations_remaining_ = 1;
   std::vector<NavigationType> navigation_types_;
diff --git a/content/browser/web_package/web_bundle_reader.cc b/content/browser/web_package/web_bundle_reader.cc
index d4bde56c..c199011 100644
--- a/content/browser/web_package/web_bundle_reader.cc
+++ b/content/browser/web_package/web_bundle_reader.cc
@@ -258,12 +258,12 @@
 
   GetUIThreadTaskRunner({})->PostTask(
       FROM_HERE, base::BindOnce(&WebBundleReader::DidReconnect, this,
-                                base::nullopt /* error */));
+                                absl::nullopt /* error */));
 }
 
 void WebBundleReader::ReconnectForFile(base::File file) {
   base::File::Error file_error = parser_->OpenFile(std::move(file));
-  base::Optional<std::string> error;
+  absl::optional<std::string> error;
   if (file_error != base::File::FILE_OK)
     error = base::File::ErrorToString(file_error);
   GetUIThreadTaskRunner({})->PostTask(
@@ -271,7 +271,7 @@
       base::BindOnce(&WebBundleReader::DidReconnect, this, std::move(error)));
 }
 
-void WebBundleReader::DidReconnect(base::Optional<std::string> error) {
+void WebBundleReader::DidReconnect(absl::optional<std::string> error) {
   DCHECK_EQ(state_, State::kDisconnected);
   DCHECK(parser_);
   auto read_tasks = std::move(pending_read_responses_);
diff --git a/content/browser/web_package/web_bundle_reader.h b/content/browser/web_package/web_bundle_reader.h
index 7e438a6..41f8780f 100644
--- a/content/browser/web_package/web_bundle_reader.h
+++ b/content/browser/web_package/web_bundle_reader.h
@@ -13,7 +13,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "base/sequenced_task_runner.h"
 #include "content/common/content_export.h"
@@ -24,6 +23,7 @@
 #include "net/base/net_errors.h"
 #include "services/data_decoder/public/cpp/safe_web_bundle_parser.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -135,7 +135,7 @@
   void OnParserDisconnected();
   void Reconnect();
   void ReconnectForFile(base::File file);
-  void DidReconnect(base::Optional<std::string> error);
+  void DidReconnect(absl::optional<std::string> error);
 
   SEQUENCE_CHECKER(sequence_checker_);
 
diff --git a/content/browser/web_package/web_bundle_reader_unittest.cc b/content/browser/web_package/web_bundle_reader_unittest.cc
index 867ca44..ac2b44fe 100644
--- a/content/browser/web_package/web_bundle_reader_unittest.cc
+++ b/content/browser/web_package/web_bundle_reader_unittest.cc
@@ -10,13 +10,13 @@
 #include "base/files/scoped_temp_dir.h"
 #include "base/macros.h"
 #include "base/numerics/safe_conversions.h"
-#include "base/optional.h"
 #include "base/test/task_environment.h"
 #include "components/web_package/mojom/web_bundle_parser.mojom.h"
 #include "content/browser/web_package/mock_web_bundle_reader_factory.h"
 #include "content/browser/web_package/web_bundle_source.h"
 #include "mojo/public/c/system/data_pipe.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
diff --git a/content/browser/web_package/web_bundle_redirect_url_loader.cc b/content/browser/web_package/web_bundle_redirect_url_loader.cc
index f23b772..2be01ff3 100644
--- a/content/browser/web_package/web_bundle_redirect_url_loader.cc
+++ b/content/browser/web_package/web_bundle_redirect_url_loader.cc
@@ -37,7 +37,7 @@
           ? net::RedirectInfo::FirstPartyURLPolicy::UPDATE_URL_ON_REDIRECT
           : net::RedirectInfo::FirstPartyURLPolicy::NEVER_CHANGE_URL,
       resource_request.referrer_policy, resource_request.referrer.spec(), 303,
-      url, /*referrer_policy_header=*/base::nullopt,
+      url, /*referrer_policy_header=*/absl::nullopt,
       /*insecure_scheme_was_upgraded=*/false, /*copy_fragment=*/true,
       /*is_signed_exchange_fallback_redirect=*/false);
   client_->OnReceiveRedirect(redirect_info, std::move(response_head));
diff --git a/content/browser/web_package/web_bundle_redirect_url_loader.h b/content/browser/web_package/web_bundle_redirect_url_loader.h
index 77fb33c..d7bddad 100644
--- a/content/browser/web_package/web_bundle_redirect_url_loader.h
+++ b/content/browser/web_package/web_bundle_redirect_url_loader.h
@@ -41,7 +41,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {}
+      const absl::optional<GURL>& new_url) override {}
   void SetPriority(net::RequestPriority priority,
                    int intra_priority_value) override {}
   void PauseReadingBodyFromNet() override {}
diff --git a/content/browser/web_package/web_bundle_url_loader_factory.cc b/content/browser/web_package/web_bundle_url_loader_factory.cc
index b1fe954e..1a8fc83 100644
--- a/content/browser/web_package/web_bundle_url_loader_factory.cc
+++ b/content/browser/web_package/web_bundle_url_loader_factory.cc
@@ -86,7 +86,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override {}
+      const absl::optional<GURL>& new_url) override {}
   void SetPriority(net::RequestPriority priority,
                    int intra_priority_value) override {}
   void PauseReadingBodyFromNet() override {}
@@ -173,7 +173,7 @@
   base::WeakPtr<WebBundleURLLoaderFactory> factory_;
   mojo::Remote<network::mojom::URLLoaderClient> loader_client_;
   const int frame_tree_node_id_;
-  base::Optional<net::HttpByteRange> byte_range_;
+  absl::optional<net::HttpByteRange> byte_range_;
 
   base::WeakPtrFactory<EntryLoader> weak_factory_{this};
 
diff --git a/content/browser/web_package/web_bundle_url_loader_factory_unittest.cc b/content/browser/web_package/web_bundle_url_loader_factory_unittest.cc
index b2293a58..1f99427b 100644
--- a/content/browser/web_package/web_bundle_url_loader_factory_unittest.cc
+++ b/content/browser/web_package/web_bundle_url_loader_factory_unittest.cc
@@ -6,7 +6,6 @@
 
 #include "base/callback_helpers.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "content/browser/renderer_host/frame_tree_node.h"
 #include "content/browser/web_package/mock_web_bundle_reader_factory.h"
@@ -21,6 +20,7 @@
 #include "services/network/test/test_url_loader_client.h"
 #include "services/network/test/test_url_loader_factory.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -78,7 +78,7 @@
   // is given. |response| can contain nullptr to simulate the case ReadResponse
   // fails.
   mojo::Remote<network::mojom::URLLoader> CreateLoaderAndStart(
-      base::Optional<web_package::mojom::BundleResponsePtr> response,
+      absl::optional<web_package::mojom::BundleResponsePtr> response,
       bool clone = false) {
     mojo::Remote<network::mojom::URLLoader> loader;
 
@@ -247,14 +247,14 @@
 TEST_F(WebBundleURLLoaderFactoryTest, CreateLoaderForPost) {
   // URL should match, but POST method should not be handled by the EntryLoader.
   resource_request_.method = "POST";
-  auto loader = CreateLoaderAndStart(/*response=*/base::nullopt);
+  auto loader = CreateLoaderAndStart(/*response=*/absl::nullopt);
 
   RunAndCheckFailure(net::ERR_FAILED);
 }
 
 TEST_F(WebBundleURLLoaderFactoryTest, CreateLoaderForNotSupportedURL) {
   resource_request_.url = GURL("https://test.example.org/nowhere");
-  auto loader = CreateLoaderAndStart(/*response=*/base::nullopt);
+  auto loader = CreateLoaderAndStart(/*response=*/absl::nullopt);
 
   RunAndCheckFailure(net::ERR_FAILED);
 }
@@ -272,7 +272,7 @@
   // the fallback factory set above.
   const std::string url_string = "https://test.example.org/somewhere";
   resource_request_.url = GURL(url_string);
-  auto loader = CreateLoaderAndStart(base::nullopt);
+  auto loader = CreateLoaderAndStart(absl::nullopt);
   ASSERT_EQ(1, test_factory->NumPending());
 
   // Reply with a mock response.
diff --git a/content/browser/webauth/authenticator_common.cc b/content/browser/webauth/authenticator_common.cc
index 198f70b7..f2d1fdd 100644
--- a/content/browser/webauth/authenticator_common.cc
+++ b/content/browser/webauth/authenticator_common.cc
@@ -110,16 +110,16 @@
 // ID value, mostly according to the rules in
 // https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-appid-and-facets-v1.2-ps-20170411.html#determining-if-a-caller-s-facetid-is-authorized-for-an-appid.
 //
-// Returns the App ID to use for the request, or base::nullopt if the origin
+// Returns the App ID to use for the request, or absl::nullopt if the origin
 // is not authorized to use the provided value.
-base::Optional<std::string> ProcessAppIdExtension(std::string appid,
+absl::optional<std::string> ProcessAppIdExtension(std::string appid,
                                                   const url::Origin& origin) {
   // The CryptoToken U2F extension checks the appid before calling the WebAuthn
   // API so there is no need to validate it here.
   if (WebAuthRequestSecurityChecker::OriginIsCryptoTokenExtension(origin)) {
     if (!GURL(appid).is_valid()) {
       DCHECK(false) << "cryptotoken request did not set a valid App ID";
-      return base::nullopt;
+      return absl::nullopt;
     }
     return appid;
   }
@@ -155,7 +155,7 @@
   GURL appid_url = GURL(appid);
   if (!appid_url.is_valid() || appid_url.scheme() != url::kHttpsScheme ||
       appid_url.scheme_piece() != origin.scheme()) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   // This check is repeated inside |SameDomainOrHost|, just after this. However
@@ -189,7 +189,7 @@
     return appid;
   }
 
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 // The application parameter is the SHA-256 hash of the UTF-8 encoding of
@@ -206,7 +206,7 @@
 device::CtapGetAssertionRequest CreateCtapGetAssertionRequest(
     const std::string& client_data_json,
     const blink::mojom::PublicKeyCredentialRequestOptionsPtr& options,
-    base::Optional<std::string> app_id,
+    absl::optional<std::string> app_id,
     bool is_off_the_record) {
   device::CtapGetAssertionRequest request_parameter(options->relying_party_id,
                                                     client_data_json);
@@ -293,7 +293,7 @@
   kEraseAttestationAndAaguid,
 };
 
-base::TimeDelta AdjustTimeout(base::Optional<base::TimeDelta> timeout,
+base::TimeDelta AdjustTimeout(absl::optional<base::TimeDelta> timeout,
                               RenderFrameHost* render_frame_host) {
   // Time to wait for an authenticator to successfully complete an operation.
   static constexpr base::TimeDelta kAdjustedTimeoutLower =
@@ -341,7 +341,7 @@
   }
   // If the attestation certificate specifies that the token supports any other
   // transports, include them in the list.
-  base::Optional<base::span<const uint8_t>> leaf_cert =
+  absl::optional<base::span<const uint8_t>> leaf_cert =
       response_data.attestation_object()
           .attestation_statement()
           .GetLeafCertificate();
@@ -353,7 +353,7 @@
 
   bool did_create_hmac_secret = false;
   bool did_store_cred_blob = false;
-  const base::Optional<cbor::Value>& maybe_extensions =
+  const absl::optional<cbor::Value>& maybe_extensions =
       response_data.attestation_object().authenticator_data().extensions();
   if (maybe_extensions) {
     DCHECK(maybe_extensions->is_map());
@@ -429,7 +429,7 @@
                                             .attested_data()
                                             ->public_key();
   response->public_key_algo = public_key->algorithm;
-  const base::Optional<std::vector<uint8_t>>& public_key_der =
+  const absl::optional<std::vector<uint8_t>>& public_key_der =
       public_key->der_bytes;
   if (public_key_der) {
     response->public_key_der.emplace(public_key_der.value());
@@ -441,7 +441,7 @@
 blink::mojom::GetAssertionAuthenticatorResponsePtr CreateGetAssertionResponse(
     const std::string& client_data_json,
     device::AuthenticatorGetAssertionResponse response_data,
-    const base::Optional<std::string>& app_id,
+    const absl::optional<std::string>& app_id,
     const base::flat_set<RequestExtension>& requested_extensions) {
   auto response = blink::mojom::GetAssertionAuthenticatorResponse::New();
   auto common_info = blink::mojom::CommonCredentialInfo::New();
@@ -469,7 +469,7 @@
         break;
       case RequestExtension::kPRF: {
         response->echo_prf = true;
-        base::Optional<base::span<const uint8_t>> hmac_secret =
+        absl::optional<base::span<const uint8_t>> hmac_secret =
             response_data.hmac_secret;
         if (hmac_secret) {
           auto prf_values = blink::mojom::PRFValues::New();
@@ -497,7 +497,7 @@
         break;
       case RequestExtension::kGetCredBlob: {
         response->echo_get_cred_blob = true;
-        const base::Optional<cbor::Value>& extensions =
+        const absl::optional<cbor::Value>& extensions =
             response_data.authenticator_data.extensions();
         if (extensions) {
           const cbor::Value::MapValue& map = extensions->GetMap();
@@ -542,7 +542,7 @@
   // Only instantiate platform discovery if the embedder hasn't chosen to
   // override IsUserVerifyingPlatformAuthenticatorAvailable() to be false.
   // Chrome disables platform authenticators in Guest modes this way.
-  base::Optional<bool> embedder_isuvpaa_override =
+  absl::optional<bool> embedder_isuvpaa_override =
       GetWebAuthenticationDelegate()
           ->IsUserVerifyingPlatformAuthenticatorAvailableOverride(
               render_frame_host);
@@ -902,7 +902,7 @@
     return;
   }
 
-  base::Optional<std::string> rp_id =
+  absl::optional<std::string> rp_id =
       GetWebAuthenticationDelegate()->MaybeGetRelyingPartyIdOverride(
           options->relying_party.id, caller_origin);
 
@@ -926,8 +926,8 @@
   device::fido_filter::MaybeInitialize();
   switch (device::fido_filter::Evaluate(
       device::fido_filter::Operation::MAKE_CREDENTIAL, relying_party_id_,
-      /*device=*/base::nullopt,
-      /*id=*/base::nullopt)) {
+      /*device=*/absl::nullopt,
+      /*id=*/absl::nullopt)) {
     case device::fido_filter::Action::ALLOW:
       break;
     case device::fido_filter::Action::NO_ATTESTATION:
@@ -939,7 +939,7 @@
       return;
   }
 
-  base::Optional<std::string> appid_exclude;
+  absl::optional<std::string> appid_exclude;
   if (options->appid_exclude) {
     appid_exclude =
         ProcessAppIdExtension(*options->appid_exclude, caller_origin);
@@ -1019,7 +1019,7 @@
     return;
   }
 
-  base::Optional<device::CredProtectRequest> cred_protect_request;
+  absl::optional<device::CredProtectRequest> cred_protect_request;
   switch (options->protection_policy) {
     case blink::mojom::ProtectionPolicy::UNSPECIFIED:
       if (might_create_resident_key) {
@@ -1160,7 +1160,7 @@
     return;
   }
 
-  base::Optional<std::string> rp_id =
+  absl::optional<std::string> rp_id =
       GetWebAuthenticationDelegate()->MaybeGetRelyingPartyIdOverride(
           options->relying_party_id, caller_origin);
 
@@ -1201,8 +1201,8 @@
   device::fido_filter::MaybeInitialize();
   if (device::fido_filter::Evaluate(
           device::fido_filter::Operation::GET_ASSERTION, relying_party_id_,
-          /*device=*/base::nullopt,
-          /*id=*/base::nullopt) == device::fido_filter::Action::BLOCK) {
+          /*device=*/absl::nullopt,
+          /*id=*/absl::nullopt) == device::fido_filter::Action::BLOCK) {
     CompleteGetAssertionRequest(
         blink::mojom::AuthenticatorStatus::NOT_ALLOWED_ERROR);
     return;
@@ -1263,7 +1263,7 @@
   ctap_get_assertion_options_.emplace();
 
   bool is_first = true;
-  base::Optional<std::vector<uint8_t>> last_id;
+  absl::optional<std::vector<uint8_t>> last_id;
   if (options->prf) {
     requested_extensions_.insert(RequestExtension::kPRF);
     for (const auto& prf_input_from_renderer : options->prf_inputs) {
@@ -1332,7 +1332,7 @@
         IsUserVerifyingPlatformAuthenticatorAvailableCallback callback) {
   // Check for a delegate override. Chrome overrides IsUVPAA() in Guest mode
   // and, on Windows only, in Incognito.
-  base::Optional<bool> is_uvpaa_override =
+  absl::optional<bool> is_uvpaa_override =
       GetWebAuthenticationDelegate()
           ->IsUserVerifyingPlatformAuthenticatorAvailableOverride(
               GetRenderFrameHost());
@@ -1370,7 +1370,7 @@
 // Callback to handle the async registration response from a U2fDevice.
 void AuthenticatorCommon::OnRegisterResponse(
     device::MakeCredentialStatus status_code,
-    base::Optional<device::AuthenticatorMakeCredentialResponse> response_data,
+    absl::optional<device::AuthenticatorMakeCredentialResponse> response_data,
     const device::FidoAuthenticator* authenticator) {
   if (!request_) {
     // Either the callback was called immediately and |request_| has not yet
@@ -1475,7 +1475,7 @@
       DCHECK(response_data.has_value());
       DCHECK(authenticator);
 
-      const base::Optional<device::FidoTransportProtocol> transport_used =
+      const absl::optional<device::FidoTransportProtocol> transport_used =
           authenticator->AuthenticatorTransport();
       bool is_transport_used_internal = false;
       bool is_transport_used_cable = false;
@@ -1489,7 +1489,7 @@
 
       const auto attestation =
           ctap_make_credential_request_->attestation_preference;
-      base::Optional<AttestationErasureOption> attestation_erasure;
+      absl::optional<AttestationErasureOption> attestation_erasure;
       const bool origin_is_crypto_token_extension =
           WebAuthRequestSecurityChecker::OriginIsCryptoTokenExtension(
               caller_origin_);
@@ -1615,7 +1615,7 @@
 
 void AuthenticatorCommon::OnSignResponse(
     device::GetAssertionStatus status_code,
-    base::Optional<std::vector<device::AuthenticatorGetAssertionResponse>>
+    absl::optional<std::vector<device::AuthenticatorGetAssertionResponse>>
         response_data,
     const device::FidoAuthenticator* authenticator) {
   DCHECK(!response_data || !response_data->empty());  // empty vector is invalid
diff --git a/content/browser/webauth/authenticator_common.h b/content/browser/webauth/authenticator_common.h
index dfb3ce3..9499286 100644
--- a/content/browser/webauth/authenticator_common.h
+++ b/content/browser/webauth/authenticator_common.h
@@ -15,7 +15,6 @@
 #include "base/containers/flat_set.h"
 #include "base/containers/span.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/timer/timer.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/authenticator_request_client_delegate.h"
@@ -29,6 +28,7 @@
 #include "device/fido/fido_transport_protocol.h"
 #include "device/fido/make_credential_request_handler.h"
 #include "services/data_decoder/public/cpp/data_decoder.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h"
 #include "url/origin.h"
 
@@ -164,7 +164,7 @@
   // Callback to handle the async response from a U2fDevice.
   void OnRegisterResponse(
       device::MakeCredentialStatus status_code,
-      base::Optional<device::AuthenticatorMakeCredentialResponse> response_data,
+      absl::optional<device::AuthenticatorMakeCredentialResponse> response_data,
       const device::FidoAuthenticator* authenticator);
 
   // Callback to complete the registration process once a decision about
@@ -176,7 +176,7 @@
   // Callback to handle the async response from a U2fDevice.
   void OnSignResponse(
       device::GetAssertionStatus status_code,
-      base::Optional<std::vector<device::AuthenticatorGetAssertionResponse>>
+      absl::optional<std::vector<device::AuthenticatorGetAssertionResponse>>
           response_data,
       const device::FidoAuthenticator* authenticator);
 
@@ -238,13 +238,13 @@
   scoped_refptr<WebAuthRequestSecurityChecker> security_checker_;
   std::unique_ptr<base::OneShotTimer> timer_ =
       std::make_unique<base::OneShotTimer>();
-  base::Optional<std::string> app_id_;
-  base::Optional<device::CtapMakeCredentialRequest>
+  absl::optional<std::string> app_id_;
+  absl::optional<device::CtapMakeCredentialRequest>
       ctap_make_credential_request_;
-  base::Optional<device::MakeCredentialRequestHandler::Options>
+  absl::optional<device::MakeCredentialRequestHandler::Options>
       make_credential_options_;
-  base::Optional<device::CtapGetAssertionRequest> ctap_get_assertion_request_;
-  base::Optional<device::CtapGetAssertionOptions> ctap_get_assertion_options_;
+  absl::optional<device::CtapGetAssertionRequest> ctap_get_assertion_request_;
+  absl::optional<device::CtapGetAssertionOptions> ctap_get_assertion_options_;
   // awaiting_attestation_response_ is true if the embedder has been queried
   // about an attestsation decision and the response is still pending.
   bool awaiting_attestation_response_ = false;
diff --git a/content/browser/webauth/authenticator_impl_unittest.cc b/content/browser/webauth/authenticator_impl_unittest.cc
index 1836c65..21c4233 100644
--- a/content/browser/webauth/authenticator_impl_unittest.cc
+++ b/content/browser/webauth/authenticator_impl_unittest.cc
@@ -407,7 +407,7 @@
 
 device::AuthenticatorData AuthDataFromMakeCredentialResponse(
     const MakeCredentialAuthenticatorResponsePtr& response) {
-  base::Optional<Value> attestation_value =
+  absl::optional<Value> attestation_value =
       Reader::Read(response->attestation_object);
   CHECK(attestation_value);
   const auto& attestation = attestation_value->GetMap();
@@ -415,7 +415,7 @@
   const auto auth_data_it = attestation.find(Value(device::kAuthDataKey));
   CHECK(auth_data_it != attestation.end());
   const std::vector<uint8_t>& auth_data = auth_data_it->second.GetBytestring();
-  base::Optional<device::AuthenticatorData> parsed_auth_data =
+  absl::optional<device::AuthenticatorData> parsed_auth_data =
       device::AuthenticatorData::DecodeAuthenticatorData(auth_data);
   return std::move(parsed_auth_data.value());
 }
@@ -664,7 +664,7 @@
   }
 
  protected:
-  base::Optional<base::test::ScopedFeatureList> scoped_feature_list_;
+  absl::optional<base::test::ScopedFeatureList> scoped_feature_list_;
   std::unique_ptr<device::BluetoothAdapterFactory::GlobalValuesForTesting>
       bluetooth_global_values_ =
           device::BluetoothAdapterFactory::Get()->InitGlobalValuesForTesting();
@@ -1628,12 +1628,12 @@
 // WebAuthentuicationDelegate embedder interface.
 class TestWebAuthenticationDelegate : public WebAuthenticationDelegate {
  public:
-  base::Optional<bool> IsUserVerifyingPlatformAuthenticatorAvailableOverride(
+  absl::optional<bool> IsUserVerifyingPlatformAuthenticatorAvailableOverride(
       RenderFrameHost*) override {
     return is_uvpaa_override;
   }
 
-  base::Optional<std::string> MaybeGetRelyingPartyIdOverride(
+  absl::optional<std::string> MaybeGetRelyingPartyIdOverride(
       const std::string& claimed_rp_id,
       const url::Origin& caller_origin) override {
     return rp_id_override;
@@ -1652,7 +1652,7 @@
   bool IsFocused(WebContents* web_contents) override { return is_focused; }
 
 #if defined(OS_MAC)
-  base::Optional<TouchIdAuthenticatorConfig> GetTouchIdAuthenticatorConfig(
+  absl::optional<TouchIdAuthenticatorConfig> GetTouchIdAuthenticatorConfig(
       BrowserContext* browser_context) override {
     return touch_id_authenticator_config;
   }
@@ -1660,11 +1660,11 @@
 
   // If set, the return value of IsUVPAA() will be overridden with this value.
   // Platform-specific implementations will not be invoked.
-  base::Optional<bool> is_uvpaa_override;
+  absl::optional<bool> is_uvpaa_override;
 
   // If set, the delegate will override the RP ID used for WebAuthn requests
   // with this value.
-  base::Optional<std::string> rp_id_override;
+  absl::optional<std::string> rp_id_override;
 
   // Indicates whether individual attestation should be permitted by the
   // delegate.
@@ -1679,7 +1679,7 @@
 
 #if defined(OS_MAC)
   // Configuration data for the macOS platform authenticator.
-  base::Optional<TouchIdAuthenticatorConfig> touch_id_authenticator_config;
+  absl::optional<TouchIdAuthenticatorConfig> touch_id_authenticator_config;
 #endif
 };
 
@@ -1784,7 +1784,7 @@
   }
 
   base::OnceClosure action_callbacks_registered_callback_;
-  base::Optional<base::OnceClosure> cancel_callback_;
+  absl::optional<base::OnceClosure> cancel_callback_;
   const AttestationConsent attestation_consent_;
   base::OnceClosure started_over_callback_;
   bool attestation_consent_queried_ = false;
@@ -1905,7 +1905,7 @@
       const device::AuthenticatorData auth_data =
           AuthDataFromMakeCredentialResponse(result.response);
 
-      base::Optional<Value> attestation_value =
+      absl::optional<Value> attestation_value =
           Reader::Read(result.response->attestation_object);
       ASSERT_TRUE(attestation_value);
       ASSERT_TRUE(attestation_value->is_map());
@@ -2064,7 +2064,7 @@
           kExtensionOrigin;
     } else {
       test_client_.GetTestWebAuthenticationDelegate()->rp_id_override =
-          base::nullopt;
+          absl::nullopt;
     }
 
     std::vector<uint8_t> credential_id;
@@ -3589,12 +3589,12 @@
 
   static constexpr struct {
     device::CoseAlgorithmIdentifier algo;
-    base::Optional<int> evp_id;
+    absl::optional<int> evp_id;
   } kTests[] = {
       {device::CoseAlgorithmIdentifier::kEs256, EVP_PKEY_EC},
       {device::CoseAlgorithmIdentifier::kRs256, EVP_PKEY_RSA},
       {device::CoseAlgorithmIdentifier::kEdDSA, EVP_PKEY_ED25519},
-      {device::CoseAlgorithmIdentifier::kInvalidForTesting, base::nullopt},
+      {device::CoseAlgorithmIdentifier::kInvalidForTesting, absl::nullopt},
   };
 
   for (const auto& test : kTests) {
@@ -3912,7 +3912,7 @@
   }
 
   static bool HasUV(const GetAssertionAuthenticatorResponsePtr& response) {
-    base::Optional<device::AuthenticatorData> auth_data =
+    absl::optional<device::AuthenticatorData> auth_data =
         device::AuthenticatorData::DecodeAuthenticatorData(
             response->info->authenticator_data);
     return auth_data->obtained_user_verification();
@@ -3945,7 +3945,7 @@
   PINTestAuthenticatorRequestDelegate(
       bool supports_pin,
       const std::list<PINExpectation>& pins,
-      base::Optional<InterestingFailureReason>* failure_reason)
+      absl::optional<InterestingFailureReason>* failure_reason)
       : supports_pin_(supports_pin),
         expected_(pins),
         failure_reason_(failure_reason) {}
@@ -3987,7 +3987,7 @@
  private:
   const bool supports_pin_;
   std::list<PINExpectation> expected_;
-  base::Optional<InterestingFailureReason>* const failure_reason_;
+  absl::optional<InterestingFailureReason>* const failure_reason_;
   DISALLOW_COPY_AND_ASSIGN(PINTestAuthenticatorRequestDelegate);
 };
 
@@ -4009,7 +4009,7 @@
 
   bool supports_pin = true;
   std::list<PINExpectation> expected;
-  base::Optional<InterestingFailureReason> failure_reason;
+  absl::optional<InterestingFailureReason> failure_reason;
 };
 
 class PINAuthenticatorImplTest : public UVAuthenticatorImplTest {
@@ -5462,7 +5462,7 @@
   ResidentKeyTestAuthenticatorRequestDelegate(
       std::string expected_accounts,
       std::vector<uint8_t> selected_user_id,
-      base::Optional<InterestingFailureReason>* failure_reason,
+      absl::optional<InterestingFailureReason>* failure_reason,
       bool* is_conditional)
       : expected_accounts_(expected_accounts),
         selected_user_id_(selected_user_id),
@@ -5531,7 +5531,7 @@
  private:
   const std::string expected_accounts_;
   const std::vector<uint8_t> selected_user_id_;
-  base::Optional<InterestingFailureReason>* const failure_reason_;
+  absl::optional<InterestingFailureReason>* const failure_reason_;
   bool* const is_conditional_;
 };
 
@@ -5558,7 +5558,7 @@
   std::string expected_accounts;
   std::vector<uint8_t> selected_user_id;
   bool is_conditional = false;
-  base::Optional<AuthenticatorRequestClientDelegate::InterestingFailureReason>
+  absl::optional<AuthenticatorRequestClientDelegate::InterestingFailureReason>
       failure_reason;
 };
 
@@ -5753,7 +5753,7 @@
 TEST_F(ResidentKeyAuthenticatorImplTest, GetAssertionSingleNoPII) {
   ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
       /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId,
-      /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt));
+      /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, absl::nullopt));
 
   // |SelectAccount| should not be called when there's only a single response
   // with no identifying user info because the UI is bad in that case: we can
@@ -5769,7 +5769,7 @@
 TEST_F(ResidentKeyAuthenticatorImplTest, GetAssertionSingleWithPII) {
   ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
       /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId,
-      /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, "Test User"));
+      /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, "Test User"));
 
   // |SelectAccount| should be called when PII is available.
   test_client_.expected_accounts = "01020304::Test User";
@@ -5810,7 +5810,7 @@
 
   ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
       /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId,
-      /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt));
+      /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, absl::nullopt));
 
   // |SelectAccount| should not be called when there's only a single response
   // without identifying information.
@@ -5946,7 +5946,7 @@
     virtual_device_factory_->SetCtap2Config(config);
     ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
         /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId,
-        /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt));
+        /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, absl::nullopt));
 
     if (test.large_blob_set) {
       virtual_device_factory_->mutable_state()->InjectLargeBlob(
@@ -6011,7 +6011,7 @@
     const std::vector<uint8_t> cred_id = {4, 3, 2, 1};
     ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
         cred_id, kTestRelyingPartyId,
-        /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt));
+        /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, absl::nullopt));
 
     if (test.large_blob_set) {
       virtual_device_factory_->mutable_state()->InjectLargeBlob(
@@ -6037,7 +6037,7 @@
     EXPECT_TRUE(result.response->echo_large_blob_written);
     EXPECT_EQ(test.did_write_large_blob, result.response->large_blob_written);
     if (test.did_write_large_blob) {
-      base::Optional<std::vector<uint8_t>> compressed_blob =
+      absl::optional<std::vector<uint8_t>> compressed_blob =
           virtual_device_factory_->mutable_state()->GetLargeBlob(
               virtual_device_factory_->mutable_state()
                   ->registrations.begin()
@@ -6247,7 +6247,7 @@
         EXPECT_EQ(AuthenticatorStatus::SUCCESS, status);
         ASSERT_EQ(
             1u, virtual_device_factory_->mutable_state()->registrations.size());
-        const base::Optional<device::CredProtect> result =
+        const absl::optional<device::CredProtect> result =
             virtual_device_factory_->mutable_state()
                 ->registrations.begin()
                 ->second.protection;
@@ -6381,7 +6381,7 @@
   virtual_device_factory_->SetCtap2Config(config);
   ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
       /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId,
-      /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt));
+      /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, absl::nullopt));
 
   // |SelectAccount| should not be called when there's only a single response
   // without identifying information.
@@ -6434,7 +6434,7 @@
 TEST_F(ResidentKeyAuthenticatorImplTest, PRFExtension) {
   NavigateAndCommit(GURL(kTestOrigin1));
 
-  base::Optional<device::PublicKeyCredentialDescriptor> credential;
+  absl::optional<device::PublicKeyCredentialDescriptor> credential;
   for (bool hmac_secret_supported : {false, true}) {
     // Setting the PRF extension on an authenticator that doesn't support it
     // should cause the extension to be echoed, but with enabled=false.
@@ -6636,7 +6636,7 @@
 
   ASSERT_TRUE(virtual_device_factory_->mutable_state()->InjectResidentKey(
       /*credential_id=*/{{4, 3, 2, 1}}, kTestRelyingPartyId,
-      /*user_id=*/{{1, 2, 3, 4}}, base::nullopt, base::nullopt));
+      /*user_id=*/{{1, 2, 3, 4}}, absl::nullopt, absl::nullopt));
 
   // |SelectAccount| should not be called when there's only a single response
   // without identifying information.
@@ -6999,7 +6999,7 @@
               std::move(ble_advert_callback_), &virtual_device_),
           network_context_.get(), root_secret_, "Test Authenticator",
           zero_qr_secret_, peer_identity_x962_,
-          /*contact_id=*/base::nullopt);
+          /*contact_id=*/absl::nullopt);
 
   EXPECT_EQ(AuthenticatorMakeCredential().status, AuthenticatorStatus::SUCCESS);
   EXPECT_EQ(pairings_.size(), 0u);
@@ -7107,7 +7107,7 @@
   pairings.emplace_back(DummyPairing());
   // Passing |nullopt| as the callback here causes all contact IDs to be
   // rejected.
-  auto network_context = device::cablev2::NewMockTunnelServer(base::nullopt);
+  auto network_context = device::cablev2::NewMockTunnelServer(absl::nullopt);
   auto callback_and_event_stream =
       device::cablev2::Discovery::EventStream<size_t>::New();
   auto discovery = std::make_unique<device::cablev2::Discovery>(
diff --git a/content/browser/webauth/authenticator_mojom_traits_unittest.cc b/content/browser/webauth/authenticator_mojom_traits_unittest.cc
index 2f425fc..2e1d7a8a 100644
--- a/content/browser/webauth/authenticator_mojom_traits_unittest.cc
+++ b/content/browser/webauth/authenticator_mojom_traits_unittest.cc
@@ -6,7 +6,6 @@
 
 #include <vector>
 
-#include "base/optional.h"
 #include "device/fido/authenticator_selection_criteria.h"
 #include "device/fido/cable/cable_discovery_data.h"
 #include "device/fido/fido_constants.h"
@@ -17,6 +16,7 @@
 #include "device/fido/public_key_credential_user_entity.h"
 #include "mojo/public/cpp/test_support/test_utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h"
 #include "url/gurl.h"
 #include "url/mojom/url_gurl_mojom_traits.h"
@@ -130,12 +130,12 @@
       PublicKeyCredentialRpEntity(std::string(kRpId)),
       PublicKeyCredentialRpEntity(std::string(kRpId))};
   // TODO(kenrb): There is a mismatch between the types, where
-  // device::PublicKeyCredentialRpEntity can have base::nullopt for
+  // device::PublicKeyCredentialRpEntity can have absl::nullopt for
   // the name but the mapped mojom type is not optional. This should
-  // be corrected at some point. We can't currently test base::nullopt
+  // be corrected at some point. We can't currently test absl::nullopt
   // because it won't serialize.
   success_cases[0].name = std::string(kRpName);
-  success_cases[0].icon_url = base::nullopt;
+  success_cases[0].icon_url = absl::nullopt;
   success_cases[1].name = std::string(kRpName);
   success_cases[1].icon_url = GURL(kTestURL);
 
@@ -153,7 +153,7 @@
   // PublicKeyCredentialRpEntity::name above.
   success_cases[0].name = std::string(kRpName);
   success_cases[0].display_name = std::string(kRpName);
-  success_cases[0].icon_url = base::nullopt;
+  success_cases[0].icon_url = absl::nullopt;
   success_cases[1].name = std::string(kRpName);
   success_cases[1].display_name = std::string(kRpName);
   success_cases[1].icon_url = GURL(kTestURL);
diff --git a/content/browser/webauth/is_uvpaa.cc b/content/browser/webauth/is_uvpaa.cc
index b094003..80ecda0 100644
--- a/content/browser/webauth/is_uvpaa.cc
+++ b/content/browser/webauth/is_uvpaa.cc
@@ -30,7 +30,7 @@
 void IsUVPlatformAuthenticatorAvailable(
     BrowserContext* browser_context,
     IsUVPlatformAuthenticatorAvailableCallback callback) {
-  const base::Optional<device::fido::mac::AuthenticatorConfig> config =
+  const absl::optional<device::fido::mac::AuthenticatorConfig> config =
       GetContentClient()
           ->browser()
           ->GetWebAuthenticationDelegate()
diff --git a/content/browser/webauth/virtual_authenticator.cc b/content/browser/webauth/virtual_authenticator.cc
index 1f9e45e..a0b9662 100644
--- a/content/browser/webauth/virtual_authenticator.cc
+++ b/content/browser/webauth/virtual_authenticator.cc
@@ -8,13 +8,13 @@
 
 #include "base/bind.h"
 #include "base/guid.h"
-#include "base/optional.h"
 #include "crypto/ec_private_key.h"
 #include "device/fido/fido_parsing_utils.h"
 #include "device/fido/public_key_credential_rp_entity.h"
 #include "device/fido/public_key_credential_user_entity.h"
 #include "device/fido/virtual_ctap2_device.h"
 #include "device/fido/virtual_u2f_device.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -48,7 +48,7 @@
     const std::string& rp_id,
     base::span<const uint8_t> private_key,
     int32_t counter) {
-  base::Optional<std::unique_ptr<device::VirtualFidoDevice::PrivateKey>>
+  absl::optional<std::unique_ptr<device::VirtualFidoDevice::PrivateKey>>
       fido_private_key =
           device::VirtualFidoDevice::PrivateKey::FromPKCS8(private_key);
   if (!fido_private_key)
@@ -69,7 +69,7 @@
     base::span<const uint8_t> private_key,
     int32_t counter,
     std::vector<uint8_t> user_handle) {
-  base::Optional<std::unique_ptr<device::VirtualFidoDevice::PrivateKey>>
+  absl::optional<std::unique_ptr<device::VirtualFidoDevice::PrivateKey>>
       fido_private_key =
           device::VirtualFidoDevice::PrivateKey::FromPKCS8(private_key);
   if (!fido_private_key)
@@ -140,13 +140,13 @@
                                         GetLargeBlobCallback callback) {
   auto registration = state_->registrations.find(key_handle);
   if (registration == state_->registrations.end()) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
-  base::Optional<std::vector<uint8_t>> blob =
+  absl::optional<std::vector<uint8_t>> blob =
       state_->GetLargeBlob(registration->second);
   if (!blob) {
-    std::move(callback).Run(base::nullopt);
+    std::move(callback).Run(absl::nullopt);
     return;
   }
   data_decoder_.GzipUncompress(
diff --git a/content/browser/webauth/virtual_authenticator.h b/content/browser/webauth/virtual_authenticator.h
index 6cd92aa..3e56785 100644
--- a/content/browser/webauth/virtual_authenticator.h
+++ b/content/browser/webauth/virtual_authenticator.h
@@ -13,13 +13,13 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "device/fido/fido_constants.h"
 #include "device/fido/virtual_fido_device.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/receiver_set.h"
 #include "services/data_decoder/public/cpp/data_decoder.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/webauthn/virtual_authenticator.mojom.h"
 
 namespace content {
diff --git a/content/browser/webauth/webauth_browsertest.cc b/content/browser/webauth/webauth_browsertest.cc
index 8073517..d66b4b6f 100644
--- a/content/browser/webauth/webauth_browsertest.cc
+++ b/content/browser/webauth/webauth_browsertest.cc
@@ -532,9 +532,9 @@
         /*cable_registration_data=*/nullptr,
         /*hmac_create_secret=*/false, /*prf_enable=*/false,
         blink::mojom::ProtectionPolicy::UNSPECIFIED,
-        /*enforce_protection_policy=*/false, /*appid_exclude=*/base::nullopt,
+        /*enforce_protection_policy=*/false, /*appid_exclude=*/absl::nullopt,
         /*cred_props=*/false, device::LargeBlobSupport::kNotRequested,
-        /*is_payment_credential_creation=*/false, /*cred_blob=*/base::nullopt);
+        /*is_payment_credential_creation=*/false, /*cred_blob=*/absl::nullopt);
 
     return mojo_options;
   }
@@ -555,10 +555,10 @@
     auto mojo_options = blink::mojom::PublicKeyCredentialRequestOptions::New(
         /*is_conditional=*/false, kTestChallenge,
         base::TimeDelta::FromSeconds(30), "acme.com", std::move(credentials),
-        device::UserVerificationRequirement::kPreferred, base::nullopt,
+        device::UserVerificationRequirement::kPreferred, absl::nullopt,
         std::vector<device::CableDiscoveryData>(), /*prf=*/false,
         /*prf_inputs=*/std::vector<blink::mojom::PRFValuesPtr>(),
-        /*large_blob_read=*/false, /*large_blob_write=*/base::nullopt,
+        /*large_blob_read=*/false, /*large_blob_write=*/absl::nullopt,
         /*get_cred_blob=*/false);
     return mojo_options;
   }
@@ -1148,7 +1148,7 @@
 // DOMMessageQueues, this allows other functions that depend on ExecuteScript
 // (and thus trigger the broadcast of values) to run while this function is
 // waiting for a specific result.
-base::Optional<std::string> ExecuteScriptAndExtractPrefixedString(
+absl::optional<std::string> ExecuteScriptAndExtractPrefixedString(
     WebContents* web_contents,
     const std::string& script,
     const std::string& result_prefix) {
@@ -1159,13 +1159,13 @@
   for (;;) {
     std::string json;
     if (!dom_message_queue.WaitForMessage(&json)) {
-      return base::nullopt;
+      return absl::nullopt;
     }
 
-    base::Optional<base::Value> result =
+    absl::optional<base::Value> result =
         base::JSONReader::Read(json, base::JSON_ALLOW_TRAILING_COMMAS);
     if (!result) {
-      return base::nullopt;
+      return absl::nullopt;
     }
 
     std::string str;
@@ -1288,7 +1288,7 @@
   // The plain ExecuteScriptAndExtractString cannot be used because
   // NavigateIframeToURL uses it internally and they get confused about which
   // message is for whom.
-  base::Optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
+  absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
       shell()->web_contents(),
       BuildCreateCallWithParameters(CreateParameters()), "webauth: ");
   ASSERT_TRUE(result);
@@ -1324,7 +1324,7 @@
           // Can't use NavigateIframeToURL here because in the
           // BEFORE_NAVIGATION case we are racing AuthenticatorImpl and
           // NavigateIframeToURL can get confused by the "OK" message.
-          base::Optional<std::string> result =
+          absl::optional<std::string> result =
               ExecuteScriptAndExtractPrefixedString(
                   web_contents,
                   "document.getElementById('test_iframe').src = "
@@ -1347,7 +1347,7 @@
     // The plain ExecuteScriptAndExtractString cannot be used because
     // NavigateIframeToURL uses it internally and they get confused about which
     // message is for whom.
-    base::Optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
+    absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
         shell()->web_contents(), BuildCreateCallWithParameters(parameters),
         "webauth: ");
     ASSERT_TRUE(result);
@@ -1402,7 +1402,7 @@
   auto* virtual_device_factory = InjectVirtualFidoDeviceFactory();
   virtual_device_factory->set_win_webauthn_api(&fake_api);
 
-  base::Optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
+  absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
       shell()->web_contents(),
       BuildCreateCallWithParameters(CreateParameters()), "webauth: ");
   ASSERT_TRUE(result);
@@ -1439,7 +1439,7 @@
   for (const auto& error : errors) {
     fake_api.set_hresult(error.first);
 
-    base::Optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
+    absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
         shell()->web_contents(),
         BuildCreateCallWithParameters(CreateParameters()), "webauth: ");
     EXPECT_TRUE(result);
@@ -1463,7 +1463,7 @@
       "allowCredentials: [{ type: 'public-key', id: new "
       "TextEncoder().encode('AAA')}]";
 
-  base::Optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
+  absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
       shell()->web_contents(), BuildGetCallWithParameters(get_parameters),
       "webauth: ");
   ASSERT_TRUE(result);
@@ -1491,7 +1491,7 @@
   for (const auto& error : errors) {
     fake_api.set_hresult(error);
 
-    base::Optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
+    absl::optional<std::string> result = ExecuteScriptAndExtractPrefixedString(
         shell()->web_contents(), BuildGetCallWithParameters(GetParameters()),
         "webauth: ");
     ASSERT_EQ(*result, kNotAllowedErrorMessage);
diff --git a/content/browser/webauth/webauth_request_security_checker.cc b/content/browser/webauth/webauth_request_security_checker.cc
index b27bc79..113eee9c 100644
--- a/content/browser/webauth/webauth_request_security_checker.cc
+++ b/content/browser/webauth/webauth_request_security_checker.cc
@@ -66,7 +66,7 @@
 // registrable domain suffix of, or be equal to, the origin's effective domain.
 // Reference:
 // https://html.spec.whatwg.org/multipage/origin.html#is-a-registrable-domain-suffix-of-or-is-equal-to.
-base::Optional<std::string> GetRelyingPartyId(
+absl::optional<std::string> GetRelyingPartyId(
     const std::string& claimed_relying_party_id,
     const url::Origin& caller_origin) {
   if (WebAuthRequestSecurityChecker::OriginIsCryptoTokenExtension(
@@ -76,7 +76,7 @@
   }
 
   if (claimed_relying_party_id.empty()) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   if (caller_origin.host() == claimed_relying_party_id) {
@@ -84,7 +84,7 @@
   }
 
   if (!caller_origin.DomainIs(claimed_relying_party_id)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   if (!net::registry_controlled_domains::HostHasRegistryControlledDomain(
@@ -98,7 +98,7 @@
     // TODO(crbug.com/803414): Accept corner-case situations like the following
     // origin: "https://login.awesomecompany",
     // relying_party_id: "awesomecompany".
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return claimed_relying_party_id;
@@ -158,7 +158,7 @@
     return domain_validation;
   }
 
-  base::Optional<std::string> valid_rp_id =
+  absl::optional<std::string> valid_rp_id =
       GetRelyingPartyId(relying_party_id, caller_origin);
   if (!valid_rp_id) {
     return blink::mojom::AuthenticatorStatus::BAD_RELYING_PARTY_ID;
diff --git a/content/browser/webauth/webauth_request_security_checker.h b/content/browser/webauth/webauth_request_security_checker.h
index d1cb8f73..27b0fa8 100644
--- a/content/browser/webauth/webauth_request_security_checker.h
+++ b/content/browser/webauth/webauth_request_security_checker.h
@@ -8,8 +8,8 @@
 #include <string>
 
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/webauthn/authenticator.mojom.h"
 
 namespace url {
diff --git a/content/browser/webid/federated_auth_request_impl_unittest.cc b/content/browser/webid/federated_auth_request_impl_unittest.cc
index 0258315..5f0189fb 100644
--- a/content/browser/webid/federated_auth_request_impl_unittest.cc
+++ b/content/browser/webid/federated_auth_request_impl_unittest.cc
@@ -9,7 +9,6 @@
 #include <string>
 #include <utility>
 
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/string_util.h"
 #include "base/test/task_environment.h"
@@ -21,6 +20,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/webid/federated_auth_request.mojom.h"
 #include "url/gurl.h"
 
@@ -77,21 +77,21 @@
 
 // Mock configuration values for test.
 typedef struct {
-  base::Optional<SigninResponse> signin_response;
+  absl::optional<SigninResponse> signin_response;
   const char* signin_url_or_token;
-  base::Optional<UserApproval> token_permission;
+  absl::optional<UserApproval> token_permission;
 } MockPermissionConfiguration;
 
 typedef struct {
-  base::Optional<AccountsResponse> accounts_response;
+  absl::optional<AccountsResponse> accounts_response;
   IdpNetworkRequestManager::AccountList accounts;
-  base::Optional<TokenResponse> token_response;
+  absl::optional<TokenResponse> token_response;
 } MockMediatedConfiguration;
 
 typedef struct {
   const char* token;
-  base::Optional<UserApproval> initial_permission;
-  base::Optional<FetchStatus> wellknown_fetch_status;
+  absl::optional<UserApproval> initial_permission;
+  absl::optional<FetchStatus> wellknown_fetch_status;
   const char* idp_endpoint;
   const char* accounts_endpoint;
   const char* token_endpoint;
@@ -99,7 +99,7 @@
   MockMediatedConfiguration Mediated_conf;
 } MockConfiguration;
 
-// base::Optional fields should be nullopt to prevent the corresponding
+// absl::optional fields should be nullopt to prevent the corresponding
 // methods from having EXPECT_CALL set on the mocks.
 typedef struct {
   std::string test_name;
@@ -115,10 +115,10 @@
   return os << name;
 }
 
-static const MockMediatedConfiguration kMediatedNoop{base::nullopt, kAccounts,
-                                                     base::nullopt};
-static const MockPermissionConfiguration kPermissionNoop{base::nullopt, "",
-                                                         base::nullopt};
+static const MockMediatedConfiguration kMediatedNoop{absl::nullopt, kAccounts,
+                                                     absl::nullopt};
+static const MockPermissionConfiguration kPermissionNoop{absl::nullopt, "",
+                                                         absl::nullopt};
 
 static const AuthRequestTestCase kPermissionTestCases[]{
     {"Successful run with the IdP page loaded",
@@ -142,13 +142,13 @@
       kIdpEndpoint,
       "",
       "",
-      {SigninResponse::kTokenGranted, kToken, base::nullopt},
+      {SigninResponse::kTokenGranted, kToken, absl::nullopt},
       kMediatedNoop}},
 
     {"Initial user permission denied",
      {kIdpTestOrigin, kAuthRequest, RequestMode::kPermission},
      {RequestIdTokenStatus::kApprovalDeclined, kEmptyToken},
-     {kToken, UserApproval::kDenied, base::nullopt, "", "", "", kPermissionNoop,
+     {kToken, UserApproval::kDenied, absl::nullopt, "", "", "", kPermissionNoop,
       kMediatedNoop}},
 
     {"Wellknown file not found",
@@ -178,7 +178,7 @@
       kIdpEndpoint,
       "",
       "",
-      {SigninResponse::kSigninError, "", base::nullopt},
+      {SigninResponse::kSigninError, "", absl::nullopt},
       kMediatedNoop}},
 
     {"Error parsing the idpendpoint response",
@@ -190,7 +190,7 @@
       kIdpEndpoint,
       "",
       "",
-      {SigninResponse::kInvalidResponseError, "", base::nullopt},
+      {SigninResponse::kInvalidResponseError, "", absl::nullopt},
       kMediatedNoop}},
 
     {"IdP window closed before token provision",
@@ -202,7 +202,7 @@
       kIdpEndpoint,
       "",
       "",
-      {SigninResponse::kLoadIdp, kSigninUrl, base::nullopt},
+      {SigninResponse::kLoadIdp, kSigninUrl, absl::nullopt},
       kMediatedNoop}},
 
     {"Token provision declined by user after IdP window closed",
@@ -221,44 +221,44 @@
     {"Error parsing wellknown for Mediated mode missing token endpoint",
      {kIdpTestOrigin, kAuthRequest, RequestMode::kMediated},
      {RequestIdTokenStatus::kErrorInvalidWellKnown, kEmptyToken},
-     {kToken, base::nullopt, FetchStatus::kInvalidResponseError, kIdpEndpoint,
+     {kToken, absl::nullopt, FetchStatus::kInvalidResponseError, kIdpEndpoint,
       kAccountsEndpoint, "", kPermissionNoop, kMediatedNoop}},
 
     {"Error parsing wellknown for Mediated mode missing accounts endpoint",
      {kIdpTestOrigin, kAuthRequest, RequestMode::kMediated},
      {RequestIdTokenStatus::kErrorInvalidWellKnown, kEmptyToken},
-     {kToken, base::nullopt, FetchStatus::kInvalidResponseError, kIdpEndpoint,
+     {kToken, absl::nullopt, FetchStatus::kInvalidResponseError, kIdpEndpoint,
       "", kTokenEndpoint, kPermissionNoop, kMediatedNoop}},
 
     {"Error reaching Accounts endpoint",
      {kIdpTestOrigin, kAuthRequest, RequestMode::kMediated},
      {RequestIdTokenStatus::kError, kEmptyToken},
      {kEmptyToken,
-      base::nullopt,
+      absl::nullopt,
       FetchStatus::kSuccess,
       "",
       kAccountsEndpoint,
       kTokenEndpoint,
       kPermissionNoop,
-      {AccountsResponse::kNetError, kAccounts, base::nullopt}}},
+      {AccountsResponse::kNetError, kAccounts, absl::nullopt}}},
 
     {"Error parsing Accounts response",
      {kIdpTestOrigin, kAuthRequest, RequestMode::kMediated},
      {RequestIdTokenStatus::kErrorInvalidAccountsResponse, kEmptyToken},
      {kToken,
-      base::nullopt,
+      absl::nullopt,
       FetchStatus::kSuccess,
       "",
       kAccountsEndpoint,
       kTokenEndpoint,
       kPermissionNoop,
-      {AccountsResponse::kInvalidResponseError, kAccounts, base::nullopt}}},
+      {AccountsResponse::kInvalidResponseError, kAccounts, absl::nullopt}}},
 
     {"Successful Mediated flow",
      {kIdpTestOrigin, kAuthRequest, RequestMode::kMediated},
      {RequestIdTokenStatus::kSuccess, kToken},
      {kToken,
-      base::nullopt,
+      absl::nullopt,
       FetchStatus::kSuccess,
       "",
       kAccountsEndpoint,
@@ -278,11 +278,11 @@
       delete;
 
   RequestIdTokenStatus status() const { return status_; }
-  base::Optional<std::string> token() const { return token_; }
+  absl::optional<std::string> token() const { return token_; }
 
   // This can only be called once per lifetime of this object.
   base::OnceCallback<void(RequestIdTokenStatus,
-                          const base::Optional<std::string>&)>
+                          const absl::optional<std::string>&)>
   callback() {
     return base::BindOnce(&AuthRequestCallbackHelper::ReceiverMethod,
                           base::Unretained(this));
@@ -298,7 +298,7 @@
 
  private:
   void ReceiverMethod(RequestIdTokenStatus status,
-                      const base::Optional<std::string>& token) {
+                      const absl::optional<std::string>& token) {
     status_ = status;
     token_ = token;
     was_called_ = true;
@@ -308,7 +308,7 @@
   bool was_called_ = false;
   base::RunLoop wait_for_callback_loop_;
   RequestIdTokenStatus status_;
-  base::Optional<std::string> token_;
+  absl::optional<std::string> token_;
 };
 
 // Helper class for receiving the Logout method callback.
@@ -372,7 +372,7 @@
         std::make_unique<NiceMock<MockRequestPermissionDelegate>>();
   }
 
-  std::pair<RequestIdTokenStatus, base::Optional<std::string>>
+  std::pair<RequestIdTokenStatus, absl::optional<std::string>>
   PerformAuthRequest(const std::string& request,
                      blink::mojom::RequestMode mode) {
     auth_request_impl_->SetNetworkManagerForTests(
diff --git a/content/browser/webid/idp_network_request_manager.cc b/content/browser/webid/idp_network_request_manager.cc
index 884792bec..37e0d87 100644
--- a/content/browser/webid/idp_network_request_manager.cc
+++ b/content/browser/webid/idp_network_request_manager.cc
@@ -101,7 +101,7 @@
   return resource_request;
 }
 
-base::Optional<content::IdentityRequestAccount> ParseAccount(
+absl::optional<content::IdentityRequestAccount> ParseAccount(
     const base::Value& account) {
   auto* sub = account.FindStringKey("sub");
   auto* email = account.FindStringKey("email");
@@ -111,7 +111,7 @@
 
   // required fields
   if (!(sub && email && name))
-    return base::nullopt;
+    return absl::nullopt;
 
   return content::IdentityRequestAccount(*sub, *email, *name,
                                          given_name ? *given_name : "",
diff --git a/content/browser/webrtc/webrtc_internals_unittest.cc b/content/browser/webrtc/webrtc_internals_unittest.cc
index 9454eac..08e8dfd 100644
--- a/content/browser/webrtc/webrtc_internals_unittest.cc
+++ b/content/browser/webrtc/webrtc_internals_unittest.cc
@@ -136,7 +136,7 @@
   void VerifyInt(const base::DictionaryValue& dict,
                  const std::string& key,
                  int expected) {
-    base::Optional<int> actual = dict.FindIntKey(key);
+    absl::optional<int> actual = dict.FindIntKey(key);
     ASSERT_TRUE(actual.has_value());
     EXPECT_EQ(expected, actual.value());
   }
diff --git a/content/browser/websockets/websocket_connector_impl.cc b/content/browser/websockets/websocket_connector_impl.cc
index 701487a..5e8b4f43 100644
--- a/content/browser/websockets/websocket_connector_impl.cc
+++ b/content/browser/websockets/websocket_connector_impl.cc
@@ -56,7 +56,7 @@
     const GURL& url,
     const std::vector<std::string>& requested_protocols,
     const net::SiteForCookies& site_for_cookies,
-    const base::Optional<std::string>& user_agent,
+    const absl::optional<std::string>& user_agent,
     mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
         handshake_client) {
   DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
diff --git a/content/browser/websockets/websocket_connector_impl.h b/content/browser/websockets/websocket_connector_impl.h
index bdf0fc3..8ab4294 100644
--- a/content/browser/websockets/websocket_connector_impl.h
+++ b/content/browser/websockets/websocket_connector_impl.h
@@ -7,11 +7,11 @@
 
 #include <string>
 #include <vector>
-#include "base/optional.h"
 #include "content/public/browser/content_browser_client.h"
 #include "net/base/isolation_info.h"
 #include "services/network/public/mojom/network_context.mojom.h"
 #include "services/network/public/mojom/websocket.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/websockets/websocket_connector.mojom.h"
 #include "url/origin.h"
 
@@ -39,7 +39,7 @@
   void Connect(const GURL& url,
                const std::vector<std::string>& requested_protocols,
                const net::SiteForCookies& site_for_cookies,
-               const base::Optional<std::string>& user_agent,
+               const absl::optional<std::string>& user_agent,
                mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
                    handshake_client) override;
 
diff --git a/content/browser/webtransport/web_transport_connector_impl.cc b/content/browser/webtransport/web_transport_connector_impl.cc
index 371e1ea..9c6147c 100644
--- a/content/browser/webtransport/web_transport_connector_impl.cc
+++ b/content/browser/webtransport/web_transport_connector_impl.cc
@@ -33,10 +33,10 @@
     remote_->OnConnectionEstablished(std::move(transport), std::move(client));
   }
   void OnHandshakeFailed(
-      const base::Optional<net::WebTransportError>& error) override {
+      const absl::optional<net::WebTransportError>& error) override {
     // Here we pass null because it is dangerous to pass the error details
     // to the initiator renderer.
-    remote_->OnHandshakeFailed(base::nullopt);
+    remote_->OnHandshakeFailed(absl::nullopt);
 
     if (RenderFrameHostImpl* frame = frame_.get()) {
       devtools_instrumentation::OnWebTransportHandshakeFailed(frame, url_,
diff --git a/content/browser/webui/web_ui_main_frame_observer.cc b/content/browser/webui/web_ui_main_frame_observer.cc
index 3a43991..3d8464b3 100644
--- a/content/browser/webui/web_ui_main_frame_observer.cc
+++ b/content/browser/webui/web_ui_main_frame_observer.cc
@@ -74,7 +74,7 @@
     const std::u16string& message,
     int32_t line_no,
     const std::u16string& source_id,
-    const base::Optional<std::u16string>& untrusted_stack_trace) {
+    const absl::optional<std::u16string>& untrusted_stack_trace) {
   // TODO(iby) Change all VLOGs to DVLOGs once tast tests are stable.
   DVLOG(3) << "OnDidAddMessageToConsole called for " << message;
   if (untrusted_stack_trace) {
diff --git a/content/browser/webui/web_ui_main_frame_observer.h b/content/browser/webui/web_ui_main_frame_observer.h
index 3ec9e60..9a824944 100644
--- a/content/browser/webui/web_ui_main_frame_observer.h
+++ b/content/browser/webui/web_ui_main_frame_observer.h
@@ -53,7 +53,7 @@
       const std::u16string& message,
       int32_t line_no,
       const std::u16string& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace) override;
+      const absl::optional<std::u16string>& untrusted_stack_trace) override;
   void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
 #endif  // defined(OS_LINUX) || defined(OS_CHROMEOS)
 
diff --git a/content/browser/webui/web_ui_main_frame_observer_unittest.cc b/content/browser/webui/web_ui_main_frame_observer_unittest.cc
index 3d26be26..0cde2b6 100644
--- a/content/browser/webui/web_ui_main_frame_observer_unittest.cc
+++ b/content/browser/webui/web_ui_main_frame_observer_unittest.cc
@@ -152,7 +152,7 @@
       const std::u16string& message,
       int32_t line_no,
       const std::u16string& source_id,
-      const base::Optional<std::u16string>& stack_trace) {
+      const absl::optional<std::u16string>& stack_trace) {
     web_ui_->GetWebUIMainFrameObserverForTest()->OnDidAddMessageToConsole(
         source_frame, log_level, message, line_no, source_id, stack_trace);
   }
@@ -212,10 +212,10 @@
   NavigateToPage();
   CallOnDidAddMessageToConsole(web_ui_->frame_host(),
                                blink::mojom::ConsoleMessageLevel::kError,
-                               kMessage16, 5, kSourceURL16, base::nullopt);
+                               kMessage16, 5, kSourceURL16, absl::nullopt);
   task_environment()->RunUntilIdle();
   EXPECT_EQ(processor_->error_report_count(), 1);
-  EXPECT_EQ(processor_->last_error_report().stack_trace, base::nullopt);
+  EXPECT_EQ(processor_->last_error_report().stack_trace, absl::nullopt);
 }
 
 TEST_F(WebUIMainFrameObserverTest, NonErrorsIgnored) {
diff --git a/content/browser/webui/web_ui_navigation_browsertest.cc b/content/browser/webui/web_ui_navigation_browsertest.cc
index 76a3efd2..34e6498 100644
--- a/content/browser/webui/web_ui_navigation_browsertest.cc
+++ b/content/browser/webui/web_ui_navigation_browsertest.cc
@@ -680,7 +680,7 @@
   TestUntrustedDataSourceHeaders headers;
   std::vector<std::string> frame_ancestors({"chrome://web-ui"});
   headers.frame_ancestors =
-      base::make_optional<std::vector<std::string>>(std::move(frame_ancestors));
+      absl::make_optional<std::vector<std::string>>(std::move(frame_ancestors));
 
   // Add a DataSource for the chrome-untrusted:// iframe with frame ancestor
   // chrome://web-ui.
diff --git a/content/browser/worker_host/dedicated_worker_host.cc b/content/browser/worker_host/dedicated_worker_host.cc
index dd11b86..c6008ea 100644
--- a/content/browser/worker_host/dedicated_worker_host.cc
+++ b/content/browser/worker_host/dedicated_worker_host.cc
@@ -46,8 +46,8 @@
     DedicatedWorkerServiceImpl* service,
     const blink::DedicatedWorkerToken& token,
     RenderProcessHost* worker_process_host,
-    base::Optional<GlobalFrameRoutingId> creator_render_frame_host_id,
-    base::Optional<blink::DedicatedWorkerToken> creator_worker_token,
+    absl::optional<GlobalFrameRoutingId> creator_render_frame_host_id,
+    absl::optional<blink::DedicatedWorkerToken> creator_worker_token,
     GlobalFrameRoutingId ancestor_render_frame_host_id,
     const url::Origin& creator_origin,
     const net::IsolationInfo& isolation_info,
@@ -410,7 +410,7 @@
       worker_process_host_->GetBrowserContext(),
       /*frame=*/nullptr, worker_process_host_->GetID(),
       ContentBrowserClient::URLLoaderFactoryType::kWorkerSubResource,
-      worker_origin_, /*navigation_id=*/base::nullopt,
+      worker_origin_, /*navigation_id=*/absl::nullopt,
       ukm::SourceIdObj::FromInt64(
           ancestor_render_frame_host->GetPageUkmSourceId()),
       &default_factory_receiver, &factory_params->header_client,
@@ -549,7 +549,7 @@
   mojo::MakeSelfOwnedReceiver(
       std::make_unique<DedicatedWorkerHostFactoryImpl>(
           worker_process_host_->GetID(),
-          /*creator_render_frame_host_id_=*/base::nullopt,
+          /*creator_render_frame_host_id_=*/absl::nullopt,
           /*creator_worker_token=*/token_, ancestor_render_frame_host_id_,
           worker_origin_, isolation_info_, cross_origin_embedder_policy(),
           creator_coep_reporter, ancestor_coep_reporter_),
diff --git a/content/browser/worker_host/dedicated_worker_host.h b/content/browser/worker_host/dedicated_worker_host.h
index ebc715e..89ad81c 100644
--- a/content/browser/worker_host/dedicated_worker_host.h
+++ b/content/browser/worker_host/dedicated_worker_host.h
@@ -7,7 +7,6 @@
 
 #include <memory>
 
-#include "base/optional.h"
 #include "base/scoped_observation.h"
 #include "build/build_config.h"
 #include "content/browser/browser_interface_broker_impl.h"
@@ -20,6 +19,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "net/base/isolation_info.h"
 #include "services/network/public/cpp/cross_origin_embedder_policy.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/idle/idle_manager.mojom-forward.h"
 #include "third_party/blink/public/mojom/loader/content_security_notifier.mojom.h"
@@ -56,8 +56,8 @@
       DedicatedWorkerServiceImpl* service,
       const blink::DedicatedWorkerToken& token,
       RenderProcessHost* worker_process_host,
-      base::Optional<GlobalFrameRoutingId> creator_render_frame_host_id,
-      base::Optional<blink::DedicatedWorkerToken> creator_worker_token,
+      absl::optional<GlobalFrameRoutingId> creator_render_frame_host_id,
+      absl::optional<blink::DedicatedWorkerToken> creator_worker_token,
       GlobalFrameRoutingId ancestor_render_frame_host_id,
       const url::Origin& creator_origin,
       const net::IsolationInfo& isolation_info,
@@ -76,7 +76,7 @@
   const GlobalFrameRoutingId& GetAncestorRenderFrameHostId() const {
     return ancestor_render_frame_host_id_;
   }
-  const base::Optional<GURL>& GetFinalResponseURL() const {
+  const absl::optional<GURL>& GetFinalResponseURL() const {
     return final_response_url_;
   }
 
@@ -204,13 +204,13 @@
   base::ScopedObservation<RenderProcessHost, RenderProcessHostObserver>
       scoped_process_host_observation_{this};
 
-  // The ID of the frame that directly starts this worker. This is base::nullopt
+  // The ID of the frame that directly starts this worker. This is absl::nullopt
   // when this worker is nested.
-  const base::Optional<GlobalFrameRoutingId> creator_render_frame_host_id_;
+  const absl::optional<GlobalFrameRoutingId> creator_render_frame_host_id_;
 
   // The token of the dedicated worker that directly starts this worker. This is
-  // base::nullopt when this worker is created from a frame.
-  const base::Optional<blink::DedicatedWorkerToken> creator_worker_token_;
+  // absl::nullopt when this worker is created from a frame.
+  const absl::optional<blink::DedicatedWorkerToken> creator_worker_token_;
 
   // The ID of the frame that owns this worker, either directly, or (in the case
   // of nested workers) indirectly via a tree of dedicated workers.
@@ -234,7 +234,7 @@
 
   // The DedicatedWorker's Cross-Origin-Embedder-Policy (COEP). This is set when
   // the script's response head is loaded.
-  base::Optional<network::CrossOriginEmbedderPolicy>
+  absl::optional<network::CrossOriginEmbedderPolicy>
       worker_cross_origin_embedder_policy_;
 
   // This is kept alive during the lifetime of the dedicated worker, since it's
@@ -275,7 +275,7 @@
   base::WeakPtr<CrossOriginEmbedderPolicyReporter> ancestor_coep_reporter_;
 
   // Will be set once the worker script started loading.
-  base::Optional<GURL> final_response_url_;
+  absl::optional<GURL> final_response_url_;
 
   base::WeakPtrFactory<DedicatedWorkerHost> weak_factory_{this};
 
diff --git a/content/browser/worker_host/dedicated_worker_host_factory_impl.cc b/content/browser/worker_host/dedicated_worker_host_factory_impl.cc
index a6abc12..e0dc43d 100644
--- a/content/browser/worker_host/dedicated_worker_host_factory_impl.cc
+++ b/content/browser/worker_host/dedicated_worker_host_factory_impl.cc
@@ -37,8 +37,8 @@
 
 DedicatedWorkerHostFactoryImpl::DedicatedWorkerHostFactoryImpl(
     int worker_process_id,
-    base::Optional<GlobalFrameRoutingId> creator_render_frame_host_id,
-    base::Optional<blink::DedicatedWorkerToken> creator_worker_token,
+    absl::optional<GlobalFrameRoutingId> creator_render_frame_host_id,
+    absl::optional<blink::DedicatedWorkerToken> creator_worker_token,
     GlobalFrameRoutingId ancestor_render_frame_host_id,
     const url::Origin& creator_origin,
     const net::IsolationInfo& isolation_info,
diff --git a/content/browser/worker_host/dedicated_worker_host_factory_impl.h b/content/browser/worker_host/dedicated_worker_host_factory_impl.h
index 6e950e7..4ab6cd6 100644
--- a/content/browser/worker_host/dedicated_worker_host_factory_impl.h
+++ b/content/browser/worker_host/dedicated_worker_host_factory_impl.h
@@ -5,7 +5,6 @@
 #ifndef CONTENT_BROWSER_WORKER_HOST_DEDICATED_WORKER_HOST_FACTORY_IMPL_H_
 #define CONTENT_BROWSER_WORKER_HOST_DEDICATED_WORKER_HOST_FACTORY_IMPL_H_
 
-#include "base/optional.h"
 #include "content/browser/net/cross_origin_embedder_policy_reporter.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/global_routing_id.h"
@@ -14,6 +13,7 @@
 #include "net/base/isolation_info.h"
 #include "services/network/public/cpp/cross_origin_embedder_policy.h"
 #include "services/network/public/mojom/cross_origin_embedder_policy.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom.h"
 #include "url/origin.h"
 
@@ -26,8 +26,8 @@
  public:
   DedicatedWorkerHostFactoryImpl(
       int worker_process_id,
-      base::Optional<GlobalFrameRoutingId> creator_render_frame_host_id,
-      base::Optional<blink::DedicatedWorkerToken> creator_worker_token,
+      absl::optional<GlobalFrameRoutingId> creator_render_frame_host_id,
+      absl::optional<blink::DedicatedWorkerToken> creator_worker_token,
       GlobalFrameRoutingId ancestor_render_frame_host_id,
       const url::Origin& creator_origin,
       const net::IsolationInfo& isolation_info,
@@ -62,8 +62,8 @@
   const int worker_process_id_;
 
   // See comments on the corresponding members of DedicatedWorkerHost.
-  const base::Optional<GlobalFrameRoutingId> creator_render_frame_host_id_;
-  const base::Optional<blink::DedicatedWorkerToken> creator_worker_token_;
+  const absl::optional<GlobalFrameRoutingId> creator_render_frame_host_id_;
+  const absl::optional<blink::DedicatedWorkerToken> creator_worker_token_;
   const GlobalFrameRoutingId ancestor_render_frame_host_id_;
 
   const url::Origin creator_origin_;
diff --git a/content/browser/worker_host/dedicated_worker_service_impl_unittest.cc b/content/browser/worker_host/dedicated_worker_service_impl_unittest.cc
index d44e66d1..fe8bc32 100644
--- a/content/browser/worker_host/dedicated_worker_service_impl_unittest.cc
+++ b/content/browser/worker_host/dedicated_worker_service_impl_unittest.cc
@@ -40,12 +40,12 @@
     auto coep_reporter = std::make_unique<CrossOriginEmbedderPolicyReporter>(
         RenderFrameHostImpl::FromID(render_frame_host_id)
             ->GetStoragePartition(),
-        GURL(), base::nullopt, base::nullopt, net::NetworkIsolationKey());
+        GURL(), absl::nullopt, absl::nullopt, net::NetworkIsolationKey());
 
     mojo::MakeSelfOwnedReceiver(
         std::make_unique<DedicatedWorkerHostFactoryImpl>(
             worker_process_id, render_frame_host_id,
-            /*creator_worker_token=*/base::nullopt, render_frame_host_id,
+            /*creator_worker_token=*/absl::nullopt, render_frame_host_id,
             url::Origin(), net::IsolationInfo::CreateTransient(),
             network::CrossOriginEmbedderPolicy(), coep_reporter->GetWeakPtr(),
             coep_reporter->GetWeakPtr()),
diff --git a/content/browser/worker_host/mock_shared_worker.cc b/content/browser/worker_host/mock_shared_worker.cc
index 042b2d6..5c81416 100644
--- a/content/browser/worker_host/mock_shared_worker.cc
+++ b/content/browser/worker_host/mock_shared_worker.cc
@@ -119,7 +119,7 @@
         content_settings,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr
         service_worker_container_info,
-    const base::Optional<base::UnguessableToken>& appcache_host_id,
+    const absl::optional<base::UnguessableToken>& appcache_host_id,
     blink::mojom::WorkerMainScriptLoadParamsPtr main_script_load_params,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
diff --git a/content/browser/worker_host/mock_shared_worker.h b/content/browser/worker_host/mock_shared_worker.h
index 687c431..89f4578 100644
--- a/content/browser/worker_host/mock_shared_worker.h
+++ b/content/browser/worker_host/mock_shared_worker.h
@@ -94,7 +94,7 @@
           content_settings,
       blink::mojom::ServiceWorkerContainerInfoForClientPtr
           service_worker_container_info,
-      const base::Optional<base::UnguessableToken>& appcache_host_id,
+      const absl::optional<base::UnguessableToken>& appcache_host_id,
       blink::mojom::WorkerMainScriptLoadParamsPtr main_script_load_params,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
diff --git a/content/browser/worker_host/shared_worker_host.cc b/content/browser/worker_host/shared_worker_host.cc
index af053af8..208cd46 100644
--- a/content/browser/worker_host/shared_worker_host.cc
+++ b/content/browser/worker_host/shared_worker_host.cc
@@ -244,8 +244,8 @@
       std::move(renderer_preferences), std::move(preference_watcher_receiver),
       std::move(content_settings), service_worker_handle_->TakeContainerInfo(),
       appcache_handle_
-          ? base::make_optional(appcache_handle_->appcache_host_id())
-          : base::nullopt,
+          ? absl::make_optional(appcache_handle_->appcache_host_id())
+          : absl::nullopt,
       std::move(main_script_load_params),
       std::move(subresource_loader_factories), std::move(controller),
       receiver_.BindNewPipeAndPassRemote(), std::move(worker_receiver_),
@@ -294,7 +294,7 @@
       GetProcessHost()->GetBrowserContext(),
       /*frame=*/nullptr, GetProcessHost()->GetID(),
       ContentBrowserClient::URLLoaderFactoryType::kWorkerSubResource, origin,
-      /*navigation_id=*/base::nullopt,
+      /*navigation_id=*/absl::nullopt,
       ukm::SourceIdObj::FromInt64(ukm_source_id_), &default_factory_receiver,
       &factory_params->header_client, bypass_redirect_checks,
       /*disable_secure_dns=*/nullptr, &factory_params->factory_override);
diff --git a/content/browser/worker_host/shared_worker_host_unittest.cc b/content/browser/worker_host/shared_worker_host_unittest.cc
index 2f498936..8e43ee81 100644
--- a/content/browser/worker_host/shared_worker_host_unittest.cc
+++ b/content/browser/worker_host/shared_worker_host_unittest.cc
@@ -102,7 +102,7 @@
     auto subresource_loader_factories =
         std::make_unique<blink::PendingURLLoaderFactoryBundle>();
 
-    base::Optional<SubresourceLoaderParams> subresource_loader_params =
+    absl::optional<SubresourceLoaderParams> subresource_loader_params =
         SubresourceLoaderParams();
     mojo::PendingRemote<network::mojom::URLLoaderFactory>
         loader_factory_remote =
diff --git a/content/browser/worker_host/worker_browsertest.cc b/content/browser/worker_host/worker_browsertest.cc
index 16a4a74..53da53c 100644
--- a/content/browser/worker_host/worker_browsertest.cc
+++ b/content/browser/worker_host/worker_browsertest.cc
@@ -166,7 +166,7 @@
     GURL cookie_url = ssl_server_.GetURL(host, "/");
     std::unique_ptr<net::CanonicalCookie> cookie = net::CanonicalCookie::Create(
         cookie_url, std::string(kSameSiteCookie) + "; SameSite=Lax; Secure",
-        base::Time::Now(), base::nullopt /* server_time */);
+        base::Time::Now(), absl::nullopt /* server_time */);
     base::RunLoop run_loop;
     cookie_manager->SetCanonicalCookie(
         *cookie, cookie_url, options,
diff --git a/content/browser/worker_host/worker_script_fetch_initiator.cc b/content/browser/worker_host/worker_script_fetch_initiator.cc
index fc3274c0..07a2e4e0 100644
--- a/content/browser/worker_host/worker_script_fetch_initiator.cc
+++ b/content/browser/worker_host/worker_script_fetch_initiator.cc
@@ -377,7 +377,7 @@
         browser_context, creator_render_frame_host, factory_process->GetID(),
         ContentBrowserClient::URLLoaderFactoryType::kWorkerMainResource,
         request_initiator,
-        /*navigation_id=*/base::nullopt,
+        /*navigation_id=*/absl::nullopt,
         /* TODO(https://crbug.com/1103288): The UKM ID could be computed */
         ukm::kInvalidSourceIdObj, &default_factory_receiver,
         &factory_params->header_client, &bypass_redirect_checks,
@@ -438,7 +438,7 @@
         subresource_loader_factories,
     const GURL& initial_request_url,
     blink::mojom::WorkerMainScriptLoadParamsPtr main_script_load_params,
-    base::Optional<SubresourceLoaderParams> subresource_loader_params,
+    absl::optional<SubresourceLoaderParams> subresource_loader_params,
     bool success) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 
diff --git a/content/browser/worker_host/worker_script_fetch_initiator.h b/content/browser/worker_host/worker_script_fetch_initiator.h
index fc8be2ff..8e52a03 100644
--- a/content/browser/worker_host/worker_script_fetch_initiator.h
+++ b/content/browser/worker_host/worker_script_fetch_initiator.h
@@ -143,7 +143,7 @@
           subresource_loader_factories,
       const GURL& initial_request_url,
       blink::mojom::WorkerMainScriptLoadParamsPtr main_script_load_params,
-      base::Optional<SubresourceLoaderParams> subresource_loader_params,
+      absl::optional<SubresourceLoaderParams> subresource_loader_params,
       bool success);
 
   // Calculate the final response URL from the redirect chain, URLs fetched by
diff --git a/content/browser/worker_host/worker_script_fetcher.cc b/content/browser/worker_host/worker_script_fetcher.cc
index c07ff16..6ddf67ed 100644
--- a/content/browser/worker_host/worker_script_fetcher.cc
+++ b/content/browser/worker_host/worker_script_fetcher.cc
@@ -193,7 +193,7 @@
   // We can reach here only when loading fails before receiving a response_head.
   DCHECK_NE(net::OK, status.error_code);
   std::move(callback_).Run(nullptr /* main_script_load_params */,
-                           base::nullopt /* subresource_loader_params */,
+                           absl::nullopt /* subresource_loader_params */,
                            false /* success */);
   delete this;
 }
diff --git a/content/browser/worker_host/worker_script_fetcher.h b/content/browser/worker_host/worker_script_fetcher.h
index b2f35b6..2df4466 100644
--- a/content/browser/worker_host/worker_script_fetcher.h
+++ b/content/browser/worker_host/worker_script_fetcher.h
@@ -6,7 +6,6 @@
 #define CONTENT_BROWSER_WORKER_HOST_WORKER_SCRIPT_FETCHER_H_
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "content/browser/navigation_subresource_loader_params.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver.h"
@@ -14,6 +13,7 @@
 #include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "services/network/public/mojom/url_response_head.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/worker/worker_main_script_load_params.mojom.h"
 
 namespace network {
@@ -42,7 +42,7 @@
  public:
   using CreateAndStartCallback =
       base::OnceCallback<void(blink::mojom::WorkerMainScriptLoadParamsPtr,
-                              base::Optional<SubresourceLoaderParams>,
+                              absl::optional<SubresourceLoaderParams>,
                               bool /* success */)>;
 
   // Called on the IO thread, and calls |callback| on the IO thread when
@@ -96,7 +96,7 @@
   mojo::Receiver<network::mojom::URLLoaderClient> response_url_loader_receiver_{
       this};
 
-  base::Optional<SubresourceLoaderParams> subresource_loader_params_;
+  absl::optional<SubresourceLoaderParams> subresource_loader_params_;
 
   std::vector<net::RedirectInfo> redirect_infos_;
   std::vector<network::mojom::URLResponseHeadPtr> redirect_response_heads_;
diff --git a/content/browser/worker_host/worker_script_loader.cc b/content/browser/worker_host/worker_script_loader.cc
index d56cf24..33d2b64 100644
--- a/content/browser/worker_host/worker_script_loader.cc
+++ b/content/browser/worker_host/worker_script_loader.cc
@@ -175,7 +175,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   DCHECK(!new_url.has_value()) << "Redirect with modified URL was not "
                                   "supported yet. crbug.com/845683";
diff --git a/content/browser/worker_host/worker_script_loader.h b/content/browser/worker_host/worker_script_loader.h
index f3fdd7d..7bb1fdf9 100644
--- a/content/browser/worker_host/worker_script_loader.h
+++ b/content/browser/worker_host/worker_script_loader.h
@@ -11,7 +11,6 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/browser/loader/single_request_url_loader_factory.h"
 #include "content/browser/navigation_subresource_loader_params.h"
 #include "content/public/browser/service_worker_client_info.h"
@@ -23,6 +22,7 @@
 #include "net/url_request/url_request.h"
 #include "services/network/public/cpp/resource_request.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 
 namespace blink {
@@ -83,7 +83,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int32_t intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
@@ -116,7 +116,7 @@
           response_client_receiver,
       blink::ThrottlingURLLoader* url_loader);
 
-  base::Optional<SubresourceLoaderParams> TakeSubresourceLoaderParams() {
+  absl::optional<SubresourceLoaderParams> TakeSubresourceLoaderParams() {
     return std::move(subresource_loader_params_);
   }
 
@@ -140,7 +140,7 @@
   std::vector<std::unique_ptr<NavigationLoaderInterceptor>> interceptors_;
   size_t interceptor_index_ = 0;
 
-  base::Optional<SubresourceLoaderParams> subresource_loader_params_;
+  absl::optional<SubresourceLoaderParams> subresource_loader_params_;
 
   const int32_t request_id_;
   const uint32_t options_;
@@ -152,7 +152,7 @@
   net::MutableNetworkTrafficAnnotationTag traffic_annotation_;
   const ukm::SourceId ukm_source_id_;
 
-  base::Optional<net::RedirectInfo> redirect_info_;
+  absl::optional<net::RedirectInfo> redirect_info_;
   int redirect_limit_ = net::URLRequest::kMaxRedirects;
 
   mojo::Remote<network::mojom::URLLoader> url_loader_;
diff --git a/content/browser/xr/service/browser_xr_runtime_impl.cc b/content/browser/xr/service/browser_xr_runtime_impl.cc
index 7060192..0dce0111 100644
--- a/content/browser/xr/service/browser_xr_runtime_impl.cc
+++ b/content/browser/xr/service/browser_xr_runtime_impl.cc
@@ -503,7 +503,7 @@
 }
 
 #if defined(OS_WIN)
-base::Optional<LUID> BrowserXRRuntimeImpl::GetLuid() const {
+absl::optional<LUID> BrowserXRRuntimeImpl::GetLuid() const {
   return device_data_->luid;
 }
 #endif
diff --git a/content/browser/xr/service/browser_xr_runtime_impl.h b/content/browser/xr/service/browser_xr_runtime_impl.h
index 96ccef3..a53c8778 100644
--- a/content/browser/xr/service/browser_xr_runtime_impl.h
+++ b/content/browser/xr/service/browser_xr_runtime_impl.h
@@ -85,7 +85,7 @@
   device::mojom::XRDeviceId GetId() const { return id_; }
 
 #if defined(OS_WIN)
-  base::Optional<LUID> GetLuid() const;
+  absl::optional<LUID> GetLuid() const;
 #endif
 
   // BrowserXRRuntime
diff --git a/content/browser/xr/service/xr_frame_sink_client_impl.cc b/content/browser/xr/service/xr_frame_sink_client_impl.cc
index 2291077..e377cc5 100644
--- a/content/browser/xr/service/xr_frame_sink_client_impl.cc
+++ b/content/browser/xr/service/xr_frame_sink_client_impl.cc
@@ -59,7 +59,7 @@
   root_frame_sink_id_ = viz::FrameSinkId();
 }
 
-base::Optional<viz::SurfaceId> XrFrameSinkClientImpl::GetDOMSurface() {
+absl::optional<viz::SurfaceId> XrFrameSinkClientImpl::GetDOMSurface() {
   base::AutoLock lock(dom_surface_lock_);
   return dom_surface_id_;
 }
diff --git a/content/browser/xr/service/xr_frame_sink_client_impl.h b/content/browser/xr/service/xr_frame_sink_client_impl.h
index 40581e7..6ed33e9 100644
--- a/content/browser/xr/service/xr_frame_sink_client_impl.h
+++ b/content/browser/xr/service/xr_frame_sink_client_impl.h
@@ -9,7 +9,6 @@
 #include "base/callback_list.h"
 #include "base/memory/scoped_refptr.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/synchronization/lock.h"
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
@@ -17,6 +16,7 @@
 #include "components/viz/host/host_frame_sink_client.h"
 #include "device/vr/public/cpp/xr_frame_sink_client.h"
 #include "services/viz/privileged/mojom/compositing/frame_sink_manager.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class SingleThreadTaskRunner;
@@ -38,7 +38,7 @@
       device::DomOverlaySetup dom_setup,
       base::OnceClosure on_initialized) override;
   void SurfaceDestroyed() override;
-  base::Optional<viz::SurfaceId> GetDOMSurface() override;
+  absl::optional<viz::SurfaceId> GetDOMSurface() override;
   viz::FrameSinkId FrameSinkId() override;
 
  private:
@@ -63,7 +63,7 @@
   viz::FrameSinkId root_frame_sink_id_;
   bool initialized_ = false;
 
-  base::Optional<viz::SurfaceId> dom_surface_id_;
+  absl::optional<viz::SurfaceId> dom_surface_id_;
   base::Lock dom_surface_lock_;
 #if defined(OS_ANDROID)
   base::CallbackListSubscription surface_id_changed_subscription_;
diff --git a/content/browser/xr/service/xr_runtime_manager_impl.cc b/content/browser/xr/service/xr_runtime_manager_impl.cc
index b280e0c..1f6b1bef 100644
--- a/content/browser/xr/service/xr_runtime_manager_impl.cc
+++ b/content/browser/xr/service/xr_runtime_manager_impl.cc
@@ -354,7 +354,7 @@
 
   if (!IsInitializedOnCompatibleAdapter(runtime)) {
 #if defined(OS_WIN)
-    base::Optional<LUID> luid = runtime->GetLuid();
+    absl::optional<LUID> luid = runtime->GetLuid();
     // IsInitializedOnCompatibleAdapter should have returned true if the
     // runtime doesn't specify a LUID.
     DCHECK(luid && (luid->HighPart != 0 || luid->LowPart != 0));
@@ -400,7 +400,7 @@
 bool XRRuntimeManagerImpl::IsInitializedOnCompatibleAdapter(
     BrowserXRRuntimeImpl* runtime) {
 #if defined(OS_WIN)
-  base::Optional<LUID> luid = runtime->GetLuid();
+  absl::optional<LUID> luid = runtime->GetLuid();
   if (luid && (luid->HighPart != 0 || luid->LowPart != 0)) {
     LUID active_luid =
         content::GpuDataManager::GetInstance()->GetGPUInfo().active_gpu().luid;
diff --git a/content/browser/xr/service/xr_runtime_manager_impl.h b/content/browser/xr/service/xr_runtime_manager_impl.h
index 6f5bff81..65b822e 100644
--- a/content/browser/xr/service/xr_runtime_manager_impl.h
+++ b/content/browser/xr/service/xr_runtime_manager_impl.h
@@ -15,7 +15,6 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/threading/thread_checker.h"
 #include "base/timer/timer.h"
 #include "build/build_config.h"
@@ -27,6 +26,7 @@
 #include "content/public/browser/xr_runtime_manager.h"
 #include "device/vr/public/mojom/vr_service.mojom-forward.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 class XRRuntimeManagerTest;
diff --git a/content/child/blink_platform_impl_unittest.cc b/content/child/blink_platform_impl_unittest.cc
index f69413f..26e3eef 100644
--- a/content/child/blink_platform_impl_unittest.cc
+++ b/content/child/blink_platform_impl_unittest.cc
@@ -20,7 +20,7 @@
   if (origin.IsOpaque())
     return;
 
-  base::Optional<url::Origin> checked_origin =
+  absl::optional<url::Origin> checked_origin =
       url::Origin::UnsafelyCreateTupleOriginWithoutNormalization(
           origin.Protocol().Utf8(), origin.Host().Utf8(), origin.Port());
   url::Origin non_checked_origin = url::Origin::CreateFromNormalizedTuple(
diff --git a/content/child/webthemeengine_impl_android.cc b/content/child/webthemeengine_impl_android.cc
index 361f8fe..cbf0818 100644
--- a/content/child/webthemeengine_impl_android.cc
+++ b/content/child/webthemeengine_impl_android.cc
@@ -164,7 +164,7 @@
     const gfx::Rect& rect,
     const WebThemeEngine::ExtraParams* extra_params,
     blink::mojom::ColorScheme color_scheme,
-    const base::Optional<SkColor>& accent_color) {
+    const absl::optional<SkColor>& accent_color) {
   ui::NativeTheme::ExtraParams native_theme_extra_params;
   GetNativeThemeExtraParams(
       part, state, extra_params, &native_theme_extra_params);
diff --git a/content/child/webthemeengine_impl_android.h b/content/child/webthemeengine_impl_android.h
index acf1ff7..96f17ae 100644
--- a/content/child/webthemeengine_impl_android.h
+++ b/content/child/webthemeengine_impl_android.h
@@ -22,7 +22,7 @@
              const gfx::Rect& rect,
              const blink::WebThemeEngine::ExtraParams* extra_params,
              blink::mojom::ColorScheme color_scheme,
-             const base::Optional<SkColor>& accent_color) override;
+             const absl::optional<SkColor>& accent_color) override;
   blink::ForcedColors GetForcedColors() const override;
   void SetForcedColors(const blink::ForcedColors forced_colors) override;
 };
diff --git a/content/child/webthemeengine_impl_default.cc b/content/child/webthemeengine_impl_default.cc
index e14d1a3..183279e9 100644
--- a/content/child/webthemeengine_impl_default.cc
+++ b/content/child/webthemeengine_impl_default.cc
@@ -192,7 +192,7 @@
     const gfx::Rect& rect,
     const WebThemeEngine::ExtraParams* extra_params,
     blink::mojom::ColorScheme color_scheme,
-    const base::Optional<SkColor>& accent_color) {
+    const absl::optional<SkColor>& accent_color) {
   ui::NativeTheme::ExtraParams native_theme_extra_params;
   GetNativeThemeExtraParams(
       part, state, extra_params, &native_theme_extra_params);
@@ -224,7 +224,7 @@
       NativeThemePart(part));
 }
 
-base::Optional<SkColor> WebThemeEngineDefault::GetSystemColor(
+absl::optional<SkColor> WebThemeEngineDefault::GetSystemColor(
     blink::WebThemeEngine::SystemThemeColor system_theme_color) const {
   return ui::NativeTheme::GetInstanceForWeb()->GetSystemThemeColor(
       NativeSystemThemeColor(system_theme_color));
diff --git a/content/child/webthemeengine_impl_default.h b/content/child/webthemeengine_impl_default.h
index 9655c6f4..b6e8e4c 100644
--- a/content/child/webthemeengine_impl_default.h
+++ b/content/child/webthemeengine_impl_default.h
@@ -23,13 +23,13 @@
              const gfx::Rect& rect,
              const blink::WebThemeEngine::ExtraParams* extra_params,
              blink::mojom::ColorScheme color_scheme,
-             const base::Optional<SkColor>& accent_color) override;
+             const absl::optional<SkColor>& accent_color) override;
   void GetOverlayScrollbarStyle(
       blink::WebThemeEngine::ScrollbarStyle*) override;
   bool SupportsNinePatch(Part part) const override;
   gfx::Size NinePatchCanvasSize(Part part) const override;
   gfx::Rect NinePatchAperture(Part part) const override;
-  base::Optional<SkColor> GetSystemColor(blink::WebThemeEngine::SystemThemeColor
+  absl::optional<SkColor> GetSystemColor(blink::WebThemeEngine::SystemThemeColor
                                              system_theme_color) const override;
 #if defined(OS_WIN)
   // Caches the scrollbar metrics. These are retrieved in the browser and passed
diff --git a/content/child/webthemeengine_impl_mac.cc b/content/child/webthemeengine_impl_mac.cc
index 7307bfc..ece2eff9cb 100644
--- a/content/child/webthemeengine_impl_mac.cc
+++ b/content/child/webthemeengine_impl_mac.cc
@@ -15,7 +15,7 @@
                               const gfx::Rect& rect,
                               const WebThemeEngine::ExtraParams* extra_params,
                               blink::mojom::ColorScheme color_scheme,
-                              const base::Optional<SkColor>& accent_color) {
+                              const absl::optional<SkColor>& accent_color) {
   if (IsScrollbarPart(part)) {
     PaintMacScrollBarParts(canvas, part, state, rect, extra_params,
                            color_scheme);
diff --git a/content/child/webthemeengine_impl_mac.h b/content/child/webthemeengine_impl_mac.h
index 576f7338..eaf1c66 100644
--- a/content/child/webthemeengine_impl_mac.h
+++ b/content/child/webthemeengine_impl_mac.h
@@ -19,7 +19,7 @@
              const gfx::Rect& rect,
              const blink::WebThemeEngine::ExtraParams* extra_params,
              blink::mojom::ColorScheme color_scheme,
-             const base::Optional<SkColor>& accent_color) override;
+             const absl::optional<SkColor>& accent_color) override;
 
   static bool IsScrollbarPart(WebThemeEngine::Part part);
   static void PaintMacScrollBarParts(
diff --git a/content/common/agent_scheduling_group.mojom b/content/common/agent_scheduling_group.mojom
index cea18340..1e22330 100644
--- a/content/common/agent_scheduling_group.mojom
+++ b/content/common/agent_scheduling_group.mojom
@@ -60,7 +60,7 @@
   //     RenderFrameProxyHost.
   // `routing_id`: The legacy IPC routing ID.
   // `opener_frame_token`: Frame token that identifies the opener frame if one
-  //     exists, or base::nullopt otherwise.
+  //     exists, or absl::nullopt otherwise.
   // `view_routing_id`: routing ID of the RenderView for this RenderFrameProxy.
   //     Must not be `MSG_ROUTING_NONE`.
   // `parent_routing_id`: `MSG_ROUTING_NONE` for a top-level RenderFrameProxy;
diff --git a/content/common/android/cpu_time_metrics.cc b/content/common/android/cpu_time_metrics.cc
index a7d3f13..7d6c7efd 100644
--- a/content/common/android/cpu_time_metrics.cc
+++ b/content/common/android/cpu_time_metrics.cc
@@ -436,7 +436,7 @@
   // ProcessVisibilityTracker::ProcessVisibilityObserver implementation:
   void OnVisibilityChanged(bool visible) override {
     DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_);
-    base::Optional<bool> was_visible = is_visible_;
+    absl::optional<bool> was_visible = is_visible_;
     is_visible_ = visible;
 
     if (collection_in_progress_.load(std::memory_order_relaxed))
@@ -449,7 +449,7 @@
   // power_scheduler::PowerModeArbiter::Observer implementation:
   void OnPowerModeChanged(power_scheduler::PowerMode old_mode,
                           power_scheduler::PowerMode new_mode) override {
-    base::Optional<power_scheduler::PowerMode> old_power_mode =
+    absl::optional<power_scheduler::PowerMode> old_power_mode =
         power_mode_.has_value() ? power_mode_ : old_mode;
     power_mode_ = new_mode;
 
@@ -465,8 +465,8 @@
   }
 
   void PostCollectionTask(
-      base::Optional<bool> was_visible,
-      base::Optional<power_scheduler::PowerMode> power_mode) {
+      absl::optional<bool> was_visible,
+      absl::optional<power_scheduler::PowerMode> power_mode) {
     DCHECK_CALLED_ON_VALID_SEQUENCE(main_thread_);
     // PostTask() applies a barrier, so this will be applied before the thread
     // pool task executes and sets |collection_in_progress_| back to false.
@@ -480,8 +480,8 @@
   }
 
   void CollectAndReportCpuTimeOnThreadPool(
-      base::Optional<bool> was_visible,
-      base::Optional<power_scheduler::PowerMode> power_mode) {
+      absl::optional<bool> was_visible,
+      absl::optional<power_scheduler::PowerMode> power_mode) {
     DCHECK_CALLED_ON_VALID_SEQUENCE(thread_pool_);
 
     // This might overflow. We only care that it is different for each cycle.
@@ -860,8 +860,8 @@
   scoped_refptr<base::SequencedTaskRunner> task_runner_;
   int task_counter_ = 0;
   int reporting_interval_ = 0;  // set in constructor.
-  base::Optional<bool> is_visible_;
-  base::Optional<power_scheduler::PowerMode> power_mode_;
+  absl::optional<bool> is_visible_;
+  absl::optional<power_scheduler::PowerMode> power_mode_;
 
   // Accessed on |task_runner_|.
   SEQUENCE_CHECKER(thread_pool_);
diff --git a/content/common/child_process_host_impl.cc b/content/common/child_process_host_impl.cc
index f47fd23..2166308 100644
--- a/content/common/child_process_host_impl.cc
+++ b/content/common/child_process_host_impl.cc
@@ -175,7 +175,7 @@
   child_process_->ProcessShutdown();
 }
 
-base::Optional<mojo::OutgoingInvitation>&
+absl::optional<mojo::OutgoingInvitation>&
 ChildProcessHostImpl::GetMojoInvitation() {
   return mojo_invitation_;
 }
diff --git a/content/common/child_process_host_impl.h b/content/common/child_process_host_impl.h
index 3fc75b78..5f9408c 100644
--- a/content/common/child_process_host_impl.h
+++ b/content/common/child_process_host_impl.h
@@ -14,7 +14,6 @@
 
 #include "base/macros.h"
 #include "base/memory/singleton.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "build/build_config.h"
 #include "content/common/child_process.mojom.h"
@@ -23,6 +22,7 @@
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/invitation.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace IPC {
 class MessageFilter;
@@ -69,7 +69,7 @@
   // ChildProcessHost implementation
   bool Send(IPC::Message* message) override;
   void ForceShutdown() override;
-  base::Optional<mojo::OutgoingInvitation>& GetMojoInvitation() override;
+  absl::optional<mojo::OutgoingInvitation>& GetMojoInvitation() override;
   void CreateChannelMojo() override;
   bool IsChannelOpening() override;
   void AddFilter(IPC::MessageFilter* filter) override;
@@ -105,7 +105,7 @@
 
   // The outgoing Mojo invitation which must be consumed to bootstrap Mojo IPC
   // to the child process.
-  base::Optional<mojo::OutgoingInvitation> mojo_invitation_{absl::in_place};
+  absl::optional<mojo::OutgoingInvitation> mojo_invitation_{absl::in_place};
 
   const IpcMode ipc_mode_;
   ChildProcessHostDelegate* delegate_;
diff --git a/content/common/cursors/webcursor.h b/content/common/cursors/webcursor.h
index 802f483..63092e07 100644
--- a/content/common/cursors/webcursor.h
+++ b/content/common/cursors/webcursor.h
@@ -14,7 +14,7 @@
 #include "ui/gfx/native_widget_types.h"
 
 #if defined(USE_AURA)
-#include "base/optional.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/base/cursor/cursor.h"
 #endif
 
@@ -76,7 +76,7 @@
 #endif
 
 #if defined(USE_AURA)
-  base::Optional<ui::Cursor> custom_cursor_;
+  absl::optional<ui::Cursor> custom_cursor_;
 #endif
 };
 
diff --git a/content/common/drop_data_unittest.cc b/content/common/drop_data_unittest.cc
index 8c40db8..4d42e57f 100644
--- a/content/common/drop_data_unittest.cc
+++ b/content/common/drop_data_unittest.cc
@@ -5,11 +5,11 @@
 #include "content/public/common/drop_data.h"
 
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "build/build_config.h"
 #include "net/base/mime_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if defined(OS_WIN)
 #include "base/strings/utf_string_conversions.h"
@@ -61,7 +61,7 @@
         GURL(base::StringPrintf("https://example.com/testresource"));
     drop_data.file_contents_filename_extension =
         CONVERT_IF_NEEDED(test_case.extension);
-    base::Optional<base::FilePath> generated_name =
+    absl::optional<base::FilePath> generated_name =
         drop_data.GetSafeFilenameForImageFileContents();
     ASSERT_EQ(test_case.should_generate_filename, generated_name.has_value());
 
diff --git a/content/common/fetch/fetch_request_type_converters.cc b/content/common/fetch/fetch_request_type_converters.cc
index c79ca4b..ea4c900 100644
--- a/content/common/fetch/fetch_request_type_converters.cc
+++ b/content/common/fetch/fetch_request_type_converters.cc
@@ -23,7 +23,7 @@
   // We put the request body data into |output->body| rather than
   // |output->blob|. The |blob| is used in cases without
   // network::ResourceRequest involved. See fetch_api_request.mojom.
-  // We leave |output->body| as base::nullopt when |input.request_body| is
+  // We leave |output->body| as absl::nullopt when |input.request_body| is
   // nullptr.
   if (input.request_body)
     output->body = input.request_body;
diff --git a/content/common/font_list_win.cc b/content/common/font_list_win.cc
index 2a775ec..bec877e5 100644
--- a/content/common/font_list_win.cc
+++ b/content/common/font_list_win.cc
@@ -47,7 +47,7 @@
 
     // Retrieve the native font family name. Try the "en-us" locale and if it's
     // not present, used the first available localized name.
-    base::Optional<std::string> native_name =
+    absl::optional<std::string> native_name =
         gfx::win::RetrieveLocalizedString(family_names.Get(), "en-us");
     if (!native_name) {
       native_name = gfx::win::RetrieveLocalizedString(family_names.Get(), "");
@@ -55,7 +55,7 @@
         continue;
     }
 
-    base::Optional<std::string> localized_name =
+    absl::optional<std::string> localized_name =
         gfx::win::RetrieveLocalizedString(family_names.Get(), locale);
     if (!localized_name)
       localized_name = native_name;
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 6907ba6..5f6980c 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -83,7 +83,7 @@
   // The session storage namespace ID this view should use.
   string session_storage_namespace_id;
 
-  // The frame token of the opener frame if one exists, or base::nullopt
+  // The frame token of the opener frame if one exists, or absl::nullopt
   // otherwise.
   blink.mojom.FrameToken? opener_frame_token;
 
@@ -212,7 +212,7 @@
   int32 previous_routing_id;
 
   // Specifies the new frame's opener.  The opener will be null if this is
-  // base::nullopt.
+  // absl::nullopt.
   blink.mojom.FrameToken? opener_frame_token;
 
   // The new frame should be created as a child of the object
diff --git a/content/common/input/actions_parser_test_driver_unittest.cc b/content/common/input/actions_parser_test_driver_unittest.cc
index 8442458..6bc0b6d 100644
--- a/content/common/input/actions_parser_test_driver_unittest.cc
+++ b/content/common/input/actions_parser_test_driver_unittest.cc
@@ -13,7 +13,7 @@
 namespace content {
 
 TEST(ActionsParserTestDriverTest, ParseMousePointerActionSequence) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 2, "y": 3,
                              "button": 0},
@@ -41,7 +41,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseTouchPointerActionSequence) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 3, "y": 5},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -75,7 +75,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseTouchPointerActionSequenceWithPause) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 3, "y": 5},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -125,7 +125,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseTouchPointerActionSequenceIdNotString) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 0, "y": 0},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -146,7 +146,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseTouchPointerActionSequenceDuplicateId) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 0, "y": 0},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -166,7 +166,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseMousePointerActionSequenceNoParameters) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 2, "y": 3,
                              "button": 0},
@@ -194,7 +194,7 @@
 
 TEST(ActionsParserTestDriverTest,
      ParseMousePointerActionSequenceNoPointerType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 2, "y": 3,
                              "button": 0},
@@ -210,7 +210,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseMousePointerActionSequenceNoAction) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer", "parameters": {"pointerType": "mouse"},
                 "id": "pointer1"}] )JSON");
 
@@ -222,7 +222,7 @@
 
 TEST(ActionsParserTestDriverTest,
      ParseMousePointerActionSequenceUnsupportedButton) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 2, "y": 3,
                              "button": -1},
@@ -239,7 +239,7 @@
 
 TEST(ActionsParserTestDriverTest,
      ParseTouchPointerActionSequenceMultiActionsType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "key",
                 "actions": [{"type":"keyDown","value":"p"},
                             {"type":"keyUp","value":"p"},
@@ -255,7 +255,7 @@
 
 TEST(ActionsParserTestDriverTest,
      ParseTouchPointerActionSequenceMultiPointerType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 3, "y": 5},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -276,7 +276,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseTouchPointerActionSequenceMultiMouse) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 3, "y": 5},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -297,7 +297,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseWheelScrollAction) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "wheel",
                 "actions": [{"type": "scroll", "x": 10, "y": 10,
                              "deltaX": 30, "deltaY": 50}]}] )JSON");
@@ -321,7 +321,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseWheelScrollActionNoSourceType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{
             "actions": [{"type": "scroll", "x": 10, "y": 10,
                          "deltaX": 30, "deltaY": 50}]}] )JSON");
@@ -333,7 +333,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseWheelScrollActionInvalidDelta) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "wheel",
                 "actions": [{"type": "scroll", "x": 10, "y": 10,
                              "deltaX": 30.2, "deltaY": 50}]}] )JSON");
@@ -345,7 +345,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseWheelScrollNoActionType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "wheel",
                 "actions": [{"x": 10, "y": 10,
                              "deltaX": 30, "deltaY": 50}]}] )JSON");
@@ -357,7 +357,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseWheelScrollInvalidActionType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "wheel",
                 "actions": [{"type": "zoom", "x": 10, "y": 10,
                              "deltaX": 30, "deltaY": 30}]}] )JSON");
@@ -371,7 +371,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseWheelScrollInvalidActionList) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "wheel",
                 "actions": [{"type": "scroll", "x": 10, "y": 10,
                              "deltaX": 30, "deltaY": 50},
@@ -387,7 +387,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseMultiInputSource) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 3, "y": 5},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -411,7 +411,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseActionSequenceInvalidInputSourceType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "touchpad",
                 "actions": [{"type": "scroll", "x": 10, "y": 10,
                              "deltaX": 30, "deltaY": 30}]}] )JSON");
@@ -423,7 +423,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseActionSequenceWithoutY) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerDown", "x": 3},
                             {"type": "pointerMove", "x": 30, "y": 30},
@@ -438,7 +438,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseActionSequencePenProperties) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerMove", "x": 10, "y": 5},
                             {"type": "pointerDown", "x": 10, "y": 5,
@@ -469,7 +469,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseActionSequenceInvalidForce) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerMove", "x": 10, "y": 10},
                             {"type": "pointerDown", "x": 10, "y": 10,
@@ -488,7 +488,7 @@
 }
 
 TEST(ActionsParserTestDriverTest, ParseActionSequenceInvalidTiltX) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"type": "pointer",
                 "actions": [{"type": "pointerMove", "x": 10, "y": 10},
                             {"type": "pointerDown", "x": 10, "y": 10,
diff --git a/content/common/input/actions_parser_unittest.cc b/content/common/input/actions_parser_unittest.cc
index b257d5f..6cce29871 100644
--- a/content/common/input/actions_parser_unittest.cc
+++ b/content/common/input/actions_parser_unittest.cc
@@ -12,7 +12,7 @@
 namespace content {
 
 TEST(ActionsParserTest, ParseMousePointerActionSequence) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "mouse", "id": 0,
                 "actions": [{"name": "pointerDown", "x": 2, "y": 3,
                              "button": 0},
@@ -38,7 +38,7 @@
 }
 
 TEST(ActionsParserTest, ParseTouchPointerActionSequence1) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "touch", "id": 1,
                 "actions": [{"name": "pointerDown", "x": 3, "y": 5},
                             {"name": "pointerMove", "x": 30, "y": 30},
@@ -68,7 +68,7 @@
 }
 
 TEST(ActionsParserTest, ParseTouchPointerActionSequenceWithoutId) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "touch", "id": 0,
                 "actions": [{"name": "pointerDown", "x": 3, "y": 5},
                             {"name": "pointerMove", "x": 30, "y": 30},
@@ -98,7 +98,7 @@
 }
 
 TEST(ActionsParserTest, ParseMousePointerActionSequenceNoSource) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"id": 0,
                 "actions": [{"name": "pointerDown", "x": 2, "y": 3,
                              "button": 0},
@@ -112,7 +112,7 @@
 }
 
 TEST(ActionsParserTest, ParseMousePointerActionSequenceNoAction) {
-  base::Optional<base::Value> value =
+  absl::optional<base::Value> value =
       base::JSONReader::Read(R"JSON( [{"source": "mouse", "id": 0}] )JSON");
 
   ActionsParser actions_parser(std::move(value.value()));
@@ -122,7 +122,7 @@
 }
 
 TEST(ActionsParserTest, ParseMousePointerActionSequenceUnsupportedButton) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "mouse", "id": 0,
                 "actions": [{"name": "pointerDown", "x": 2, "y": 3,
                              "button": -1},
@@ -136,7 +136,7 @@
 }
 
 TEST(ActionsParserTest, ParseTouchPointerActionSequenceMultiSource) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "touch", "id": 1,
                 "actions": [{"name": "pointerDown", "x": 3, "y": 5},
                             {"name": "pointerMove", "x": 30, "y": 30},
@@ -153,7 +153,7 @@
 }
 
 TEST(ActionsParserTest, ParseTouchPointerActionSequenceMultiMouse) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "mouse", "id": 1,
                 "actions": [{"name": "pointerDown", "x": 3, "y": 5},
                             {"name": "pointerMove", "x": 30, "y": 30},
@@ -172,7 +172,7 @@
 }
 
 TEST(ActionsParserTest, ParsePointerActionSequenceInvalidKey) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "mouse", "id": 0,
                 "actions": [{"name": "pointerDown", "x": 3, "y": 5,
                              "keys": "Ctrl"} ]}] )JSON");
@@ -184,7 +184,7 @@
 }
 
 TEST(ActionsParserTest, ParsePointerActionSequenceEmptyActionList) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "mouse", "id": 0,
                 "actions": []}] )JSON");
 
@@ -195,7 +195,7 @@
 }
 
 TEST(ActionsParserTest, ParsePointerActionSequenceInvalidPointerType) {
-  base::Optional<base::Value> value = base::JSONReader::Read(
+  absl::optional<base::Value> value = base::JSONReader::Read(
       R"JSON( [{"source": "wheel", "id": 0,
                 "actions": [{"name": "pointerDown", "x": 3, "y": 5,
                              "keys": "Ctrl"} ]}] )JSON");
diff --git a/content/common/media/cdm_info.cc b/content/common/media/cdm_info.cc
index 8a2ba58..f41ae67 100644
--- a/content/common/media/cdm_info.cc
+++ b/content/common/media/cdm_info.cc
@@ -10,7 +10,7 @@
 
 CdmInfo::CdmInfo(const std::string& key_system,
                  Robustness robustness,
-                 base::Optional<media::CdmCapability> capability,
+                 absl::optional<media::CdmCapability> capability,
                  bool supports_sub_key_systems,
                  const std::string& name,
                  const base::Token& guid,
@@ -31,7 +31,7 @@
 
 CdmInfo::CdmInfo(const std::string& key_system,
                  Robustness robustness,
-                 base::Optional<media::CdmCapability> capability)
+                 absl::optional<media::CdmCapability> capability)
     : key_system(key_system),
       robustness(robustness),
       capability(std::move(capability)) {
diff --git a/content/common/mojo_core_library_support.cc b/content/common/mojo_core_library_support.cc
index dc85973..daac629 100644
--- a/content/common/mojo_core_library_support.cc
+++ b/content/common/mojo_core_library_support.cc
@@ -11,20 +11,20 @@
 namespace content {
 
 bool IsMojoCoreSharedLibraryEnabled() {
-  return GetMojoCoreSharedLibraryPath() != base::nullopt;
+  return GetMojoCoreSharedLibraryPath() != absl::nullopt;
 }
 
-base::Optional<base::FilePath> GetMojoCoreSharedLibraryPath() {
+absl::optional<base::FilePath> GetMojoCoreSharedLibraryPath() {
 #if defined(OS_LINUX) || defined(OS_CHROMEOS)
   const base::CommandLine& command_line =
       *base::CommandLine::ForCurrentProcess();
   if (!command_line.HasSwitch(switches::kMojoCoreLibraryPath))
-    return base::nullopt;
+    return absl::nullopt;
   return command_line.GetSwitchValuePath(switches::kMojoCoreLibraryPath);
 #else
   // Content does not yet properly support dynamic Mojo Core on platforms other
   // than Linux and Chrome OS.
-  return base::nullopt;
+  return absl::nullopt;
 #endif
 }
 
diff --git a/content/common/mojo_core_library_support.h b/content/common/mojo_core_library_support.h
index 73ec4ff..0ee2d6db 100644
--- a/content/common/mojo_core_library_support.h
+++ b/content/common/mojo_core_library_support.h
@@ -6,8 +6,8 @@
 #define CONTENT_COMMON_MOJO_CORE_LIBRARY_SUPPORT_H_
 
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -19,7 +19,7 @@
 // Returns the path to the Mojo Core shared library passed in on the command
 // line for the calling process, or null if the process was launched without a
 // Mojo Core library path on the command line.
-CONTENT_EXPORT base::Optional<base::FilePath> GetMojoCoreSharedLibraryPath();
+CONTENT_EXPORT absl::optional<base::FilePath> GetMojoCoreSharedLibraryPath();
 
 }  // namespace content
 
diff --git a/content/common/process_visibility_tracker.h b/content/common/process_visibility_tracker.h
index 808069a..3a0269d 100644
--- a/content/common/process_visibility_tracker.h
+++ b/content/common/process_visibility_tracker.h
@@ -7,10 +7,10 @@
 
 #include "base/no_destructor.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "components/power_scheduler/power_mode_voter.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -42,7 +42,7 @@
   ProcessVisibilityTracker();
   ~ProcessVisibilityTracker();
 
-  base::Optional<bool> is_visible_;
+  absl::optional<bool> is_visible_;
   base::ObserverList<ProcessVisibilityObserver> observers_;
   std::unique_ptr<power_scheduler::PowerModeVoter> power_mode_visibility_voter_;
   SEQUENCE_CHECKER(main_thread_);
diff --git a/content/common/shared_file_util.cc b/content/common/shared_file_util.cc
index c4add4f2..8f831baa9 100644
--- a/content/common/shared_file_util.cc
+++ b/content/common/shared_file_util.cc
@@ -19,7 +19,7 @@
   switch_value_ += base::NumberToString(key_id);
 }
 
-base::Optional<std::map<int, std::string>> ParseSharedFileSwitchValue(
+absl::optional<std::map<int, std::string>> ParseSharedFileSwitchValue(
     const std::string& value) {
   std::map<int, std::string> values;
   std::vector<std::string> string_pairs = base::SplitString(
@@ -30,7 +30,7 @@
         colon_position == pair.size() - 1) {
       DLOG(ERROR) << "Found invalid entry parsing shared file string value:"
                   << pair;
-      return base::nullopt;
+      return absl::nullopt;
     }
     std::string key = pair.substr(0, colon_position);
     std::string number_string =
@@ -39,12 +39,12 @@
     if (!base::StringToInt(number_string, &key_int)) {
       DLOG(ERROR) << "Found invalid entry parsing shared file string value:"
                   << number_string << " (not an int).";
-      return base::nullopt;
+      return absl::nullopt;
     }
 
     values[key_int] = key;
   }
-  return base::make_optional(std::move(values));
+  return absl::make_optional(std::move(values));
 }
 
 }  // namespace content
diff --git a/content/common/shared_file_util.h b/content/common/shared_file_util.h
index a4e5b82..a7ba1f9 100644
--- a/content/common/shared_file_util.h
+++ b/content/common/shared_file_util.h
@@ -10,8 +10,8 @@
 
 #include "base/command_line.h"
 #include "base/component_export.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -25,7 +25,7 @@
 };
 
 CONTENT_EXPORT
-base::Optional<std::map<int, std::string>> ParseSharedFileSwitchValue(
+absl::optional<std::map<int, std::string>> ParseSharedFileSwitchValue(
     const std::string& value);
 
 }  // namespace content
diff --git a/content/public/browser/android/synchronous_compositor.h b/content/public/browser/android/synchronous_compositor.h
index a691729c..6894379 100644
--- a/content/public/browser/android/synchronous_compositor.h
+++ b/content/public/browser/android/synchronous_compositor.h
@@ -59,7 +59,7 @@
     std::unique_ptr<viz::CompositorFrame> frame;
     // Invalid if |frame| is nullptr.
     viz::LocalSurfaceId local_surface_id;
-    base::Optional<viz::HitTestRegionList> hit_test_region_list;
+    absl::optional<viz::HitTestRegionList> hit_test_region_list;
 
    private:
     DISALLOW_COPY_AND_ASSIGN(Frame);
diff --git a/content/public/browser/authenticator_request_client_delegate.cc b/content/public/browser/authenticator_request_client_delegate.cc
index 6bdb0c48..89f2870 100644
--- a/content/public/browser/authenticator_request_client_delegate.cc
+++ b/content/public/browser/authenticator_request_client_delegate.cc
@@ -25,11 +25,11 @@
 
 WebAuthenticationDelegate::~WebAuthenticationDelegate() = default;
 
-base::Optional<std::string>
+absl::optional<std::string>
 WebAuthenticationDelegate::MaybeGetRelyingPartyIdOverride(
     const std::string& claimed_relying_party_id,
     const url::Origin& caller_origin) {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool WebAuthenticationDelegate::ShouldPermitIndividualAttestation(
@@ -56,10 +56,10 @@
 }
 
 #if defined(OS_MAC)
-base::Optional<WebAuthenticationDelegate::TouchIdAuthenticatorConfig>
+absl::optional<WebAuthenticationDelegate::TouchIdAuthenticatorConfig>
 WebAuthenticationDelegate::GetTouchIdAuthenticatorConfig(
     BrowserContext* browser_context) {
-  return base::nullopt;
+  return absl::nullopt;
 }
 #endif  // defined(OS_MAC)
 
@@ -71,7 +71,7 @@
 }
 #endif
 
-base::Optional<bool> WebAuthenticationDelegate::
+absl::optional<bool> WebAuthenticationDelegate::
     IsUserVerifyingPlatformAuthenticatorAvailableOverride(
         RenderFrameHost* render_frame_host) {
   FrameTreeNode* frame_tree_node =
@@ -81,7 +81,7 @@
     return AuthenticatorEnvironmentImpl::GetInstance()
         ->HasVirtualUserVerifyingPlatformAuthenticator(frame_tree_node);
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 AuthenticatorRequestClientDelegate::AuthenticatorRequestClientDelegate() =
diff --git a/content/public/browser/authenticator_request_client_delegate.h b/content/public/browser/authenticator_request_client_delegate.h
index e326ef5..8f19b7c 100644
--- a/content/public/browser/authenticator_request_client_delegate.h
+++ b/content/public/browser/authenticator_request_client_delegate.h
@@ -10,7 +10,6 @@
 #include "base/callback_forward.h"
 #include "base/containers/span.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "build/chromeos_buildflags.h"
 #include "content/common/content_export.h"
@@ -18,6 +17,7 @@
 #include "device/fido/cable/cable_discovery_data.h"
 #include "device/fido/fido_request_handler_base.h"
 #include "device/fido/fido_transport_protocol.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 #if defined(OS_MAC)
 #include "device/fido/mac/authenticator_config.h"
@@ -59,7 +59,7 @@
   // credentials so thought is required before allowing an origin to assert an
   // RP ID. RP ID strings may be stored on authenticators and may later appear
   // in management UI.
-  virtual base::Optional<std::string> MaybeGetRelyingPartyIdOverride(
+  virtual absl::optional<std::string> MaybeGetRelyingPartyIdOverride(
       const std::string& claimed_relying_party_id,
       const url::Origin& caller_origin);
 
@@ -94,7 +94,7 @@
   // authenticator. May return nullopt if the authenticator is not available in
   // the current context, in which case the Touch ID authenticator will be
   // unavailable.
-  virtual base::Optional<TouchIdAuthenticatorConfig>
+  virtual absl::optional<TouchIdAuthenticatorConfig>
   GetTouchIdAuthenticatorConfig(BrowserContext* browser_context);
 #endif  // defined(OS_MAC)
 
@@ -113,8 +113,8 @@
 
   // Returns a bool if the result of the isUserVerifyingPlatformAuthenticator
   // API call originating from |render_frame_host| should be overridden with
-  // that value, or base::nullopt otherwise.
-  virtual base::Optional<bool>
+  // that value, or absl::nullopt otherwise.
+  virtual absl::optional<bool>
   IsUserVerifyingPlatformAuthenticatorAvailableOverride(
       RenderFrameHost* render_frame_host);
 };
diff --git a/content/public/browser/background_fetch_delegate.h b/content/public/browser/background_fetch_delegate.h
index f19b0fb..dc93054a 100644
--- a/content/public/browser/background_fetch_delegate.h
+++ b/content/public/browser/background_fetch_delegate.h
@@ -12,9 +12,9 @@
 #include "base/callback_forward.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/web_contents.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/background_fetch/background_fetch.mojom.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 
@@ -139,8 +139,8 @@
   // Updates the UI shown for the fetch job associated with |job_unique_id| to
   // display a new |title| or |icon|.
   virtual void UpdateUI(const std::string& job_unique_id,
-                        const base::Optional<std::string>& title,
-                        const base::Optional<SkBitmap>& icon) = 0;
+                        const absl::optional<std::string>& title,
+                        const absl::optional<SkBitmap>& icon) = 0;
 };
 
 }  // namespace content
diff --git a/content/public/browser/background_fetch_response.cc b/content/public/browser/background_fetch_response.cc
index c6514ac..6f2620d 100644
--- a/content/public/browser/background_fetch_response.cc
+++ b/content/public/browser/background_fetch_response.cc
@@ -25,7 +25,7 @@
     std::unique_ptr<BackgroundFetchResponse> response,
     base::Time response_time,
     const base::FilePath& path,
-    base::Optional<storage::BlobDataHandle> blob_handle,
+    absl::optional<storage::BlobDataHandle> blob_handle,
     uint64_t file_size)
     : response(std::move(response)),
       response_time(response_time),
diff --git a/content/public/browser/background_fetch_response.h b/content/public/browser/background_fetch_response.h
index be3f6c9..419b17c 100644
--- a/content/public/browser/background_fetch_response.h
+++ b/content/public/browser/background_fetch_response.h
@@ -8,11 +8,11 @@
 #include <vector>
 
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "net/http/http_response_headers.h"
 #include "storage/browser/blob/blob_data_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -66,7 +66,7 @@
   BackgroundFetchResult(std::unique_ptr<BackgroundFetchResponse> response,
                         base::Time response_time,
                         const base::FilePath& path,
-                        base::Optional<storage::BlobDataHandle> blob_handle,
+                        absl::optional<storage::BlobDataHandle> blob_handle,
                         uint64_t file_size);
 
   ~BackgroundFetchResult();
@@ -74,7 +74,7 @@
   std::unique_ptr<BackgroundFetchResponse> response;
   const base::Time response_time;
   const base::FilePath file_path;
-  base::Optional<storage::BlobDataHandle> blob_handle;
+  absl::optional<storage::BlobDataHandle> blob_handle;
   const uint64_t file_size = 0;
   FailureReason failure_reason;
 
diff --git a/content/public/browser/browser_associated_interface.h b/content/public/browser/browser_associated_interface.h
index 5e7a572..a7a5796 100644
--- a/content/public/browser/browser_associated_interface.h
+++ b/content/public/browser/browser_associated_interface.h
@@ -10,7 +10,6 @@
 #include "base/bind.h"
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_message_filter.h"
 #include "content/public/browser/browser_task_traits.h"
@@ -18,6 +17,7 @@
 #include "ipc/ipc_channel_proxy.h"
 #include "mojo/public/cpp/bindings/associated_receiver_set.h"
 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -97,7 +97,7 @@
     ~InternalState() {}
 
     Interface* impl_;
-    base::Optional<mojo::AssociatedReceiverSet<Interface>> receivers_;
+    absl::optional<mojo::AssociatedReceiverSet<Interface>> receivers_;
 
     DISALLOW_COPY_AND_ASSIGN(InternalState);
   };
diff --git a/content/public/browser/browser_child_process_host_delegate.cc b/content/public/browser/browser_child_process_host_delegate.cc
index b77023b..b9558df 100644
--- a/content/public/browser/browser_child_process_host_delegate.cc
+++ b/content/public/browser/browser_child_process_host_delegate.cc
@@ -6,8 +6,8 @@
 
 namespace content {
 
-base::Optional<std::string> BrowserChildProcessHostDelegate::GetServiceName() {
-  return base::nullopt;
+absl::optional<std::string> BrowserChildProcessHostDelegate::GetServiceName() {
+  return absl::nullopt;
 }
 
 }  // namespace content
diff --git a/content/public/browser/browser_child_process_host_delegate.h b/content/public/browser/browser_child_process_host_delegate.h
index 6f1f0fd..42a8a5d 100644
--- a/content/public/browser/browser_child_process_host_delegate.h
+++ b/content/public/browser/browser_child_process_host_delegate.h
@@ -7,10 +7,10 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_listener.h"
 #include "mojo/public/cpp/bindings/generic_pending_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -33,7 +33,7 @@
 
   // Returns a string identifying the primary service running in the child
   // process, if any.
-  virtual base::Optional<std::string> GetServiceName();
+  virtual absl::optional<std::string> GetServiceName();
 
   // Binds an interface receiver in the host process, as requested by the child
   // process.
diff --git a/content/public/browser/browser_context.h b/content/public/browser/browser_context.h
index a794f0c..3664811 100644
--- a/content/public/browser/browser_context.h
+++ b/content/public/browser/browser_context.h
@@ -16,12 +16,12 @@
 
 #include "base/callback_forward.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/supports_user_data.h"
 #include "content/common/content_export.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "services/network/public/mojom/network_context.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/blob/blob.mojom-forward.h"
 #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom-forward.h"
 #include "third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom-forward.h"
@@ -203,7 +203,7 @@
       const GURL& origin,
       int64_t service_worker_registration_id,
       const std::string& message_id,
-      base::Optional<std::string> payload,
+      absl::optional<std::string> payload,
       base::OnceCallback<void(blink::mojom::PushEventStatus)> callback);
 
   // Fires a push subscription change event to the Service Worker identified by
diff --git a/content/public/browser/child_process_security_policy.h b/content/public/browser/child_process_security_policy.h
index 9b6bbe3c..ab01cf0 100644
--- a/content/public/browser/child_process_security_policy.h
+++ b/content/public/browser/child_process_security_policy.h
@@ -317,7 +317,7 @@
   // by the source of how they were added and/or by BrowserContext.
   //
   // If |source| is provided, only origins that were added with the same source
-  // will be returned; if |source| is base::nullopt, origins from all sources
+  // will be returned; if |source| is absl::nullopt, origins from all sources
   // will be returned.
   //
   // If |browser_context| is null, only globally applicable origins will be
@@ -326,7 +326,7 @@
   // includes both matching per-profile isolated origins as well as globally
   // applicable origins which apply to |browser_context| by definition).
   virtual std::vector<url::Origin> GetIsolatedOrigins(
-      base::Optional<IsolatedOriginSource> source = base::nullopt,
+      absl::optional<IsolatedOriginSource> source = absl::nullopt,
       BrowserContext* browser_context = nullptr) = 0;
 
   // Returns whether the site of |origin| is isolated and was added by the
diff --git a/content/public/browser/client_hints_controller_delegate.h b/content/public/browser/client_hints_controller_delegate.h
index b66986c..0ae1d18a 100644
--- a/content/public/browser/client_hints_controller_delegate.h
+++ b/content/public/browser/client_hints_controller_delegate.h
@@ -8,11 +8,11 @@
 #include <memory>
 #include <string>
 
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/browser_context.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/platform/web_client_hints_type.h"
 #include "url/origin.h"
 
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 338c0091..1b17611 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -339,7 +339,7 @@
 bool ContentBrowserClient::AllowAppCache(
     const GURL& manifest_url,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin,
+    const absl::optional<url::Origin>& top_frame_origin,
     BrowserContext* context) {
   return true;
 }
@@ -347,7 +347,7 @@
 AllowServiceWorkerResult ContentBrowserClient::AllowServiceWorker(
     const GURL& scope,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin,
+    const absl::optional<url::Origin>& top_frame_origin,
     const GURL& script_url,
     BrowserContext* context) {
   return AllowServiceWorkerResult::Yes();
@@ -356,7 +356,7 @@
 bool ContentBrowserClient::AllowSharedWorker(
     const GURL& worker_url,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin,
+    const absl::optional<url::Origin>& top_frame_origin,
     const std::string& name,
     const storage::StorageKey& storage_key,
     BrowserContext* context,
@@ -783,7 +783,7 @@
     int render_process_id,
     URLLoaderFactoryType type,
     const url::Origin& request_initiator,
-    base::Optional<int64_t> navigation_id,
+    absl::optional<int64_t> navigation_id,
     ukm::SourceIdObj ukm_source_id,
     mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
     mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
@@ -808,7 +808,7 @@
     WebSocketFactory factory,
     const GURL& url,
     const net::SiteForCookies& site_for_cookies,
-    const base::Optional<std::string>& user_agent,
+    const absl::optional<std::string>& user_agent,
     mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
         handshake_client) {
   // NOTREACHED because WillInterceptWebSocket returns false.
@@ -976,7 +976,7 @@
     bool is_main_frame,
     ui::PageTransition page_transition,
     bool has_user_gesture,
-    const base::Optional<url::Origin>& initiating_origin,
+    const absl::optional<url::Origin>& initiating_origin,
     mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory) {
   return true;
 }
@@ -993,10 +993,10 @@
   // |browser_context| may be null (e.g. during shutdown of a service worker).
 }
 
-base::Optional<std::string> ContentBrowserClient::GetOriginPolicyErrorPage(
+absl::optional<std::string> ContentBrowserClient::GetOriginPolicyErrorPage(
     network::OriginPolicyState error_reason,
     content::NavigationHandle* handle) {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool ContentBrowserClient::CanAcceptUntrustedExchangesIfNeeded() {
@@ -1044,8 +1044,8 @@
   return blink::UserAgentMetadata();
 }
 
-base::Optional<gfx::ImageSkia> ContentBrowserClient::GetProductLogo() {
-  return base::nullopt;
+absl::optional<gfx::ImageSkia> ContentBrowserClient::GetProductLogo() {
+  return absl::nullopt;
 }
 
 bool ContentBrowserClient::IsBuiltinComponent(BrowserContext* browser_context,
@@ -1091,7 +1091,7 @@
 blink::mojom::InterestCohortPtr ContentBrowserClient::GetInterestCohortForJsApi(
     WebContents* web_contents,
     const GURL& url,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   return blink::mojom::InterestCohort::New();
 }
 
@@ -1115,16 +1115,16 @@
     content::BrowserContext* browser_context,
     const GURL& scope,
     const GURL& site_for_cookies,
-    const base::Optional<url::Origin>& top_frame_origin) {
+    const absl::optional<url::Origin>& top_frame_origin) {
   return false;
 }
 
 base::OnceClosure ContentBrowserClient::FetchRemoteSms(
     content::WebContents* web_contents,
     const url::Origin& origin,
-    base::OnceCallback<void(base::Optional<std::vector<url::Origin>>,
-                            base::Optional<std::string>,
-                            base::Optional<content::SmsFetchFailureType>)>
+    base::OnceCallback<void(absl::optional<std::vector<url::Origin>>,
+                            absl::optional<std::string>,
+                            absl::optional<content::SmsFetchFailureType>)>
         callback) {
   return base::NullCallback();
 }
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index ccd0247..0b1a60b 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -19,7 +19,6 @@
 #include "base/containers/flat_set.h"
 #include "base/files/file_path.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/time/time.h"
 #include "base/types/strong_alias.h"
@@ -52,6 +51,7 @@
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
 #include "services/network/public/mojom/websocket.mojom-forward.h"
 #include "storage/browser/file_system/file_system_context.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
 #include "third_party/blink/public/mojom/federated_learning/floc.mojom-forward.h"
@@ -78,7 +78,7 @@
 
 class GURL;
 using LoginAuthRequiredCallback =
-    base::OnceCallback<void(const base::Optional<net::AuthCredentials>&)>;
+    base::OnceCallback<void(const absl::optional<net::AuthCredentials>&)>;
 
 namespace base {
 class CommandLine;
@@ -508,7 +508,7 @@
       ui::PageTransition* transition,
       bool* is_renderer_initiated,
       content::Referrer* referrer,
-      base::Optional<url::Origin>* initiator_origin) {}
+      absl::optional<url::Origin>* initiator_origin) {}
 
   // Temporary hack to determine whether to skip OOPIFs on the new tab page.
   // TODO(creis): Remove when https://crbug.com/566091 is fixed.
@@ -649,7 +649,7 @@
   virtual bool AllowAppCache(
       const GURL& manifest_url,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       BrowserContext* context);
 
   // Allows the embedder to control if a service worker is allowed at the given
@@ -671,7 +671,7 @@
   virtual AllowServiceWorkerResult AllowServiceWorker(
       const GURL& scope,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       const GURL& script_url,
       BrowserContext* context);
 
@@ -681,7 +681,7 @@
   virtual bool AllowSharedWorker(
       const GURL& worker_url,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin,
+      const absl::optional<url::Origin>& top_frame_origin,
       const std::string& name,
       const storage::StorageKey& storage_key,
       BrowserContext* context,
@@ -1437,7 +1437,7 @@
       int render_process_id,
       URLLoaderFactoryType type,
       const url::Origin& request_initiator,
-      base::Optional<int64_t> navigation_id,
+      absl::optional<int64_t> navigation_id,
       ukm::SourceIdObj ukm_source_id,
       mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
       mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
@@ -1473,7 +1473,7 @@
       WebSocketFactory factory,
       const GURL& url,
       const net::SiteForCookies& site_for_cookies,
-      const base::Optional<std::string>& user_agent,
+      const absl::optional<std::string>& user_agent,
       mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
           handshake_client);
 
@@ -1699,7 +1699,7 @@
   // |first_auth_attempt| is needed by AwHttpAuthHandler constructor.
   // |auth_required_callback| is used to transfer auth credentials to
   // URLRequest::SetAuth(). The credentials parameter of the callback
-  // is base::nullopt if the request should be cancelled; otherwise
+  // is absl::nullopt if the request should be cancelled; otherwise
   // the credentials will be used to respond to the auth challenge.
   // This method is called on the UI thread. The callback must be
   // called on the UI thread as well. If the LoginDelegate is destroyed
@@ -1751,7 +1751,7 @@
       bool is_main_frame,
       ui::PageTransition page_transition,
       bool has_user_gesture,
-      const base::Optional<url::Origin>& initiating_origin,
+      const absl::optional<url::Origin>& initiating_origin,
       mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
 
   // Creates an OverlayWindow to be used for Picture-in-Picture. This window
@@ -1769,7 +1769,7 @@
 
   // Returns the HTML content of the error page for Origin Policy related
   // errors.
-  virtual base::Optional<std::string> GetOriginPolicyErrorPage(
+  virtual absl::optional<std::string> GetOriginPolicyErrorPage(
       network::OriginPolicyState error_reason,
       content::NavigationHandle* navigation_handle);
 
@@ -1835,7 +1835,7 @@
 
   // Returns a 256x256 transparent background image of the product logo, i.e.
   // the browser icon, if available.
-  virtual base::Optional<gfx::ImageSkia> GetProductLogo();
+  virtual absl::optional<gfx::ImageSkia> GetProductLogo();
 
   // Returns whether |origin| should be considered a integral component similar
   // to native code, and as such whether its log messages should be recorded.
@@ -1885,7 +1885,7 @@
   virtual blink::mojom::InterestCohortPtr GetInterestCohortForJsApi(
       WebContents* web_contents,
       const GURL& url,
-      const base::Optional<url::Origin>& top_frame_origin);
+      const absl::optional<url::Origin>& top_frame_origin);
 
   // Returns whether a site is blocked to use Bluetooth scanning API.
   virtual bool IsBluetoothScanningBlocked(
@@ -1908,7 +1908,7 @@
       content::BrowserContext* browser_context,
       const GURL& scope,
       const GURL& site_for_cookies,
-      const base::Optional<url::Origin>& top_frame_origin);
+      const absl::optional<url::Origin>& top_frame_origin);
 
   // Requests an SMS from |origin| from a remote device with telephony
   // capabilities, for example the user's mobile phone. Callbacks |callback|
@@ -1920,9 +1920,9 @@
   virtual base::OnceClosure FetchRemoteSms(
       content::WebContents* web_contents,
       const url::Origin& origin,
-      base::OnceCallback<void(base::Optional<std::vector<url::Origin>>,
-                              base::Optional<std::string>,
-                              base::Optional<content::SmsFetchFailureType>)>
+      base::OnceCallback<void(absl::optional<std::vector<url::Origin>>,
+                              absl::optional<std::string>,
+                              absl::optional<content::SmsFetchFailureType>)>
           callback);
 
   // Check whether paste is allowed. To paste, an implementation may require a
diff --git a/content/public/browser/content_index_context.h b/content/public/browser/content_index_context.h
index 68cd5c2..7ab7f7b 100644
--- a/content/public/browser/content_index_context.h
+++ b/content/public/browser/content_index_context.h
@@ -10,9 +10,9 @@
 
 #include "base/callback_forward.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/content_index_provider.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/content_index/content_index.mojom.h"
 
 class SkBitmap;
@@ -31,7 +31,7 @@
       base::OnceCallback<void(blink::mojom::ContentIndexError,
                               std::vector<ContentIndexEntry>)>;
   using GetEntryCallback =
-      base::OnceCallback<void(base::Optional<ContentIndexEntry>)>;
+      base::OnceCallback<void(absl::optional<ContentIndexEntry>)>;
   using GetIconsCallback = base::OnceCallback<void(std::vector<SkBitmap>)>;
 
   ContentIndexContext() = default;
diff --git a/content/public/browser/devtools_permission_overrides.cc b/content/public/browser/devtools_permission_overrides.cc
index f7ca1a064..a2c79c4 100644
--- a/content/public/browser/devtools_permission_overrides.cc
+++ b/content/public/browser/devtools_permission_overrides.cc
@@ -18,7 +18,7 @@
     DevToolsPermissionOverrides&& other) = default;
 
 void DevToolsPermissionOverrides::Set(
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     PermissionType permission,
     const blink::mojom::PermissionStatus& status) {
   PermissionOverrides& origin_overrides =
@@ -37,23 +37,23 @@
   }
 }
 
-base::Optional<PermissionStatus> DevToolsPermissionOverrides::Get(
+absl::optional<PermissionStatus> DevToolsPermissionOverrides::Get(
     const url::Origin& origin,
     PermissionType permission) const {
   auto current_override = overrides_.find(origin);
   if (current_override == overrides_.end())
     current_override = overrides_.find(global_overrides_origin_);
   if (current_override == overrides_.end())
-    return base::nullopt;
+    return absl::nullopt;
 
   auto new_status = current_override->second.find(permission);
   if (new_status != current_override->second.end())
-    return base::make_optional(new_status->second);
-  return base::nullopt;
+    return absl::make_optional(new_status->second);
+  return absl::nullopt;
 }
 
 const PermissionOverrides& DevToolsPermissionOverrides::GetAll(
-    const base::Optional<url::Origin>& origin) const {
+    const absl::optional<url::Origin>& origin) const {
   static const base::NoDestructor<PermissionOverrides> empty_overrides;
   auto it = origin ? overrides_.find(*origin) : overrides_.end();
   if (it == overrides_.end())
@@ -64,12 +64,12 @@
 }
 
 void DevToolsPermissionOverrides::Reset(
-    const base::Optional<url::Origin>& origin) {
+    const absl::optional<url::Origin>& origin) {
   overrides_.erase(origin.value_or(global_overrides_origin_));
 }
 
 void DevToolsPermissionOverrides::GrantPermissions(
-    const base::Optional<url::Origin>& origin,
+    const absl::optional<url::Origin>& origin,
     const std::vector<PermissionType>& permissions) {
   const std::vector<PermissionType>& kAllPermissionTypes =
       GetAllPermissionTypes();
diff --git a/content/public/browser/devtools_permission_overrides.h b/content/public/browser/devtools_permission_overrides.h
index 8c685d0b..453dd2058 100644
--- a/content/public/browser/devtools_permission_overrides.h
+++ b/content/public/browser/devtools_permission_overrides.h
@@ -8,9 +8,9 @@
 #include <vector>
 
 #include "base/containers/flat_map.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/permission_type.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/permissions/permission_status.mojom.h"
 #include "url/origin.h"
 
@@ -33,12 +33,12 @@
 
   // Set permission override for |permission| at |origin| to |status|.
   // Null |origin| specifies global overrides.
-  void Set(const base::Optional<url::Origin>& origin,
+  void Set(const absl::optional<url::Origin>& origin,
            PermissionType permission,
            const blink::mojom::PermissionStatus& status);
 
   // Get override for |origin| set for |permission|, if specified.
-  base::Optional<blink::mojom::PermissionStatus> Get(
+  absl::optional<blink::mojom::PermissionStatus> Get(
       const url::Origin& origin,
       PermissionType permission) const;
 
@@ -46,16 +46,16 @@
   // if found. Will return empty overrides if none previously existed. Returns
   // global overrides when |origin| is nullptr.
   const PermissionOverrides& GetAll(
-      const base::Optional<url::Origin>& origin) const;
+      const absl::optional<url::Origin>& origin) const;
 
   // Resets overrides for |origin|.
   // Null |origin| resets global overrides.
-  void Reset(const base::Optional<url::Origin>& origin);
+  void Reset(const absl::optional<url::Origin>& origin);
 
   // Sets status for |permissions| to GRANTED in |origin|, and DENIED
   // for all others.
   // Null |origin| grants permissions globally for context.
-  void GrantPermissions(const base::Optional<url::Origin>& origin,
+  void GrantPermissions(const absl::optional<url::Origin>& origin,
                         const std::vector<PermissionType>& permissions);
 
  private:
diff --git a/content/public/browser/download_manager.h b/content/public/browser/download_manager.h
index a8324aa..1c6c8ef 100644
--- a/content/public/browser/download_manager.h
+++ b/content/public/browser/download_manager.h
@@ -35,7 +35,6 @@
 
 #include "base/callback.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/sequenced_task_runner.h"
 #include "base/time/time.h"
 #include "components/download/public/common/download_interrupt_reasons.h"
@@ -47,6 +46,7 @@
 #include "content/common/content_export.h"
 #include "net/base/net_errors.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 class GURL;
@@ -146,7 +146,7 @@
       const GURL& site_url,
       const GURL& tab_url,
       const GURL& tab_referrer_url,
-      const base::Optional<url::Origin>& request_initiator,
+      const absl::optional<url::Origin>& request_initiator,
       const std::string& mime_type,
       const std::string& original_mime_type,
       base::Time start_time,
diff --git a/content/public/browser/download_manager_delegate.cc b/content/public/browser/download_manager_delegate.cc
index b9b00c4..65c878e 100644
--- a/content/public/browser/download_manager_delegate.cc
+++ b/content/public/browser/download_manager_delegate.cc
@@ -66,7 +66,7 @@
     const WebContents::Getter& web_contents_getter,
     const GURL& url,
     const std::string& request_method,
-    base::Optional<url::Origin> request_initiator,
+    absl::optional<url::Origin> request_initiator,
     bool from_download_cross_origin_redirect,
     bool content_initiated,
     CheckDownloadAllowedCallback check_download_allowed_cb) {
diff --git a/content/public/browser/download_manager_delegate.h b/content/public/browser/download_manager_delegate.h
index 67ce503..35e0aeb 100644
--- a/content/public/browser/download_manager_delegate.h
+++ b/content/public/browser/download_manager_delegate.h
@@ -9,7 +9,6 @@
 
 #include "base/callback.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "components/download/public/common/download_danger_type.h"
 #include "components/download/public/common/download_item.h"
 #include "components/download/public/common/download_item_rename_handler.h"
@@ -19,6 +18,7 @@
 #include "content/common/content_export.h"
 #include "content/public/browser/save_page_type.h"
 #include "content/public/browser/web_contents.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 class GURL;
@@ -67,7 +67,7 @@
     download::DownloadDangerType danger_type,
     download::DownloadItem::MixedContentStatus mixed_content_status,
     const base::FilePath& intermediate_path,
-    base::Optional<download::DownloadSchedule> download_schedule,
+    absl::optional<download::DownloadSchedule> download_schedule,
     download::DownloadInterruptReason interrupt_reason)>;
 
 // Called when a download delayed by the delegate has completed.
@@ -202,7 +202,7 @@
       const WebContents::Getter& web_contents_getter,
       const GURL& url,
       const std::string& request_method,
-      base::Optional<url::Origin> request_initiator,
+      absl::optional<url::Origin> request_initiator,
       bool from_download_cross_origin_redirect,
       bool content_initiated,
       CheckDownloadAllowedCallback check_download_allowed_cb);
diff --git a/content/public/browser/media_device_id.cc b/content/public/browser/media_device_id.cc
index 72d011f..0cc1de4 100644
--- a/content/public/browser/media_device_id.cc
+++ b/content/public/browser/media_device_id.cc
@@ -44,7 +44,7 @@
     std::string salt,
     url::Origin security_origin,
     std::string hmac_device_id,
-    base::OnceCallback<void(const base::Optional<std::string>&)> callback) {
+    base::OnceCallback<void(const absl::optional<std::string>&)> callback) {
   MediaStreamManager::GetMediaDeviceIDForHMAC(
       stream_type, std::move(salt), std::move(security_origin),
       std::move(hmac_device_id), base::SequencedTaskRunnerHandle::Get(),
diff --git a/content/public/browser/media_device_id.h b/content/public/browser/media_device_id.h
index 7b49a7b..fbdf0d6 100644
--- a/content/public/browser/media_device_id.h
+++ b/content/public/browser/media_device_id.h
@@ -51,7 +51,7 @@
     std::string salt,
     url::Origin security_origin,
     std::string hmac_device_id,
-    base::OnceCallback<void(const base::Optional<std::string>&)> callback);
+    base::OnceCallback<void(const absl::optional<std::string>&)> callback);
 
 CONTENT_EXPORT bool IsValidDeviceId(const std::string& device_id);
 
diff --git a/content/public/browser/message_port_provider.h b/content/public/browser/message_port_provider.h
index 25a97cc3..d3bbd98 100644
--- a/content/public/browser/message_port_provider.h
+++ b/content/public/browser/message_port_provider.h
@@ -10,10 +10,10 @@
 
 #include "base/macros.h"
 #include "base/memory/singleton.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "build/chromecast_buildflags.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/messaging/web_message_port.h"
 
 #if defined(OS_ANDROID)
@@ -55,7 +55,7 @@
   static void PostMessageToFrame(
       WebContents* web_contents,
       const std::u16string& source_origin,
-      const base::Optional<std::u16string>& target_origin,
+      const absl::optional<std::u16string>& target_origin,
       const std::u16string& data,
       std::vector<blink::WebMessagePort> ports);
 #endif  // OS_FUCHSIA || BUILDFLAG(IS_CHROMECAST)
diff --git a/content/public/browser/mhtml_generation_result.cc b/content/public/browser/mhtml_generation_result.cc
index b16e790..07114d7 100644
--- a/content/public/browser/mhtml_generation_result.cc
+++ b/content/public/browser/mhtml_generation_result.cc
@@ -10,9 +10,9 @@
                                              const std::string* digest)
     : file_size(file_size) {
   if (digest) {
-    file_digest = base::Optional<std::string>(*digest);
+    file_digest = absl::optional<std::string>(*digest);
   } else {
-    file_digest = base::nullopt;
+    file_digest = absl::nullopt;
   }
 }
 
diff --git a/content/public/browser/mhtml_generation_result.h b/content/public/browser/mhtml_generation_result.h
index fc2e706..e6dd922 100644
--- a/content/public/browser/mhtml_generation_result.h
+++ b/content/public/browser/mhtml_generation_result.h
@@ -8,8 +8,8 @@
 #include <string>
 
 #include "base/callback_forward.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -31,8 +31,8 @@
 
   // The SHA-256 digest of the generated file. On success, |file_digest|
   // contains the digest of the generated file, otherwise |file_digest| is
-  // base::nullopt.
-  base::Optional<std::string> file_digest;
+  // absl::nullopt.
+  absl::optional<std::string> file_digest;
 };
 
 }  // namespace content
diff --git a/content/public/browser/navigation_controller.h b/content/public/browser/navigation_controller.h
index f9da02c..12a042f 100644
--- a/content/public/browser/navigation_controller.h
+++ b/content/public/browser/navigation_controller.h
@@ -13,7 +13,6 @@
 #include <vector>
 
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/global_request_id.h"
@@ -28,6 +27,7 @@
 #include "content/public/common/was_activated_option.mojom.h"
 #include "services/network/public/cpp/resource_request_body.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/navigation/impression.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "ui/base/page_transition_types.h"
@@ -108,7 +108,7 @@
   CONTENT_EXPORT static std::unique_ptr<NavigationEntry> CreateNavigationEntry(
       const GURL& url,
       Referrer referrer,
-      base::Optional<url::Origin> initiator_origin,
+      absl::optional<url::Origin> initiator_origin,
       ui::PageTransition transition,
       bool is_renderer_initiated,
       const std::string& extra_headers,
@@ -136,14 +136,14 @@
     // was not associated with a frame, or if the initiating frame did not exist
     // by the time navigation started. This parameter is defined if and only if
     // |initiator_process_id| below is.
-    base::Optional<blink::LocalFrameToken> initiator_frame_token;
+    absl::optional<blink::LocalFrameToken> initiator_frame_token;
 
     // ID of the renderer process of the frame host that initiated the
     // navigation. This is defined if and only if |initiator_frame_token| above
     // is, and it is only valid in conjunction with it.
     int initiator_process_id = ChildProcessHost::kInvalidUniqueID;
 
-    // The origin of the initiator of the navigation or base::nullopt if the
+    // The origin of the initiator of the navigation or absl::nullopt if the
     // navigation was initiated through trusted, non-web-influenced UI
     // (e.g. via omnibox, the bookmarks bar, local NTP, etc.).
     //
@@ -152,7 +152,7 @@
     // browser-initiated navigations may also use a non-null |initiator_origin|
     // (if these navigations can be somehow triggered or influenced by web
     // content).
-    base::Optional<url::Origin> initiator_origin;
+    absl::optional<url::Origin> initiator_origin;
 
     // SiteInstance of the frame that initiated the navigation or null if we
     // don't know it.
@@ -270,7 +270,7 @@
 
     // Impression info associated with this navigation. Should only be populated
     // for navigations originating from a link click.
-    base::Optional<blink::Impression> impression;
+    absl::optional<blink::Impression> impression;
 
     DISALLOW_COPY_AND_ASSIGN(LoadURLParams);
   };
diff --git a/content/public/browser/navigation_entry.h b/content/public/browser/navigation_entry.h
index fbab464..2180bcd 100644
--- a/content/public/browser/navigation_entry.h
+++ b/content/public/browser/navigation_entry.h
@@ -11,7 +11,6 @@
 #include <string>
 
 #include "base/memory/ref_counted_memory.h"
-#include "base/optional.h"
 #include "base/supports_user_data.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -19,6 +18,7 @@
 #include "content/public/common/page_type.h"
 #include "content/public/common/referrer.h"
 #include "services/network/public/cpp/resource_request_body.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/base/page_transition_types.h"
 
 class GURL;
@@ -214,7 +214,7 @@
   // contains some information about the entry prior to being replaced. Even if
   // an entry is replaced multiple times, it represents data prior to the
   // *first* replace.
-  virtual const base::Optional<ReplacedNavigationEntryData>&
+  virtual const absl::optional<ReplacedNavigationEntryData>&
   GetReplacedEntryData() = 0;
 
   // True if this entry is restored and hasn't been loaded.
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index ce48d78..8c52916 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -332,11 +332,11 @@
   // Returns the SSLInfo for a request that succeeded or failed due to a
   // certificate error. In the case of other request failures or of a non-secure
   // scheme, returns an empty object.
-  virtual const base::Optional<net::SSLInfo>& GetSSLInfo() = 0;
+  virtual const absl::optional<net::SSLInfo>& GetSSLInfo() = 0;
 
   // Returns the AuthChallengeInfo for the request, if the response contained an
   // authentication challenge.
-  virtual const base::Optional<net::AuthChallengeInfo>&
+  virtual const absl::optional<net::AuthChallengeInfo>&
   GetAuthChallengeInfo() = 0;
 
   // Returns host resolution error info associated with the request.
@@ -388,14 +388,14 @@
   // Returns, if available, the impression associated with the link clicked to
   // initiate this navigation. The impression is available for the entire
   // lifetime of the navigation.
-  virtual const base::Optional<blink::Impression>& GetImpression() = 0;
+  virtual const absl::optional<blink::Impression>& GetImpression() = 0;
 
   // Returns the frame token associated with the frame that initiated the
   // navigation. This can be nullptr if the navigation was not associated with a
   // frame, or may return a valid frame token to a frame that no longer exists
   // because it was deleted before the navigation began. This parameter is
   // defined if and only if GetInitiatorProcessID below is.
-  virtual const base::Optional<blink::LocalFrameToken>&
+  virtual const absl::optional<blink::LocalFrameToken>&
   GetInitiatorFrameToken() = 0;
 
   // Return the ID of the renderer process of the frame host that initiated the
@@ -405,7 +405,7 @@
 
   // Returns, if available, the origin of the document that has initiated the
   // navigation for this NavigationHandle.
-  virtual const base::Optional<url::Origin>& GetInitiatorOrigin() = 0;
+  virtual const absl::optional<url::Origin>& GetInitiatorOrigin() = 0;
 
   // Retrieves any DNS aliases for the requested URL. The alias chain order
   // is preserved in reverse, from canonical name (i.e. address record name)
diff --git a/content/public/browser/navigation_throttle.cc b/content/public/browser/navigation_throttle.cc
index 53ec64f..ec487cb 100644
--- a/content/public/browser/navigation_throttle.cc
+++ b/content/public/browser/navigation_throttle.cc
@@ -35,19 +35,19 @@
     NavigationThrottle::ThrottleAction action)
     : NavigationThrottle::ThrottleCheckResult(action,
                                               DefaultNetErrorCode(action),
-                                              base::nullopt) {}
+                                              absl::nullopt) {}
 
 NavigationThrottle::ThrottleCheckResult::ThrottleCheckResult(
     NavigationThrottle::ThrottleAction action,
     net::Error net_error_code)
     : NavigationThrottle::ThrottleCheckResult(action,
                                               net_error_code,
-                                              base::nullopt) {}
+                                              absl::nullopt) {}
 
 NavigationThrottle::ThrottleCheckResult::ThrottleCheckResult(
     NavigationThrottle::ThrottleAction action,
     net::Error net_error_code,
-    base::Optional<std::string> error_page_content)
+    absl::optional<std::string> error_page_content)
     : action_(action),
       net_error_code_(net_error_code),
       error_page_content_(error_page_content) {}
diff --git a/content/public/browser/navigation_throttle.h b/content/public/browser/navigation_throttle.h
index 653f5b9..475537ae 100644
--- a/content/public/browser/navigation_throttle.h
+++ b/content/public/browser/navigation_throttle.h
@@ -6,9 +6,9 @@
 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_THROTTLE_H_
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "net/base/net_errors.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 class NavigationHandle;
@@ -109,7 +109,7 @@
     // Construct with an action, error, and error page HTML.
     ThrottleCheckResult(ThrottleAction action,
                         net::Error net_error_code,
-                        base::Optional<std::string> error_page_content);
+                        absl::optional<std::string> error_page_content);
 
     ThrottleCheckResult(const ThrottleCheckResult& other);
 
@@ -117,14 +117,14 @@
 
     ThrottleAction action() const { return action_; }
     net::Error net_error_code() const { return net_error_code_; }
-    const base::Optional<std::string>& error_page_content() {
+    const absl::optional<std::string>& error_page_content() {
       return error_page_content_;
     }
 
    private:
     ThrottleAction action_;
     net::Error net_error_code_;
-    base::Optional<std::string> error_page_content_;
+    absl::optional<std::string> error_page_content_;
   };
 
   NavigationThrottle(NavigationHandle* navigation_handle);
diff --git a/content/public/browser/notification_database_data.h b/content/public/browser/notification_database_data.h
index f3708799..862f44d 100644
--- a/content/public/browser/notification_database_data.h
+++ b/content/public/browser/notification_database_data.h
@@ -8,9 +8,9 @@
 #include <stdint.h>
 #include <string>
 
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/notifications/notification_resources.h"
 #include "third_party/blink/public/common/notifications/platform_notification_data.h"
 #include "url/gurl.h"
@@ -62,7 +62,7 @@
   // Notification resources to allow showing scheduled notifications. This is
   // only used to store resources in the NotificationDatabase and is not
   // deserialized when reading from the database.
-  base::Optional<blink::NotificationResources> notification_resources;
+  absl::optional<blink::NotificationResources> notification_resources;
 
   // Boolean for if this current notification is replacing an existing
   // notification.
@@ -81,14 +81,14 @@
 
   // Amount of time, in ms, between when the notification is shown and the
   // first click.
-  base::Optional<base::TimeDelta> time_until_first_click_millis;
+  absl::optional<base::TimeDelta> time_until_first_click_millis;
 
   // Amount of time, in ms, between when the notification is shown and the
   // last click.
-  base::Optional<base::TimeDelta> time_until_last_click_millis;
+  absl::optional<base::TimeDelta> time_until_last_click_millis;
 
   // Amount of time, in ms, between when the notification is shown and closed.
-  base::Optional<base::TimeDelta> time_until_close_millis;
+  absl::optional<base::TimeDelta> time_until_close_millis;
 
   // Why the notification was closed.
   ClosedReason closed_reason = ClosedReason::UNKNOWN;
diff --git a/content/public/browser/notification_event_dispatcher.h b/content/public/browser/notification_event_dispatcher.h
index ff01bca..881acd8 100644
--- a/content/public/browser/notification_event_dispatcher.h
+++ b/content/public/browser/notification_event_dispatcher.h
@@ -8,8 +8,8 @@
 #include <string>
 
 #include "base/callback_forward.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class GURL;
 
@@ -39,8 +39,8 @@
       BrowserContext* browser_context,
       const std::string& notification_id,
       const GURL& origin,
-      const base::Optional<int>& action_index,
-      const base::Optional<std::u16string>& reply,
+      const absl::optional<int>& action_index,
+      const absl::optional<std::u16string>& reply,
       NotificationDispatchCompleteCallback dispatch_complete_callback) = 0;
 
   // Dispatches the "notificationclose" event on the Service Worker associated
diff --git a/content/public/browser/page_navigator.h b/content/public/browser/page_navigator.h
index 88337a1..881c925 100644
--- a/content/public/browser/page_navigator.h
+++ b/content/public/browser/page_navigator.h
@@ -77,7 +77,7 @@
   // drop), and the frame with the corresponding token may have been deleted
   // before the navigation begins. This parameter is defined if and only if
   // |initiator_process_id| below is.
-  base::Optional<blink::LocalFrameToken> initiator_frame_token;
+  absl::optional<blink::LocalFrameToken> initiator_frame_token;
 
   // ID of the renderer process of the RenderFrameHost that initiated the
   // navigation. This is defined if and only if |initiator_frame_token| above
@@ -85,7 +85,7 @@
   int initiator_process_id = ChildProcessHost::kInvalidUniqueID;
 
   // The origin of the initiator of the navigation.
-  base::Optional<url::Origin> initiator_origin;
+  absl::optional<url::Origin> initiator_origin;
 
   // SiteInstance of the frame that initiated the navigation or null if we
   // don't know it.
@@ -154,7 +154,7 @@
   // Optional impression associated with this navigation. Only set on
   // navigations that originate from links with impression attributes. Used for
   // conversion measurement.
-  base::Optional<blink::Impression> impression;
+  absl::optional<blink::Impression> impression;
 };
 
 class PageNavigator {
diff --git a/content/public/browser/permission_controller_delegate.cc b/content/public/browser/permission_controller_delegate.cc
index d2dc1935..aa98c2c2 100644
--- a/content/public/browser/permission_controller_delegate.cc
+++ b/content/public/browser/permission_controller_delegate.cc
@@ -8,7 +8,7 @@
 
 bool PermissionControllerDelegate::IsPermissionOverridableByDevTools(
     PermissionType permission,
-    const base::Optional<url::Origin>& origin) {
+    const absl::optional<url::Origin>& origin) {
   return true;
 }
 
diff --git a/content/public/browser/permission_controller_delegate.h b/content/public/browser/permission_controller_delegate.h
index 67ad96d..8551bc2 100644
--- a/content/public/browser/permission_controller_delegate.h
+++ b/content/public/browser/permission_controller_delegate.h
@@ -97,7 +97,7 @@
   // are tracked by the delegate. This method should only be called by the
   // PermissionController owning the delegate.
   virtual void SetPermissionOverridesForDevTools(
-      const base::Optional<url::Origin>& origin,
+      const absl::optional<url::Origin>& origin,
       const PermissionOverrides& overrides) {}
 
   // Removes overrides that have been set, if any, for all origins. If delegate
@@ -108,7 +108,7 @@
   // DevToolsPermissionOverrides.
   virtual bool IsPermissionOverridableByDevTools(
       PermissionType permission,
-      const base::Optional<url::Origin>& origin);
+      const absl::optional<url::Origin>& origin);
 };
 
 }  // namespace content
diff --git a/content/public/browser/permission_type.cc b/content/public/browser/permission_type.cc
index 4a69360..a340659c 100644
--- a/content/public/browser/permission_type.cc
+++ b/content/public/browser/permission_type.cc
@@ -31,7 +31,7 @@
   return *kAllPermissionTypes;
 }
 
-base::Optional<PermissionType> PermissionDescriptorToPermissionType(
+absl::optional<PermissionType> PermissionDescriptorToPermissionType(
     const PermissionDescriptorPtr& descriptor) {
   switch (descriptor->name) {
     case PermissionName::GEOLOCATION:
@@ -50,7 +50,7 @@
       return PermissionType::PROTECTED_MEDIA_IDENTIFIER;
 #else
       NOTIMPLEMENTED();
-      return base::nullopt;
+      return absl::nullopt;
 #endif  // defined(ENABLE_PROTECTED_MEDIA_IDENTIFIER_PERMISSION)
     case PermissionName::DURABLE_STORAGE:
       return PermissionType::DURABLE_STORAGE;
@@ -106,7 +106,7 @@
   }
 
   NOTREACHED();
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace content
diff --git a/content/public/browser/permission_type.h b/content/public/browser/permission_type.h
index c5ee87f..4c845ae 100644
--- a/content/public/browser/permission_type.h
+++ b/content/public/browser/permission_type.h
@@ -7,8 +7,8 @@
 
 #include <vector>
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/permissions/permission.mojom-forward.h"
 
 namespace content {
@@ -60,7 +60,7 @@
 CONTENT_EXPORT const std::vector<PermissionType>& GetAllPermissionTypes();
 
 // Given |descriptor|, set |permission_type| to a corresponding PermissionType.
-CONTENT_EXPORT base::Optional<PermissionType>
+CONTENT_EXPORT absl::optional<PermissionType>
 PermissionDescriptorToPermissionType(
     const blink::mojom::PermissionDescriptorPtr& descriptor);
 
diff --git a/content/public/browser/push_messaging_service.h b/content/public/browser/push_messaging_service.h
index e81ffbac..e68c57e 100644
--- a/content/public/browser/push_messaging_service.h
+++ b/content/public/browser/push_messaging_service.h
@@ -10,9 +10,9 @@
 #include <vector>
 
 #include "base/callback_forward.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/push_messaging/push_messaging.mojom.h"
 #include "url/gurl.h"
 
@@ -36,7 +36,7 @@
   using RegisterCallback =
       base::OnceCallback<void(const std::string& registration_id,
                               const GURL& endpoint,
-                              const base::Optional<base::Time>& expiration_time,
+                              const absl::optional<base::Time>& expiration_time,
                               const std::vector<uint8_t>& p256dh,
                               const std::vector<uint8_t>& auth,
                               blink::mojom::PushRegistrationStatus status)>;
@@ -45,7 +45,7 @@
   using SubscriptionInfoCallback =
       base::OnceCallback<void(bool is_valid,
                               const GURL& endpoint,
-                              const base::Optional<base::Time>& expiration_time,
+                              const absl::optional<base::Time>& expiration_time,
                               const std::vector<uint8_t>& p256dh,
                               const std::vector<uint8_t>& auth)>;
   using RegistrationUserDataCallback =
diff --git a/content/public/browser/render_frame_host.h b/content/public/browser/render_frame_host.h
index b135aa8..6f6cb5e 100644
--- a/content/public/browser/render_frame_host.h
+++ b/content/public/browser/render_frame_host.h
@@ -10,7 +10,6 @@
 
 #include "base/callback_forward.h"
 #include "base/containers/flat_set.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "cc/input/browser_controls_state.h"
 #include "content/common/content_export.h"
@@ -19,6 +18,7 @@
 #include "ipc/ipc_sender.h"
 #include "services/metrics/public/cpp/ukm_source_id.h"
 #include "services/network/public/mojom/web_sandbox_flags.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/ad_tagging/ad_frame.mojom-forward.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom-forward.h"
@@ -313,7 +313,7 @@
   //
   // TODO(crbug/1098283): Remove the nullopt scenario by creating the token in
   // CreateChildFrame() or similar.
-  virtual base::Optional<base::UnguessableToken> GetEmbeddingToken() = 0;
+  virtual absl::optional<base::UnguessableToken> GetEmbeddingToken() = 0;
 
   // Returns the assigned name of the frame, the name of the iframe tag
   // declaring it. For example, <iframe name="framename">[...]</iframe>. It is
@@ -326,7 +326,7 @@
 
   // Returns the size of the frame in the viewport. The frame may not be aware
   // of its size.
-  virtual const base::Optional<gfx::Size>& GetFrameSize() = 0;
+  virtual const absl::optional<gfx::Size>& GetFrameSize() = 0;
 
   // Returns the distance from this frame to its main frame.
   virtual size_t GetFrameDepth() = 0;
diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h
index a342e41..0f152715 100644
--- a/content/public/browser/render_widget_host.h
+++ b/content/public/browser/render_widget_host.h
@@ -12,13 +12,13 @@
 
 #include "base/callback.h"
 #include "base/i18n/rtl.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "content/public/browser/native_web_keyboard_event.h"
 #include "content/public/common/drop_data.h"
 #include "ipc/ipc_channel.h"
 #include "ipc/ipc_sender.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_gesture_event.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/common/page/drag_operation.h"
@@ -261,7 +261,7 @@
   virtual float GetDeviceScaleFactor() = 0;
 
   // Get the allowed touch action corresponding to this RenderWidgetHost.
-  virtual base::Optional<cc::TouchAction> GetAllowedTouchAction() = 0;
+  virtual absl::optional<cc::TouchAction> GetAllowedTouchAction() = 0;
 
   // Write a representation of this object into a trace.
   virtual void WriteIntoTrace(perfetto::TracedValue context) = 0;
diff --git a/content/public/browser/render_widget_host_view.h b/content/public/browser/render_widget_host_view.h
index 12761b4..8c85abb1 100644
--- a/content/public/browser/render_widget_host_view.h
+++ b/content/public/browser/render_widget_host_view.h
@@ -9,9 +9,9 @@
 
 #include "base/containers/flat_map.h"
 #include "base/containers/flat_set.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/common/widget/screen_info.h"
 #include "third_party/blink/public/mojom/input/pointer_lock_result.mojom.h"
@@ -160,7 +160,7 @@
   // which is shown if the background color of the renderer is not available.
   virtual void SetBackgroundColor(SkColor color) = 0;
   // GetBackgroundColor returns the current background color of the view.
-  virtual base::Optional<SkColor> GetBackgroundColor() = 0;
+  virtual absl::optional<SkColor> GetBackgroundColor() = 0;
   // Copy background color from another view if other view has background color.
   virtual void CopyBackgroundColorIfPresentFrom(
       const RenderWidgetHostView& other) = 0;
@@ -182,7 +182,7 @@
 
   // Start/Stop intercepting future system keyboard events.
   virtual bool LockKeyboard(
-      base::Optional<base::flat_set<ui::DomCode>> dom_codes) = 0;
+      absl::optional<base::flat_set<ui::DomCode>> dom_codes) = 0;
   virtual void UnlockKeyboard() = 0;
   // Returns true if keyboard lock is active.
   virtual bool IsKeyboardLocked() = 0;
diff --git a/content/public/browser/service_process_host.h b/content/public/browser/service_process_host.h
index 4f044bb..6fce83d 100644
--- a/content/public/browser/service_process_host.h
+++ b/content/public/browser/service_process_host.h
@@ -14,7 +14,6 @@
 #include "base/command_line.h"
 #include "base/macros.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/process/process_handle.h"
 #include "base/strings/string_piece.h"
 #include "content/common/content_export.h"
@@ -24,6 +23,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "sandbox/policy/sandbox_type.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -83,7 +83,7 @@
     sandbox::policy::SandboxType sandbox_type =
         sandbox::policy::SandboxType::kUtility;
     std::u16string display_name;
-    base::Optional<int> child_flags;
+    absl::optional<int> child_flags;
     std::vector<std::string> extra_switches;
   };
 
diff --git a/content/public/browser/service_worker_client_info.h b/content/public/browser/service_worker_client_info.h
index 03a13fc..30eb976 100644
--- a/content/public/browser/service_worker_client_info.h
+++ b/content/public/browser/service_worker_client_info.h
@@ -54,7 +54,7 @@
   int frame_tree_node_id_ = content::RenderFrameHost::kNoFrameTreeNodeId;
 
   // The ID of the client, if it is a worker.
-  base::Optional<DedicatedOrSharedWorkerToken> worker_token_;
+  absl::optional<DedicatedOrSharedWorkerToken> worker_token_;
 };
 
 }  // namespace content
diff --git a/content/public/browser/storage_partition_config.cc b/content/public/browser/storage_partition_config.cc
index 9d87aa95..0095de1 100644
--- a/content/public/browser/storage_partition_config.cc
+++ b/content/public/browser/storage_partition_config.cc
@@ -61,10 +61,10 @@
       partition_name_(partition_name),
       in_memory_(in_memory) {}
 
-base::Optional<StoragePartitionConfig>
+absl::optional<StoragePartitionConfig>
 StoragePartitionConfig::GetFallbackForBlobUrls() const {
   if (fallback_to_partition_domain_for_blob_urls_ == FallbackMode::kNone)
-    return base::nullopt;
+    return absl::nullopt;
 
   return StoragePartitionConfig(
       partition_domain_, "",
diff --git a/content/public/browser/storage_partition_config.h b/content/public/browser/storage_partition_config.h
index 9feeeff..79ee360 100644
--- a/content/public/browser/storage_partition_config.h
+++ b/content/public/browser/storage_partition_config.h
@@ -9,8 +9,8 @@
 
 #include "base/check.h"
 #include "base/gtest_prod_util.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 class BrowserContext;
@@ -77,7 +77,7 @@
   FallbackMode fallback_to_partition_domain_for_blob_urls() const {
     return fallback_to_partition_domain_for_blob_urls_;
   }
-  base::Optional<StoragePartitionConfig> GetFallbackForBlobUrls() const;
+  absl::optional<StoragePartitionConfig> GetFallbackForBlobUrls() const;
 
   bool operator<(const StoragePartitionConfig& rhs) const;
   bool operator==(const StoragePartitionConfig& rhs) const;
diff --git a/content/public/browser/tts_controller_delegate.h b/content/public/browser/tts_controller_delegate.h
index d5c73556..67f26cf 100644
--- a/content/public/browser/tts_controller_delegate.h
+++ b/content/public/browser/tts_controller_delegate.h
@@ -8,8 +8,8 @@
 #include <memory>
 #include <string>
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -39,15 +39,15 @@
 
     // The voice ID that matches the language of the utterance, if the user
     // has picked a preferred voice for that language.
-    base::Optional<PreferredVoiceId> lang_voice_id;
+    absl::optional<PreferredVoiceId> lang_voice_id;
 
     // The voice ID that matches the language of the system locale, if the user
     // has picked a preferred voice for that locale.
-    base::Optional<PreferredVoiceId> locale_voice_id;
+    absl::optional<PreferredVoiceId> locale_voice_id;
 
     // The voice ID that the user has chosen to use when no language code is
     // specified, which can be used to match against any locale.
-    base::Optional<PreferredVoiceId> any_locale_voice_id;
+    absl::optional<PreferredVoiceId> any_locale_voice_id;
   };
 
   // Returns the PreferredVoiceIds for an utterance. PreferredVoiceIds are used
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index e15b662..84c271d 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -16,7 +16,6 @@
 #include "base/callback_helpers.h"
 #include "base/compiler_specific.h"
 #include "base/memory/scoped_refptr.h"
-#include "base/optional.h"
 #include "base/process/kill.h"
 #include "base/supports_user_data.h"
 #include "base/time/time.h"
@@ -30,6 +29,7 @@
 #include "content/public/browser/visibility.h"
 #include "content/public/common/stop_find_action.h"
 #include "services/data_decoder/public/mojom/web_bundler.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/favicon/favicon_url.mojom-forward.h"
 #include "third_party/blink/public/mojom/frame/find_in_page.mojom-forward.h"
 #include "third_party/blink/public/mojom/input/pointer_lock_result.mojom.h"
@@ -387,11 +387,11 @@
 
   // Returns the theme color for the underlying content as set by the
   // theme-color meta tag if any.
-  virtual base::Optional<SkColor> GetThemeColor() = 0;
+  virtual absl::optional<SkColor> GetThemeColor() = 0;
 
   // Returns the background color for the underlying content as set by CSS if
   // any.
-  virtual base::Optional<SkColor> GetBackgroundColor() = 0;
+  virtual absl::optional<SkColor> GetBackgroundColor() = 0;
 
   // Returns the committed WebUI if one exists, otherwise the pending one.
   virtual WebUI* GetWebUI() = 0;
@@ -453,7 +453,7 @@
   // |start_recording| is false, it is expected that |callback| does not.
   virtual void RecordAccessibilityEvents(
       bool start_recording,
-      base::Optional<AccessibilityEventCallback> callback) = 0;
+      absl::optional<AccessibilityEventCallback> callback) = 0;
 
   // Tab navigation state ------------------------------------------------------
 
@@ -1118,7 +1118,7 @@
 
   virtual int GetCurrentlyPlayingVideoCount() = 0;
 
-  virtual base::Optional<gfx::Size> GetFullscreenVideoSize() = 0;
+  virtual absl::optional<gfx::Size> GetFullscreenVideoSize() = 0;
 
   // Tells the renderer to clear the focused element (if any).
   virtual void ClearFocusedElement() = 0;
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
index 214737d..3ca079e 100644
--- a/content/public/browser/web_contents_observer.h
+++ b/content/public/browser/web_contents_observer.h
@@ -8,7 +8,6 @@
 #include <stdint.h>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/process/kill.h"
 #include "base/process/process_handle.h"
 #include "base/threading/thread_restrictions.h"
@@ -23,6 +22,7 @@
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "services/network/public/mojom/fetch_api.mojom-forward.h"
 #include "services/service_manager/public/cpp/bind_source_info.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
 #include "third_party/blink/public/mojom/devtools/console_message.mojom.h"
@@ -588,7 +588,7 @@
       const std::u16string& message,
       int32_t line_no,
       const std::u16string& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace) {}
+      const absl::optional<std::u16string>& untrusted_stack_trace) {}
 
   // Invoked when media is playing or paused.  |id| is unique per player and per
   // RenderFrameHost.  There may be multiple players within a RenderFrameHost
@@ -664,7 +664,7 @@
   // be invoked before DidUpdateFaviconURL().
   virtual void DidUpdateWebManifestURL(
       RenderFrameHost* target_frame,
-      const base::Optional<GURL>& manifest_url) {}
+      const absl::optional<GURL>& manifest_url) {}
 
   // DEPRECATED. Please register interface binders with BrowserInterfaceBroker
   // instead (see 'Interface-Brokers' section in //docs/mojo_and_services.md).
diff --git a/content/public/common/cdm_info.h b/content/public/common/cdm_info.h
index 9b23f3c..0e900eb 100644
--- a/content/public/common/cdm_info.h
+++ b/content/public/common/cdm_info.h
@@ -10,7 +10,6 @@
 
 #include "base/containers/flat_set.h"
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "base/token.h"
 #include "base/version.h"
 #include "content/common/content_export.h"
@@ -18,6 +17,7 @@
 #include "media/base/encryption_scheme.h"
 #include "media/base/video_codecs.h"
 #include "media/cdm/cdm_capability.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -30,7 +30,7 @@
 
   CdmInfo(const std::string& key_system,
           Robustness robustness,
-          base::Optional<media::CdmCapability> capability,
+          absl::optional<media::CdmCapability> capability,
           bool supports_sub_key_systems,
           const std::string& name,
           const base::Token& guid,
@@ -39,7 +39,7 @@
           const std::string& file_system_id);
   CdmInfo(const std::string& key_system,
           Robustness robustness,
-          base::Optional<media::CdmCapability> capability);
+          absl::optional<media::CdmCapability> capability);
   CdmInfo(const CdmInfo& other);
   ~CdmInfo();
 
@@ -56,7 +56,7 @@
   // CDM capability, e.g. video codecs, encryption schemes and session types.
   // Optional to allow lazy initialization, i.e. to populate the capability
   // after registration.
-  base::Optional<media::CdmCapability> capability;
+  absl::optional<media::CdmCapability> capability;
 
   // Whether we also support sub key systems of the `key_system`.
   // A sub key system to a key system is like a sub domain to a domain.
diff --git a/content/public/common/child_process_host.h b/content/public/common/child_process_host.h
index c73a188..f9233d5 100644
--- a/content/public/common/child_process_host.h
+++ b/content/public/common/child_process_host.h
@@ -12,13 +12,13 @@
 
 #include "base/clang_profiling_buildflags.h"
 #include "base/files/scoped_file.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_channel_proxy.h"
 #include "mojo/public/cpp/bindings/generic_pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/system/message_pipe.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class FilePath;
@@ -146,7 +146,7 @@
   //
   // Always valid immediately after ChildProcessHost construction, but may be
   // null if someone else has taken ownership.
-  virtual base::Optional<mojo::OutgoingInvitation>& GetMojoInvitation() = 0;
+  virtual absl::optional<mojo::OutgoingInvitation>& GetMojoInvitation() = 0;
 
   // Creates the IPC channel over a Mojo message pipe. The pipe connection is
   // brokered through the Service Manager like any other service connection.
diff --git a/content/public/common/drop_data.cc b/content/public/common/drop_data.cc
index 5ded808..9048201 100644
--- a/content/public/common/drop_data.cc
+++ b/content/public/common/drop_data.cc
@@ -53,7 +53,7 @@
 
 DropData::~DropData() {}
 
-base::Optional<base::FilePath> DropData::GetSafeFilenameForImageFileContents()
+absl::optional<base::FilePath> DropData::GetSafeFilenameForImageFileContents()
     const {
   base::FilePath file_name = net::GenerateFileName(
       file_contents_source_url, file_contents_content_disposition,
@@ -68,7 +68,7 @@
                        base::CompareCase::INSENSITIVE_ASCII)) {
     return file_name.ReplaceExtension(file_contents_filename_extension);
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 // static
diff --git a/content/public/common/drop_data.h b/content/public/common/drop_data.h
index e84dbb20..3f8b9ad 100644
--- a/content/public/common/drop_data.h
+++ b/content/public/common/drop_data.h
@@ -16,10 +16,10 @@
 #include <vector>
 
 #include "base/files/file_path.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_message.h"
 #include "services/network/public/mojom/referrer_policy.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/base/clipboard/file_info.h"
 #include "url/gurl.h"
 
@@ -68,9 +68,9 @@
   DropData(const DropData& other);
   ~DropData();
 
-  // Returns a sanitized filename to use for the dragged image, or base::nullopt
+  // Returns a sanitized filename to use for the dragged image, or absl::nullopt
   // if no sanitized name could be synthesized.
-  base::Optional<base::FilePath> GetSafeFilenameForImageFileContents() const;
+  absl::optional<base::FilePath> GetSafeFilenameForImageFileContents() const;
 
   int view_id = MSG_ROUTING_NONE;
 
@@ -102,12 +102,12 @@
   std::vector<FileSystemFileInfo> file_system_files;
 
   // User is dragging plain text into the webview.
-  base::Optional<std::u16string> text;
+  absl::optional<std::u16string> text;
 
   // User is dragging text/html into the webview (e.g., out of Firefox).
   // |html_base_url| is the URL that the html fragment is taken from (used to
   // resolve relative links).  It's ok for |html_base_url| to be empty.
-  base::Optional<std::u16string> html;
+  absl::optional<std::u16string> html;
   GURL html_base_url;
 
   // User is dragging an image out of the WebView.
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
index 917fe73..4e168c7 100644
--- a/content/public/renderer/content_renderer_client.cc
+++ b/content/public/renderer/content_renderer_client.cc
@@ -215,9 +215,9 @@
   return true;
 }
 
-base::Optional<std::string>
+absl::optional<std::string>
 ContentRendererClient::WebRTCPlatformSpecificAudioProcessingConfiguration() {
-  return base::Optional<std::string>();
+  return absl::optional<std::string>();
 }
 
 GURL ContentRendererClient::OverrideFlashEmbedWithHTML(const GURL& url) {
@@ -246,10 +246,10 @@
 
 void ContentRendererClient::DidSetUserAgent(const std::string& user_agent) {}
 
-base::Optional<::media::AudioRendererAlgorithmParameters>
+absl::optional<::media::AudioRendererAlgorithmParameters>
 ContentRendererClient::GetAudioRendererAlgorithmParameters(
     media::AudioParameters audio_parameters) {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 }  // namespace content
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index f492800..6016334 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -15,12 +15,12 @@
 #include "base/callback_forward.h"
 #include "base/files/file_path.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "base/task/thread_pool/thread_pool_instance.h"
 #include "build/build_config.h"
 #include "content/public/common/content_client.h"
 #include "media/base/audio_parameters.h"
 #include "media/base/supported_types.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/platform/url_loader_throttle_provider.h"
 #include "third_party/blink/public/platform/web_content_settings_client.h"
 #include "third_party/blink/public/platform/websocket_handshake_throttle_provider.h"
@@ -357,7 +357,7 @@
   // more functional tuning on platforms with known implementation and hardware
   // limitations.
   // This is currently not supported when running the Chrome audio service.
-  virtual base::Optional<std::string>
+  virtual absl::optional<std::string>
   WebRTCPlatformSpecificAudioProcessingConfiguration();
 
   // Notifies that a worker context has been created. This function is called
@@ -395,7 +395,7 @@
   virtual void DidSetUserAgent(const std::string& user_agent);
 
   // Optionally returns audio renderer algorithm parameters.
-  virtual base::Optional<::media::AudioRendererAlgorithmParameters>
+  virtual absl::optional<::media::AudioRendererAlgorithmParameters>
   GetAudioRendererAlgorithmParameters(
       ::media::AudioParameters audio_parameters);
 };
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index fa860cd..107c22e 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -12,7 +12,6 @@
 #include "base/compiler_specific.h"
 #include "base/macros.h"
 #include "base/memory/read_only_shared_memory_region.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "content/common/content_export.h"
 #include "ipc/ipc_listener.h"
@@ -20,6 +19,7 @@
 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
 #include "mojo/public/cpp/system/message_pipe.h"
 #include "services/network/public/mojom/url_response_head.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/loading_behavior_flag.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/use_counter/use_counter_feature.h"
@@ -98,7 +98,7 @@
   // the browser process (e.g. by typing a url) won't have a navigation type.
   virtual void DidStartNavigation(
       const GURL& url,
-      base::Optional<blink::WebNavigationType> navigation_type) {}
+      absl::optional<blink::WebNavigationType> navigation_type) {}
 
   // Called when a navigation has just committed and |document_loader|
   // will start loading a new document in the RenderFrame.
diff --git a/content/public/test/accessibility_notification_waiter.cc b/content/public/test/accessibility_notification_waiter.cc
index 79af4b1..d566c751 100644
--- a/content/public/test/accessibility_notification_waiter.cc
+++ b/content/public/test/accessibility_notification_waiter.cc
@@ -29,7 +29,7 @@
     WebContents* web_contents)
     : WebContentsObserver(web_contents),
       event_to_wait_for_(ax::mojom::Event::kNone),
-      generated_event_to_wait_for_(base::nullopt),
+      generated_event_to_wait_for_(absl::nullopt),
       loop_runner_(std::make_unique<base::RunLoop>()) {
   ListenToAllFrames(web_contents);
 }
@@ -40,7 +40,7 @@
     ax::mojom::Event event_type)
     : WebContentsObserver(web_contents),
       event_to_wait_for_(event_type),
-      generated_event_to_wait_for_(base::nullopt),
+      generated_event_to_wait_for_(absl::nullopt),
       loop_runner_(std::make_unique<base::RunLoop>()) {
   ListenToAllFrames(web_contents);
   static_cast<WebContentsImpl*>(web_contents)
@@ -57,7 +57,7 @@
     ui::AXMode accessibility_mode,
     ui::AXEventGenerator::Event event_type)
     : WebContentsObserver(web_contents),
-      event_to_wait_for_(base::nullopt),
+      event_to_wait_for_(absl::nullopt),
       generated_event_to_wait_for_(event_type),
       loop_runner_(std::make_unique<base::RunLoop>()) {
   ListenToAllFrames(web_contents);
diff --git a/content/public/test/accessibility_notification_waiter.h b/content/public/test/accessibility_notification_waiter.h
index aacd620b..8126bd8 100644
--- a/content/public/test/accessibility_notification_waiter.h
+++ b/content/public/test/accessibility_notification_waiter.h
@@ -108,8 +108,8 @@
   // GetAXTree() is about the page with the url "about:blank".
   bool IsAboutBlank();
 
-  base::Optional<ax::mojom::Event> event_to_wait_for_;
-  base::Optional<ui::AXEventGenerator::Event> generated_event_to_wait_for_;
+  absl::optional<ax::mojom::Event> event_to_wait_for_;
+  absl::optional<ui::AXEventGenerator::Event> generated_event_to_wait_for_;
   std::unique_ptr<base::RunLoop> loop_runner_;
   int event_target_id_ = 0;
   RenderFrameHostImpl* event_render_frame_host_ = nullptr;
diff --git a/content/public/test/browser_task_environment.h b/content/public/test/browser_task_environment.h
index c581fa6..e9260fc 100644
--- a/content/public/test/browser_task_environment.h
+++ b/content/public/test/browser_task_environment.h
@@ -113,7 +113,7 @@
 //    protected:
 //     // Use this protected member directly from the test body to drive tasks
 //     // posted within a FooBase-based test.
-//     base::Optional<base::test::TaskEnvironment> task_environment_;
+//     absl::optional<base::test::TaskEnvironment> task_environment_;
 //   };
 //
 //   class ChromeFooBase : public FooBase {
@@ -179,7 +179,7 @@
 
   void Init();
 
-  static constexpr bool UseRealIOThread(base::Optional<Options> options) {
+  static constexpr bool UseRealIOThread(absl::optional<Options> options) {
     if (!options)
       return false;
     return *options == Options::REAL_IO_THREAD;
diff --git a/content/public/test/browser_test_base.cc b/content/public/test/browser_test_base.cc
index e3be623..39f96f7 100644
--- a/content/public/test/browser_test_base.cc
+++ b/content/public/test/browser_test_base.cc
@@ -771,7 +771,7 @@
   // set a ScopedLoopRunTimeout from their fixture's constructor (which
   // happens as part of setting up the test factory in gtest while
   // ProxyRunTestOnMainThreadLoop() happens later as part of SetUp()).
-  base::Optional<base::test::ScopedRunLoopTimeout> scoped_run_timeout;
+  absl::optional<base::test::ScopedRunLoopTimeout> scoped_run_timeout;
   if (!base::test::ScopedRunLoopTimeout::ExistsForCurrentThread()) {
     // TODO(https://crbug.com/918724): determine whether the timeout can be
     // reduced from action_max_timeout() to action_timeout().
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 70862132..e2efd6e 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -1935,7 +1935,7 @@
       ->GetNetworkContext()
       ->GetCookieManager(cookie_manager.BindNewPipeAndPassReceiver());
   std::unique_ptr<net::CanonicalCookie> cc(net::CanonicalCookie::Create(
-      url, value, base::Time::Now(), base::nullopt /* server_time */));
+      url, value, base::Time::Now(), absl::nullopt /* server_time */));
   DCHECK(cc.get());
 
   net::CookieOptions options;
@@ -2215,7 +2215,7 @@
 }
 
 bool RequestKeyboardLock(WebContents* web_contents,
-                         base::Optional<base::flat_set<ui::DomCode>> codes) {
+                         absl::optional<base::flat_set<ui::DomCode>> codes) {
   DCHECK(!codes.has_value() || !codes.value().empty());
   WebContentsImpl* web_contents_impl =
       static_cast<WebContentsImpl*>(web_contents);
@@ -2383,8 +2383,8 @@
                     RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT),
       uma_name_(uma_name) {}
 
-base::Optional<int> RenderProcessHostKillWaiter::Wait() {
-  base::Optional<bad_message::BadMessageReason> result;
+absl::optional<int> RenderProcessHostKillWaiter::Wait() {
+  absl::optional<bad_message::BadMessageReason> result;
 
   // Wait for the renderer kill.
   exit_watcher_.Wait();
@@ -2436,14 +2436,14 @@
       RenderProcessHostImpl::BadMojoMessageCallbackForTesting());
 }
 
-base::Optional<std::string> RenderProcessHostBadMojoMessageWaiter::Wait() {
-  base::Optional<int> bad_message_reason = kill_waiter_.Wait();
+absl::optional<std::string> RenderProcessHostBadMojoMessageWaiter::Wait() {
+  absl::optional<int> bad_message_reason = kill_waiter_.Wait();
   if (!bad_message_reason.has_value())
-    return base::nullopt;
+    return absl::nullopt;
   if (bad_message_reason.value() != bad_message::RPH_MOJO_PROCESS_ERROR) {
     LOG(ERROR) << "Unexpected |bad_message_reason|: "
                << bad_message_reason.value();
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   return observed_mojo_error_;
@@ -3088,7 +3088,7 @@
     const std::u16string& message_contents,
     int32_t line_no,
     const std::u16string& source_id,
-    const base::Optional<std::u16string>& untrusted_stack_trace) {
+    const absl::optional<std::u16string>& untrusted_stack_trace) {
   Message message(
       {source_frame, log_level, message_contents, line_no, source_id});
   if (filter_ && !filter_.Run(message))
@@ -3332,7 +3332,7 @@
     network::mojom::URLLoaderFactory* url_loader_factory,
     const GURL& url,
     int load_flags,
-    const base::Optional<url::Origin>& request_initiator = base::nullopt) {
+    const absl::optional<url::Origin>& request_initiator = absl::nullopt) {
   auto request = std::make_unique<network::ResourceRequest>();
   request->url = url;
   request->load_flags = load_flags;
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index 8e4ecb6..306b4b8 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -19,7 +19,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "base/run_loop.h"
 #include "base/scoped_observation.h"
@@ -45,6 +44,7 @@
 #include "services/network/public/mojom/network_service.mojom.h"
 #include "storage/common/file_system/file_system_types.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/context_menu_data/untrustworthy_context_menu_params.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/common/input/web_mouse_event.h"
@@ -977,8 +977,8 @@
 struct FindAccessibilityNodeCriteria {
   FindAccessibilityNodeCriteria();
   ~FindAccessibilityNodeCriteria();
-  base::Optional<ax::mojom::Role> role;
-  base::Optional<std::string> name;
+  absl::optional<ax::mojom::Role> role;
+  absl::optional<std::string> name;
 };
 ui::AXPlatformNodeDelegate* FindAccessibilityNode(
     WebContents* web_contents,
@@ -1012,7 +1012,7 @@
 // all keys will be considered locked.  If |codes| has a value, then at least
 // one key must be specified.
 bool RequestKeyboardLock(WebContents* web_contents,
-                         base::Optional<base::flat_set<ui::DomCode>> codes);
+                         absl::optional<base::flat_set<ui::DomCode>> codes);
 void CancelKeyboardLock(WebContents* web_contents);
 
 // Returns the screen orientation provider that's been set via
@@ -1132,9 +1132,9 @@
 
   // Waits until the renderer process exits.  Extracts and returns the bad
   // message reason that should be logged in the |uma_name_| histogram.
-  // Returns |base::nullopt| if the renderer exited normally or didn't log
+  // Returns |absl::nullopt| if the renderer exited normally or didn't log
   // the |uma_name_| histogram.
-  base::Optional<int> Wait() WARN_UNUSED_RESULT;
+  absl::optional<int> Wait() WARN_UNUSED_RESULT;
 
  private:
   RenderProcessHostWatcher exit_watcher_;
@@ -1162,15 +1162,15 @@
 
   // Waits until |render_process_host| from the constructor is terminated
   // because of a bad/invalid mojo message and returns the associated error
-  // string.  Returns base::nullopt if the process was terminated for an
+  // string.  Returns absl::nullopt if the process was terminated for an
   // unrelated reason.
-  base::Optional<std::string> Wait() WARN_UNUSED_RESULT;
+  absl::optional<std::string> Wait() WARN_UNUSED_RESULT;
 
  private:
   void OnBadMojoMessage(int render_process_id, const std::string& error);
 
   int monitored_render_process_id_;
-  base::Optional<std::string> observed_mojo_error_;
+  absl::optional<std::string> observed_mojo_error_;
   RenderProcessHostKillWaiter kill_waiter_;
 };
 
@@ -1655,7 +1655,7 @@
       const std::u16string& message,
       int32_t line_no,
       const std::u16string& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace) override;
+      const absl::optional<std::u16string>& untrusted_stack_trace) override;
 
   Filter filter_;
   std::string pattern_;
diff --git a/content/public/test/dump_accessibility_test_helper.cc b/content/public/test/dump_accessibility_test_helper.cc
index b544180..88b4881b4 100644
--- a/content/public/test/dump_accessibility_test_helper.cc
+++ b/content/public/test/dump_accessibility_test_helper.cc
@@ -218,7 +218,7 @@
 }
 
 // static
-base::Optional<std::vector<std::string>>
+absl::optional<std::vector<std::string>>
 DumpAccessibilityTestHelper::LoadExpectationFile(
     const base::FilePath& expected_file) {
   base::ScopedAllowBlockingForTesting allow_blocking;
@@ -232,7 +232,7 @@
   base::RemoveChars(expected_contents_raw, "\r", &expected_contents);
 
   if (!expected_contents.compare(0, strlen(kMarkSkipFile), kMarkSkipFile)) {
-    return base::nullopt;
+    return absl::nullopt;
   }
 
   std::vector<std::string> expected_lines =
diff --git a/content/public/test/dump_accessibility_test_helper.h b/content/public/test/dump_accessibility_test_helper.h
index b1fabc5..759b493 100644
--- a/content/public/test/dump_accessibility_test_helper.h
+++ b/content/public/test/dump_accessibility_test_helper.h
@@ -7,8 +7,8 @@
 
 #include "base/files/file_path.h"
 #include "base/gtest_prod_util.h"
-#include "base/optional.h"
 #include "content/public/browser/ax_inspect_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class CommandLine;
@@ -58,7 +58,7 @@
   // Loads the given expectation file and returns the contents. An expectation
   // file may be empty, in which case an empty vector is returned.
   // Returns nullopt if the file contains a skip marker.
-  static base::Optional<std::vector<std::string>> LoadExpectationFile(
+  static absl::optional<std::vector<std::string>> LoadExpectationFile(
       const base::FilePath& expected_file);
 
   // Compares the given actual dump against the given expectation and generates
diff --git a/content/public/test/fake_download_item.cc b/content/public/test/fake_download_item.cc
index 5cd2ba5f..99866a3b 100644
--- a/content/public/test/fake_download_item.cc
+++ b/content/public/test/fake_download_item.cc
@@ -202,7 +202,7 @@
   return download::DownloadItem::DownloadCreationType::TYPE_ACTIVE_DOWNLOAD;
 }
 
-const base::Optional<download::DownloadSchedule>&
+const absl::optional<download::DownloadSchedule>&
 FakeDownloadItem::GetDownloadSchedule() const {
   return download_schedule_;
 }
@@ -286,7 +286,7 @@
 }
 
 void FakeDownloadItem::OnDownloadScheduleChanged(
-    base::Optional<download::DownloadSchedule> schedule) {
+    absl::optional<download::DownloadSchedule> schedule) {
   NOTREACHED();
 }
 
@@ -338,7 +338,7 @@
   return dummy_url;
 }
 
-const base::Optional<url::Origin>& FakeDownloadItem::GetRequestInitiator()
+const absl::optional<url::Origin>& FakeDownloadItem::GetRequestInitiator()
     const {
   NOTREACHED();
   return dummy_origin;
diff --git a/content/public/test/fake_download_item.h b/content/public/test/fake_download_item.h
index 7d6bb80..52f302b 100644
--- a/content/public/test/fake_download_item.h
+++ b/content/public/test/fake_download_item.h
@@ -11,11 +11,11 @@
 #include "base/callback_forward.h"
 #include "base/files/file_path.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "components/download/public/common/download_danger_type.h"
 #include "components/download/public/common/download_interrupt_reasons.h"
 #include "components/download/public/common/download_item.h"
 #include "components/download/public/common/download_source.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/base/page_transition_types.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -57,7 +57,7 @@
   bool IsTransient() const override;
   bool IsParallelDownload() const override;
   DownloadCreationType GetDownloadCreationType() const override;
-  const base::Optional<download::DownloadSchedule>& GetDownloadSchedule()
+  const absl::optional<download::DownloadSchedule>& GetDownloadSchedule()
       const override;
   bool IsDone() const override;
   const std::string& GetETag() const override;
@@ -72,7 +72,7 @@
   const GURL& GetSiteUrl() const override;
   const GURL& GetTabUrl() const override;
   const GURL& GetTabReferrerUrl() const override;
-  const base::Optional<url::Origin>& GetRequestInitiator() const override;
+  const absl::optional<url::Origin>& GetRequestInitiator() const override;
   std::string GetSuggestedFilename() const override;
   std::string GetContentDisposition() const override;
   std::string GetOriginalMimeType() const override;
@@ -127,7 +127,7 @@
   void OnAsyncScanningCompleted(
       download::DownloadDangerType danger_type) override;
   void OnDownloadScheduleChanged(
-      base::Optional<download::DownloadSchedule> schedule) override;
+      absl::optional<download::DownloadSchedule> schedule) override;
   bool removed() const { return removed_; }
   void NotifyDownloadDestroyed();
   void NotifyDownloadRemoved();
@@ -185,12 +185,12 @@
   std::string etag_;
   std::string last_modified_time_;
   std::string hash_;
-  base::Optional<download::DownloadSchedule> download_schedule_;
+  absl::optional<download::DownloadSchedule> download_schedule_;
 
   // The members below are to be returned by methods, which return by reference.
   std::string dummy_string;
   GURL dummy_url;
-  base::Optional<url::Origin> dummy_origin;
+  absl::optional<url::Origin> dummy_origin;
   base::FilePath dummy_file_path;
 
   DISALLOW_COPY_AND_ASSIGN(FakeDownloadItem);
diff --git a/content/public/test/fake_frame_widget.cc b/content/public/test/fake_frame_widget.cc
index 4c30d1ab..7a9d81e 100644
--- a/content/public/test/fake_frame_widget.cc
+++ b/content/public/test/fake_frame_widget.cc
@@ -28,7 +28,7 @@
 }
 #endif
 
-base::Optional<bool> FakeFrameWidget::GetActive() const {
+absl::optional<bool> FakeFrameWidget::GetActive() const {
   return active_;
 }
 
@@ -43,7 +43,7 @@
 
 void FakeFrameWidget::SetViewportIntersection(
     blink::mojom::ViewportIntersectionStatePtr intersection_state,
-    const base::Optional<blink::VisualProperties>& visual_properties) {
+    const absl::optional<blink::VisualProperties>& visual_properties) {
   intersection_state_ = std::move(intersection_state);
 }
 
diff --git a/content/public/test/fake_frame_widget.h b/content/public/test/fake_frame_widget.h
index c58991af..6e600cd 100644
--- a/content/public/test/fake_frame_widget.h
+++ b/content/public/test/fake_frame_widget.h
@@ -33,7 +33,7 @@
   const blink::mojom::ViewportIntersectionStatePtr& GetIntersectionState()
       const;
 
-  base::Optional<bool> GetActive() const;
+  absl::optional<bool> GetActive() const;
 
  private:
   void DragTargetDragEnter(
@@ -85,13 +85,13 @@
       mojo::PendingReceiver<viz::mojom::InputTargetClient> receiver) override {}
   void SetViewportIntersection(
       blink::mojom::ViewportIntersectionStatePtr intersection_state,
-      const base::Optional<blink::VisualProperties>& visual_properties)
+      const absl::optional<blink::VisualProperties>& visual_properties)
       override;
 
   mojo::AssociatedReceiver<blink::mojom::FrameWidget> receiver_;
   base::i18n::TextDirection text_direction_ =
       base::i18n::TextDirection::UNKNOWN_DIRECTION;
-  base::Optional<bool> active_;
+  absl::optional<bool> active_;
   blink::mojom::ViewportIntersectionStatePtr intersection_state_;
 };
 
diff --git a/content/public/test/fake_local_frame.cc b/content/public/test/fake_local_frame.cc
index f57e2e1..7abe9743 100644
--- a/content/public/test/fake_local_frame.cc
+++ b/content/public/test/fake_local_frame.cc
@@ -88,7 +88,7 @@
 
 void FakeLocalFrame::AdvanceFocusInFrame(
     blink::mojom::FocusType focus_type,
-    const base::Optional<blink::RemoteFrameToken>& source_frame_token) {}
+    const absl::optional<blink::RemoteFrameToken>& source_frame_token) {}
 
 void FakeLocalFrame::AdvanceFocusInForm(blink::mojom::FocusType focus_type) {}
 
@@ -101,7 +101,7 @@
 void FakeLocalFrame::OnScreensChange() {}
 
 void FakeLocalFrame::PostMessageEvent(
-    const base::Optional<blink::RemoteFrameToken>& source_frame_token,
+    const absl::optional<blink::RemoteFrameToken>& source_frame_token,
     const std::u16string& source_origin,
     const std::u16string& target_origin,
     blink::TransferableMessage message) {}
@@ -147,7 +147,7 @@
     mojo::PendingReceiver<blink::mojom::ReportingObserver> receiver) {}
 
 void FakeLocalFrame::UpdateOpener(
-    const base::Optional<blink::FrameToken>& opener_frame_token) {}
+    const absl::optional<blink::FrameToken>& opener_frame_token) {}
 
 void FakeLocalFrame::MixedContentFound(
     const GURL& main_resource_url,
diff --git a/content/public/test/fake_local_frame.h b/content/public/test/fake_local_frame.h
index 373188c..5b54027 100644
--- a/content/public/test/fake_local_frame.h
+++ b/content/public/test/fake_local_frame.h
@@ -5,10 +5,10 @@
 #ifndef CONTENT_PUBLIC_TEST_FAKE_LOCAL_FRAME_H_
 #define CONTENT_PUBLIC_TEST_FAKE_LOCAL_FRAME_H_
 
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "mojo/public/cpp/bindings/associated_receiver_set.h"
 #include "mojo/public/cpp/bindings/pending_associated_receiver.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/messaging/transferable_message.h"
 #include "third_party/blink/public/mojom/devtools/devtools_agent.mojom-forward.h"
@@ -71,7 +71,7 @@
   void MediaPlayerActionAt(const gfx::Point& location,
                            blink::mojom::MediaPlayerActionPtr action) override;
   void AdvanceFocusInFrame(blink::mojom::FocusType focus_type,
-                           const base::Optional<blink::RemoteFrameToken>&
+                           const absl::optional<blink::RemoteFrameToken>&
                                source_frame_token) override;
   void AdvanceFocusInForm(blink::mojom::FocusType focus_type) override;
   void ReportContentSecurityPolicyViolation(
@@ -79,7 +79,7 @@
   void DidUpdateFramePolicy(const blink::FramePolicy& frame_policy) override;
   void OnScreensChange() override;
   void PostMessageEvent(
-      const base::Optional<blink::RemoteFrameToken>& source_frame_token,
+      const absl::optional<blink::RemoteFrameToken>& source_frame_token,
       const std::u16string& source_origin,
       const std::u16string& target_origin,
       blink::TransferableMessage message) override;
@@ -115,7 +115,7 @@
   void BindReportingObserver(
       mojo::PendingReceiver<blink::mojom::ReportingObserver> receiver) override;
   void UpdateOpener(
-      const base::Optional<blink::FrameToken>& opener_frame_token) override;
+      const absl::optional<blink::FrameToken>& opener_frame_token) override;
   void MixedContentFound(
       const GURL& main_resource_url,
       const GURL& mixed_content_url,
diff --git a/content/public/test/fake_remote_frame.cc b/content/public/test/fake_remote_frame.cc
index 7440635..34a437f 100644
--- a/content/public/test/fake_remote_frame.cc
+++ b/content/public/test/fake_remote_frame.cc
@@ -84,7 +84,7 @@
     blink::mojom::IntrinsicSizingInfoPtr sizing_info) {}
 
 void FakeRemoteFrame::UpdateOpener(
-    const base::Optional<blink::FrameToken>& opener_frame_token) {}
+    const absl::optional<blink::FrameToken>& opener_frame_token) {}
 
 void FakeRemoteFrame::FakeRemoteFrame::BindFrameHostReceiver(
     mojo::ScopedInterfaceEndpointHandle handle) {
diff --git a/content/public/test/fake_remote_frame.h b/content/public/test/fake_remote_frame.h
index b9713dd9..48b42025 100644
--- a/content/public/test/fake_remote_frame.h
+++ b/content/public/test/fake_remote_frame.h
@@ -84,7 +84,7 @@
           parsed_permissions_policy) override {}
   void DidUpdateFramePolicy(const blink::FramePolicy& frame_policy) override {}
   void UpdateOpener(
-      const base::Optional<blink::FrameToken>& opener_frame_token) override;
+      const absl::optional<blink::FrameToken>& opener_frame_token) override;
   void DetachAndDispose() override;
   void EnableAutoResize(const gfx::Size& min_size,
                         const gfx::Size& max_size) override;
diff --git a/content/public/test/focus_changed_observer.h b/content/public/test/focus_changed_observer.h
index 594a454..30f8e02 100644
--- a/content/public/test/focus_changed_observer.h
+++ b/content/public/test/focus_changed_observer.h
@@ -24,7 +24,7 @@
   void OnFocusChangedInPage(FocusedNodeDetails*) override;
 
   base::RunLoop run_loop_;
-  base::Optional<FocusedNodeDetails> observed_details_;
+  absl::optional<FocusedNodeDetails> observed_details_;
 
   DISALLOW_COPY_AND_ASSIGN(FocusChangedObserver);
 };
diff --git a/content/public/test/hit_test_region_observer.h b/content/public/test/hit_test_region_observer.h
index 7124389..b84d59b 100644
--- a/content/public/test/hit_test_region_observer.h
+++ b/content/public/test/hit_test_region_observer.h
@@ -8,11 +8,11 @@
 #include <memory>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "components/viz/common/hit_test/aggregated_hit_test_region.h"
 #include "components/viz/common/surfaces/frame_sink_id.h"
 #include "components/viz/host/hit_test/hit_test_region_observer.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 class RenderFrameHost;
diff --git a/content/public/test/mock_download_manager.cc b/content/public/test/mock_download_manager.cc
index 0cb92ef..504cd5db 100644
--- a/content/public/test/mock_download_manager.cc
+++ b/content/public/test/mock_download_manager.cc
@@ -19,7 +19,7 @@
     const GURL& site_url,
     const GURL& tab_url,
     const GURL& tab_referrer_url,
-    const base::Optional<url::Origin>& request_initiator,
+    const absl::optional<url::Origin>& request_initiator,
     const std::string& mime_type,
     const std::string& original_mime_type,
     base::Time start_time,
@@ -122,7 +122,7 @@
     const GURL& site_url,
     const GURL& tab_url,
     const GURL& tab_referrer_url,
-    const base::Optional<url::Origin>& request_initiator,
+    const absl::optional<url::Origin>& request_initiator,
     const std::string& mime_type,
     const std::string& original_mime_type,
     base::Time start_time,
diff --git a/content/public/test/mock_download_manager.h b/content/public/test/mock_download_manager.h
index db24e72..a12c452 100644
--- a/content/public/test/mock_download_manager.h
+++ b/content/public/test/mock_download_manager.h
@@ -11,12 +11,12 @@
 #include <utility>
 #include <vector>
 
-#include "base/optional.h"
 #include "components/download/public/common/download_url_parameters.h"
 #include "components/download/public/common/input_stream.h"
 #include "content/public/browser/download_manager.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "url/origin.h"
 
@@ -41,7 +41,7 @@
     GURL site_url;
     GURL tab_url;
     GURL tab_referrer_url;
-    base::Optional<url::Origin> request_initiator;
+    absl::optional<url::Origin> request_initiator;
     std::string mime_type;
     std::string original_mime_type;
     base::Time start_time;
@@ -69,7 +69,7 @@
         const GURL& site_url,
         const GURL& tab_url,
         const GURL& tab_refererr_url,
-        const base::Optional<url::Origin>& request_initiator,
+        const absl::optional<url::Origin>& request_initiator,
         const std::string& mime_type,
         const std::string& original_mime_type,
         base::Time start_time,
@@ -131,7 +131,7 @@
       const GURL& site_url,
       const GURL& tab_url,
       const GURL& tab_refererr_url,
-      const base::Optional<url::Origin>& request_initiator,
+      const absl::optional<url::Origin>& request_initiator,
       const std::string& mime_type,
       const std::string& original_mime_type,
       base::Time start_time,
diff --git a/content/public/test/mock_navigation_handle.h b/content/public/test/mock_navigation_handle.h
index c52791c..3c5e58f 100644
--- a/content/public/test/mock_navigation_handle.h
+++ b/content/public/test/mock_navigation_handle.h
@@ -109,10 +109,10 @@
     return response_headers_.get();
   }
   MOCK_METHOD0(GetConnectionInfo, net::HttpResponseInfo::ConnectionInfo());
-  const base::Optional<net::SSLInfo>& GetSSLInfo() override {
+  const absl::optional<net::SSLInfo>& GetSSLInfo() override {
     return ssl_info_;
   }
-  const base::Optional<net::AuthChallengeInfo>& GetAuthChallengeInfo()
+  const absl::optional<net::AuthChallengeInfo>& GetAuthChallengeInfo()
       override {
     return auth_challenge_info_;
   }
@@ -132,15 +132,15 @@
   bool WasResponseCached() override { return was_response_cached_; }
   const net::ProxyServer& GetProxyServer() override { return proxy_server_; }
   const std::string& GetHrefTranslate() override { return href_translate_; }
-  const base::Optional<blink::Impression>& GetImpression() override {
+  const absl::optional<blink::Impression>& GetImpression() override {
     return impression_;
   }
-  const base::Optional<blink::LocalFrameToken>& GetInitiatorFrameToken()
+  const absl::optional<blink::LocalFrameToken>& GetInitiatorFrameToken()
       override {
     return initiator_frame_token_;
   }
   int GetInitiatorProcessID() override { return initiator_process_id_; }
-  const base::Optional<url::Origin>& GetInitiatorOrigin() override {
+  const absl::optional<url::Origin>& GetInitiatorOrigin() override {
     return initiator_origin_;
   }
   const std::vector<std::string>& GetDnsAliases() override {
@@ -254,18 +254,18 @@
   bool is_error_page_ = false;
   net::HttpRequestHeaders request_headers_;
   scoped_refptr<net::HttpResponseHeaders> response_headers_;
-  base::Optional<net::SSLInfo> ssl_info_;
-  base::Optional<net::AuthChallengeInfo> auth_challenge_info_;
+  absl::optional<net::SSLInfo> ssl_info_;
+  absl::optional<net::AuthChallengeInfo> auth_challenge_info_;
   net::ResolveErrorInfo resolve_error_info_;
   content::GlobalRequestID global_request_id_;
   bool is_form_submission_ = false;
   bool was_response_cached_ = false;
   net::ProxyServer proxy_server_;
-  base::Optional<url::Origin> initiator_origin_;
+  absl::optional<url::Origin> initiator_origin_;
   ReloadType reload_type_ = content::ReloadType::NONE;
   std::string href_translate_;
-  base::Optional<blink::Impression> impression_;
-  base::Optional<blink::LocalFrameToken> initiator_frame_token_;
+  absl::optional<blink::Impression> impression_;
+  absl::optional<blink::LocalFrameToken> initiator_frame_token_;
   int initiator_process_id_ = ChildProcessHost::kInvalidUniqueID;
 };
 
diff --git a/content/public/test/mock_web_contents_observer.h b/content/public/test/mock_web_contents_observer.h
index f37cc15a..dcdee31 100644
--- a/content/public/test/mock_web_contents_observer.h
+++ b/content/public/test/mock_web_contents_observer.h
@@ -278,12 +278,12 @@
   MOCK_METHOD(void, OnBackgroundColorChanged, (), (override));
   MOCK_METHOD(void,
               OnDidAddMessageToConsole,
-              (RenderFrameHost* source_frame,
+              (RenderFrameHost * source_frame,
                blink::mojom::ConsoleMessageLevel log_level,
                const std::u16string& message,
                int32_t line_no,
                const std::u16string& source_id,
-               const base::Optional<std::u16string>& untrusted_stack_trace),
+               const absl::optional<std::u16string>& untrusted_stack_trace),
               (override));
   MOCK_METHOD(void,
               MediaStartedPlaying,
@@ -336,8 +336,8 @@
               (override));
   MOCK_METHOD(void,
               DidUpdateWebManifestURL,
-              (RenderFrameHost* target_frame,
-               const base::Optional<GURL>& manifest_url),
+              (RenderFrameHost * target_frame,
+               const absl::optional<GURL>& manifest_url),
               (override));
   MOCK_METHOD(void,
               OnInterfaceRequestFromFrame,
diff --git a/content/public/test/navigation_handle_observer.h b/content/public/test/navigation_handle_observer.h
index 1e113d6..06cf6bc 100644
--- a/content/public/test/navigation_handle_observer.h
+++ b/content/public/test/navigation_handle_observer.h
@@ -38,7 +38,7 @@
   int64_t navigation_id() { return navigation_id_; }
   bool is_download() { return is_download_; }
   ukm::SourceId next_page_ukm_source_id() { return next_page_ukm_source_id_; }
-  base::Optional<net::AuthChallengeInfo> auth_challenge_info() {
+  absl::optional<net::AuthChallengeInfo> auth_challenge_info() {
     return auth_challenge_info_;
   }
   const net::ResolveErrorInfo& resolve_error_info() {
@@ -70,7 +70,7 @@
   int64_t navigation_id_ = -1;
   bool is_download_ = false;
   ukm::SourceId next_page_ukm_source_id_ = ukm::kInvalidSourceId;
-  base::Optional<net::AuthChallengeInfo> auth_challenge_info_;
+  absl::optional<net::AuthChallengeInfo> auth_challenge_info_;
   net::ResolveErrorInfo resolve_error_info_;
   base::TimeTicks navigation_start_;
   NavigationHandleTiming navigation_handle_timing_;
diff --git a/content/public/test/network_service_test_helper.cc b/content/public/test/network_service_test_helper.cc
index e5a714b..b49cd6c 100644
--- a/content/public/test/network_service_test_helper.cc
+++ b/content/public/test/network_service_test_helper.cc
@@ -245,7 +245,7 @@
   }
 
   void SetSCTAuditingRetryDelay(
-      base::Optional<base::TimeDelta> delay,
+      absl::optional<base::TimeDelta> delay,
       SetSCTAuditingRetryDelayCallback callback) override {
     network::NetworkService::GetNetworkServiceForTesting()
         ->sct_auditing_cache()
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index e11dfe0..f962ef6 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -11,7 +11,6 @@
 #include "base/bind.h"
 #include "base/callback_helpers.h"
 #include "base/location.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "build/build_config.h"
@@ -41,6 +40,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "net/base/escape.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/dom_storage/session_storage_namespace_id.h"
 #include "third_party/blink/public/common/input/web_gesture_event.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
@@ -139,7 +139,7 @@
       base::TimeDelta timeout_interval,
       blink::WebURLLoaderClient* client,
       blink::WebURLResponse&,
-      base::Optional<blink::WebURLError>&,
+      absl::optional<blink::WebURLError>&,
       blink::WebData&,
       int64_t&,
       int64_t&,
@@ -493,7 +493,7 @@
   process_ = std::make_unique<RenderProcess>();
 
   mojom::CreateViewParamsPtr view_params = mojom::CreateViewParams::New();
-  view_params->opener_frame_token = base::nullopt;
+  view_params->opener_frame_token = absl::nullopt;
   view_params->window_was_created_with_opener = false;
   view_params->renderer_preferences = blink::RendererPreferences();
   view_params->web_preferences = blink::web_pref::WebPreferences();
@@ -757,7 +757,7 @@
 
 void RenderViewTest::Reload(const GURL& url) {
   auto common_params = mojom::CommonNavigationParams::New(
-      url, base::nullopt, blink::mojom::Referrer::New(),
+      url, absl::nullopt, blink::mojom::Referrer::New(),
       ui::PAGE_TRANSITION_LINK, mojom::NavigationType::RELOAD,
       blink::NavigationDownloadPolicy(), false, GURL(), GURL(),
       blink::PreviewsTypes::PREVIEWS_UNSPECIFIED, base::TimeTicks::Now(), "GET",
@@ -894,7 +894,7 @@
   int pending_offset = offset + webview->HistoryBackListCount();
 
   auto common_params = mojom::CommonNavigationParams::New(
-      url, base::nullopt, blink::mojom::Referrer::New(),
+      url, absl::nullopt, blink::mojom::Referrer::New(),
       ui::PAGE_TRANSITION_FORWARD_BACK,
       mojom::NavigationType::HISTORY_DIFFERENT_DOCUMENT,
       blink::NavigationDownloadPolicy(), false, GURL(), GURL(),
diff --git a/content/public/test/scoped_page_focus_override.cc b/content/public/test/scoped_page_focus_override.cc
index bdf04be..0585642 100644
--- a/content/public/test/scoped_page_focus_override.cc
+++ b/content/public/test/scoped_page_focus_override.cc
@@ -11,10 +11,10 @@
 #include "base/containers/span.h"
 #include "base/json/json_reader.h"
 #include "base/json/json_writer.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/values.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -35,11 +35,11 @@
     base::span<const uint8_t> message) {
   base::StringPiece message_str(reinterpret_cast<const char*>(message.data()),
                                 message.size());
-  base::Optional<base::Value> parsed_message =
+  absl::optional<base::Value> parsed_message =
       base::JSONReader::Read(message_str);
   ASSERT_TRUE(parsed_message.has_value());
 
-  base::Optional<int> id = parsed_message->FindIntPath("id");
+  absl::optional<int> id = parsed_message->FindIntPath("id");
   if (!id || !*id || *id != last_sent_id_)
     return;
 
diff --git a/content/public/test/service_worker_test_helpers.cc b/content/public/test/service_worker_test_helpers.cc
index 5da4f5a..3aee035 100644
--- a/content/public/test/service_worker_test_helpers.cc
+++ b/content/public/test/service_worker_test_helpers.cc
@@ -110,7 +110,7 @@
                         base::DoNothing());
   version->endpoint()->DispatchNotificationClickEvent(
       "notification_id", notification_data, -1 /* action_index */,
-      base::nullopt /* reply */,
+      absl::nullopt /* reply */,
       base::BindOnce([](blink::mojom::ServiceWorkerEventStatus event_status) {
         DCHECK_EQ(blink::mojom::ServiceWorkerEventStatus::COMPLETED,
                   event_status);
diff --git a/content/public/test/signed_exchange_browser_test_helper.cc b/content/public/test/signed_exchange_browser_test_helper.cc
index 17e8e4c..c2a77ed1 100644
--- a/content/public/test/signed_exchange_browser_test_helper.cc
+++ b/content/public/test/signed_exchange_browser_test_helper.cc
@@ -42,7 +42,7 @@
 void SignedExchangeBrowserTestHelper::TearDownOnMainThread() {
   interceptor_.reset();
   signed_exchange_utils::SetVerificationTimeForTesting(
-      base::Optional<base::Time>());
+      absl::optional<base::Time>());
 }
 
 scoped_refptr<net::X509Certificate>
diff --git a/content/public/test/test_download_http_response.h b/content/public/test/test_download_http_response.h
index 0293355..574de3c 100644
--- a/content/public/test/test_download_http_response.h
+++ b/content/public/test/test_download_http_response.h
@@ -9,13 +9,13 @@
 #include <vector>
 
 #include "base/containers/queue.h"
-#include "base/optional.h"
 #include "base/sequence_checker.h"
 #include "net/http/http_byte_range.h"
 #include "net/http/http_response_info.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 #include "net/test/embedded_test_server/http_request.h"
 #include "net/test/embedded_test_server/http_response.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace net {
 class HttpByteRange;
@@ -189,7 +189,7 @@
 
     // Offset of body to pause the response sending. A -1 offset will pause
     // the response before header is sent.
-    base::Optional<int64_t> pause_offset;
+    absl::optional<int64_t> pause_offset;
   };
 
   // Information about completed requests.
diff --git a/content/public/test/test_frame_navigation_observer.h b/content/public/test/test_frame_navigation_observer.h
index eb0091c..075412e 100644
--- a/content/public/test/test_frame_navigation_observer.h
+++ b/content/public/test/test_frame_navigation_observer.h
@@ -60,7 +60,7 @@
   bool last_navigation_succeeded_;
 
   // Saved parameters from NavigationHandle.
-  base::Optional<ui::PageTransition> transition_type_;
+  absl::optional<ui::PageTransition> transition_type_;
   GURL last_committed_url_;
 
   // The RunLoop used to spin the message loop.
diff --git a/content/public/test/test_navigation_observer.cc b/content/public/test/test_navigation_observer.cc
index 94c6a731..65942c47 100644
--- a/content/public/test/test_navigation_observer.cc
+++ b/content/public/test/test_navigation_observer.cc
@@ -70,8 +70,8 @@
     bool ignore_uncommitted_navigations)
     : TestNavigationObserver(web_contents,
                              number_of_navigations,
-                             base::nullopt /* target_url */,
-                             base::nullopt /* target_error */,
+                             absl::nullopt /* target_url */,
+                             absl::nullopt /* target_error */,
                              quit_mode,
                              ignore_uncommitted_navigations) {}
 
@@ -91,7 +91,7 @@
     : TestNavigationObserver(nullptr,
                              1 /* num_of_navigations */,
                              target_url,
-                             base::nullopt /* target_error */,
+                             absl::nullopt /* target_error */,
                              quit_mode,
                              ignore_uncommitted_navigations) {}
 
@@ -102,7 +102,7 @@
     bool ignore_uncommitted_navigations)
     : TestNavigationObserver(web_contents,
                              1 /* num_of_navigations */,
-                             base::nullopt,
+                             absl::nullopt,
                              target_error,
                              quit_mode,
                              ignore_uncommitted_navigations) {}
@@ -154,8 +154,8 @@
 TestNavigationObserver::TestNavigationObserver(
     WebContents* web_contents,
     int number_of_navigations,
-    const base::Optional<GURL>& target_url,
-    base::Optional<net::Error> target_error,
+    const absl::optional<GURL>& target_url,
+    absl::optional<net::Error> target_error,
     MessageLoopRunner::QuitMode quit_mode,
     bool ignore_uncommitted_navigations)
     : wait_event_(WaitEvent::kLoadStopped),
diff --git a/content/public/test/test_navigation_observer.h b/content/public/test/test_navigation_observer.h
index 2f59192..473944a 100644
--- a/content/public/test/test_navigation_observer.h
+++ b/content/public/test/test_navigation_observer.h
@@ -11,10 +11,10 @@
 #include "base/callback.h"
 #include "base/containers/unique_ptr_adapters.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/public/browser/navigation_type.h"
 #include "content/public/test/test_utils.h"
 #include "net/base/net_errors.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace content {
@@ -88,14 +88,14 @@
 
   // Returns the initiator origin of the last finished navigation (that matched
   // URL / net error filters, if set).
-  const base::Optional<url::Origin>& last_initiator_origin() const {
+  const absl::optional<url::Origin>& last_initiator_origin() const {
     return last_navigation_initiator_origin_;
   }
 
   // Returns the frame token of the initiator RenderFrameHost of the last
   // finished navigation. This is defined if and only if
   // last_initiator_process_id below is.
-  const base::Optional<blink::LocalFrameToken>& last_initiator_frame_token()
+  const absl::optional<blink::LocalFrameToken>& last_initiator_frame_token()
       const {
     return last_initiator_frame_token_;
   }
@@ -151,8 +151,8 @@
 
   TestNavigationObserver(WebContents* web_contents,
                          int number_of_navigations,
-                         const base::Optional<GURL>& target_url,
-                         base::Optional<net::Error> target_error,
+                         const absl::optional<GURL>& target_url,
+                         absl::optional<net::Error> target_error,
                          MessageLoopRunner::QuitMode quit_mode =
                              MessageLoopRunner::QuitMode::IMMEDIATE,
                          bool ignore_uncommitted_navigations = true);
@@ -192,11 +192,11 @@
 
   // The URL to wait for.
   // If this is nullopt, any URL counts.
-  const base::Optional<GURL> target_url_;
+  const absl::optional<GURL> target_url_;
 
   // The net error of the finished navigation to wait for.
   // If this is nullopt, any net::Error counts.
-  const base::Optional<net::Error> target_error_;
+  const absl::optional<net::Error> target_error_;
 
   // Whether to ignore navigations that finish but don't commit.
   bool ignore_uncommitted_navigations_;
@@ -208,12 +208,12 @@
   bool last_navigation_succeeded_;
 
   // The initiator origin of the last navigation.
-  base::Optional<url::Origin> last_navigation_initiator_origin_;
+  absl::optional<url::Origin> last_navigation_initiator_origin_;
 
   // The frame token of the initiator frame for the last observed
   // navigation. This parameter is defined if and only if
   // |initiator_process_id_| below is.
-  base::Optional<blink::LocalFrameToken> last_initiator_frame_token_;
+  absl::optional<blink::LocalFrameToken> last_initiator_frame_token_;
 
   // The process id of the initiator frame for the last observed navigation.
   // This is defined if and only if |initiator_frame_token_| above is, and it is
diff --git a/content/public/test/test_navigation_throttle.cc b/content/public/test/test_navigation_throttle.cc
index 4755cc06..ab28508 100644
--- a/content/public/test/test_navigation_throttle.cc
+++ b/content/public/test/test_navigation_throttle.cc
@@ -5,10 +5,10 @@
 #include "content/public/test/test_navigation_throttle.h"
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "content/public/browser/browser_task_traits.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/navigation_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/public/test/test_navigation_throttle.h b/content/public/test/test_navigation_throttle.h
index ca1f04e..25073c2 100644
--- a/content/public/test/test_navigation_throttle.h
+++ b/content/public/test/test_navigation_throttle.h
@@ -8,8 +8,8 @@
 #include "base/callback.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/public/browser/navigation_throttle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/public/test/test_renderer_host.h b/content/public/test/test_renderer_host.h
index a046d09..287944c 100644
--- a/content/public/test/test_renderer_host.h
+++ b/content/public/test/test_renderer_host.h
@@ -13,7 +13,6 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/test/task_environment.h"
 #include "build/build_config.h"
 #include "content/public/browser/render_frame_host.h"
@@ -21,6 +20,7 @@
 #include "content/public/test/browser_task_environment.h"
 #include "content/public/test/browser_test_utils.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/synthetic_web_input_event_builders.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "ui/base/page_transition_types.h"
@@ -136,7 +136,7 @@
 
   // Simulates the receipt of a manifest URL.
   virtual void SimulateManifestURLUpdate(
-      const base::Optional<GURL>& manifest_url) = 0;
+      const absl::optional<GURL>& manifest_url) = 0;
 };
 
 // An interface and utility for driving tests of RenderViewHost.
diff --git a/content/public/test/test_utils.h b/content/public/test/test_utils.h
index a14af6cd..b74ff7f 100644
--- a/content/public/test/test_utils.h
+++ b/content/public/test/test_utils.h
@@ -329,7 +329,7 @@
   void BrowserChildProcessHostDisconnected(
       const ChildProcessData& data) override;
 
-  base::Optional<base::RunLoop> run_loop_;
+  absl::optional<base::RunLoop> run_loop_;
 
   DISALLOW_COPY_AND_ASSIGN(InProcessUtilityThreadHelper);
 };
diff --git a/content/public/test/test_web_ui_listener_observer.h b/content/public/test/test_web_ui_listener_observer.h
index fab32a9..a55c2a0 100644
--- a/content/public/test/test_web_ui_listener_observer.h
+++ b/content/public/test/test_web_ui_listener_observer.h
@@ -44,7 +44,7 @@
   base::RunLoop run_loop_;
 
   // Only filled when a matching listener call has been observed.
-  base::Optional<std::vector<base::Value>> call_args_;
+  absl::optional<std::vector<base::Value>> call_args_;
 };
 
 }  // namespace content
diff --git a/content/public/test/url_loader_interceptor.cc b/content/public/test/url_loader_interceptor.cc
index 4ddef68..5381332 100644
--- a/content/public/test/url_loader_interceptor.cc
+++ b/content/public/test/url_loader_interceptor.cc
@@ -547,7 +547,7 @@
     base::StringPiece headers,
     base::StringPiece body,
     network::mojom::URLLoaderClient* client,
-    base::Optional<net::SSLInfo> ssl_info) {
+    absl::optional<net::SSLInfo> ssl_info) {
   net::HttpResponseInfo info;
   info.headers = base::MakeRefCounted<net::HttpResponseHeaders>(
       net::HttpUtil::AssembleRawHeaders(headers));
@@ -564,7 +564,7 @@
     const std::string& relative_path,
     network::mojom::URLLoaderClient* client,
     const std::string* headers,
-    base::Optional<net::SSLInfo> ssl_info) {
+    absl::optional<net::SSLInfo> ssl_info) {
   return WriteResponse(GetDataFilePath(relative_path), client, headers,
                        std::move(ssl_info));
 }
@@ -573,7 +573,7 @@
     const base::FilePath& file_path,
     network::mojom::URLLoaderClient* client,
     const std::string* headers,
-    base::Optional<net::SSLInfo> ssl_info) {
+    absl::optional<net::SSLInfo> ssl_info) {
   base::ScopedAllowBlockingForTesting allow_io;
   std::string headers_str;
   if (headers) {
diff --git a/content/public/test/url_loader_interceptor.h b/content/public/test/url_loader_interceptor.h
index 097e756..4d2535f1 100644
--- a/content/public/test/url_loader_interceptor.h
+++ b/content/public/test/url_loader_interceptor.h
@@ -113,7 +113,7 @@
       base::StringPiece headers,
       base::StringPiece body,
       network::mojom::URLLoaderClient* client,
-      base::Optional<net::SSLInfo> ssl_info = base::nullopt);
+      absl::optional<net::SSLInfo> ssl_info = absl::nullopt);
 
   // Reads the given path, relative to the root source directory, and writes it
   // to |client|. For headers:
@@ -127,14 +127,14 @@
       const std::string& relative_path,
       network::mojom::URLLoaderClient* client,
       const std::string* headers = nullptr,
-      base::Optional<net::SSLInfo> ssl_info = base::nullopt);
+      absl::optional<net::SSLInfo> ssl_info = absl::nullopt);
 
   // Like above, but uses an absolute file path.
   static void WriteResponse(
       const base::FilePath& file_path,
       network::mojom::URLLoaderClient* client,
       const std::string* headers = nullptr,
-      base::Optional<net::SSLInfo> ssl_info = base::nullopt);
+      absl::optional<net::SSLInfo> ssl_info = absl::nullopt);
 
   // Attempts to write |body| to |client| and complete the load with status OK.
   // client->OnReceiveResponse() must have been called prior to this.
diff --git a/content/public/test/url_loader_monitor.cc b/content/public/test/url_loader_monitor.cc
index 29f0f8f..ced0169 100644
--- a/content/public/test/url_loader_monitor.cc
+++ b/content/public/test/url_loader_monitor.cc
@@ -23,12 +23,12 @@
   interceptor_.reset();
 }
 
-base::Optional<network::ResourceRequest> URLLoaderMonitor::GetRequestInfo(
+absl::optional<network::ResourceRequest> URLLoaderMonitor::GetRequestInfo(
     const GURL& url) {
   base::AutoLock autolock(lock_);
   const auto resource_request = resource_request_map_.find(url);
   if (resource_request == resource_request_map_.end())
-    return base::nullopt;
+    return absl::nullopt;
   return resource_request->second;
 }
 
diff --git a/content/public/test/url_loader_monitor.h b/content/public/test/url_loader_monitor.h
index 63df3c7..6dfb23e 100644
--- a/content/public/test/url_loader_monitor.h
+++ b/content/public/test/url_loader_monitor.h
@@ -9,12 +9,12 @@
 #include <memory>
 #include <set>
 
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/synchronization/lock.h"
 #include "base/thread_annotations.h"
 #include "content/public/test/url_loader_interceptor.h"
 #include "services/network/public/cpp/resource_request.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace base {
@@ -37,7 +37,7 @@
 
   // Returns the network::ResourceRequest for the most recently observed request
   // to |url|. If no such request has been observed, returns nullptr.
-  base::Optional<network::ResourceRequest> GetRequestInfo(const GURL& url);
+  absl::optional<network::ResourceRequest> GetRequestInfo(const GURL& url);
 
   // Waits for the URLs passed in to the constructor to all be observers. All
   // URLs observed after the constructor is invoked are counted.
diff --git a/content/public/test/web_ui_browsertest_util.cc b/content/public/test/web_ui_browsertest_util.cc
index ffd921e..3ba3cd56 100644
--- a/content/public/test/web_ui_browsertest_util.cc
+++ b/content/public/test/web_ui_browsertest_util.cc
@@ -58,7 +58,7 @@
   bool disable_xfo = false;
   bool disable_trusted_types = false;
   std::vector<std::string> requestable_schemes;
-  base::Optional<std::vector<std::string>> frame_ancestors;
+  absl::optional<std::vector<std::string>> frame_ancestors;
 };
 
 class TestWebUIController : public WebUIController {
@@ -108,7 +108,7 @@
 void AddUntrustedDataSource(
     BrowserContext* browser_context,
     const std::string& host,
-    base::Optional<TestUntrustedDataSourceHeaders> headers) {
+    absl::optional<TestUntrustedDataSourceHeaders> headers) {
   auto* untrusted_data_source =
       WebUIDataSource::Create(GetChromeUntrustedUIURL(host).spec());
   untrusted_data_source->SetRequestFilter(
diff --git a/content/public/test/web_ui_browsertest_util.h b/content/public/test/web_ui_browsertest_util.h
index dfef24b..bba197b1 100644
--- a/content/public/test/web_ui_browsertest_util.h
+++ b/content/public/test/web_ui_browsertest_util.h
@@ -9,9 +9,9 @@
 #include <string>
 #include <utility>
 
-#include "base/optional.h"
 #include "content/public/browser/web_ui_controller_factory.h"
 #include "services/network/public/mojom/cross_origin_opener_policy.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -20,23 +20,23 @@
   TestUntrustedDataSourceHeaders(const TestUntrustedDataSourceHeaders& other);
   ~TestUntrustedDataSourceHeaders();
 
-  base::Optional<std::string> child_src = base::nullopt;
-  base::Optional<std::string> script_src = base::nullopt;
-  base::Optional<std::string> default_src = base::nullopt;
+  absl::optional<std::string> child_src = absl::nullopt;
+  absl::optional<std::string> script_src = absl::nullopt;
+  absl::optional<std::string> default_src = absl::nullopt;
   // Trusted Types is enabled by default for TestUntrustedDataSource.
   // Setting this to true will disable Trusted Types.
   bool no_trusted_types = false;
   bool no_xfo = false;
-  base::Optional<std::vector<std::string>> frame_ancestors = base::nullopt;
-  base::Optional<network::mojom::CrossOriginOpenerPolicyValue>
-      cross_origin_opener_policy = base::nullopt;
+  absl::optional<std::vector<std::string>> frame_ancestors = absl::nullopt;
+  absl::optional<network::mojom::CrossOriginOpenerPolicyValue>
+      cross_origin_opener_policy = absl::nullopt;
 };
 
 // Adds a DataSource for chrome-untrusted://|host| URLs.
 void AddUntrustedDataSource(
     BrowserContext* browser_context,
     const std::string& host,
-    base::Optional<TestUntrustedDataSourceHeaders> headers = base::nullopt);
+    absl::optional<TestUntrustedDataSourceHeaders> headers = absl::nullopt);
 
 // Returns chrome-untrusted://|host_and_path| as a GURL.
 GURL GetChromeUntrustedUIURL(const std::string& host_and_path);
diff --git a/content/renderer/accessibility/ax_image_annotator.cc b/content/renderer/accessibility/ax_image_annotator.cc
index 1375b70..6402933 100644
--- a/content/renderer/accessibility/ax_image_annotator.cc
+++ b/content/renderer/accessibility/ax_image_annotator.cc
@@ -234,7 +234,7 @@
     : image_processor_(
           base::BindRepeating(&AXImageAnnotator::GetImageData, image)),
       status_(ax::mojom::ImageAnnotationStatus::kAnnotationPending),
-      annotation_(base::nullopt) {}
+      annotation_(absl::nullopt) {}
 
 AXImageAnnotator::ImageInfo::~ImageInfo() = default;
 
diff --git a/content/renderer/accessibility/ax_image_annotator.h b/content/renderer/accessibility/ax_image_annotator.h
index 6f4e071..a629e25 100644
--- a/content/renderer/accessibility/ax_image_annotator.h
+++ b/content/renderer/accessibility/ax_image_annotator.h
@@ -12,13 +12,13 @@
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list_types.h"
-#include "base/optional.h"
 #include "content/common/content_export.h"
 #include "content/renderer/accessibility/render_accessibility_impl.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "services/image_annotation/public/cpp/image_processor.h"
 #include "services/image_annotation/public/mojom/image_annotation.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/skia/include/core/SkBitmap.h"
 #include "ui/accessibility/ax_enums.mojom.h"
 
@@ -85,7 +85,7 @@
    private:
     image_annotation::ImageProcessor image_processor_;
     ax::mojom::ImageAnnotationStatus status_;
-    base::Optional<std::string> annotation_;
+    absl::optional<std::string> annotation_;
   };
 
   // Retrieves the image data from the renderer.
diff --git a/content/renderer/accessibility/blink_ax_tree_source.h b/content/renderer/accessibility/blink_ax_tree_source.h
index 340aefb5..f382301c 100644
--- a/content/renderer/accessibility/blink_ax_tree_source.h
+++ b/content/renderer/accessibility/blink_ax_tree_source.h
@@ -10,8 +10,8 @@
 #include <set>
 #include <string>
 
-#include "base/optional.h"
 #include "content/common/content_export.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/web/web_ax_object.h"
 #include "third_party/blink/public/web/web_document.h"
 #include "ui/accessibility/ax_common.h"
@@ -88,7 +88,7 @@
   }
   void RemoveImageAnnotator() {
     image_annotator_ = nullptr;
-    first_unlabeled_image_id_ = base::nullopt;
+    first_unlabeled_image_id_ = absl::nullopt;
   }
 
   // Query or update a set of IDs for which we should load inline text boxes.
@@ -196,7 +196,7 @@
   //
   // Used to ensure that the tutor message that explains to screen reader users
   // how to turn on automatic image labels is provided only once.
-  mutable base::Optional<int32_t> first_unlabeled_image_id_ = base::nullopt;
+  mutable absl::optional<int32_t> first_unlabeled_image_id_ = absl::nullopt;
 
   // Current bounding box of every object, so we can detect when it moves.
   mutable std::unordered_map<int, ui::AXRelativeBounds> cached_bounding_boxes_;
diff --git a/content/renderer/agent_scheduling_group.cc b/content/renderer/agent_scheduling_group.cc
index 6c65f8e..59c98f4 100644
--- a/content/renderer/agent_scheduling_group.cc
+++ b/content/renderer/agent_scheduling_group.cc
@@ -217,7 +217,7 @@
 void AgentSchedulingGroup::CreateFrameProxy(
     const blink::RemoteFrameToken& token,
     int32_t routing_id,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int32_t view_routing_id,
     int32_t parent_routing_id,
     blink::mojom::FrameReplicationStatePtr replicated_state,
diff --git a/content/renderer/agent_scheduling_group.h b/content/renderer/agent_scheduling_group.h
index 9cfc552..ecd3bb4a 100644
--- a/content/renderer/agent_scheduling_group.h
+++ b/content/renderer/agent_scheduling_group.h
@@ -93,7 +93,7 @@
   void CreateFrameProxy(
       const blink::RemoteFrameToken& token,
       int32_t routing_id,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int32_t view_routing_id,
       int32_t parent_routing_id,
       blink::mojom::FrameReplicationStatePtr replicated_state,
diff --git a/content/renderer/content_security_policy_util.cc b/content/renderer/content_security_policy_util.cc
index 1267b3a..86b3311 100644
--- a/content/renderer/content_security_policy_util.cc
+++ b/content/renderer/content_security_policy_util.cc
@@ -98,10 +98,10 @@
           source_list->report_sample};
 }
 
-base::Optional<blink::WebCSPTrustedTypes> ToOptionalWebCSPTrustedTypes(
+absl::optional<blink::WebCSPTrustedTypes> ToOptionalWebCSPTrustedTypes(
     network::mojom::CSPTrustedTypesPtr trusted_types) {
   if (!trusted_types)
-    return base::nullopt;
+    return absl::nullopt;
   return blink::WebCSPTrustedTypes{
       ToWebVectorOfWebStrings(std::move(trusted_types->list)),
       trusted_types->allow_any, trusted_types->allow_duplicates};
diff --git a/content/renderer/gpu_benchmarking_extension.cc b/content/renderer/gpu_benchmarking_extension.cc
index 9293e77..9a75b46 100644
--- a/content/renderer/gpu_benchmarking_extension.cc
+++ b/content/renderer/gpu_benchmarking_extension.cc
@@ -299,7 +299,7 @@
   return false;
 }
 
-base::Optional<gfx::Vector2dF> ToVector(const std::string& direction,
+absl::optional<gfx::Vector2dF> ToVector(const std::string& direction,
                                         float distance) {
   if (direction == "down") {
     return gfx::Vector2dF(0, distance);
@@ -318,7 +318,7 @@
   } else if (direction == "downright") {
     return gfx::Vector2dF(distance, distance);
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 int ToKeyModifiers(const base::StringPiece& key) {
@@ -788,7 +788,7 @@
   // Scroll by percentage does not require speed in pixels
   DCHECK(!scroll_by_percentage || (speed_in_pixels_s == 800));
 
-  base::Optional<gfx::Vector2dF> pixels_to_scrol_vector =
+  absl::optional<gfx::Vector2dF> pixels_to_scrol_vector =
       ToVector(direction, pixels_to_scroll);
   if (!pixels_to_scrol_vector.has_value())
     return false;
@@ -967,9 +967,9 @@
     fling_velocity = 1000;
   }
 
-  base::Optional<gfx::Vector2dF> pixels_to_scrol_vector =
+  absl::optional<gfx::Vector2dF> pixels_to_scrol_vector =
       ToVector(direction, pixels_to_scroll);
-  base::Optional<gfx::Vector2dF> fling_velocity_vector =
+  absl::optional<gfx::Vector2dF> fling_velocity_vector =
       ToVector(direction, fling_velocity);
   if (!pixels_to_scrol_vector.has_value() ||
       !fling_velocity_vector.has_value()) {
diff --git a/content/renderer/loader/navigation_body_loader.cc b/content/renderer/loader/navigation_body_loader.cc
index a40e349..72fa00b 100644
--- a/content/renderer/loader/navigation_body_loader.cc
+++ b/content/renderer/loader/navigation_body_loader.cc
@@ -338,7 +338,7 @@
 
   handle_watcher_.Cancel();
 
-  base::Optional<blink::WebURLError> error;
+  absl::optional<blink::WebURLError> error;
   if (status_.error_code != net::OK) {
     error = blink::WebURLLoader::PopulateURLError(status_, original_url_);
   }
diff --git a/content/renderer/loader/navigation_body_loader_unittest.cc b/content/renderer/loader/navigation_body_loader_unittest.cc
index 1b2517a..6dd5e80 100644
--- a/content/renderer/loader/navigation_body_loader_unittest.cc
+++ b/content/renderer/loader/navigation_body_loader_unittest.cc
@@ -98,7 +98,7 @@
       int64_t total_encoded_body_length,
       int64_t total_decoded_body_length,
       bool should_report_corb_blocking,
-      const base::Optional<blink::WebURLError>& error) override {
+      const absl::optional<blink::WebURLError>& error) override {
     ASSERT_TRUE(expecting_finished_);
     did_finish_ = true;
     error_ = error;
@@ -171,7 +171,7 @@
   bool toggle_defers_loading_ = false;
   bool destroy_loader_ = false;
   std::string data_received_;
-  base::Optional<blink::WebURLError> error_;
+  absl::optional<blink::WebURLError> error_;
 };
 
 TEST_F(NavigationBodyLoaderTest, SetDefersBeforeStart) {
diff --git a/content/renderer/loader/web_worker_fetch_context_impl.cc b/content/renderer/loader/web_worker_fetch_context_impl.cc
index 36a4ce9..bd384a2 100644
--- a/content/renderer/loader/web_worker_fetch_context_impl.cc
+++ b/content/renderer/loader/web_worker_fetch_context_impl.cc
@@ -489,7 +489,7 @@
   return site_for_cookies_;
 }
 
-base::Optional<blink::WebSecurityOrigin>
+absl::optional<blink::WebSecurityOrigin>
 WebWorkerFetchContextImpl::TopFrameOrigin() const {
   // TODO(jkarlin): set_top_frame_origin is only called for dedicated workers.
   // Determine the top-frame-origin of a shared worker as well. See
diff --git a/content/renderer/loader/web_worker_fetch_context_impl.h b/content/renderer/loader/web_worker_fetch_context_impl.h
index 6b1ec4e..4d5c450 100644
--- a/content/renderer/loader/web_worker_fetch_context_impl.h
+++ b/content/renderer/loader/web_worker_fetch_context_impl.h
@@ -118,7 +118,7 @@
   void SetIsOnSubframe(bool) override;
   bool IsOnSubframe() const override;
   net::SiteForCookies SiteForCookies() const override;
-  base::Optional<blink::WebSecurityOrigin> TopFrameOrigin() const override;
+  absl::optional<blink::WebSecurityOrigin> TopFrameOrigin() const override;
   void SetSubresourceFilterBuilder(
       std::unique_ptr<blink::WebDocumentSubresourceFilter::Builder>) override;
   std::unique_ptr<blink::WebDocumentSubresourceFilter> TakeSubresourceFilter()
@@ -321,7 +321,7 @@
   // blocked.
   scoped_refptr<blink::WebFrameRequestBlocker> frame_request_blocker_;
   net::SiteForCookies site_for_cookies_;
-  base::Optional<url::Origin> top_frame_origin_;
+  absl::optional<url::Origin> top_frame_origin_;
 
   blink::RendererPreferences renderer_preferences_;
 
diff --git a/content/renderer/media/android/stream_texture_factory.cc b/content/renderer/media/android/stream_texture_factory.cc
index 15eec24..80bfebc7 100644
--- a/content/renderer/media/android/stream_texture_factory.cc
+++ b/content/renderer/media/android/stream_texture_factory.cc
@@ -89,7 +89,7 @@
     const gpu::Mailbox& mailbox,
     const gfx::Size& coded_size,
     const gfx::Rect& visible_rect,
-    const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info) {
+    const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info) {
   base::AutoLock lock(lock_);
   // Set the ycbcr info before running the received frame callback so that the
   // first frame has it.
diff --git a/content/renderer/media/android/stream_texture_factory.h b/content/renderer/media/android/stream_texture_factory.h
index 28bffd7..889784d 100644
--- a/content/renderer/media/android/stream_texture_factory.h
+++ b/content/renderer/media/android/stream_texture_factory.h
@@ -39,7 +39,7 @@
       const gpu::Mailbox& mailbox,
       const gfx::Size& coded_size,
       const gfx::Rect& visible_rect,
-      const base::Optional<gpu::VulkanYCbCrInfo>&)>;
+      const absl::optional<gpu::VulkanYCbCrInfo>&)>;
 
   ~StreamTextureProxy() override;
 
@@ -57,7 +57,7 @@
       const gpu::Mailbox& mailbox,
       const gfx::Size& coded_size,
       const gfx::Rect& visible_rect,
-      const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info) override;
+      const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info) override;
 
   // Sends an IPC to the GPU process.
   // Asks the StreamTexture to forward its SurfaceTexture to the
diff --git a/content/renderer/media/android/stream_texture_wrapper_impl.cc b/content/renderer/media/android/stream_texture_wrapper_impl.cc
index 3a04392..5d828757 100644
--- a/content/renderer/media/android/stream_texture_wrapper_impl.cc
+++ b/content/renderer/media/android/stream_texture_wrapper_impl.cc
@@ -58,7 +58,7 @@
     const gpu::Mailbox& mailbox,
     const gfx::Size& coded_size,
     const gfx::Rect& visible_rect,
-    const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info) {
+    const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info) {
   // This message comes from GPU process when the SharedImage is already
   // created, so we don't need to wait on any synctoken, mailbox is ready to
   // use.
diff --git a/content/renderer/media/android/stream_texture_wrapper_impl.h b/content/renderer/media/android/stream_texture_wrapper_impl.h
index 185eb5b..886b174 100644
--- a/content/renderer/media/android/stream_texture_wrapper_impl.h
+++ b/content/renderer/media/android/stream_texture_wrapper_impl.h
@@ -101,7 +101,7 @@
   void CreateVideoFrame(const gpu::Mailbox& mailbox,
                         const gfx::Size& coded_size,
                         const gfx::Rect& visible_rect,
-                        const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info);
+                        const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info);
 
   void SetCurrentFrameInternal(scoped_refptr<media::VideoFrame> video_frame);
 
diff --git a/content/renderer/media/batching_media_log.h b/content/renderer/media/batching_media_log.h
index 91a50532..5810efd 100644
--- a/content/renderer/media/batching_media_log.h
+++ b/content/renderer/media/batching_media_log.h
@@ -84,18 +84,18 @@
   bool logged_rate_limit_warning_;
 
   // Limits the number of events we send over IPC to one.
-  base::Optional<media::MediaLogRecord> last_duration_changed_event_;
-  base::Optional<media::MediaLogRecord> last_buffering_state_event_;
+  absl::optional<media::MediaLogRecord> last_duration_changed_event_;
+  absl::optional<media::MediaLogRecord> last_buffering_state_event_;
 
   // Holds the earliest MEDIA_ERROR_LOG_ENTRY event added to this log. This is
   // most likely to contain the most specific information available describing
   // any eventual fatal error.
   // TODO(wolenetz): Introduce a reset method to clear this in cases like
   // non-fatal error recovery like decoder fallback.
-  base::Optional<media::MediaLogRecord> cached_media_error_for_message_;
+  absl::optional<media::MediaLogRecord> cached_media_error_for_message_;
 
   // Holds a copy of the most recent PIPELINE_ERROR, if any.
-  base::Optional<media::MediaLogRecord> last_pipeline_error_;
+  absl::optional<media::MediaLogRecord> last_pipeline_error_;
 
   base::WeakPtr<BatchingMediaLog> weak_this_;
   base::WeakPtrFactory<BatchingMediaLog> weak_factory_{this};
diff --git a/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc b/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
index 009ba04..843ac3b 100644
--- a/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
+++ b/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.cc
@@ -498,7 +498,7 @@
   return task_runner_;
 }
 
-base::Optional<media::VideoEncodeAccelerator::SupportedProfiles>
+absl::optional<media::VideoEncodeAccelerator::SupportedProfiles>
 GpuVideoAcceleratorFactoriesImpl::GetVideoEncodeAcceleratorSupportedProfiles() {
   base::AutoLock lock(supported_profiles_lock_);
   return supported_vea_profiles_;
diff --git a/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.h b/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.h
index 91cc6b4d..753407b 100644
--- a/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.h
+++ b/content/renderer/media/gpu/gpu_video_accelerator_factories_impl.h
@@ -14,7 +14,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/synchronization/lock.h"
 #include "base/synchronization/waitable_event.h"
 #include "base/unguessable_token.h"
@@ -27,6 +26,7 @@
 #include "media/video/gpu_video_accelerator_factories.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/gfx/geometry/size.h"
 
 namespace base {
@@ -86,7 +86,7 @@
       media::MediaLog* media_log,
       media::VideoDecoderImplementation implementation,
       media::RequestOverlayInfoCB request_overlay_info_cb) override;
-  base::Optional<media::VideoEncodeAccelerator::SupportedProfiles>
+  absl::optional<media::VideoEncodeAccelerator::SupportedProfiles>
   GetVideoEncodeAcceleratorSupportedProfiles() override;
   bool IsEncoderSupportKnown() override;
   void NotifyEncoderSupportKnown(base::OnceClosure callback) override;
@@ -217,11 +217,11 @@
   // If the Optional is empty, then we have not yet gotten the configs.  If the
   // Optional contains an empty vector, then we have gotten the result and there
   // are no supported configs.
-  base::Optional<media::SupportedVideoDecoderConfigMap>
+  absl::optional<media::SupportedVideoDecoderConfigMap>
       supported_decoder_configs_ GUARDED_BY(supported_profiles_lock_);
   Notifier decoder_support_notifier_ GUARDED_BY(supported_profiles_lock_);
 
-  base::Optional<media::VideoEncodeAccelerator::SupportedProfiles>
+  absl::optional<media::VideoEncodeAccelerator::SupportedProfiles>
       supported_vea_profiles_ GUARDED_BY(supported_profiles_lock_);
   Notifier encoder_support_notifier_ GUARDED_BY(supported_profiles_lock_);
 
diff --git a/content/renderer/media/render_media_client.cc b/content/renderer/media/render_media_client.cc
index ae86139..e4f7291 100644
--- a/content/renderer/media/render_media_client.cc
+++ b/content/renderer/media/render_media_client.cc
@@ -47,7 +47,7 @@
   return GetContentClient()->renderer()->IsSupportedBitstreamAudioCodec(codec);
 }
 
-base::Optional<::media::AudioRendererAlgorithmParameters>
+absl::optional<::media::AudioRendererAlgorithmParameters>
 RenderMediaClient::GetAudioRendererAlgorithmParameters(
     media::AudioParameters audio_parameters) {
   return GetContentClient()->renderer()->GetAudioRendererAlgorithmParameters(
diff --git a/content/renderer/media/render_media_client.h b/content/renderer/media/render_media_client.h
index 5cd93d2..d881df5 100644
--- a/content/renderer/media/render_media_client.h
+++ b/content/renderer/media/render_media_client.h
@@ -27,7 +27,7 @@
   bool IsSupportedAudioType(const media::AudioType& type) final;
   bool IsSupportedVideoType(const media::VideoType& type) final;
   bool IsSupportedBitstreamAudioCodec(media::AudioCodec codec) final;
-  base::Optional<::media::AudioRendererAlgorithmParameters>
+  absl::optional<::media::AudioRendererAlgorithmParameters>
   GetAudioRendererAlgorithmParameters(
       media::AudioParameters audio_parameters) final;
 
diff --git a/content/renderer/navigation_client.cc b/content/renderer/navigation_client.cc
index 182edb7..ff42305e 100644
--- a/content/renderer/navigation_client.cc
+++ b/content/renderer/navigation_client.cc
@@ -22,7 +22,7 @@
     mojo::ScopedDataPipeConsumerHandle response_body,
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle> subresource_loaders,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     blink::mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
@@ -53,7 +53,7 @@
     int error_code,
     int extended_error_code,
     const net::ResolveErrorInfo& resolve_error_info,
-    const base::Optional<std::string>& error_page_content,
+    const absl::optional<std::string>& error_page_content,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle> subresource_loaders,
     blink::mojom::PolicyContainerPtr policy_container,
     CommitFailedNavigationCallback callback) {
diff --git a/content/renderer/navigation_client.h b/content/renderer/navigation_client.h
index 12e0a31e..e30e5cd 100644
--- a/content/renderer/navigation_client.h
+++ b/content/renderer/navigation_client.h
@@ -26,7 +26,7 @@
       mojo::ScopedDataPipeConsumerHandle response_body,
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle> subresource_loaders,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ControllerServiceWorkerInfoPtr
           controller_service_worker_info,
@@ -43,7 +43,7 @@
       int error_code,
       int extended_error_code,
       const net::ResolveErrorInfo& resolve_error_info,
-      const base::Optional<std::string>& error_page_content,
+      const absl::optional<std::string>& error_page_content,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle> subresource_loaders,
       blink::mojom::PolicyContainerPtr policy_container,
       CommitFailedNavigationCallback callback) override;
diff --git a/content/renderer/pepper/pepper_file_system_host.cc b/content/renderer/pepper/pepper_file_system_host.cc
index b9d3ea1..aaf62fc2 100644
--- a/content/renderer/pepper/pepper_file_system_host.cc
+++ b/content/renderer/pepper/pepper_file_system_host.cc
@@ -6,7 +6,6 @@
 
 #include "base/bind.h"
 #include "base/callback.h"
-#include "base/optional.h"
 #include "content/common/pepper_file_util.h"
 #include "content/public/renderer/render_view.h"
 #include "content/public/renderer/renderer_ppapi_host.h"
@@ -19,6 +18,7 @@
 #include "ppapi/shared_impl/file_system_util.h"
 #include "ppapi/shared_impl/file_type_conversion.h"
 #include "storage/common/file_system/file_system_util.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/filesystem/file_system.mojom.h"
 #include "third_party/blink/public/web/web_document.h"
 #include "third_party/blink/public/web/web_local_frame.h"
@@ -28,7 +28,7 @@
 
 namespace {
 
-base::Optional<blink::mojom::FileSystemType>
+absl::optional<blink::mojom::FileSystemType>
 PepperFileSystemTypeToMojoFileSystemType(PP_FileSystemType type) {
   switch (type) {
     case PP_FILESYSTEMTYPE_LOCALTEMPORARY:
@@ -38,7 +38,7 @@
     case PP_FILESYSTEMTYPE_EXTERNAL:
       return blink::mojom::FileSystemType::kExternal;
     default:
-      return base::nullopt;
+      return absl::nullopt;
   }
 }
 
@@ -114,7 +114,7 @@
     return PP_ERROR_INPROGRESS;
   called_open_ = true;
 
-  base::Optional<blink::mojom::FileSystemType> file_system_type =
+  absl::optional<blink::mojom::FileSystemType> file_system_type =
       PepperFileSystemTypeToMojoFileSystemType(type_);
   if (!file_system_type.has_value())
     return PP_ERROR_FAILED;
diff --git a/content/renderer/pepper/pepper_media_stream_video_track_host.cc b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
index 8031752..7ead143 100644
--- a/content/renderer/pepper/pepper_media_stream_video_track_host.cc
+++ b/content/renderer/pepper/pepper_media_stream_video_track_host.cc
@@ -451,14 +451,14 @@
   }
 
  private:
-  base::Optional<media::VideoCaptureFormat> GetCurrentFormat() const override {
+  absl::optional<media::VideoCaptureFormat> GetCurrentFormat() const override {
     if (host_) {
-      return base::Optional<media::VideoCaptureFormat>(
+      return absl::optional<media::VideoCaptureFormat>(
           media::VideoCaptureFormat(
               host_->plugin_frame_size_, kDefaultOutputFrameRate,
               ToPixelFormat(host_->plugin_frame_format_)));
     }
-    return base::Optional<media::VideoCaptureFormat>();
+    return absl::optional<media::VideoCaptureFormat>();
   }
 
   const base::WeakPtr<PepperMediaStreamVideoTrackHost> host_;
diff --git a/content/renderer/pepper/pepper_platform_audio_output.cc b/content/renderer/pepper/pepper_platform_audio_output.cc
index 1de73ff2..03e8595 100644
--- a/content/renderer/pepper/pepper_platform_audio_output.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output.cc
@@ -156,7 +156,7 @@
     const media::AudioParameters& params) {
   DCHECK(io_task_runner_->BelongsToCurrentThread());
   if (ipc_)
-    ipc_->CreateStream(this, params, base::nullopt);
+    ipc_->CreateStream(this, params, absl::nullopt);
 }
 
 void PepperPlatformAudioOutput::StartPlaybackOnIOThread() {
diff --git a/content/renderer/pepper/pepper_platform_audio_output_dev.cc b/content/renderer/pepper/pepper_platform_audio_output_dev.cc
index f941943c..308beca 100644
--- a/content/renderer/pepper/pepper_platform_audio_output_dev.cc
+++ b/content/renderer/pepper/pepper_platform_audio_output_dev.cc
@@ -314,7 +314,7 @@
     case IDLE:
       if (did_receive_auth_.IsSignaled() && device_id_.empty()) {
         state_ = CREATING_STREAM;
-        ipc_->CreateStream(this, params, base::nullopt);
+        ipc_->CreateStream(this, params, absl::nullopt);
       } else {
         RequestDeviceAuthorizationOnIOThread();
         start_on_authorized_ = true;
@@ -327,7 +327,7 @@
 
     case AUTHORIZED:
       state_ = CREATING_STREAM;
-      ipc_->CreateStream(this, params, base::nullopt);
+      ipc_->CreateStream(this, params, absl::nullopt);
       start_on_authorized_ = false;
       break;
 
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.h b/content/renderer/pepper/pepper_plugin_instance_impl.h
index d1a75b8..a6719844 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.h
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.h
@@ -20,7 +20,6 @@
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "build/build_config.h"
 #include "cc/layers/content_layer_client.h"
 #include "cc/layers/layer.h"
@@ -57,6 +56,7 @@
 #include "ppapi/shared_impl/tracked_callback.h"
 #include "ppapi/thunk/ppb_gamepad_api.h"
 #include "ppapi/thunk/resource_creation_api.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/platform/web_string.h"
 #include "third_party/blink/public/platform/web_url_response.h"
 #include "third_party/blink/public/web/web_associated_url_loader_client.h"
@@ -798,7 +798,7 @@
     gfx::Rect caret;
     gfx::Rect caret_bounds;
   };
-  base::Optional<TextInputCaretInfo> text_input_caret_info_;
+  absl::optional<TextInputCaretInfo> text_input_caret_info_;
   ui::TextInputType text_input_type_;
 
   // Text selection status.
diff --git a/content/renderer/pepper/pepper_plugin_registry.cc b/content/renderer/pepper/pepper_plugin_registry.cc
index 0f87597..c7c9bed 100644
--- a/content/renderer/pepper/pepper_plugin_registry.cc
+++ b/content/renderer/pepper/pepper_plugin_registry.cc
@@ -47,7 +47,7 @@
 
 PluginModule* PepperPluginRegistry::GetLiveModule(
     const base::FilePath& path,
-    const base::Optional<url::Origin>& origin_lock) {
+    const absl::optional<url::Origin>& origin_lock) {
   auto module_iter = live_modules_.find({path, origin_lock});
   if (module_iter == live_modules_.end())
     return nullptr;
@@ -74,7 +74,7 @@
 
 void PepperPluginRegistry::AddLiveModule(
     const base::FilePath& path,
-    const base::Optional<url::Origin>& origin_lock,
+    const absl::optional<url::Origin>& origin_lock,
     PluginModule* module) {
   DCHECK(live_modules_.find({path, origin_lock}) == live_modules_.end());
   live_modules_[{path, origin_lock}] = module;
@@ -120,7 +120,7 @@
     auto module = base::MakeRefCounted<PluginModule>(
         current.name, current.version, current.path,
         ppapi::PpapiPermissions(current.permissions));
-    AddLiveModule(current.path, base::Optional<url::Origin>(), module.get());
+    AddLiveModule(current.path, absl::optional<url::Origin>(), module.get());
     if (current.is_internal) {
       if (!module->InitAsInternalPlugin(current.internal_entry_points)) {
         DVLOG(1) << "Failed to load pepper module: " << current.path.value();
diff --git a/content/renderer/pepper/pepper_plugin_registry.h b/content/renderer/pepper/pepper_plugin_registry.h
index 67a29419..4c248a2 100644
--- a/content/renderer/pepper/pepper_plugin_registry.h
+++ b/content/renderer/pepper/pepper_plugin_registry.h
@@ -10,8 +10,8 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/public/common/pepper_plugin_info.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 namespace content {
@@ -39,7 +39,7 @@
   // plugins matching the given name (and origin if supplied). Returns NULL if
   // the plugin hasn't been loaded.
   PluginModule* GetLiveModule(const base::FilePath& path,
-                              const base::Optional<url::Origin>& origin_lock);
+                              const absl::optional<url::Origin>& origin_lock);
 
   // Notifies the registry that a new non-preloaded module has been created.
   // This is normally called for out-of-process plugins. Once this is called,
@@ -48,7 +48,7 @@
   // |origin_lock| is used to segregate plugins by origin, omitted if the
   // plugin is to handle content from all origins.
   void AddLiveModule(const base::FilePath& path,
-                     const base::Optional<url::Origin>& origin_lock,
+                     const absl::optional<url::Origin>& origin_lock,
                      PluginModule* module);
 
   void PluginModuleDead(PluginModule* dead_module);
@@ -73,7 +73,7 @@
   // continue as long as there are WebKit references to it, but it will not
   // appear in this list.
   using NonOwningModuleMap =
-      std::map<std::pair<base::FilePath, base::Optional<url::Origin>>,
+      std::map<std::pair<base::FilePath, absl::optional<url::Origin>>,
                PluginModule*>;
   NonOwningModuleMap live_modules_;
 
diff --git a/content/renderer/pepper/plugin_module.cc b/content/renderer/pepper/plugin_module.cc
index d3de9462..3a637db 100644
--- a/content/renderer/pepper/plugin_module.cc
+++ b/content/renderer/pepper/plugin_module.cc
@@ -665,7 +665,7 @@
 scoped_refptr<PluginModule> PluginModule::Create(
     RenderFrameImpl* render_frame,
     const WebPluginInfo& webplugin_info,
-    const base::Optional<url::Origin>& origin_lock,
+    const absl::optional<url::Origin>& origin_lock,
     bool* pepper_plugin_was_registered,
     scoped_refptr<base::SingleThreadTaskRunner> task_runner) {
   *pepper_plugin_was_registered = true;
diff --git a/content/renderer/pepper/plugin_module.h b/content/renderer/pepper/plugin_module.h
index 1ab89fc..a16e0df 100644
--- a/content/renderer/pepper/plugin_module.h
+++ b/content/renderer/pepper/plugin_module.h
@@ -15,7 +15,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/native_library.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "base/single_thread_task_runner.h"
 #include "content/common/content_export.h"
@@ -25,6 +24,7 @@
 #include "ppapi/c/ppb_core.h"
 #include "ppapi/c/private/ppb_instance_private.h"
 #include "ppapi/shared_impl/ppapi_permissions.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/origin.h"
 
 typedef void* NPIdentifier;
@@ -212,7 +212,7 @@
   static scoped_refptr<PluginModule> Create(
       RenderFrameImpl* render_frame,
       const WebPluginInfo& webplugin_info,
-      const base::Optional<url::Origin>& origin_lock,
+      const absl::optional<url::Origin>& origin_lock,
       bool* pepper_plugin_was_registered,
       scoped_refptr<base::SingleThreadTaskRunner> task_runner);
 
diff --git a/content/renderer/pepper/url_request_info_util.cc b/content/renderer/pepper/url_request_info_util.cc
index 0e16f846..0f3d8ea 100644
--- a/content/renderer/pepper/url_request_info_util.cc
+++ b/content/renderer/pepper/url_request_info_util.cc
@@ -96,7 +96,7 @@
     default:
       NOTREACHED();
   }
-  base::Optional<base::Time> optional_modified_time;
+  absl::optional<base::Time> optional_modified_time;
   if (expected_last_modified_time != 0)
     optional_modified_time =
         base::Time::FromDoubleT(expected_last_modified_time);
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4741b58..e0c8e8c 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -32,7 +32,6 @@
 #include "base/metrics/field_trial_params.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/process/process.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
@@ -132,6 +131,7 @@
 #include "services/network/public/mojom/url_response_head.mojom.h"
 #include "services/service_manager/public/mojom/interface_provider.mojom.h"
 #include "services/viz/public/cpp/gpu/context_provider_command_buffer.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/action_after_pagehide.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/chrome_debug_urls.h"
@@ -1040,7 +1040,7 @@
           WebString::FromUTF8(id));
     }
 
-    const base::Optional<std::string>& permissions_policy =
+    const absl::optional<std::string>& permissions_policy =
         head.origin_policy.value().contents->permissions_policy;
     if (permissions_policy) {
       navigation_params->origin_policy->permissions_policy =
@@ -1198,7 +1198,7 @@
                            int64_t total_encoded_body_length,
                            int64_t total_decoded_body_length,
                            bool should_report_corb_blocking,
-                           const base::Optional<WebURLError>& error) override {
+                           const absl::optional<WebURLError>& error) override {
     committing_ = true;
     AssertNavigationCommits assert_navigation_commits(frame_);
     if (!error.has_value()) {
@@ -1481,7 +1481,7 @@
     // `params->subresource_loader_factories`.
     render_frame->loader_factories_ = render_frame->CreateLoaderFactoryBundle(
         std::move(params->subresource_loader_factories),
-        base::nullopt /* subresource_overrides */,
+        absl::nullopt /* subresource_overrides */,
         mojo::NullRemote() /* prefetch_loader_factory */);
   }
 
@@ -1497,7 +1497,7 @@
     mojo::PendingRemote<blink::mojom::BrowserInterfaceBroker>
         browser_interface_broker,
     int previous_routing_id,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int parent_routing_id,
     int previous_sibling_routing_id,
     const base::UnguessableToken& devtools_frame_token,
@@ -2294,7 +2294,7 @@
     const WebPluginInfo& info,
     const blink::WebPluginParams& params) {
 #if BUILDFLAG(ENABLE_PLUGINS)
-  base::Optional<url::Origin> origin_lock;
+  absl::optional<url::Origin> origin_lock;
   if (GetContentClient()->renderer()->IsOriginIsolatedPepperPlugin(info.path)) {
     origin_lock = url::Origin::Create(GURL(params.url));
   }
@@ -2512,7 +2512,7 @@
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     blink::mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
@@ -2662,7 +2662,7 @@
     mojom::CommitNavigationParamsPtr commit_params,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     blink::mojom::ControllerServiceWorkerInfoPtr controller_service_worker_info,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
@@ -2803,7 +2803,7 @@
     int error_code,
     int extended_error_code,
     net::ResolveErrorInfo resolve_error_info,
-    const base::Optional<std::string>& error_page_content,
+    const absl::optional<std::string>& error_page_content,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
     blink::mojom::PolicyContainerPtr policy_container,
@@ -2836,7 +2836,7 @@
   scoped_refptr<blink::ChildURLLoaderFactoryBundle> new_loader_factories =
       CreateLoaderFactoryBundle(
           std::move(subresource_loader_factories),
-          base::nullopt /* subresource_overrides */,
+          absl::nullopt /* subresource_overrides */,
           mojo::NullRemote() /* prefetch_loader_factory */);
   DCHECK(new_loader_factories->HasBoundDefaultFactory());
 
@@ -3606,7 +3606,7 @@
     // Navigation initiated in this frame has been already reported in
     // BeginNavigation.
     for (auto& observer : observers_)
-      observer.DidStartNavigation(document_loader->GetUrl(), base::nullopt);
+      observer.DidStartNavigation(document_loader->GetUrl(), absl::nullopt);
   }
 
   for (auto& observer : observers_)
@@ -3700,7 +3700,7 @@
   // TODO(https://crbug.com/855189): figure out which of the following observer
   // calls are necessary, if any.
   for (auto& observer : observers_)
-    observer.DidStartNavigation(document_loader->GetUrl(), base::nullopt);
+    observer.DidStartNavigation(document_loader->GetUrl(), absl::nullopt);
   for (auto& observer : observers_)
     observer.ReadyToCommitNavigation(document_loader);
   for (auto& observer : observers_)
@@ -3847,7 +3847,7 @@
       blink::DocumentPolicyFeatureState(),  // document_policy_header
       nullptr,                              // interface_params
       std::move(same_document_params),
-      base::nullopt  // embedding_token
+      absl::nullopt  // embedding_token
   );
 
   // If we end up reusing this WebRequest (for example, due to a #ref click),
@@ -3949,10 +3949,10 @@
 
   ApplyFilePathAlias(&request);
   GURL new_url;
-  base::Optional<url::Origin> initiator_origin =
+  absl::optional<url::Origin> initiator_origin =
       request.RequestorOrigin().IsNull()
-          ? base::Optional<url::Origin>()
-          : base::Optional<url::Origin>(request.RequestorOrigin());
+          ? absl::optional<url::Origin>()
+          : absl::optional<url::Origin>(request.RequestorOrigin());
   GetContentClient()->renderer()->WillSendRequest(
       frame_, transition_type, request.Url(), request.SiteForCookies(),
       base::OptionalOrNullptr(initiator_origin), &new_url);
@@ -4186,13 +4186,13 @@
   return blink::WebString();
 }
 
-base::Optional<blink::UserAgentMetadata>
+absl::optional<blink::UserAgentMetadata>
 RenderFrameImpl::UserAgentMetadataOverride() {
   if (ShouldUseUserAgentOverride()) {
     return render_view_->GetRendererPreferences()
         .user_agent_override.ua_metadata_override;
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool RenderFrameImpl::ShouldUseUserAgentOverride() const {
@@ -4319,7 +4319,7 @@
     ui::PageTransition transition,
     const blink::ParsedPermissionsPolicy& permissions_policy_header,
     const blink::DocumentPolicyFeatureState& document_policy_header,
-    const base::Optional<base::UnguessableToken>& embedding_token) {
+    const absl::optional<base::UnguessableToken>& embedding_token) {
   WebDocumentLoader* document_loader = frame_->GetDocumentLoader();
   const WebURLResponse& response = document_loader->GetResponse();
 
@@ -4591,7 +4591,7 @@
     const blink::DocumentPolicyFeatureState& document_policy_header,
     mojom::DidCommitProvisionalLoadInterfaceParamsPtr interface_params,
     mojom::DidCommitSameDocumentNavigationParamsPtr same_document_params,
-    const base::Optional<base::UnguessableToken>& embedding_token) {
+    const absl::optional<base::UnguessableToken>& embedding_token) {
   DCHECK(!(same_document_params && interface_params));
   UpdateStateForCommit(commit_type, transition);
 
@@ -5178,7 +5178,7 @@
 scoped_refptr<blink::ChildURLLoaderFactoryBundle>
 RenderFrameImpl::CreateLoaderFactoryBundle(
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle> info,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     mojo::PendingRemote<network::mojom::URLLoaderFactory>
         prefetch_loader_factory) {
@@ -5404,11 +5404,11 @@
         base::JSONReader::ReadDeprecated(info->devtools_initiator_info.Utf8()));
   }
 
-  base::Optional<network::ResourceRequest::WebBundleTokenParams>
+  absl::optional<network::ResourceRequest::WebBundleTokenParams>
       web_bundle_token_params;
   if (info->url_request.WebBundleToken()) {
     web_bundle_token_params =
-        base::make_optional(network::ResourceRequest::WebBundleTokenParams(
+        absl::make_optional(network::ResourceRequest::WebBundleTokenParams(
             *info->url_request.WebBundleUrl(),
             *info->url_request.WebBundleToken(),
             -1 /* render_process_id, to be filled in the browser process */));
@@ -5424,15 +5424,15 @@
           blink::GetMixedContentContextTypeForWebURLRequest(info->url_request),
           is_form_submission, was_initiated_by_link_click, searchable_form_url,
           searchable_form_encoding, client_side_redirect_url,
-          initiator ? base::make_optional<base::Value>(std::move(*initiator))
-                    : base::nullopt,
+          initiator ? absl::make_optional<base::Value>(std::move(*initiator))
+                    : absl::nullopt,
           info->url_request.TrustTokenParams()
               ? info->url_request.TrustTokenParams()->Clone()
               : nullptr,
           info->impression
-              ? base::make_optional<blink::Impression>(
+              ? absl::make_optional<blink::Impression>(
                     blink::ConvertWebImpressionToImpression(*info->impression))
-              : base::nullopt,
+              : absl::nullopt,
           renderer_before_unload_start, renderer_before_unload_end,
           web_bundle_token_params);
 
@@ -5618,7 +5618,7 @@
   pending_loader_factories_ = CreateLoaderFactoryBundle(
       blink::ChildPendingURLLoaderFactoryBundle::CreateFromDefaultFactoryImpl(
           network::NotImplementedURLLoaderFactory::Create()),
-      base::nullopt,  // |subresource_overrides|
+      absl::nullopt,  // |subresource_overrides|
       {});            // prefetch_loader_factory
 
   auto navigation_params = std::make_unique<WebNavigationParams>();
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 8623e91..77aaa3c0 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -25,7 +25,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/process/process_handle.h"
 #include "base/single_thread_task_runner.h"
 #include "base/unguessable_token.h"
@@ -64,6 +63,7 @@
 #include "services/network/public/mojom/url_response_head.mojom-forward.h"
 #include "services/service_manager/public/cpp/binder_registry.h"
 #include "services/service_manager/public/mojom/interface_provider.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
 #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
@@ -205,7 +205,7 @@
       mojo::PendingRemote<blink::mojom::BrowserInterfaceBroker>
           browser_interface_broker,
       int previous_routing_id,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int parent_routing_id,
       int previous_sibling_routing_id,
       const base::UnguessableToken& devtools_frame_token,
@@ -424,7 +424,7 @@
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ControllerServiceWorkerInfoPtr
           controller_service_worker_info,
@@ -441,7 +441,7 @@
       int error_code,
       int extended_error_code,
       net::ResolveErrorInfo resolve_error_info,
-      const base::Optional<std::string>& error_page_content,
+      const absl::optional<std::string>& error_page_content,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
       blink::mojom::PolicyContainerPtr policy_container,
@@ -583,7 +583,7 @@
   bool AllowRTCLegacyTLSProtocols() override;
   blink::WebEncryptedMediaClient* EncryptedMediaClient() override;
   blink::WebString UserAgentOverride() override;
-  base::Optional<blink::UserAgentMetadata> UserAgentMetadataOverride() override;
+  absl::optional<blink::UserAgentMetadata> UserAgentMetadataOverride() override;
   blink::WebString DoNotTrackValue() override;
   blink::mojom::RendererAudioInputStreamFactory* GetAudioInputStreamFactory();
   bool AllowContentInitiatedDataUrlNavigations(
@@ -836,7 +836,7 @@
 
   scoped_refptr<blink::ChildURLLoaderFactoryBundle> CreateLoaderFactoryBundle(
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle> info,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       mojo::PendingRemote<network::mojom::URLLoaderFactory>
           prefetch_loader_factory);
@@ -896,7 +896,7 @@
       mojom::CommitNavigationParamsPtr commit_params,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ControllerServiceWorkerInfoPtr
           controller_service_worker_info,
@@ -942,7 +942,7 @@
       ui::PageTransition transition,
       const blink::ParsedPermissionsPolicy& permissions_policy_header,
       const blink::DocumentPolicyFeatureState& document_policy_header,
-      const base::Optional<base::UnguessableToken>& embedding_token);
+      const absl::optional<base::UnguessableToken>& embedding_token);
 
   // Updates the navigation history depending on the passed parameters.
   // This could result either in the creation of a new entry or a modification
@@ -968,7 +968,7 @@
       const blink::DocumentPolicyFeatureState& document_policy_header,
       mojom::DidCommitProvisionalLoadInterfaceParamsPtr interface_params,
       mojom::DidCommitSameDocumentNavigationParamsPtr same_document_params,
-      const base::Optional<base::UnguessableToken>& embedding_token);
+      const absl::optional<base::UnguessableToken>& embedding_token);
 
   blink::WebComputedAXTree* GetOrCreateWebComputedAXTree() override;
 
@@ -1282,7 +1282,7 @@
   scoped_refptr<blink::WebFrameRequestBlocker> frame_request_blocker_;
 
   // AndroidOverlay routing token from the browser, if we have one yet.
-  base::Optional<base::UnguessableToken> overlay_routing_token_;
+  absl::optional<base::UnguessableToken> overlay_routing_token_;
 
   // Used for devtools instrumentation and trace-ability. This token is
   // used to tag calls and requests in order to attribute them to the context
@@ -1301,7 +1301,7 @@
 
   // Used for tracking a frame's main frame document intersection and
   // and replicating it to the browser when it changes.
-  base::Optional<gfx::Rect> mainframe_intersection_rect_;
+  absl::optional<gfx::Rect> mainframe_intersection_rect_;
 
   std::unique_ptr<blink::WebSocketHandshakeThrottleProvider>
       websocket_handshake_throttle_provider_;
diff --git a/content/renderer/render_frame_impl_browsertest.cc b/content/renderer/render_frame_impl_browsertest.cc
index f24a372..34a2452 100644
--- a/content/renderer/render_frame_impl_browsertest.cc
+++ b/content/renderer/render_frame_impl_browsertest.cc
@@ -10,7 +10,6 @@
 #include "base/callback_helpers.h"
 #include "base/command_line.h"
 #include "base/debug/leak_annotations.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/stl_util.h"
 #include "base/strings/stringprintf.h"
@@ -45,6 +44,7 @@
 #include "mojo/public/cpp/bindings/remote.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/loader/previews_state.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/common/widget/screen_info.h"
@@ -138,7 +138,7 @@
         *agent_scheduling_group_, blink::LocalFrameToken(), kSubframeRouteId,
         TestRenderFrame::CreateStubFrameReceiver(),
         TestRenderFrame::CreateStubBrowserInterfaceBrokerRemote(),
-        MSG_ROUTING_NONE, base::nullopt, kFrameProxyRouteId, MSG_ROUTING_NONE,
+        MSG_ROUTING_NONE, absl::nullopt, kFrameProxyRouteId, MSG_ROUTING_NONE,
         base::UnguessableToken::Create(), std::move(frame_replication_state),
         std::move(widget_params), blink::mojom::FrameOwnerProperties::New(),
         /*has_committed_real_load=*/true,
@@ -540,7 +540,7 @@
     receiver_.WaitForIncomingCall();
   }
 
-  const base::Optional<SourceAnnotation>& ping_source() const {
+  const absl::optional<SourceAnnotation>& ping_source() const {
     return ping_source_;
   }
 
@@ -551,7 +551,7 @@
 
  private:
   mojo::Receiver<mojom::FrameHostTestInterface> receiver_{this};
-  base::Optional<SourceAnnotation> ping_source_;
+  absl::optional<SourceAnnotation> ping_source_;
 
   DISALLOW_COPY_AND_ASSIGN(FrameHostTestInterfaceImpl);
 };
@@ -663,8 +663,8 @@
  public:
   explicit ScopedNewFrameInterfaceProviderExerciser(
       FrameCreationObservingRendererClient* frame_creation_observer,
-      const base::Optional<std::string>& html_override_for_first_load =
-          base::nullopt)
+      const absl::optional<std::string>& html_override_for_first_load =
+          absl::nullopt)
       : frame_creation_observer_(frame_creation_observer),
         html_override_for_first_load_(html_override_for_first_load) {
     frame_creation_observer_->set_callback(base::BindRepeating(
@@ -725,11 +725,11 @@
 
   FrameCreationObservingRendererClient* frame_creation_observer_;
   TestRenderFrame* frame_ = nullptr;
-  base::Optional<std::string> html_override_for_first_load_;
+  absl::optional<std::string> html_override_for_first_load_;
   GURL first_committed_url_;
 
-  base::Optional<FrameCommitWaiter> frame_commit_waiter_;
-  base::Optional<FrameHostTestInterfaceRequestIssuer> test_request_issuer_;
+  absl::optional<FrameCommitWaiter> frame_commit_waiter_;
+  absl::optional<FrameHostTestInterfaceRequestIssuer> test_request_issuer_;
 
   mojo::PendingReceiver<blink::mojom::BrowserInterfaceBroker>
       browser_interface_broker_receiver_for_initial_empty_document_;
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 2082251..1e5a114b 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -85,7 +85,7 @@
     AgentSchedulingGroup& agent_scheduling_group,
     const blink::RemoteFrameToken& frame_token,
     int routing_id,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int render_view_routing_id,
     int parent_routing_id,
     blink::mojom::FrameReplicationStatePtr replicated_state,
diff --git a/content/renderer/render_frame_proxy.h b/content/renderer/render_frame_proxy.h
index 7067208..4027f53 100644
--- a/content/renderer/render_frame_proxy.h
+++ b/content/renderer/render_frame_proxy.h
@@ -89,7 +89,7 @@
       AgentSchedulingGroup& agent_scheduling_group,
       const blink::RemoteFrameToken& frame_token,
       int routing_id,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int render_view_routing_id,
       int parent_routing_id,
       blink::mojom::FrameReplicationStatePtr replicated_state,
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index af03b7b..57269d6 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1652,11 +1652,11 @@
 #if defined(OS_MAC)
   blink::WebScrollbarTheme::UpdateScrollbarsWithNSDefaults(
       params->has_initial_button_delay
-          ? base::make_optional(params->initial_button_delay)
-          : base::nullopt,
+          ? absl::make_optional(params->initial_button_delay)
+          : absl::nullopt,
       params->has_autoscroll_button_delay
-          ? base::make_optional(params->autoscroll_button_delay)
-          : base::nullopt,
+          ? absl::make_optional(params->autoscroll_button_delay)
+          : absl::nullopt,
       params->preferred_scroller_style, params->redraw,
       params->jump_on_track_click);
 
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h
index 7772c8d..c8767f8 100644
--- a/content/renderer/render_thread_impl.h
+++ b/content/renderer/render_thread_impl.h
@@ -24,7 +24,6 @@
 #include "base/memory/ref_counted.h"
 #include "base/metrics/user_metrics_action.h"
 #include "base/observer_list.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "base/types/pass_key.h"
 #include "build/build_config.h"
@@ -50,6 +49,7 @@
 #include "net/base/network_change_notifier.h"
 #include "net/nqe/effective_connection_type.h"
 #include "services/viz/public/mojom/compositing/compositing_mode_watcher.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
 #include "third_party/blink/public/platform/scheduler/web_rail_mode_observer.h"
@@ -491,8 +491,8 @@
   // Used to keep track of the renderer's backgrounded and visibility state.
   // Updated via an IPC from the browser process. If nullopt, the browser
   // process has yet to send an update and the state is unknown.
-  base::Optional<mojom::RenderProcessBackgroundState> background_state_;
-  base::Optional<mojom::RenderProcessVisibleState> visible_state_;
+  absl::optional<mojom::RenderProcessBackgroundState> background_state_;
+  absl::optional<mojom::RenderProcessVisibleState> visible_state_;
 
   blink::WebString user_agent_;
   blink::UserAgentMetadata user_agent_metadata_;
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 6ba337a..67af0a7a 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -15,7 +15,6 @@
 #include "base/json/json_reader.h"
 #include "base/json/json_writer.h"
 #include "base/location.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/single_thread_task_runner.h"
 #include "base/stl_util.h"
@@ -70,6 +69,7 @@
 #include "services/network/public/cpp/resource_request_body.h"
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/dom_storage/session_storage_namespace_id.h"
 #include "third_party/blink/public/common/origin_trials/origin_trial_policy.h"
 #include "third_party/blink/public/common/origin_trials/trial_token_validator.h"
@@ -777,7 +777,7 @@
       : LocalFrameHostInterceptor(provider) {}
 
   MOCK_METHOD2(UpdateTitle,
-               void(const base::Optional<::std::u16string>& title,
+               void(const absl::optional<::std::u16string>& title,
                     base::i18n::TextDirection title_direction));
 };
 }  // namespace
@@ -818,12 +818,12 @@
   waiter.Wait();
 
   // While LocalFrame is initialized, it's called with an empty title.
-  const base::Optional<::std::u16string> null_title;
+  const absl::optional<::std::u16string> null_title;
   EXPECT_CALL(*title_mock_frame_host(), UpdateTitle(null_title, testing::_))
       .Times(1);
 
-  const base::Optional<::std::u16string>& title =
-      base::make_optional(u"Data page");
+  const absl::optional<::std::u16string>& title =
+      absl::make_optional(u"Data page");
   EXPECT_CALL(*title_mock_frame_host(), UpdateTitle(title, testing::_))
       .Times(1);
 }
@@ -1014,7 +1014,7 @@
       blink::kWebNavigationPolicyNewForegroundTab,
       network::mojom::WebSandboxFlags::kNone,
       blink::AllocateSessionStorageNamespaceId(), consumed_user_gesture,
-      base::nullopt);
+      absl::nullopt);
   auto popup_navigation_info = std::make_unique<blink::WebNavigationInfo>();
   popup_navigation_info->url_request = std::move(popup_request);
   popup_navigation_info->frame_type =
@@ -1179,7 +1179,7 @@
       *agent_scheduling_group_, blink::LocalFrameToken(), routing_id,
       TestRenderFrame::CreateStubFrameReceiver(),
       TestRenderFrame::CreateStubBrowserInterfaceBrokerRemote(),
-      kProxyRoutingId, base::nullopt, MSG_ROUTING_NONE, MSG_ROUTING_NONE,
+      kProxyRoutingId, absl::nullopt, MSG_ROUTING_NONE, MSG_ROUTING_NONE,
       base::UnguessableToken::Create(), std::move(replication_state),
       std::move(widget_params), blink::mojom::FrameOwnerProperties::New(),
       /*has_committed_real_load=*/true, CreateStubPolicyContainer());
@@ -1239,7 +1239,7 @@
       *agent_scheduling_group_, blink::LocalFrameToken(), routing_id,
       TestRenderFrame::CreateStubFrameReceiver(),
       TestRenderFrame::CreateStubBrowserInterfaceBrokerRemote(),
-      kProxyRoutingId, base::nullopt, frame()->GetRoutingID(), MSG_ROUTING_NONE,
+      kProxyRoutingId, absl::nullopt, frame()->GetRoutingID(), MSG_ROUTING_NONE,
       base::UnguessableToken::Create(), std::move(replication_state),
       /*widget_params=*/nullptr, blink::mojom::FrameOwnerProperties::New(),
       /*has_committed_real_load=*/true, CreateStubPolicyContainer());
@@ -2949,8 +2949,8 @@
       blink::mojom::ConsoleMessageLevel log_level,
       const std::u16string& msg,
       int32_t line_number,
-      const base::Optional<std::u16string>& source_id,
-      const base::Optional<std::u16string>& untrusted_stack_trace) override {
+      const absl::optional<std::u16string>& source_id,
+      const absl::optional<std::u16string>& untrusted_stack_trace) override {
     if (did_add_message_to_console_callback_) {
       std::move(did_add_message_to_console_callback_).Run(msg);
     }
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 1f10156..9ee8f76 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -275,7 +275,7 @@
     network::mojom::WebSandboxFlags sandbox_flags,
     const blink::SessionStorageNamespaceId& session_storage_namespace_id,
     bool& consumed_user_gesture,
-    const base::Optional<blink::WebImpression>& impression) {
+    const absl::optional<blink::WebImpression>& impression) {
   consumed_user_gesture = false;
   RenderFrameImpl* creator_frame = RenderFrameImpl::FromWebFrame(creator);
   mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index fc9408102..dfaf88a32 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -137,7 +137,7 @@
       network::mojom::WebSandboxFlags sandbox_flags,
       const blink::SessionStorageNamespaceId& session_storage_namespace_id,
       bool& consumed_user_gesture,
-      const base::Optional<blink::WebImpression>& impression) override;
+      const absl::optional<blink::WebImpression>& impression) override;
   void PrintPage(blink::WebLocalFrame* frame) override;
   bool CanUpdateLayout() override;
   void OnPageFrozenChanged(bool frozen) override;
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 948e1cb4..d5ebc98 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -578,7 +578,7 @@
 
 //------------------------------------------------------------------------------
 
-base::Optional<double>
+absl::optional<double>
 RendererBlinkPlatformImpl::GetWebRtcMaxCaptureFrameRate() {
   const std::string max_fps_str =
       base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
@@ -588,7 +588,7 @@
     if (base::StringToDouble(max_fps_str, &value) && value >= 0.0)
       return value;
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 scoped_refptr<media::AudioRendererSink>
@@ -606,7 +606,7 @@
   return blink::WebAudioDeviceFactory::GetSourceLatencyType(source_type);
 }
 
-base::Optional<std::string>
+absl::optional<std::string>
 RendererBlinkPlatformImpl::GetWebRTCAudioProcessingConfiguration() {
   return GetContentClient()
       ->renderer()
@@ -677,16 +677,16 @@
   *allow_mdns_obfuscation = true;
 }
 
-base::Optional<int> RendererBlinkPlatformImpl::GetAgcStartupMinimumVolume() {
+absl::optional<int> RendererBlinkPlatformImpl::GetAgcStartupMinimumVolume() {
   std::string min_volume_str =
       base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
           switches::kAgcStartupMinVolume);
   int startup_min_volume;
   if (min_volume_str.empty() ||
       !base::StringToInt(min_volume_str, &startup_min_volume)) {
-    return base::Optional<int>();
+    return absl::optional<int>();
   }
-  return base::Optional<int>(startup_min_volume);
+  return absl::optional<int>(startup_min_volume);
 }
 
 bool RendererBlinkPlatformImpl::IsWebRtcHWH264DecodingEnabled(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 663046c..4b73945 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -14,7 +14,6 @@
 #include "base/compiler_specific.h"
 #include "base/containers/id_map.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/single_thread_task_runner.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
@@ -25,6 +24,7 @@
 #include "mojo/public/cpp/bindings/shared_remote.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
 #include "services/service_manager/public/cpp/interface_provider.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/user_agent/user_agent_metadata.h"
 #include "third_party/blink/public/mojom/cache_storage/cache_storage.mojom.h"
 #include "third_party/blink/public/mojom/loader/code_cache.mojom.h"
@@ -149,14 +149,14 @@
   SharedCompositorWorkerContextProvider() override;
   scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
   bool RTCSmoothnessAlgorithmEnabled() override;
-  base::Optional<double> GetWebRtcMaxCaptureFrameRate() override;
+  absl::optional<double> GetWebRtcMaxCaptureFrameRate() override;
   scoped_refptr<media::AudioRendererSink> NewAudioRendererSink(
       blink::WebAudioDeviceSourceType source_type,
       blink::WebLocalFrame* web_frame,
       const media::AudioSinkParameters& params) override;
   media::AudioLatency::LatencyType GetAudioSourceLatencyType(
       blink::WebAudioDeviceSourceType source_type) override;
-  base::Optional<std::string> GetWebRTCAudioProcessingConfiguration() override;
+  absl::optional<std::string> GetWebRTCAudioProcessingConfiguration() override;
   bool ShouldEnforceWebRTCRoutingPreferences() override;
   bool UsesFakeCodecForPeerConnection() override;
   bool IsWebRtcEncryptionEnabled() override;
@@ -168,7 +168,7 @@
                                     uint16_t* udp_min_port,
                                     uint16_t* udp_max_port,
                                     bool* allow_mdns_obfuscation) override;
-  base::Optional<int> GetAgcStartupMinimumVolume() override;
+  absl::optional<int> GetAgcStartupMinimumVolume() override;
   bool IsWebRtcHWH264DecodingEnabled(
       webrtc::VideoCodecType video_coded_type) override;
   bool IsWebRtcHWEncodingEnabled() override;
diff --git a/content/renderer/renderer_main.cc b/content/renderer/renderer_main.cc
index b743a751..a28996d 100644
--- a/content/renderer/renderer_main.cc
+++ b/content/renderer/renderer_main.cc
@@ -13,7 +13,6 @@
 #include "base/message_loop/message_pump.h"
 #include "base/message_loop/message_pump_type.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/pending_task.h"
 #include "base/run_loop.h"
 #include "base/strings/string_number_conversions.h"
@@ -40,6 +39,7 @@
 #include "ppapi/buildflags/buildflags.h"
 #include "sandbox/policy/switches.h"
 #include "services/tracing/public/cpp/trace_startup.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/platform/platform.h"
 #include "third_party/blink/public/platform/scheduler/web_thread_scheduler.h"
 #include "third_party/icu/source/common/unicode/unistr.h"
@@ -136,7 +136,7 @@
 
   using UserspaceSwapInit =
       chromeos::memory::userspace_swap::UserspaceSwapRendererInitializationImpl;
-  base::Optional<UserspaceSwapInit> swap_init;
+  absl::optional<UserspaceSwapInit> swap_init;
   if (UserspaceSwapInit::UserspaceSwapSupportedAndEnabled()) {
     swap_init.emplace();
 
diff --git a/content/renderer/service_worker/service_worker_fetch_context_impl.cc b/content/renderer/service_worker/service_worker_fetch_context_impl.cc
index 0b35a00..a0e6929 100644
--- a/content/renderer/service_worker/service_worker_fetch_context_impl.cc
+++ b/content/renderer/service_worker/service_worker_fetch_context_impl.cc
@@ -155,9 +155,9 @@
   return net::SiteForCookies::FromUrl(worker_script_url_);
 }
 
-base::Optional<blink::WebSecurityOrigin>
+absl::optional<blink::WebSecurityOrigin>
 ServiceWorkerFetchContextImpl::TopFrameOrigin() const {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 std::unique_ptr<blink::WebSocketHandshakeThrottle>
diff --git a/content/renderer/service_worker/service_worker_fetch_context_impl.h b/content/renderer/service_worker/service_worker_fetch_context_impl.h
index 9f64fe3..91047ad 100644
--- a/content/renderer/service_worker/service_worker_fetch_context_impl.h
+++ b/content/renderer/service_worker/service_worker_fetch_context_impl.h
@@ -71,7 +71,7 @@
   blink::mojom::ControllerServiceWorkerMode GetControllerServiceWorkerMode()
       const override;
   net::SiteForCookies SiteForCookies() const override;
-  base::Optional<blink::WebSecurityOrigin> TopFrameOrigin() const override;
+  absl::optional<blink::WebSecurityOrigin> TopFrameOrigin() const override;
   std::unique_ptr<blink::WebSocketHandshakeThrottle>
   CreateWebSocketHandshakeThrottle(
       scoped_refptr<base::SingleThreadTaskRunner> task_runner) override;
diff --git a/content/renderer/service_worker/service_worker_subresource_loader.cc b/content/renderer/service_worker/service_worker_subresource_loader.cc
index 71d22ea..6601562 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader.cc
@@ -10,7 +10,6 @@
 #include "base/command_line.h"
 #include "base/metrics/histogram_functions.h"
 #include "base/metrics/histogram_macros.h"
-#include "base/optional.h"
 #include "base/strings/strcat.h"
 #include "base/trace_event/trace_event.h"
 #include "content/common/fetch/fetch_request_type_converters.h"
@@ -23,6 +22,7 @@
 #include "net/url_request/redirect_util.h"
 #include "net/url_request/url_request.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/blob/blob_utils.h"
 #include "third_party/blink/public/common/service_worker/service_worker_loader_helpers.h"
 #include "third_party/blink/public/common/service_worker/service_worker_type_converters.h"
@@ -251,7 +251,7 @@
     // to return an error as the client must be shutting down.
     DCHECK_EQ(ControllerServiceWorkerConnector::State::kNoContainerHost,
               controller_state);
-    SettleFetchEventDispatch(base::nullopt);
+    SettleFetchEventDispatch(absl::nullopt);
     return;
   }
 
@@ -283,7 +283,7 @@
           blink::mojom::ControllerServiceWorkerPurpose::FETCH_SUB_RESOURCE);
 
   if (!controller) {
-    SettleFetchEventDispatch(base::nullopt);
+    SettleFetchEventDispatch(absl::nullopt);
     return;
   }
 
@@ -394,7 +394,7 @@
 }
 
 void ServiceWorkerSubresourceLoader::SettleFetchEventDispatch(
-    base::Optional<blink::ServiceWorkerStatusCode> status) {
+    absl::optional<blink::ServiceWorkerStatusCode> status) {
   if (!controller_connector_observation_.IsObserving()) {
     // Already settled.
     return;
@@ -576,7 +576,7 @@
   // Otherwise we can immediately complete side data reading so that the
   // entire resource completes when the main body is read.
   OnSideDataReadingComplete(std::move(data_pipe),
-                            base::Optional<mojo_base::BigBuffer>());
+                            absl::optional<mojo_base::BigBuffer>());
 }
 
 void ServiceWorkerSubresourceLoader::CommitResponseHeaders() {
@@ -700,7 +700,7 @@
     const std::vector<std::string>& removed_headers,
     const net::HttpRequestHeaders& modified_headers,
     const net::HttpRequestHeaders& modified_cors_exempt_headers,
-    const base::Optional<GURL>& new_url) {
+    const absl::optional<GURL>& new_url) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker", "ServiceWorkerSubresourceLoader::FollowRedirect",
       TRACE_ID_WITH_SCOPE(kServiceWorkerSubresourceLoaderScope,
@@ -781,7 +781,7 @@
 
 void ServiceWorkerSubresourceLoader::OnSideDataReadingComplete(
     mojo::ScopedDataPipeConsumerHandle data_pipe,
-    base::Optional<mojo_base::BigBuffer> metadata) {
+    absl::optional<mojo_base::BigBuffer> metadata) {
   TRACE_EVENT_WITH_FLOW1(
       "ServiceWorker",
       "ServiceWorkerSubresourceLoader::OnSideDataReadingComplete",
diff --git a/content/renderer/service_worker/service_worker_subresource_loader.h b/content/renderer/service_worker/service_worker_subresource_loader.h
index 41016b9..f88fe7b 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader.h
+++ b/content/renderer/service_worker/service_worker_subresource_loader.h
@@ -7,7 +7,6 @@
 
 #include "base/memory/ref_counted.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/scoped_observation.h"
 #include "content/common/content_export.h"
 #include "content/renderer/service_worker/controller_service_worker_connector.h"
@@ -19,6 +18,7 @@
 #include "net/traffic_annotation/network_traffic_annotation.h"
 #include "net/url_request/redirect_info.h"
 #include "services/network/public/mojom/url_loader_factory.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/service_worker/service_worker_status_code.h"
 #include "third_party/blink/public/mojom/blob/blob.mojom-forward.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_event_status.mojom-forward.h"
@@ -91,7 +91,7 @@
   // Called when this loader no longer needs to restart dispatching the fetch
   // event on failure. Null |status| means the event dispatch was not attempted.
   void SettleFetchEventDispatch(
-      base::Optional<blink::ServiceWorkerStatusCode> status);
+      absl::optional<blink::ServiceWorkerStatusCode> status);
 
   // blink::mojom::ServiceWorkerFetchResponseCallback overrides:
   void OnResponse(
@@ -115,7 +115,7 @@
       const std::vector<std::string>& removed_headers,
       const net::HttpRequestHeaders& modified_headers,
       const net::HttpRequestHeaders& modified_cors_exempt_headers,
-      const base::Optional<GURL>& new_url) override;
+      const absl::optional<GURL>& new_url) override;
   void SetPriority(net::RequestPriority priority,
                    int intra_priority_value) override;
   void PauseReadingBodyFromNet() override;
@@ -123,7 +123,7 @@
 
   int StartBlobReading(mojo::ScopedDataPipeConsumerHandle* body_pipe);
   void OnSideDataReadingComplete(mojo::ScopedDataPipeConsumerHandle data_pipe,
-                                 base::Optional<mojo_base::BigBuffer> metadata);
+                                 absl::optional<mojo_base::BigBuffer> metadata);
   void OnBodyReadingComplete(int net_error);
 
   // Calls url_loader_client_->OnReceiveResponse() with |response_head_|.
@@ -150,7 +150,7 @@
 
   network::mojom::URLResponseHeadPtr response_head_ =
       network::mojom::URLResponseHead::New();
-  base::Optional<net::RedirectInfo> redirect_info_;
+  absl::optional<net::RedirectInfo> redirect_info_;
   int redirect_limit_;
 
   mojo::Remote<network::mojom::URLLoaderClient> url_loader_client_;
diff --git a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
index 2d314d6..b06b5fc 100644
--- a/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
+++ b/content/renderer/service_worker/service_worker_subresource_loader_unittest.cc
@@ -41,7 +41,7 @@
 // A simple blob implementation for serving data stored in a vector.
 class FakeBlob final : public blink::mojom::Blob {
  public:
-  FakeBlob(base::Optional<std::vector<uint8_t>> side_data, std::string body)
+  FakeBlob(absl::optional<std::vector<uint8_t>> side_data, std::string body)
       : side_data_(std::move(side_data)), body_(std::move(body)) {}
 
  private:
@@ -81,14 +81,14 @@
     std::move(callback).Run(side_data_);
   }
   void CaptureSnapshot(CaptureSnapshotCallback callback) override {
-    std::move(callback).Run(body_.size(), base::nullopt);
+    std::move(callback).Run(body_.size(), absl::nullopt);
   }
   void GetInternalUUID(GetInternalUUIDCallback callback) override {
     NOTREACHED();
   }
 
   mojo::ReceiverSet<blink::mojom::Blob> receivers_;
-  base::Optional<std::vector<uint8_t>> side_data_;
+  absl::optional<std::vector<uint8_t>> side_data_;
   std::string body_;
 };
 
@@ -178,7 +178,7 @@
   }
 
   // Tells this controller to respond to fetch events with a blob response body.
-  void RespondWithBlob(base::Optional<std::vector<uint8_t>> metadata,
+  void RespondWithBlob(absl::optional<std::vector<uint8_t>> metadata,
                        std::string body) {
     response_mode_ = ResponseMode::kBlob;
     blob_body_ = blink::mojom::SerializedBlob::New();
@@ -314,7 +314,7 @@
         blob->uuid = "dummy-blob-uuid";
         blob->size = size;
         mojo::MakeSelfOwnedReceiver(
-            std::make_unique<FakeBlob>(base::nullopt, body),
+            std::make_unique<FakeBlob>(absl::nullopt, body),
             blob->blob.InitWithNewPipeAndPassReceiver());
 
         // Respond with a 206 response.
@@ -1124,7 +1124,7 @@
 
   // Construct the Blob to respond with.
   const std::string kResponseBody = "/* Here is sample text for the Blob. */";
-  fake_controller_.RespondWithBlob(base::nullopt, kResponseBody);
+  fake_controller_.RespondWithBlob(absl::nullopt, kResponseBody);
 
   mojo::Remote<network::mojom::URLLoaderFactory> factory =
       CreateSubresourceLoaderFactory();
@@ -1294,7 +1294,7 @@
 
   // Redirect once more.
   fake_controller_.RespondWithRedirect("https://other.example.com/baz.png");
-  loader->FollowRedirect({}, {}, {}, base::nullopt);
+  loader->FollowRedirect({}, {}, {}, absl::nullopt);
   client->RunUntilRedirectReceived();
 
   EXPECT_EQ(net::OK, client->completion_status().error_code);
@@ -1316,7 +1316,7 @@
             MOJO_RESULT_OK);
   fake_controller_.RespondWithStream(
       stream_callback.BindNewPipeAndPassReceiver(), std::move(consumer_handle));
-  loader->FollowRedirect({}, {}, {}, base::nullopt);
+  loader->FollowRedirect({}, {}, {}, absl::nullopt);
   client->RunUntilResponseReceived();
 
   auto& info = client->response_head();
@@ -1386,7 +1386,7 @@
     redirect_location = std::string("https://www.example.com/redirect_") +
                         base::NumberToString(count);
     fake_controller_.RespondWithRedirect(redirect_location);
-    loader->FollowRedirect({}, {}, {}, base::nullopt);
+    loader->FollowRedirect({}, {}, {}, absl::nullopt);
   }
   client->RunUntilComplete();
 
@@ -1417,7 +1417,7 @@
 
   // Tell the loader to follow a non-existent redirect. It should complete
   // with network error.
-  loader->FollowRedirect({}, {}, {}, base::nullopt);
+  loader->FollowRedirect({}, {}, {}, absl::nullopt);
   client->RunUntilComplete();
   EXPECT_EQ(net::ERR_INVALID_REDIRECT, client->completion_status().error_code);
 }
@@ -1447,7 +1447,7 @@
 TEST_F(ServiceWorkerSubresourceLoaderTest, RangeRequest_200Response) {
   // Construct the Blob to respond with.
   const std::string kResponseBody = "Here is sample text for the Blob.";
-  fake_controller_.RespondWithBlob(base::nullopt, kResponseBody);
+  fake_controller_.RespondWithBlob(absl::nullopt, kResponseBody);
 
   // Perform the request.
   std::unique_ptr<network::TestURLLoaderClient> client =
diff --git a/content/renderer/service_worker/web_service_worker_provider_impl.cc b/content/renderer/service_worker/web_service_worker_provider_impl.cc
index 55441bc..ce68286 100644
--- a/content/renderer/service_worker/web_service_worker_provider_impl.cc
+++ b/content/renderer/service_worker/web_service_worker_provider_impl.cc
@@ -217,7 +217,7 @@
 void WebServiceWorkerProviderImpl::OnRegistered(
     std::unique_ptr<WebServiceWorkerRegistrationCallbacks> callbacks,
     blink::mojom::ServiceWorkerErrorType error,
-    const base::Optional<std::string>& error_msg,
+    const absl::optional<std::string>& error_msg,
     blink::mojom::ServiceWorkerRegistrationObjectInfoPtr registration) {
   TRACE_EVENT_ASYNC_END2(
       "ServiceWorker", "WebServiceWorkerProviderImpl::RegisterServiceWorker",
@@ -243,7 +243,7 @@
 void WebServiceWorkerProviderImpl::OnDidGetRegistration(
     std::unique_ptr<WebServiceWorkerGetRegistrationCallbacks> callbacks,
     blink::mojom::ServiceWorkerErrorType error,
-    const base::Optional<std::string>& error_msg,
+    const absl::optional<std::string>& error_msg,
     blink::mojom::ServiceWorkerRegistrationObjectInfoPtr registration) {
   TRACE_EVENT_ASYNC_END2("ServiceWorker",
                          "WebServiceWorkerProviderImpl::GetRegistration", this,
@@ -271,8 +271,8 @@
 void WebServiceWorkerProviderImpl::OnDidGetRegistrations(
     std::unique_ptr<WebServiceWorkerGetRegistrationsCallbacks> callbacks,
     blink::mojom::ServiceWorkerErrorType error,
-    const base::Optional<std::string>& error_msg,
-    base::Optional<
+    const absl::optional<std::string>& error_msg,
+    absl::optional<
         std::vector<blink::mojom::ServiceWorkerRegistrationObjectInfoPtr>>
         infos) {
   TRACE_EVENT_ASYNC_END2("ServiceWorker",
diff --git a/content/renderer/service_worker/web_service_worker_provider_impl.h b/content/renderer/service_worker/web_service_worker_provider_impl.h
index 4a7d37da..ceea72f 100644
--- a/content/renderer/service_worker/web_service_worker_provider_impl.h
+++ b/content/renderer/service_worker/web_service_worker_provider_impl.h
@@ -70,20 +70,20 @@
   void OnRegistered(
       std::unique_ptr<WebServiceWorkerRegistrationCallbacks> callbacks,
       blink::mojom::ServiceWorkerErrorType error,
-      const base::Optional<std::string>& error_msg,
+      const absl::optional<std::string>& error_msg,
       blink::mojom::ServiceWorkerRegistrationObjectInfoPtr registration);
 
   void OnDidGetRegistration(
       std::unique_ptr<WebServiceWorkerGetRegistrationCallbacks> callbacks,
       blink::mojom::ServiceWorkerErrorType error,
-      const base::Optional<std::string>& error_msg,
+      const absl::optional<std::string>& error_msg,
       blink::mojom::ServiceWorkerRegistrationObjectInfoPtr registration);
 
   void OnDidGetRegistrations(
       std::unique_ptr<WebServiceWorkerGetRegistrationsCallbacks> callbacks,
       blink::mojom::ServiceWorkerErrorType error,
-      const base::Optional<std::string>& error_msg,
-      base::Optional<
+      const absl::optional<std::string>& error_msg,
+      absl::optional<
           std::vector<blink::mojom::ServiceWorkerRegistrationObjectInfoPtr>>
           infos);
 
diff --git a/content/renderer/stream_texture_host_android.cc b/content/renderer/stream_texture_host_android.cc
index 49583c7..d4ec36d 100644
--- a/content/renderer/stream_texture_host_android.cc
+++ b/content/renderer/stream_texture_host_android.cc
@@ -66,7 +66,7 @@
     const gpu::Mailbox& mailbox,
     const gfx::Size& coded_size,
     const gfx::Rect& visible_rect,
-    const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info) {
+    const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info) {
   if (listener_)
     listener_->OnFrameWithInfoAvailable(mailbox, coded_size, visible_rect,
                                         ycbcr_info);
diff --git a/content/renderer/stream_texture_host_android.h b/content/renderer/stream_texture_host_android.h
index 0510125..0752afb 100644
--- a/content/renderer/stream_texture_host_android.h
+++ b/content/renderer/stream_texture_host_android.h
@@ -48,7 +48,7 @@
         const gpu::Mailbox& mailbox,
         const gfx::Size& coded_size,
         const gfx::Rect& visible_rect,
-        const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info) = 0;
+        const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info) = 0;
     virtual ~Listener() {}
   };
 
@@ -70,7 +70,7 @@
       const gpu::Mailbox& mailbox,
       const gfx::Size& coded_size,
       const gfx::Rect& visible_rect,
-      const base::Optional<gpu::VulkanYCbCrInfo>& ycbcr_info);
+      const absl::optional<gpu::VulkanYCbCrInfo>& ycbcr_info);
 
   int32_t route_id_;
   Listener* listener_;
diff --git a/content/renderer/worker/shared_worker_factory_impl.cc b/content/renderer/worker/shared_worker_factory_impl.cc
index 9401fd49..aea9d034 100644
--- a/content/renderer/worker/shared_worker_factory_impl.cc
+++ b/content/renderer/worker/shared_worker_factory_impl.cc
@@ -37,7 +37,7 @@
         content_settings,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr
         service_worker_container_info,
-    const base::Optional<base::UnguessableToken>& appcache_host_id,
+    const absl::optional<base::UnguessableToken>& appcache_host_id,
     blink::mojom::WorkerMainScriptLoadParamsPtr main_script_load_params,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
diff --git a/content/renderer/worker/shared_worker_factory_impl.h b/content/renderer/worker/shared_worker_factory_impl.h
index 7206766..fc3b3b5 100644
--- a/content/renderer/worker/shared_worker_factory_impl.h
+++ b/content/renderer/worker/shared_worker_factory_impl.h
@@ -43,7 +43,7 @@
           content_settings,
       blink::mojom::ServiceWorkerContainerInfoForClientPtr
           service_worker_container_info,
-      const base::Optional<base::UnguessableToken>& appcache_host_id,
+      const absl::optional<base::UnguessableToken>& appcache_host_id,
       blink::mojom::WorkerMainScriptLoadParamsPtr main_script_load_params,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
diff --git a/content/services/auction_worklet/auction_downloader.cc b/content/services/auction_worklet/auction_downloader.cc
index 01ace1e..5194dff 100644
--- a/content/services/auction_worklet/auction_downloader.cc
+++ b/content/services/auction_worklet/auction_downloader.cc
@@ -168,7 +168,7 @@
   } else {
     // All OK!
     std::move(auction_downloader_callback_)
-        .Run(std::move(body), base::nullopt /* error_msg */);
+        .Run(std::move(body), absl::nullopt /* error_msg */);
   }
 }
 
diff --git a/content/services/auction_worklet/auction_downloader.h b/content/services/auction_worklet/auction_downloader.h
index 55c98737..5762a79 100644
--- a/content/services/auction_worklet/auction_downloader.h
+++ b/content/services/auction_worklet/auction_downloader.h
@@ -9,10 +9,10 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "net/url_request/redirect_info.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace network {
@@ -35,7 +35,7 @@
   // Passes in nullptr on failure. Always invoked asynchronously.
   using AuctionDownloaderCallback =
       base::OnceCallback<void(std::unique_ptr<std::string> response_body,
-                              base::Optional<std::string> error)>;
+                              absl::optional<std::string> error)>;
 
   // Starts loading the worklet script on construction. Callback will be invoked
   // asynchronously once the data has been fetched or an error has occurred.
diff --git a/content/services/auction_worklet/auction_downloader_unittest.cc b/content/services/auction_worklet/auction_downloader_unittest.cc
index 6abf337..f8e6177 100644
--- a/content/services/auction_worklet/auction_downloader_unittest.cc
+++ b/content/services/auction_worklet/auction_downloader_unittest.cc
@@ -9,7 +9,6 @@
 #include <vector>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/test/task_environment.h"
 #include "content/services/auction_worklet/worklet_test_util.h"
@@ -19,6 +18,7 @@
 #include "services/network/public/mojom/url_response_head.mojom.h"
 #include "services/network/test/test_url_loader_factory.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace auction_worklet {
@@ -59,7 +59,7 @@
 
  protected:
   void DownloadCompleteCallback(std::unique_ptr<std::string> body,
-                                base::Optional<std::string> error) {
+                                absl::optional<std::string> error) {
     DCHECK(!body_);
     DCHECK(run_loop_);
     body_ = std::move(body);
@@ -77,7 +77,7 @@
 
   std::unique_ptr<base::RunLoop> run_loop_;
   std::unique_ptr<std::string> body_;
-  base::Optional<std::string> error_;
+  absl::optional<std::string> error_;
 
   network::TestURLLoaderFactory url_loader_factory_;
 };
@@ -155,7 +155,7 @@
       last_error_msg());
 
   AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, kUtf8Charset,
-              kAsciiResponseBody, base::nullopt);
+              kAsciiResponseBody, absl::nullopt);
   EXPECT_FALSE(RunRequest());
   EXPECT_EQ(
       "Rejecting load of https://url.test/script.js due to lack of "
@@ -203,7 +203,7 @@
       last_error_msg());
 
   // Javascript request, no response type.
-  AddResponse(&url_loader_factory_, url_, base::nullopt, kUtf8Charset,
+  AddResponse(&url_loader_factory_, url_, absl::nullopt, kUtf8Charset,
               kAsciiResponseBody);
   EXPECT_FALSE(RunRequest());
   EXPECT_EQ(
@@ -239,7 +239,7 @@
       last_error_msg());
 
   // JSON request, no response type.
-  AddResponse(&url_loader_factory_, url_, base::nullopt, kUtf8Charset,
+  AddResponse(&url_loader_factory_, url_, absl::nullopt, kUtf8Charset,
               kAsciiResponseBody);
   EXPECT_FALSE(RunRequest());
   EXPECT_EQ(
@@ -403,17 +403,17 @@
       last_error_msg());
 
   // Null charset should act like UTF-8.
-  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, base::nullopt,
+  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, absl::nullopt,
               kAsciiResponseBody);
   body = RunRequest();
   ASSERT_TRUE(body);
   EXPECT_EQ(kAsciiResponseBody, *body);
-  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, base::nullopt,
+  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, absl::nullopt,
               kUtf8ResponseBody);
   body = RunRequest();
   ASSERT_TRUE(body);
   EXPECT_EQ(kUtf8ResponseBody, *body);
-  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, base::nullopt,
+  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, absl::nullopt,
               kNonUtf8ResponseBody);
   EXPECT_FALSE(RunRequest());
   EXPECT_EQ(
diff --git a/content/services/auction_worklet/auction_runner.cc b/content/services/auction_worklet/auction_runner.cc
index 2c28559..85cdc074 100644
--- a/content/services/auction_worklet/auction_runner.cc
+++ b/content/services/auction_worklet/auction_runner.cc
@@ -5,13 +5,13 @@
 #include "content/services/auction_worklet/auction_runner.h"
 
 #include "base/callback_forward.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/services/auction_worklet/auction_v8_helper.h"
 #include "content/services/auction_worklet/bidder_worklet.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom.h"
 #include "content/services/auction_worklet/seller_worklet.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
 #include "url/gurl.h"
 
@@ -77,7 +77,7 @@
 
 void AuctionRunner::OnGenerateBidComplete(
     BidState* state,
-    base::Optional<BidderWorklet::Bid> bid,
+    absl::optional<BidderWorklet::Bid> bid,
     const std::vector<std::string>& errors) {
   DCHECK(!state->bid_generate_complete);
   DCHECK_GT(outstanding_bids_, 0);
@@ -154,7 +154,7 @@
   return "#####";
 }
 
-base::Optional<std::string> AuctionRunner::PerBuyerSignals(
+absl::optional<std::string> AuctionRunner::PerBuyerSignals(
     const BidState* state) {
   if (auction_config_->per_buyer_signals.has_value()) {
     auto it = auction_config_->per_buyer_signals.value().find(
@@ -162,7 +162,7 @@
     if (it != auction_config_->per_buyer_signals.value().end())
       return it->second;
   }
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 void AuctionRunner::CompleteAuction() {
@@ -198,8 +198,8 @@
 
 void AuctionRunner::OnReportSellerResultComplete(
     const BidState* best_bid,
-    const base::Optional<std::string>& signals_for_winner,
-    const base::Optional<GURL>& seller_report_url,
+    const absl::optional<std::string>& signals_for_winner,
+    const absl::optional<GURL>& seller_report_url,
     const std::vector<std::string>& errors) {
   signals_for_winner_ = signals_for_winner;
   seller_report_url_ = seller_report_url;
@@ -225,7 +225,7 @@
 
 void AuctionRunner::OnReportBidWinComplete(
     const BidState* best_bid,
-    const base::Optional<GURL>& bidder_report_url,
+    const absl::optional<GURL>& bidder_report_url,
     const std::vector<std::string>& errors) {
   bidder_report_url_ = bidder_report_url;
   errors_.insert(errors_.end(), errors.begin(), errors.end());
diff --git a/content/services/auction_worklet/auction_runner.h b/content/services/auction_worklet/auction_runner.h
index a155dd2b..d164bda 100644
--- a/content/services/auction_worklet/auction_runner.h
+++ b/content/services/auction_worklet/auction_runner.h
@@ -10,13 +10,13 @@
 
 #include "base/callback_forward.h"
 #include "base/logging.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/services/auction_worklet/auction_v8_helper.h"
 #include "content/services/auction_worklet/bidder_worklet.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom.h"
 #include "content/services/auction_worklet/seller_worklet.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
 #include "url/gurl.h"
 
@@ -60,7 +60,7 @@
     bool bid_generate_complete = false;
 
     std::unique_ptr<BidderWorklet> bidder_worklet;
-    base::Optional<BidderWorklet::Bid> bid_result;
+    absl::optional<BidderWorklet::Bid> bid_result;
     double seller_score = 0;
   };
 
@@ -74,7 +74,7 @@
 
   void StartBidding();
   void OnGenerateBidComplete(BidState* state,
-                             base::Optional<BidderWorklet::Bid> bid,
+                             absl::optional<BidderWorklet::Bid> bid,
                              const std::vector<std::string>& errors);
 
   // True if all bid results and the seller script load are complete.
@@ -94,7 +94,7 @@
   void OnBidScored(double score, const std::vector<std::string>& errors);
 
   std::string AdRenderFingerprint(const BidState* state);
-  base::Optional<std::string> PerBuyerSignals(const BidState* state);
+  absl::optional<std::string> PerBuyerSignals(const BidState* state);
 
   void CompleteAuction();  // Indirectly deletes `this`, if there's no winner.
 
@@ -104,12 +104,12 @@
   void ReportSellerResult(const BidState* state);
   void OnReportSellerResultComplete(
       const BidState* best_bid,
-      const base::Optional<std::string>& signals_for_winner,
-      const base::Optional<GURL>& seller_report_url,
+      const absl::optional<std::string>& signals_for_winner,
+      const absl::optional<GURL>& seller_report_url,
       const std::vector<std::string>& errors);
   void ReportBidWin(const BidState* state);
   void OnReportBidWinComplete(const BidState* best_bid,
-                              const base::Optional<GURL>& bidder_report_url,
+                              const absl::optional<GURL>& bidder_report_url,
                               const std::vector<std::string>& error_msgs);
 
   // Destroys `this`.
@@ -146,11 +146,11 @@
   size_t seller_considering_ = 0;
 
   // Seller script reportResult() results.
-  base::Optional<std::string> signals_for_winner_;
-  base::Optional<GURL> seller_report_url_;
+  absl::optional<std::string> signals_for_winner_;
+  absl::optional<GURL> seller_report_url_;
 
   // Bidder script reportWin() results.
-  base::Optional<GURL> bidder_report_url_;
+  absl::optional<GURL> bidder_report_url_;
 
   // All errors reported by worklets thus far.
   std::vector<std::string> errors_;
diff --git a/content/services/auction_worklet/auction_runner_unittest.cc b/content/services/auction_worklet/auction_runner_unittest.cc
index e90c6b8..cb62811 100644
--- a/content/services/auction_worklet/auction_runner_unittest.cc
+++ b/content/services/auction_worklet/auction_runner_unittest.cc
@@ -258,7 +258,7 @@
       const url::Origin& owner,
       const std::string& name,
       const GURL& bidding_url,
-      const base::Optional<GURL>& trusted_bidding_signals_url,
+      const absl::optional<GURL>& trusted_bidding_signals_url,
       const std::vector<std::string>& trusted_bidding_signals_keys,
       const GURL& ad_url) {
     std::vector<blink::mojom::InterestGroupAdPtr> ads;
@@ -277,7 +277,7 @@
         blink::mojom::InterestGroup::New(
             base::Time::Max(), owner, name, bidding_url,
             GURL() /* update_url */, trusted_bidding_signals_url,
-            trusted_bidding_signals_keys, base::nullopt, std::move(ads)),
+            trusted_bidding_signals_keys, absl::nullopt, std::move(ads)),
         mojom::BiddingBrowserSignals::New(3, 5, std::move(previous_wins)));
   }
 
@@ -581,10 +581,10 @@
 
   std::vector<mojom::BiddingInterestGroupPtr> bidders;
   bidders.push_back(MakeInterestGroup(kBidder1, kBidder1Name, kBidder1Url,
-                                      base::nullopt, {"k1", "k2"},
+                                      absl::nullopt, {"k1", "k2"},
                                       GURL("https://ad1.com")));
   bidders.push_back(MakeInterestGroup(kBidder2, kBidder2Name, kBidder2Url,
-                                      base::nullopt, {"l1", "l2"},
+                                      absl::nullopt, {"l1", "l2"},
                                       GURL("https://ad2.com")));
 
   Result res = RunAuctionAndWait(
diff --git a/content/services/auction_worklet/auction_v8_helper.cc b/content/services/auction_worklet/auction_v8_helper.cc
index 5bff8e4..14ece7d 100644
--- a/content/services/auction_worklet/auction_v8_helper.cc
+++ b/content/services/auction_worklet/auction_v8_helper.cc
@@ -277,7 +277,7 @@
 v8::MaybeLocal<v8::UnboundScript> AuctionV8Helper::Compile(
     const std::string& src,
     const GURL& src_url,
-    base::Optional<std::string>& error_out) {
+    absl::optional<std::string>& error_out) {
   v8::Isolate* v8_isolate = isolate();
 
   v8::MaybeLocal<v8::String> src_string = CreateUtf8String(src);
@@ -305,7 +305,7 @@
     v8::Local<v8::UnboundScript> script,
     base::StringPiece script_name,
     base::span<v8::Local<v8::Value>> args,
-    base::Optional<std::string>& error_out) {
+    absl::optional<std::string>& error_out) {
   DCHECK_EQ(isolate(), context->GetIsolate());
 
   v8::Local<v8::String> v8_script_name;
diff --git a/content/services/auction_worklet/auction_v8_helper.h b/content/services/auction_worklet/auction_v8_helper.h
index 5888242..1659c66 100644
--- a/content/services/auction_worklet/auction_v8_helper.h
+++ b/content/services/auction_worklet/auction_v8_helper.h
@@ -10,10 +10,10 @@
 
 #include "base/compiler_specific.h"
 #include "base/containers/span.h"
-#include "base/optional.h"
 #include "base/strings/string_piece.h"
 #include "base/time/time.h"
 #include "gin/public/isolate_holder.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "v8/include/v8.h"
 
@@ -115,7 +115,7 @@
   v8::MaybeLocal<v8::UnboundScript> Compile(
       const std::string& src,
       const GURL& src_url,
-      base::Optional<std::string>& error_out);
+      absl::optional<std::string>& error_out);
 
   // Binds a script and runs it in the passed in context, returning the result.
   // Note that the returned value could include references to objects or
@@ -133,7 +133,7 @@
                                       v8::Local<v8::UnboundScript> script,
                                       base::StringPiece script_name,
                                       base::span<v8::Local<v8::Value>> args,
-                                      base::Optional<std::string>& error_out);
+                                      absl::optional<std::string>& error_out);
 
   void set_script_timeout_for_testing(base::TimeDelta script_timeout) {
     script_timeout_ = script_timeout;
diff --git a/content/services/auction_worklet/auction_v8_helper_unittest.cc b/content/services/auction_worklet/auction_v8_helper_unittest.cc
index ae37ddb..ad3d90e 100644
--- a/content/services/auction_worklet/auction_v8_helper_unittest.cc
+++ b/content/services/auction_worklet/auction_v8_helper_unittest.cc
@@ -6,12 +6,12 @@
 
 #include <string>
 
-#include "base/optional.h"
 #include "base/test/task_environment.h"
 #include "base/time/time.h"
 #include "gin/converter.h"
 #include "testing/gmock/include/gmock/gmock-matchers.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "v8/include/v8.h"
 
@@ -37,7 +37,7 @@
   v8::Local<v8::UnboundScript> script;
   {
     v8::Context::Scope ctx(helper_.scratch_context());
-    base::Optional<std::string> error_msg;
+    absl::optional<std::string> error_msg;
     ASSERT_TRUE(helper_
                     .Compile("function foo() { return 1;}",
                              GURL("https://foo.test/"), error_msg)
@@ -47,7 +47,7 @@
 
   for (v8::Local<v8::Context> context :
        {helper_.scratch_context(), helper_.CreateContext()}) {
-    base::Optional<std::string> error_msg;
+    absl::optional<std::string> error_msg;
     v8::Context::Scope ctx(context);
     v8::Local<v8::Value> result;
     ASSERT_TRUE(helper_
@@ -93,7 +93,7 @@
     v8::Context::Scope context_scope(context);
 
     v8::Local<v8::UnboundScript> script;
-    base::Optional<std::string> error_msg;
+    absl::optional<std::string> error_msg;
     ASSERT_TRUE(helper_
                     .Compile(hanging_script.script, GURL("https://foo.test/"),
                              error_msg)
@@ -122,7 +122,7 @@
   v8::Local<v8::Context> context = helper_.CreateContext();
   v8::Context::Scope context_scope(context);
   v8::Local<v8::UnboundScript> script;
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   ASSERT_TRUE(helper_
                   .Compile("function foo() { return 1;}",
                            GURL("https://foo.test/"), error_msg)
@@ -147,7 +147,7 @@
 
   // Make sure Date() is not accessible.
   v8::Local<v8::UnboundScript> script;
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   ASSERT_TRUE(helper_
                   .Compile("function foo() { return Date();}",
                            GURL("https://foo.test/"), error_msg)
@@ -167,7 +167,7 @@
 TEST_F(AuctionV8HelperTest, CompileError) {
   v8::Local<v8::UnboundScript> script;
   v8::Context::Scope ctx(helper_.scratch_context());
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   ASSERT_FALSE(
       helper_.Compile("function foo() { ", GURL("https://foo.test/"), error_msg)
           .ToLocal(&script));
@@ -181,7 +181,7 @@
   v8::Local<v8::UnboundScript> script;
   {
     v8::Context::Scope ctx(helper_.scratch_context());
-    base::Optional<std::string> error_msg;
+    absl::optional<std::string> error_msg;
     ASSERT_TRUE(helper_
                     .Compile("\n\nthrow new Error('I am an error');",
                              GURL("https://foo.test/"), error_msg)
@@ -190,7 +190,7 @@
   }
 
   v8::Local<v8::Context> context = helper_.CreateContext();
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   v8::Context::Scope ctx(context);
   v8::Local<v8::Value> result;
   ASSERT_FALSE(helper_
@@ -207,7 +207,7 @@
   v8::Local<v8::UnboundScript> script;
   {
     v8::Context::Scope ctx(helper_.scratch_context());
-    base::Optional<std::string> error_msg;
+    absl::optional<std::string> error_msg;
     ASSERT_TRUE(helper_
                     .Compile("function foo() { return 1;}",
                              GURL("https://foo.test/"), error_msg)
@@ -217,7 +217,7 @@
 
   v8::Local<v8::Context> context = helper_.CreateContext();
 
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   v8::Context::Scope ctx(context);
   v8::Local<v8::Value> result;
   ASSERT_FALSE(helper_
@@ -235,7 +235,7 @@
   v8::Local<v8::UnboundScript> script;
   {
     v8::Context::Scope ctx(helper_.scratch_context());
-    base::Optional<std::string> error_msg;
+    absl::optional<std::string> error_msg;
     ASSERT_TRUE(helper_
                     .Compile("function foo() { return notfound;}",
                              GURL("https://foo.test/"), error_msg)
@@ -245,7 +245,7 @@
 
   v8::Local<v8::Context> context = helper_.CreateContext();
 
-  base::Optional<std::string> error_msg;
+  absl::optional<std::string> error_msg;
   v8::Context::Scope ctx(context);
   v8::Local<v8::Value> result;
   ASSERT_FALSE(helper_
diff --git a/content/services/auction_worklet/bidder_worklet.cc b/content/services/auction_worklet/bidder_worklet.cc
index 28a9022..ced7edd9 100644
--- a/content/services/auction_worklet/bidder_worklet.cc
+++ b/content/services/auction_worklet/bidder_worklet.cc
@@ -13,7 +13,6 @@
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/logging.h"
-#include "base/optional.h"
 #include "base/stl_util.h"
 #include "base/strings/strcat.h"
 #include "base/time/time.h"
@@ -25,6 +24,7 @@
 #include "gin/converter.h"
 #include "gin/dictionary.h"
 #include "mojo/public/cpp/bindings/struct_ptr.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -36,7 +36,7 @@
 
 bool AppendJsonValueOrNull(AuctionV8Helper* const v8_helper,
                            v8::Local<v8::Context> context,
-                           const base::Optional<std::string>& maybe_json,
+                           const absl::optional<std::string>& maybe_json,
                            std::vector<v8::Local<v8::Value>>* args) {
   v8::Isolate* isolate = v8_helper->isolate();
   if (maybe_json.has_value()) {
@@ -53,7 +53,7 @@
 //
 // TODO(mmenke): Remove once this class switches over to using Mojo.
 void InvokeReportWinCallbackAsync(BidderWorklet::ReportWinCallback callback,
-                                  const base::Optional<GURL>& report_url,
+                                  const absl::optional<GURL>& report_url,
                                   const std::vector<std::string>& errors) {
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::BindOnce(std::move(callback), report_url, errors));
@@ -83,8 +83,8 @@
     AuctionV8Helper* v8_helper,
     network::mojom::URLLoaderFactory* url_loader_factory,
     mojom::BiddingInterestGroupPtr bidding_interest_group,
-    const base::Optional<std::string>& auction_signals_json,
-    const base::Optional<std::string>& per_buyer_signals_json,
+    const absl::optional<std::string>& auction_signals_json,
+    const absl::optional<std::string>& per_buyer_signals_json,
     const url::Origin& browser_signal_top_window_origin,
     const url::Origin& browser_signal_seller_origin,
     base::Time auction_start_time,
@@ -153,7 +153,7 @@
       !AppendJsonValueOrNull(v8_helper_, context, per_buyer_signals_json_,
                              &args) ||
       !v8_helper_->AppendJsonValue(context, seller_signals_json, &args)) {
-    std::move(callback).Run(base::nullopt /* report_url */,
+    std::move(callback).Run(absl::nullopt /* report_url */,
                             std::vector<std::string>() /* errors */);
     return;
   }
@@ -172,7 +172,7 @@
       !browser_signals_dict.Set("adRenderFingerprint",
                                 browser_signal_ad_render_fingerprint) ||
       !browser_signals_dict.Set("bid", browser_signal_bid)) {
-    std::move(callback).Run(base::nullopt /* report_url */,
+    std::move(callback).Run(absl::nullopt /* report_url */,
                             std::vector<std::string>() /* errors */);
     return;
   }
@@ -180,7 +180,7 @@
 
   // An empty return value indicates an exception was thrown. Any other return
   // value indicates no exception.
-  base::Optional<std::string> error_msg_out;
+  absl::optional<std::string> error_msg_out;
   if (v8_helper_
           ->RunScript(context, worklet_script_->Get(isolate), "reportWin", args,
                       error_msg_out)
@@ -188,7 +188,7 @@
     std::vector<std::string> errors;
     if (error_msg_out)
       errors.push_back(std::move(error_msg_out).value());
-    std::move(callback).Run(base::nullopt /* report_url */, errors);
+    std::move(callback).Run(absl::nullopt /* report_url */, errors);
     return;
   }
 
@@ -200,7 +200,7 @@
 
 void BidderWorklet::OnScriptDownloaded(
     std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-    base::Optional<std::string> error_msg) {
+    absl::optional<std::string> error_msg) {
   DCHECK(load_script_and_generate_bid_callback_);
 
   if (worklet_script == nullptr) {
@@ -217,7 +217,7 @@
 
 void BidderWorklet::OnTrustedBiddingSignalsDownloaded(
     bool load_result,
-    base::Optional<std::string> error_msg) {
+    absl::optional<std::string> error_msg) {
   // Worklet results should still be pending.
   DCHECK(load_script_and_generate_bid_callback_);
   DCHECK(trusted_bidding_signals_loading_);
@@ -345,7 +345,7 @@
   args.push_back(browser_signals);
 
   v8::Local<v8::Value> generate_bid_result;
-  base::Optional<std::string> error_msg_out;
+  absl::optional<std::string> error_msg_out;
   if (!v8_helper_
            ->RunScript(context, worklet_script_->Get(isolate), "generateBid",
                        args, error_msg_out)
@@ -413,7 +413,7 @@
 }
 
 void BidderWorklet::InvokeBidCallbackOnError(
-    base::Optional<std::string> error_msg) {
+    absl::optional<std::string> error_msg) {
   std::vector<std::string> errors;
   if (error_msg)
     errors.emplace_back(std::move(error_msg).value());
@@ -421,7 +421,7 @@
     errors.emplace_back(std::move(trusted_bidding_signals_error_msg_).value());
   }
   std::move(load_script_and_generate_bid_callback_)
-      .Run(base::nullopt /* bid */, errors);
+      .Run(absl::nullopt /* bid */, errors);
 }
 
 }  // namespace auction_worklet
diff --git a/content/services/auction_worklet/bidder_worklet.h b/content/services/auction_worklet/bidder_worklet.h
index 9478e49..fd88752 100644
--- a/content/services/auction_worklet/bidder_worklet.h
+++ b/content/services/auction_worklet/bidder_worklet.h
@@ -11,12 +11,12 @@
 #include <vector>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom-forward.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom.h"
 #include "mojo/public/cpp/bindings/struct_ptr.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom-forward.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -79,7 +79,7 @@
   // - auctions will still be run without it, but `errors` will be populated
   // with information about the load failure.
   using LoadScriptAndGenerateBidCallback =
-      base::OnceCallback<void(base::Optional<Bid> bid,
+      base::OnceCallback<void(absl::optional<Bid> bid,
                               const std::vector<std::string>& errors)>;
 
   // `report_url` is the URL to request to report displaying the ad. It is
@@ -87,7 +87,7 @@
   // errors that occurred, if any. `errors` may be non-empty on success, or
   // empty on failure.
   using ReportWinCallback =
-      base::OnceCallback<void(const base::Optional<GURL>& report_url,
+      base::OnceCallback<void(const absl::optional<GURL>& report_url,
                               const std::vector<std::string>& errors)>;
 
   // Starts loading the worklet script on construction, as well as the trusted
@@ -101,8 +101,8 @@
       AuctionV8Helper* v8_helper,
       network::mojom::URLLoaderFactory* url_loader_factory,
       mojom::BiddingInterestGroupPtr bidding_interest_group,
-      const base::Optional<std::string>& auction_signals_json,
-      const base::Optional<std::string>& per_buyer_signals_json,
+      const absl::optional<std::string>& auction_signals_json,
+      const absl::optional<std::string>& per_buyer_signals_json,
       const url::Origin& browser_signal_top_window_origin,
       const url::Origin& browser_signal_seller_origin,
       base::Time auction_start_time,
@@ -122,10 +122,10 @@
  private:
   void OnScriptDownloaded(
       std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-      base::Optional<std::string> error_msg);
+      absl::optional<std::string> error_msg);
 
   void OnTrustedBiddingSignalsDownloaded(bool load_result,
-                                         base::Optional<std::string> error_msg);
+                                         absl::optional<std::string> error_msg);
 
   // Checks if the script has been loaded successfully, and the
   // TrustedBiddingSignals load has finished (successfully or not). If so, calls
@@ -137,7 +137,7 @@
   // Utility function to invoke `load_script_and_generate_bid_callback_` with
   // `error_msg` and `trusted_bidding_signals_error_msg_`.
   void InvokeBidCallbackOnError(
-      base::Optional<std::string> error_msg = base::nullopt);
+      absl::optional<std::string> error_msg = absl::nullopt);
 
   AuctionV8Helper* const v8_helper_;
 
@@ -146,8 +146,8 @@
 
   LoadScriptAndGenerateBidCallback load_script_and_generate_bid_callback_;
 
-  const base::Optional<std::string> auction_signals_json_;
-  const base::Optional<std::string> per_buyer_signals_json_;
+  const absl::optional<std::string> auction_signals_json_;
+  const absl::optional<std::string> per_buyer_signals_json_;
   const std::string browser_signal_top_window_hostname_;
   // Serialized copy of seller's origin.
   const std::string browser_signal_seller_;
@@ -160,7 +160,7 @@
   // Error message returned by attempt to load `trusted_bidding_signals_`.
   // Errors loading it are not fatal, so such errors are cached here and only
   // reported on bid completion.
-  base::Optional<std::string> trusted_bidding_signals_error_msg_;
+  absl::optional<std::string> trusted_bidding_signals_error_msg_;
 
   // Compiled script, not bound to any context. Can be repeatedly bound to
   // different context and executed, without persisting any state.
diff --git a/content/services/auction_worklet/bidder_worklet_unittest.cc b/content/services/auction_worklet/bidder_worklet_unittest.cc
index e9abda7..e86467f 100644
--- a/content/services/auction_worklet/bidder_worklet_unittest.cc
+++ b/content/services/auction_worklet/bidder_worklet_unittest.cc
@@ -9,7 +9,6 @@
 #include <vector>
 
 #include "base/bind.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/strings/stringprintf.h"
 #include "base/test/bind.h"
@@ -23,6 +22,7 @@
 #include "services/network/test/test_url_loader_factory.h"
 #include "testing/gmock/include/gmock/gmock-matchers.h"
 #include "testing/gtest/include/gtest/gtest.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -82,7 +82,7 @@
 
     interest_group_ads_.clear();
     interest_group_ads_.push_back(blink::mojom::InterestGroupAd::New(
-        GURL("https://response.test/"), base::nullopt /* metadata */));
+        GURL("https://response.test/"), absl::nullopt /* metadata */));
 
     interest_group_trusted_bidding_signals_url_.reset();
     interest_group_trusted_bidding_signals_keys_.reset();
@@ -110,7 +110,7 @@
   // specified return line Then runs the script, expecting the provided result.
   void RunGenerateBidWithReturnValueExpectingResult(
       const std::string& raw_return_value,
-      const base::Optional<BidderWorklet::Bid> expected_bid,
+      const absl::optional<BidderWorklet::Bid> expected_bid,
       std::vector<std::string> expected_errors = std::vector<std::string>()) {
     RunGenerateBidWithJavascriptExpectingResult(
         CreateGenerateBidScript(raw_return_value), expected_bid,
@@ -121,7 +121,7 @@
   // Javascript Then runs the script, expecting the provided result.
   void RunGenerateBidWithJavascriptExpectingResult(
       const std::string& javascript,
-      const base::Optional<BidderWorklet::Bid> expected_bid,
+      const absl::optional<BidderWorklet::Bid> expected_bid,
       std::vector<std::string> expected_errors = std::vector<std::string>()) {
     SCOPED_TRACE(javascript);
     AddJavascriptResponse(&url_loader_factory_, interest_group_bidding_url_,
@@ -131,7 +131,7 @@
 
   // Loads and runs a generateBid() script, expecting the provided result.
   void RunGenerateBidExpectingResult(
-      const base::Optional<BidderWorklet::Bid> expected_bid,
+      const absl::optional<BidderWorklet::Bid> expected_bid,
       std::vector<std::string> expected_errors = std::vector<std::string>()) {
     auto bidder_worklet = CreateWorkletAndGenerateBid();
 
@@ -148,7 +148,7 @@
   // specified body. Then runs the script, expecting the provided result.
   void RunReportWinWithFunctionBodyExpectingResult(
       const std::string& function_body,
-      const base::Optional<GURL>& expected_report_url,
+      const absl::optional<GURL>& expected_report_url,
       const std::vector<std::string>& expected_errors =
           std::vector<std::string>()) {
     RunReportWinWithJavascriptExpectingResult(
@@ -160,7 +160,7 @@
   // specified Javascript. Then runs the script, expecting the provided result.
   void RunReportWinWithJavascriptExpectingResult(
       const std::string& javascript,
-      const base::Optional<GURL>& expected_report_url,
+      const absl::optional<GURL>& expected_report_url,
       const std::vector<std::string>& expected_errors =
           std::vector<std::string>()) {
     SCOPED_TRACE(javascript);
@@ -172,7 +172,7 @@
   // Loads and runs a reportWin() with the provided return line, expecting the
   // supplied result.
   void RunReportWinExpectingResult(
-      const base::Optional<GURL>& expected_report_url,
+      const absl::optional<GURL>& expected_report_url,
       const std::vector<std::string>& expected_errors =
           std::vector<std::string>()) {
     auto bidder_worket = CreateWorkletAndGenerateBid();
@@ -184,7 +184,7 @@
         browser_signal_ad_render_fingerprint_, browser_signal_bid_,
         base::BindLambdaForTesting(
             [&run_loop, &expected_report_url, &expected_errors](
-                const base::Optional<GURL>& report_url,
+                const absl::optional<GURL>& report_url,
                 const std::vector<std::string>& errors) {
               EXPECT_EQ(expected_report_url, report_url);
               EXPECT_EQ(expected_errors, errors);
@@ -228,11 +228,11 @@
     auto bidder_worket = std::make_unique<BidderWorklet>(
         &v8_helper_, &url_loader_factory_, std::move(bidding_interest_group),
         null_auction_signals_
-            ? base::nullopt
-            : base::make_optional<std::string>(auction_signals_),
+            ? absl::nullopt
+            : absl::make_optional<std::string>(auction_signals_),
         null_per_buyer_signals_
-            ? base::nullopt
-            : base::make_optional<std::string>(per_buyer_signals_),
+            ? absl::nullopt
+            : absl::make_optional<std::string>(per_buyer_signals_),
         browser_signal_top_window_origin_, browser_signal_seller_origin_,
         auction_start_time_,
         base::BindOnce(&BidderWorkletTest::CreateWorkletCallback,
@@ -245,7 +245,7 @@
     return bidder_worket;
   }
 
-  const base::Optional<BidderWorklet::Bid>& bid() const { return bid_; }
+  const absl::optional<BidderWorklet::Bid>& bid() const { return bid_; }
   const std::vector<std::string> bid_errors() const { return bid_errors_; }
 
  protected:
@@ -258,7 +258,7 @@
     return out;
   }
 
-  void CreateWorkletCallback(base::Optional<BidderWorklet::Bid> bid,
+  void CreateWorkletCallback(absl::optional<BidderWorklet::Bid> bid,
                              const std::vector<std::string>& errors) {
     bid_ = std::move(bid);
     bid_errors_ = errors;
@@ -276,8 +276,8 @@
   // string. An empty string means nullptr.
   std::string interest_group_user_bidding_signals_;
   std::vector<blink::mojom::InterestGroupAdPtr> interest_group_ads_;
-  base::Optional<GURL> interest_group_trusted_bidding_signals_url_;
-  base::Optional<std::vector<std::string>>
+  absl::optional<GURL> interest_group_trusted_bidding_signals_url_;
+  absl::optional<std::vector<std::string>>
       interest_group_trusted_bidding_signals_keys_;
   int browser_signal_join_count_;
   int browser_signal_bid_count_;
@@ -308,7 +308,7 @@
   std::unique_ptr<base::RunLoop> load_script_run_loop_;
 
   // Values passed to the GenerateBidCallback().
-  base::Optional<BidderWorklet::Bid> bid_;
+  absl::optional<BidderWorklet::Bid> bid_;
   std::vector<std::string> bid_errors_;
 
   network::TestURLLoaderFactory url_loader_factory_;
@@ -320,7 +320,7 @@
                                   CreateBasicGenerateBidScript(),
                                   net::HTTP_NOT_FOUND);
   RunGenerateBidExpectingResult(
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"Failed to load https://url.test/ HTTP status = 404 Not Found."});
 }
 
@@ -382,12 +382,12 @@
   // Other values JSON can't represent result in failing instead of null.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: globalThis.not_defined, bid:1, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: function() {return 1;}, bid:1, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
 
@@ -400,7 +400,7 @@
           return {ad: a, bid:1, render:"https://response.test/"};
         }
       )",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
 
@@ -425,34 +425,34 @@
   // Bids <= 0.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:0, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */);
+      absl::nullopt /* expected_bid */);
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:-10, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */);
+      absl::nullopt /* expected_bid */);
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:-1.5, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */);
+      absl::nullopt /* expected_bid */);
 
   // Infinite and NaN bid.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1/0, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */);
+      absl::nullopt /* expected_bid */);
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:-1/0, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */);
+      absl::nullopt /* expected_bid */);
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:0/0, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */);
+      absl::nullopt /* expected_bid */);
 
   // Non-numeric bid.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:"1", render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:[1], render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
 
@@ -468,42 +468,42 @@
   // Disallowed schemes.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1, render:"http://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned "
        "render_url isn't a valid https:// URL."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1, render:"chrome-extension://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned "
        "render_url isn't a valid https:// URL."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1, render:"about:blank"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned "
        "render_url isn't a valid https:// URL."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1, render:"data:,foo"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned "
        "render_url isn't a valid https:// URL."});
 
   // Invalid URLs.
   RunGenerateBidWithReturnValueExpectingResult(
-      R"({ad: ["ad"], bid:1, render:"test"})", base::nullopt /* expected_bid */,
+      R"({ad: ["ad"], bid:1, render:"test"})", absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned "
        "render_url isn't a valid https:// URL."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1, render:"http://"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned "
        "render_url isn't a valid https:// URL."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], bid:1, render:["http://response.test/"]})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
   RunGenerateBidWithReturnValueExpectingResult(
-      R"({ad: ["ad"], bid:1, render:9})", base::nullopt /* expected_bid */,
+      R"({ad: ["ad"], bid:1, render:9})", absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
 
@@ -513,22 +513,22 @@
 
   // No return value.
   RunGenerateBidWithReturnValueExpectingResult(
-      "", base::nullopt /* expected_bid */,
+      "", absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value not an object."});
 
   // Missing value.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({bid:"a", render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: ["ad"], render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
   RunGenerateBidWithReturnValueExpectingResult(
-      R"({ad: ["ad"], bid:"a"})", base::nullopt /* expected_bid */,
+      R"({ad: ["ad"], bid:"a"})", absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() return value "
        "has incorrect structure."});
 
@@ -539,18 +539,18 @@
           return {ad: ["ad"], bid:1, render:"https://response.test/"};
         }
       )",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ `generateBid` is not a function."});
   RunGenerateBidWithJavascriptExpectingResult(
-      "", base::nullopt /* expected_bid */,
+      "", absl::nullopt /* expected_bid */,
       {"https://url.test/ `generateBid` is not a function."});
   RunGenerateBidWithJavascriptExpectingResult(
-      "5", base::nullopt /* expected_bid */,
+      "5", absl::nullopt /* expected_bid */,
       {"https://url.test/ `generateBid` is not a function."});
 
   // Throw exception.
   RunGenerateBidWithJavascriptExpectingResult(
-      "shrimp", base::nullopt /* expected_bid */,
+      "shrimp", absl::nullopt /* expected_bid */,
       {"https://url.test/:1 Uncaught ReferenceError: "
        "shrimp is not defined."});
 }
@@ -559,7 +559,7 @@
 TEST_F(BidderWorkletTest, GenerateBidDateNotAvailable) {
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: Date().toString(), bid:1, render:"https://response.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/:4 Uncaught ReferenceError: Date is not defined."});
 }
 
@@ -606,7 +606,7 @@
             R"({ad: %s, bid:1, render:"https://response.test/"})",
             test_case.name),
         test_case.is_json
-            ? base::Optional<BidderWorklet::Bid>()
+            ? absl::optional<BidderWorklet::Bid>()
             : BidderWorklet::Bid(R"("foo")", 1, GURL("https://response.test/"),
                                  base::TimeDelta()));
 
@@ -716,7 +716,7 @@
   // A bid URL that's not in the InterestGroup's ads list should fail.
   RunGenerateBidWithReturnValueExpectingResult(
       R"({ad: 0, bid:1, render:"https://response2.test/"})",
-      base::nullopt /* expected_bid */,
+      absl::nullopt /* expected_bid */,
       {"https://url.test/ generateBid() returned render_url isn't one of "
        "the registered creative URLs."});
 
@@ -942,10 +942,10 @@
 
 TEST_F(BidderWorkletTest, ReportWin) {
   RunReportWinWithFunctionBodyExpectingResult(
-      "", base::nullopt /* expected_report_url */);
+      "", absl::nullopt /* expected_report_url */);
   RunReportWinWithFunctionBodyExpectingResult(
       R"(return "https://ignored.test/")",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   RunReportWinWithFunctionBodyExpectingResult(
       R"(sendReportTo("https://foo.test"))", GURL("https://foo.test/"));
@@ -954,23 +954,23 @@
 
   RunReportWinWithFunctionBodyExpectingResult(
       R"(sendReportTo("http://http.not.allowed.test"))",
-      base::nullopt /* expected_report_url */,
+      absl::nullopt /* expected_report_url */,
       {"https://url.test/:9 Uncaught TypeError: sendReportTo must be passed a "
        "valid HTTPS url."});
   RunReportWinWithFunctionBodyExpectingResult(
       R"(sendReportTo("file:///file.not.allowed.test"))",
-      base::nullopt /* expected_report_url */,
+      absl::nullopt /* expected_report_url */,
       {"https://url.test/:9 Uncaught TypeError: sendReportTo must be passed a "
        "valid HTTPS url."});
 
   RunReportWinWithFunctionBodyExpectingResult(
-      R"(sendReportTo(""))", base::nullopt /* expected_report_url */,
+      R"(sendReportTo(""))", absl::nullopt /* expected_report_url */,
       {"https://url.test/:9 Uncaught TypeError: sendReportTo must be passed a "
        "valid HTTPS url."});
 
   RunReportWinWithFunctionBodyExpectingResult(
       R"(sendReportTo("https://foo.test");sendReportTo("https://foo.test"))",
-      base::nullopt /* expected_report_url */,
+      absl::nullopt /* expected_report_url */,
       {"https://url.test/:9 Uncaught TypeError: sendReportTo may be called at "
        "most once."});
 }
@@ -979,7 +979,7 @@
 TEST_F(BidderWorkletTest, ReportWinDateNotAvailable) {
   RunReportWinWithFunctionBodyExpectingResult(
       R"(sendReportTo("https://foo.test/" + Date().toString()))",
-      base::nullopt /* expected_report_url */,
+      absl::nullopt /* expected_report_url */,
       {"https://url.test/:9 Uncaught ReferenceError: Date is not defined."});
 }
 
@@ -1058,20 +1058,20 @@
     if (!test_case.is_json || !test_case.passed_to_generate_bid) {
       RunReportWinWithFunctionBodyExpectingResult(
           base::StringPrintf("sendReportTo(%s)", test_case.name),
-          test_case.is_json ? base::Optional<GURL>()
+          test_case.is_json ? absl::optional<GURL>()
                             : GURL("https://foo.test/"),
           {test_case.expect_errors});
     } else {
       // JSON values passed the generateBid() result in failures there, before
       // reportWin is called.
       RunGenerateBidWithJavascriptExpectingResult(
-          CreateBasicGenerateBidScript(), base::nullopt /* expected_bid */);
+          CreateBasicGenerateBidScript(), absl::nullopt /* expected_bid */);
     }
 
     *test_case.value_ptr = R"(["https://foo.test/"])";
     RunReportWinWithFunctionBodyExpectingResult(
         base::StringPrintf("sendReportTo(%s[0])", test_case.name),
-        test_case.is_json ? GURL("https://foo.test/") : base::Optional<GURL>(),
+        test_case.is_json ? GURL("https://foo.test/") : absl::optional<GURL>(),
         {test_case.expect_errors_array});
 
     SetDefaultParameters();
@@ -1189,7 +1189,7 @@
         seller_signals_, browser_signal_render_url_,
         browser_signal_ad_render_fingerprint_, browser_signal_bid_,
         base::BindLambdaForTesting(
-            [&run_loop](const base::Optional<GURL>& report_url,
+            [&run_loop](const absl::optional<GURL>& report_url,
                         const std::vector<std::string>& errors) {
               EXPECT_EQ(GURL("https://23.test/"), report_url);
               EXPECT_TRUE(errors.empty());
diff --git a/content/services/auction_worklet/report_bindings.h b/content/services/auction_worklet/report_bindings.h
index 3a52aaa..ab80e2c 100644
--- a/content/services/auction_worklet/report_bindings.h
+++ b/content/services/auction_worklet/report_bindings.h
@@ -6,8 +6,8 @@
 #define CONTENT_SERVICES_AUCTION_WORKLET_REPORT_BINDINGS_H_
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "content/services/auction_worklet/auction_v8_helper.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "v8/include/v8.h"
 
@@ -27,7 +27,7 @@
   ReportBindings& operator=(const ReportBindings&) = delete;
   ~ReportBindings();
 
-  const base::Optional<GURL>& report_url() const { return report_url_; }
+  const absl::optional<GURL>& report_url() const { return report_url_; }
 
  private:
   static void SendReportTo(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -35,7 +35,7 @@
   AuctionV8Helper* const v8_helper_;
 
   // This cleared if an exception is thrown.
-  base::Optional<GURL> report_url_;
+  absl::optional<GURL> report_url_;
 
   // Once an exception has been thrown, `report_url_` will be permanently
   // cleared.
diff --git a/content/services/auction_worklet/seller_worklet.cc b/content/services/auction_worklet/seller_worklet.cc
index 923592a..b4b1668 100644
--- a/content/services/auction_worklet/seller_worklet.cc
+++ b/content/services/auction_worklet/seller_worklet.cc
@@ -120,8 +120,8 @@
 
 void InvokeReportResultCallbackAsync(
     SellerWorklet::ReportResultCallback callback,
-    const base::Optional<std::string>& signals_for_winner,
-    const base::Optional<GURL>& report_url,
+    const absl::optional<std::string>& signals_for_winner,
+    const absl::optional<GURL>& report_url,
     const std::vector<std::string>& errors) {
   base::ThreadTaskRunnerHandle::Get()->PostTask(
       FROM_HERE, base::BindOnce(std::move(callback), signals_for_winner,
@@ -202,7 +202,7 @@
 
   v8::Local<v8::Value> score_ad_result;
   double score;
-  base::Optional<std::string> error_msg_out;
+  absl::optional<std::string> error_msg_out;
   if (!v8_helper_
            ->RunScript(context, worklet_script_->Get(isolate), "scoreAd", args,
                        error_msg_out)
@@ -258,8 +258,8 @@
 
   std::vector<v8::Local<v8::Value>> args;
   if (!AppendAuctionConfig(v8_helper_, context, auction_config, &args)) {
-    std::move(callback).Run(base::nullopt /* signals_for_winner */,
-                            base::nullopt /* report_url */,
+    std::move(callback).Run(absl::nullopt /* signals_for_winner */,
+                            absl::nullopt /* report_url */,
                             std::vector<std::string>() /* errors */);
     return;
   }
@@ -277,15 +277,15 @@
                                 browser_signal_ad_render_fingerprint) ||
       !browser_signals_dict.Set("bid", browser_signal_bid) ||
       !browser_signals_dict.Set("desirability", browser_signal_desirability)) {
-    std::move(callback).Run(base::nullopt /* signals_for_winner */,
-                            base::nullopt /* report_url */,
+    std::move(callback).Run(absl::nullopt /* signals_for_winner */,
+                            absl::nullopt /* report_url */,
                             std::vector<std::string>() /* errors */);
     return;
   }
   args.push_back(browser_signals);
 
   v8::Local<v8::Value> signals_for_winner_value;
-  base::Optional<std::string> error_msg_out;
+  absl::optional<std::string> error_msg_out;
   if (!v8_helper_
            ->RunScript(context, worklet_script_->Get(isolate), "reportResult",
                        args, error_msg_out)
@@ -293,8 +293,8 @@
     std::vector<std::string> errors;
     if (error_msg_out)
       errors.emplace_back(std::move(error_msg_out).value());
-    std::move(callback).Run(base::nullopt /* signals_for_winner */,
-                            base::nullopt /* report_url */, errors);
+    std::move(callback).Run(absl::nullopt /* signals_for_winner */,
+                            absl::nullopt /* report_url */, errors);
     return;
   }
 
@@ -312,7 +312,7 @@
 
 void SellerWorklet::OnDownloadComplete(
     std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-    base::Optional<std::string> error_msg) {
+    absl::optional<std::string> error_msg) {
   DCHECK(load_worklet_callback_);
 
   worklet_loader_.reset();
diff --git a/content/services/auction_worklet/seller_worklet.h b/content/services/auction_worklet/seller_worklet.h
index e9757bd0..db1c4bb 100644
--- a/content/services/auction_worklet/seller_worklet.h
+++ b/content/services/auction_worklet/seller_worklet.h
@@ -11,9 +11,9 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "content/services/auction_worklet/public/mojom/auction_worklet_service.mojom-forward.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/interest_group/interest_group_types.mojom-forward.h"
 #include "url/gurl.h"
 #include "url/origin.h"
@@ -53,8 +53,8 @@
   // `errors` is a vector of any errors that occurred while running the
   // script.
   using ReportResultCallback = base::OnceCallback<void(
-      const base::Optional<std::string>& signals_for_winner,
-      const base::Optional<GURL>& report_url,
+      const absl::optional<std::string>& signals_for_winner,
+      const absl::optional<GURL>& report_url,
       const std::vector<std::string>& errors)>;
 
   // Starts loading the worklet script on construction. Callback will be invoked
@@ -96,7 +96,7 @@
  private:
   void OnDownloadComplete(
       std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-      base::Optional<std::string> error_msg);
+      absl::optional<std::string> error_msg);
 
   AuctionV8Helper* const v8_helper_;
 
diff --git a/content/services/auction_worklet/seller_worklet_unittest.cc b/content/services/auction_worklet/seller_worklet_unittest.cc
index 354dfa1..f3b618c 100644
--- a/content/services/auction_worklet/seller_worklet_unittest.cc
+++ b/content/services/auction_worklet/seller_worklet_unittest.cc
@@ -141,8 +141,8 @@
   void RunReportResultCreatedScriptExpectingResult(
       const std::string& raw_return_value,
       const std::string& extra_code,
-      const base::Optional<std::string>& expected_signals_for_winner,
-      const base::Optional<GURL>& expected_report_url,
+      const absl::optional<std::string>& expected_signals_for_winner,
+      const absl::optional<GURL>& expected_report_url,
       const std::vector<std::string>& expected_errors =
           std::vector<std::string>()) {
     RunReportResultWithJavascriptExpectingResult(
@@ -155,8 +155,8 @@
   // provided result.
   void RunReportResultWithJavascriptExpectingResult(
       const std::string& javascript,
-      const base::Optional<std::string>& expected_signals_for_winner,
-      const base::Optional<GURL>& expected_report_url,
+      const absl::optional<std::string>& expected_signals_for_winner,
+      const absl::optional<GURL>& expected_report_url,
       const std::vector<std::string>& expected_errors =
           std::vector<std::string>()) {
     SCOPED_TRACE(javascript);
@@ -167,8 +167,8 @@
 
   // Loads and runs a report_result() script, expecting the supplied result.
   void RunReportResultExpectingResult(
-      const base::Optional<std::string>& expected_signals_for_winner,
-      const base::Optional<GURL>& expected_report_url,
+      const absl::optional<std::string>& expected_signals_for_winner,
+      const absl::optional<GURL>& expected_report_url,
       const std::vector<std::string>& expected_errors =
           std::vector<std::string>()) {
     auto seller_worket = CreateWorklet();
@@ -183,8 +183,8 @@
         base::BindLambdaForTesting(
             [&run_loop, &expected_signals_for_winner, &expected_report_url,
              &expected_errors](
-                const base::Optional<std::string>& signals_for_winner,
-                const base::Optional<GURL>& report_url,
+                const absl::optional<std::string>& signals_for_winner,
+                const absl::optional<GURL>& report_url,
                 const std::vector<std::string>& errors) {
               EXPECT_EQ(expected_signals_for_winner, signals_for_winner);
               EXPECT_EQ(expected_report_url, report_url);
@@ -416,25 +416,25 @@
   RunReportResultCreatedScriptExpectingResult(
       "1", std::string() /* extra_code */,
       "1" /* expected_signals_for_winner */,
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   RunReportResultCreatedScriptExpectingResult(
       R"("  1   ")", std::string() /* extra_code */,
       R"("  1   ")" /* expected_signals_for_winner */,
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   RunReportResultCreatedScriptExpectingResult(
       "[ null ]", std::string() /* extra_code */, "[null]",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   // No return value.
   RunReportResultCreatedScriptExpectingResult(
       "", std::string() /* extra_code */, "null",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   // Throw exception.
   RunReportResultCreatedScriptExpectingResult(
       "shrimp", std::string() /* extra_code */,
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:4 Uncaught ReferenceError: "
        "shrimp is not defined."});
 }
@@ -451,14 +451,14 @@
   // Disallowed schemes.
   RunReportResultCreatedScriptExpectingResult(
       "1", R"(sendReportTo("http://foo.test/"))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught TypeError: "
        "sendReportTo must be passed a valid HTTPS url."});
   RunReportResultCreatedScriptExpectingResult(
       "1", R"(sendReportTo("file:///foo/"))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught TypeError: "
        "sendReportTo must be passed a valid HTTPS url."});
 
@@ -466,8 +466,8 @@
   RunReportResultCreatedScriptExpectingResult(
       "1",
       R"(sendReportTo("https://foo.test/"); sendReportTo("https://foo.test/"))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught TypeError: "
        "sendReportTo may be called at most once."});
 
@@ -477,25 +477,25 @@
       R"(try {
         sendReportTo("https://foo.test/");
         sendReportTo("https://foo.test/")} catch(e) {})",
-      "1" /* expected_render_url */, base::nullopt /* expected_report_url */);
+      "1" /* expected_render_url */, absl::nullopt /* expected_report_url */);
 
   // Not a URL.
   RunReportResultCreatedScriptExpectingResult(
       "1", R"(sendReportTo("France"))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught TypeError: "
        "sendReportTo must be passed a valid HTTPS url."});
   RunReportResultCreatedScriptExpectingResult(
       "1", R"(sendReportTo(null))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught TypeError: "
        "sendReportTo requires 1 string parameter."});
   RunReportResultCreatedScriptExpectingResult(
       "1", R"(sendReportTo([5]))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught TypeError: "
        "sendReportTo requires 1 string parameter."});
 }
@@ -503,8 +503,8 @@
 TEST_F(SellerWorkletTest, ReportResultDateNotAvailable) {
   RunReportResultCreatedScriptExpectingResult(
       "1", R"(sendReportTo("https://foo.test/" + Date().toString()))",
-      base::nullopt /* expected_signals_for_winner */,
-      base::nullopt /* expected_render_url */,
+      absl::nullopt /* expected_signals_for_winner */,
+      absl::nullopt /* expected_render_url */,
       {"https://url.test/:3 Uncaught ReferenceError: Date is not defined."});
 }
 
@@ -513,7 +513,7 @@
   RunReportResultCreatedScriptExpectingResult(
       R"(browserSignals.adRenderFingerprint == "foo" ? 2 : 1)",
       std::string() /* extra_code */, "2",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   SetDefaultParameters();
 
   browser_signal_top_window_origin_ =
@@ -521,14 +521,14 @@
   RunReportResultCreatedScriptExpectingResult(
       R"(browserSignals.topWindowHostname == "foo.test" ? 2 : 1)",
       std::string() /* extra_code */, "2",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   browser_signal_top_window_origin_ =
       url::Origin::Create(GURL("https://[::1]:40000/"));
   RunReportResultCreatedScriptExpectingResult(
       R"(browserSignals.topWindowHostname == "[::1]" ? 3 : 1)",
       std::string() /* extra_code */, "3",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   SetDefaultParameters();
 
   browser_signal_interest_group_owner_ =
@@ -536,14 +536,14 @@
   RunReportResultCreatedScriptExpectingResult(
       R"(browserSignals.interestGroupOwner == "https://foo.test" ? 2 : 1)",
       std::string() /* extra_code */, "2",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   browser_signal_interest_group_owner_ =
       url::Origin::Create(GURL("https://[::1]:40000/"));
   RunReportResultCreatedScriptExpectingResult(
       R"(browserSignals.interestGroupOwner == "https://[::1]:40000" ? 3 : 1)",
       std::string() /* extra_code */, "3",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   SetDefaultParameters();
 
   browser_signal_render_url_ = GURL("https://foo/");
@@ -556,14 +556,14 @@
   RunReportResultCreatedScriptExpectingResult(
       "browserSignals.bid + typeof browserSignals.bid",
       std::string() /* extra_code */, R"("5number")",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   SetDefaultParameters();
 
   browser_signal_desireability_ = 10;
   RunReportResultCreatedScriptExpectingResult(
       "browserSignals.desirability + typeof browserSignals.desirability",
       std::string() /* extra_code */, R"("10number")",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
   SetDefaultParameters();
 }
 
@@ -572,7 +572,7 @@
   RunReportResultCreatedScriptExpectingResult(
       "auctionConfig", std::string() /* extra_code */,
       R"({"seller":"null","decisionLogicUrl":""})",
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   // Everything filled in.
   auction_config_ = blink::mojom::AuctionAdConfig::New();
@@ -600,7 +600,7 @@
       R"("b.com":{"signals_b":"B"}}})";
   RunReportResultCreatedScriptExpectingResult(
       "auctionConfig", std::string() /* extra_code */, kExpectedJson,
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 
   // Array option for interest_group_buyers. Everything else optional
   // unpopulated.
@@ -618,7 +618,7 @@
       R"("interestGroupBuyers":["buyer1.com","another-buyer.com"]})";
   RunReportResultCreatedScriptExpectingResult(
       "auctionConfig", std::string() /* extra_code */, kExpectedJson2,
-      base::nullopt /* expected_report_url */);
+      absl::nullopt /* expected_report_url */);
 }
 
 // Subsequent runs of the same script should not affect each other. Same is true
@@ -677,8 +677,8 @@
           browser_signal_ad_render_fingerprint_, bid_,
           browser_signal_desireability_,
           base::BindLambdaForTesting(
-              [&run_loop](const base::Optional<std::string>& signals_for_winner,
-                          const base::Optional<GURL>& report_url,
+              [&run_loop](const absl::optional<std::string>& signals_for_winner,
+                          const absl::optional<GURL>& report_url,
                           const std::vector<std::string>& errors) {
                 EXPECT_EQ("2", signals_for_winner);
                 EXPECT_TRUE(errors.empty());
diff --git a/content/services/auction_worklet/trusted_bidding_signals.cc b/content/services/auction_worklet/trusted_bidding_signals.cc
index 894c91d..fe17a76 100644
--- a/content/services/auction_worklet/trusted_bidding_signals.cc
+++ b/content/services/auction_worklet/trusted_bidding_signals.cc
@@ -84,7 +84,7 @@
 void TrustedBiddingSignals::OnDownloadComplete(
     std::vector<std::string> trusted_bidding_signals_keys,
     std::unique_ptr<std::string> body,
-    base::Optional<std::string> error_msg) {
+    absl::optional<std::string> error_msg) {
   auction_downloader_.reset();
 
   if (!body) {
@@ -115,7 +115,7 @@
     v8::Local<v8::Value> v8_string_value;
     std::string value;
     if (!v8_helper_->CreateUtf8String(key).ToLocal(&v8_key)) {
-      std::move(load_signals_callback_).Run(false, base::nullopt);
+      std::move(load_signals_callback_).Run(false, absl::nullopt);
       return;
     }
     // Only the `has_result` check should be able to fail.
@@ -131,7 +131,7 @@
     }
     json_data_[key] = std::move(value);
   }
-  std::move(load_signals_callback_).Run(true, base::nullopt);
+  std::move(load_signals_callback_).Run(true, absl::nullopt);
 }
 
 }  // namespace auction_worklet
diff --git a/content/services/auction_worklet/trusted_bidding_signals.h b/content/services/auction_worklet/trusted_bidding_signals.h
index f0adee6..b0f39bf 100644
--- a/content/services/auction_worklet/trusted_bidding_signals.h
+++ b/content/services/auction_worklet/trusted_bidding_signals.h
@@ -11,8 +11,8 @@
 #include <vector>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "v8/include/v8.h"
 
@@ -36,7 +36,7 @@
  public:
   using LoadSignalsCallback =
       base::OnceCallback<void(bool success,
-                              base::Optional<std::string> error_msg)>;
+                              absl::optional<std::string> error_msg)>;
 
   // Starts loading the JSON data on construction. `trusted_bidding_signals_url`
   // must be the base URL (no query params added). Callback will be invoked
@@ -66,7 +66,7 @@
  private:
   void OnDownloadComplete(std::vector<std::string> trusted_bidding_signals_keys,
                           std::unique_ptr<std::string> body,
-                          base::Optional<std::string> error_msg);
+                          absl::optional<std::string> error_msg);
 
   const GURL trusted_bidding_signals_url_;  // original, for error messages.
   AuctionV8Helper* const v8_helper_;
diff --git a/content/services/auction_worklet/trusted_bidding_signals_unittest.cc b/content/services/auction_worklet/trusted_bidding_signals_unittest.cc
index 98485768..fd51516 100644
--- a/content/services/auction_worklet/trusted_bidding_signals_unittest.cc
+++ b/content/services/auction_worklet/trusted_bidding_signals_unittest.cc
@@ -99,7 +99,7 @@
 
  protected:
   void LoadSignalsCallback(bool success,
-                           base::Optional<std::string> error_msg) {
+                           absl::optional<std::string> error_msg) {
     load_signals_succeeded_ = success;
     error_msg_ = std::move(error_msg);
     EXPECT_EQ(load_signals_succeeded_, !error_msg_.has_value());
@@ -116,7 +116,7 @@
   // synchronously.
   std::unique_ptr<base::RunLoop> load_signals_run_loop_;
   bool load_signals_succeeded_ = false;
-  base::Optional<std::string> error_msg_;
+  absl::optional<std::string> error_msg_;
 
   network::TestURLLoaderFactory url_loader_factory_;
   AuctionV8Helper v8_helper_;
diff --git a/content/services/auction_worklet/worklet_loader.cc b/content/services/auction_worklet/worklet_loader.cc
index b2aa1ee..e6829ee 100644
--- a/content/services/auction_worklet/worklet_loader.cc
+++ b/content/services/auction_worklet/worklet_loader.cc
@@ -39,7 +39,7 @@
 WorkletLoader::~WorkletLoader() = default;
 
 void WorkletLoader::OnDownloadComplete(std::unique_ptr<std::string> body,
-                                       base::Optional<std::string> error_msg) {
+                                       absl::optional<std::string> error_msg) {
   DCHECK(load_worklet_callback_);
 
   auction_downloader_.reset();
diff --git a/content/services/auction_worklet/worklet_loader.h b/content/services/auction_worklet/worklet_loader.h
index dfa0817..39abc4b5 100644
--- a/content/services/auction_worklet/worklet_loader.h
+++ b/content/services/auction_worklet/worklet_loader.h
@@ -10,8 +10,8 @@
 #include <vector>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "services/network/public/mojom/url_loader_factory.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 #include "v8/include/v8.h"
 
@@ -28,7 +28,7 @@
   // persisting any state.
   using LoadWorkletCallback = base::OnceCallback<void(
       std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-      base::Optional<std::string> error_msg)>;
+      absl::optional<std::string> error_msg)>;
 
   // Starts loading the worklet script on construction. Callback will be invoked
   // asynchronously once the data has been fetched or an error has occurred.
@@ -43,7 +43,7 @@
 
  private:
   void OnDownloadComplete(std::unique_ptr<std::string> body,
-                          base::Optional<std::string> error_msg);
+                          absl::optional<std::string> error_msg);
 
   const GURL script_source_url_;
   AuctionV8Helper* const v8_helper_;
diff --git a/content/services/auction_worklet/worklet_loader_unittest.cc b/content/services/auction_worklet/worklet_loader_unittest.cc
index 25e1c67..76469236 100644
--- a/content/services/auction_worklet/worklet_loader_unittest.cc
+++ b/content/services/auction_worklet/worklet_loader_unittest.cc
@@ -39,7 +39,7 @@
 
   void LoadWorkletCallback(
       std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-      base::Optional<std::string> error_msg) {
+      absl::optional<std::string> error_msg) {
     load_succeeded_ = !!worklet_script;
     error_msg_ = std::move(error_msg);
     EXPECT_EQ(load_succeeded_, !error_msg_.has_value());
@@ -58,12 +58,12 @@
   GURL url_ = GURL("https://foo.test/");
   base::RunLoop run_loop_;
   bool load_succeeded_ = false;
-  base::Optional<std::string> error_msg_;
+  absl::optional<std::string> error_msg_;
 };
 
 TEST_F(WorkletLoaderTest, NetworkError) {
   // Make this look like a valid response in all ways except the response code.
-  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, base::nullopt,
+  AddResponse(&url_loader_factory_, url_, kJavascriptMimeType, absl::nullopt,
               kValidScript, kAllowFledgeHeader, net::HTTP_NOT_FOUND);
   WorkletLoader worklet_loader(
       &url_loader_factory_, url_, &v8_helper_,
@@ -109,7 +109,7 @@
           &url_loader_factory_, url_, v8_helper.get(),
           base::BindLambdaForTesting(
               [&](std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-                  base::Optional<std::string> error_msg) {
+                  absl::optional<std::string> error_msg) {
                 EXPECT_TRUE(worklet_script);
                 EXPECT_FALSE(error_msg.has_value());
                 worklet_script.reset();
@@ -132,7 +132,7 @@
           &url_loader_factory_, url_, v8_helper.get(),
           base::BindLambdaForTesting(
               [&](std::unique_ptr<v8::Global<v8::UnboundScript>> worklet_script,
-                  base::Optional<std::string> error_msg) {
+                  absl::optional<std::string> error_msg) {
                 EXPECT_FALSE(worklet_script);
                 ASSERT_TRUE(error_msg.has_value());
                 EXPECT_THAT(error_msg.value(),
diff --git a/content/services/auction_worklet/worklet_test_util.cc b/content/services/auction_worklet/worklet_test_util.cc
index 2299d93..37f78d43e 100644
--- a/content/services/auction_worklet/worklet_test_util.cc
+++ b/content/services/auction_worklet/worklet_test_util.cc
@@ -7,7 +7,6 @@
 #include <string>
 
 #include "base/logging.h"
-#include "base/optional.h"
 #include "base/strings/stringprintf.h"
 #include "content/services/auction_worklet/auction_downloader.h"
 #include "net/http/http_response_headers.h"
@@ -16,6 +15,7 @@
 #include "services/network/public/cpp/url_loader_completion_status.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
 #include "services/network/test/test_url_loader_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace auction_worklet {
 
@@ -26,10 +26,10 @@
 
 void AddResponse(network::TestURLLoaderFactory* url_loader_factory,
                  const GURL& url,
-                 base::Optional<std::string> mime_type,
-                 base::Optional<std::string> charset,
+                 absl::optional<std::string> mime_type,
+                 absl::optional<std::string> charset,
                  const std::string content,
-                 base::Optional<std::string> headers,
+                 absl::optional<std::string> headers,
                  net::HttpStatusCode http_status,
                  network::TestURLLoaderFactory::Redirects redirects) {
   auto head = network::mojom::URLResponseHead::New();
@@ -57,14 +57,14 @@
 void AddJavascriptResponse(network::TestURLLoaderFactory* url_loader_factory,
                            const GURL& url,
                            const std::string content) {
-  AddResponse(url_loader_factory, url, kJavascriptMimeType, base::nullopt,
+  AddResponse(url_loader_factory, url, kJavascriptMimeType, absl::nullopt,
               content);
 }
 
 void AddJsonResponse(network::TestURLLoaderFactory* url_loader_factory,
                      const GURL& url,
                      const std::string content) {
-  AddResponse(url_loader_factory, url, kJsonMimeType, base::nullopt, content);
+  AddResponse(url_loader_factory, url, kJsonMimeType, absl::nullopt, content);
 }
 
 }  // namespace auction_worklet
diff --git a/content/services/auction_worklet/worklet_test_util.h b/content/services/auction_worklet/worklet_test_util.h
index 27ba9c7..9574491 100644
--- a/content/services/auction_worklet/worklet_test_util.h
+++ b/content/services/auction_worklet/worklet_test_util.h
@@ -8,9 +8,9 @@
 #include <string>
 #include <vector>
 
-#include "base/optional.h"
 #include "net/http/http_status_code.h"
 #include "services/network/test/test_url_loader_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace auction_worklet {
@@ -30,10 +30,10 @@
 // null, and `http_status` is ignored.
 void AddResponse(network::TestURLLoaderFactory* url_loader_factory,
                  const GURL& url,
-                 base::Optional<std::string> mime_type,
-                 base::Optional<std::string> charset,
+                 absl::optional<std::string> mime_type,
+                 absl::optional<std::string> charset,
                  const std::string content,
-                 base::Optional<std::string> headers = kAllowFledgeHeader,
+                 absl::optional<std::string> headers = kAllowFledgeHeader,
                  net::HttpStatusCode http_status = net::HTTP_OK,
                  network::TestURLLoaderFactory::Redirects redirects =
                      network::TestURLLoaderFactory::Redirects());
diff --git a/content/shell/browser/shell_content_browser_client.cc b/content/shell/browser/shell_content_browser_client.cc
index ffc6c61..77db03c 100644
--- a/content/shell/browser/shell_content_browser_client.cc
+++ b/content/shell/browser/shell_content_browser_client.cc
@@ -116,7 +116,7 @@
     if (command_line.HasSwitch(name))
       std::move(callback).Run(command_line.GetSwitchValueASCII(name));
     else
-      std::move(callback).Run(base::nullopt);
+      std::move(callback).Run(absl::nullopt);
   }
 
   void ExecuteJavaScript(const std::u16string& script,
diff --git a/content/shell/browser/shell_download_manager_delegate.cc b/content/shell/browser/shell_download_manager_delegate.cc
index bc0aafd..bae409a 100644
--- a/content/shell/browser/shell_download_manager_delegate.cc
+++ b/content/shell/browser/shell_download_manager_delegate.cc
@@ -77,7 +77,7 @@
         download::DownloadItem::TARGET_DISPOSITION_OVERWRITE,
         download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
         download::DownloadItem::MixedContentStatus::UNKNOWN,
-        download->GetForcedFilePath(), base::nullopt /*download_schedule*/,
+        download->GetForcedFilePath(), absl::nullopt /*download_schedule*/,
         download::DOWNLOAD_INTERRUPT_REASON_NONE);
     return true;
   }
@@ -144,7 +144,7 @@
         download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
         download::DownloadItem::MixedContentStatus::UNKNOWN,
         suggested_path.AddExtension(FILE_PATH_LITERAL(".crdownload")),
-        base::nullopt /*download_schedule*/,
+        absl::nullopt /*download_schedule*/,
         download::DOWNLOAD_INTERRUPT_REASON_NONE);
     return;
   }
@@ -196,7 +196,7 @@
                           download::DownloadItem::TARGET_DISPOSITION_PROMPT,
                           download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS,
                           download::DownloadItem::MixedContentStatus::UNKNOWN,
-                          result, base::nullopt /*download_schedule*/,
+                          result, absl::nullopt /*download_schedule*/,
                           download::DOWNLOAD_INTERRUPT_REASON_NONE);
 }
 
diff --git a/content/test/content_browser_test_test.cc b/content/test/content_browser_test_test.cc
index 016ff71..aa2c856 100644
--- a/content/test/content_browser_test_test.cc
+++ b/content/test/content_browser_test_test.cc
@@ -239,7 +239,7 @@
   base::GetAppOutputAndError(command_line, &output);
 
   // Validate the resulting JSON file is the expected output.
-  base::Optional<base::Value> root =
+  absl::optional<base::Value> root =
       base::test_launcher_utils::ReadSummary(path);
   ASSERT_TRUE(root);
 
diff --git a/content/test/content_browser_test_utils_internal.cc b/content/test/content_browser_test_utils_internal.cc
index 4101312..ff933312 100644
--- a/content/test/content_browser_test_utils_internal.cc
+++ b/content/test/content_browser_test_utils_internal.cc
@@ -485,11 +485,11 @@
     : internal_waiter_(render_process_host,
                        "Stability.BadMessageTerminated.Content") {}
 
-base::Optional<bad_message::BadMessageReason>
+absl::optional<bad_message::BadMessageReason>
 RenderProcessHostBadIpcMessageWaiter::Wait() {
-  base::Optional<int> internal_result = internal_waiter_.Wait();
+  absl::optional<int> internal_result = internal_waiter_.Wait();
   if (!internal_result.has_value())
-    return base::nullopt;
+    return absl::nullopt;
   return static_cast<bad_message::BadMessageReason>(internal_result.value());
 }
 
@@ -696,7 +696,7 @@
   base::StringPiece message_str(reinterpret_cast<const char*>(message.data()),
                                 message.size());
   auto parsed_message = base::JSONReader::Read(message_str);
-  base::Optional<int> command_id = parsed_message->FindIntPath("id");
+  absl::optional<int> command_id = parsed_message->FindIntPath("id");
   if (command_id.has_value()) {
     switch (command_id.value()) {
       case kEnableLogMessageId:
diff --git a/content/test/content_browser_test_utils_internal.h b/content/test/content_browser_test_utils_internal.h
index 53bb446..50a093c 100644
--- a/content/test/content_browser_test_utils_internal.h
+++ b/content/test/content_browser_test_utils_internal.h
@@ -18,7 +18,6 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "build/build_config.h"
 #include "content/browser/bad_message.h"
@@ -31,6 +30,7 @@
 #include "content/public/test/browser_test_utils.h"
 #include "content/public/test/test_utils.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/choosers/file_chooser.mojom-forward.h"
 #include "third_party/blink/public/mojom/choosers/popup_menu.mojom.h"
 #include "third_party/blink/public/mojom/page/widget.mojom-test-utils.h"
@@ -249,9 +249,9 @@
       RenderProcessHost* render_process_host);
 
   // Waits until the renderer process exits.  Returns the bad message that made
-  // //content kill the renderer.  |base::nullopt| is returned if the renderer
+  // //content kill the renderer.  |absl::nullopt| is returned if the renderer
   // was killed outside of //content or exited normally.
-  base::Optional<bad_message::BadMessageReason> Wait() WARN_UNUSED_RESULT;
+  absl::optional<bad_message::BadMessageReason> Wait() WARN_UNUSED_RESULT;
 
  private:
   RenderProcessHostKillWaiter internal_waiter_;
diff --git a/content/test/fuzzer/presentation_service_mojolpm_fuzzer.cc b/content/test/fuzzer/presentation_service_mojolpm_fuzzer.cc
index e83c5f72..2c774623 100644
--- a/content/test/fuzzer/presentation_service_mojolpm_fuzzer.cc
+++ b/content/test/fuzzer/presentation_service_mojolpm_fuzzer.cc
@@ -14,7 +14,6 @@
 #include "base/command_line.h"
 #include "base/i18n/icu_util.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "base/test/test_switches.h"
 #include "base/test/test_timeouts.h"
@@ -47,6 +46,7 @@
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/presentation/presentation.mojom-mojolpm.h"
 #include "third_party/libprotobuf-mutator/src/src/libfuzzer/libfuzzer_macro.h"
 #include "ui/events/devices/device_data_manager.h"
diff --git a/content/test/fuzzer/renderer_tree_fuzzer.cc b/content/test/fuzzer/renderer_tree_fuzzer.cc
index 066a0f2..0134530 100644
--- a/content/test/fuzzer/renderer_tree_fuzzer.cc
+++ b/content/test/fuzzer/renderer_tree_fuzzer.cc
@@ -110,7 +110,7 @@
                                                    size_t size) {
     auto nodes = std::make_unique<NodeList>();
 
-    base::Optional<base::Value> value(base::JSONReader::Read(
+    absl::optional<base::Value> value(base::JSONReader::Read(
         std::string(reinterpret_cast<const char*>(data), size)));
     if (value)
       nodes->ParseJson(*value);
diff --git a/content/test/mock_display_feature.h b/content/test/mock_display_feature.h
index 3d12340..9b570f7c 100644
--- a/content/test/mock_display_feature.h
+++ b/content/test/mock_display_feature.h
@@ -5,8 +5,8 @@
 #ifndef CONTENT_TEST_MOCK_DISPLAY_FEATURE_H_
 #define CONTENT_TEST_MOCK_DISPLAY_FEATURE_H_
 
-#include "base/optional.h"
 #include "build/build_config.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
diff --git a/content/test/mock_overscroll_controller_delegate_aura.cc b/content/test/mock_overscroll_controller_delegate_aura.cc
index 9f34812..3a861da 100644
--- a/content/test/mock_overscroll_controller_delegate_aura.cc
+++ b/content/test/mock_overscroll_controller_delegate_aura.cc
@@ -26,9 +26,9 @@
       .size();
 }
 
-base::Optional<float>
+absl::optional<float>
 MockOverscrollControllerDelegateAura::GetMaxOverscrollDelta() const {
-  return base::nullopt;
+  return absl::nullopt;
 }
 
 bool MockOverscrollControllerDelegateAura::OnOverscrollUpdate(float, float) {
diff --git a/content/test/mock_overscroll_controller_delegate_aura.h b/content/test/mock_overscroll_controller_delegate_aura.h
index 4b81a30..49d8022 100644
--- a/content/test/mock_overscroll_controller_delegate_aura.h
+++ b/content/test/mock_overscroll_controller_delegate_aura.h
@@ -25,7 +25,7 @@
 
   // OverscrollControllerDelegate:
   gfx::Size GetDisplaySize() const override;
-  base::Optional<float> GetMaxOverscrollDelta() const override;
+  absl::optional<float> GetMaxOverscrollDelta() const override;
   bool OnOverscrollUpdate(float, float) override;
   void OnOverscrollComplete(OverscrollMode) override;
   void OnOverscrollModeChange(OverscrollMode old_mode,
diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
index d36d0c4..7397963 100644
--- a/content/test/mock_platform_notification_service.cc
+++ b/content/test/mock_platform_notification_service.cc
@@ -120,8 +120,8 @@
 
 void MockPlatformNotificationService::SimulateClick(
     const std::string& title,
-    const base::Optional<int>& action_index,
-    const base::Optional<std::u16string>& reply) {
+    const absl::optional<int>& action_index,
+    const absl::optional<std::u16string>& reply) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
   const auto notification_id_iter = notification_id_map_.find(title);
   if (notification_id_iter == notification_id_map_.end())
diff --git a/content/test/mock_platform_notification_service.h b/content/test/mock_platform_notification_service.h
index fb20e5b..f20477711 100644
--- a/content/test/mock_platform_notification_service.h
+++ b/content/test/mock_platform_notification_service.h
@@ -12,9 +12,9 @@
 
 #include "base/callback.h"
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/public/browser/notification_database_data.h"
 #include "content/public/browser/platform_notification_service.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
 namespace blink {
@@ -37,8 +37,8 @@
   // indicates which action was clicked. |reply| indicates the user reply.
   // Must be called on the UI thread.
   void SimulateClick(const std::string& title,
-                     const base::Optional<int>& action_index,
-                     const base::Optional<std::u16string>& reply);
+                     const absl::optional<int>& action_index,
+                     const absl::optional<std::u16string>& reply);
 
   // Simulates the closing a notification titled |title|. Must be called on
   // the UI thread.
diff --git a/content/test/mock_render_widget_host_delegate.cc b/content/test/mock_render_widget_host_delegate.cc
index c94814e..fe6d1b5 100644
--- a/content/test/mock_render_widget_host_delegate.cc
+++ b/content/test/mock_render_widget_host_delegate.cc
@@ -29,7 +29,7 @@
 
 void MockRenderWidgetHostDelegate::ExecuteEditCommand(
     const std::string& command,
-    const base::Optional<std::u16string>& value) {}
+    const absl::optional<std::u16string>& value) {}
 
 void MockRenderWidgetHostDelegate::Undo() {}
 
diff --git a/content/test/mock_render_widget_host_delegate.h b/content/test/mock_render_widget_host_delegate.h
index 616af39..8802e6c 100644
--- a/content/test/mock_render_widget_host_delegate.h
+++ b/content/test/mock_render_widget_host_delegate.h
@@ -44,7 +44,7 @@
   KeyboardEventProcessingResult PreHandleKeyboardEvent(
       const NativeWebKeyboardEvent& event) override;
   void ExecuteEditCommand(const std::string& command,
-                          const base::Optional<std::u16string>& value) override;
+                          const absl::optional<std::u16string>& value) override;
   void Undo() override;
   void Redo() override;
   void Cut() override;
diff --git a/content/test/mock_widget.h b/content/test/mock_widget.h
index 0258f165..a0c42fb 100644
--- a/content/test/mock_widget.h
+++ b/content/test/mock_widget.h
@@ -37,8 +37,8 @@
     shown_hidden_callback_ = std::move(callback);
   }
 
-  void ClearHidden() { is_hidden_ = base::nullopt; }
-  const base::Optional<bool>& IsHidden() const { return is_hidden_; }
+  void ClearHidden() { is_hidden_ = absl::nullopt; }
+  const absl::optional<bool>& IsHidden() const { return is_hidden_; }
 
   // blink::mojom::Widget overrides.
   void ForceRedraw(ForceRedrawCallback callback) override;
@@ -60,7 +60,7 @@
                     record_tab_switch_time_request) override;
 
  private:
-  base::Optional<bool> is_hidden_;
+  absl::optional<bool> is_hidden_;
   base::RepeatingClosure shown_hidden_callback_;
   std::vector<blink::VisualProperties> visual_properties_;
   std::vector<std::pair<gfx::Rect, gfx::Rect>> screen_rects_;
diff --git a/content/test/navigation_simulator_impl.cc b/content/test/navigation_simulator_impl.cc
index bdf7b70466..4a1391f 100644
--- a/content/test/navigation_simulator_impl.cc
+++ b/content/test/navigation_simulator_impl.cc
@@ -1183,8 +1183,8 @@
   mojom::BeginNavigationParamsPtr begin_params =
       mojom::BeginNavigationParams::New(
           initiator_frame_host_
-              ? base::make_optional(initiator_frame_host_->GetFrameToken())
-              : base::nullopt,
+              ? absl::make_optional(initiator_frame_host_->GetFrameToken())
+              : absl::nullopt,
           std::string() /* headers */, net::LOAD_NORMAL,
           false /* skip_service_worker */,
           blink::mojom::RequestContextType::HYPERLINK,
@@ -1194,11 +1194,11 @@
           GURL() /* searchable_form_url */,
           std::string() /* searchable_form_encoding */,
           GURL() /* client_side_redirect_url */,
-          base::nullopt /* detools_initiator_info */,
+          absl::nullopt /* detools_initiator_info */,
           nullptr /* trust_token_params */, impression_,
           base::TimeTicks() /* renderer_before_unload_start */,
           base::TimeTicks() /* renderer_before_unload_end */,
-          base::nullopt /* web_bundle_token */);
+          absl::nullopt /* web_bundle_token */);
   auto common_params = CreateCommonNavigationParams();
   common_params->navigation_start = base::TimeTicks::Now();
   common_params->url = navigation_url_;
diff --git a/content/test/navigation_simulator_impl.h b/content/test/navigation_simulator_impl.h
index 28a0833..c1859a1f 100644
--- a/content/test/navigation_simulator_impl.h
+++ b/content/test/navigation_simulator_impl.h
@@ -9,7 +9,6 @@
 #include <string>
 
 #include "base/callback.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/navigation_request.h"
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/navigation_throttle.h"
@@ -21,6 +20,7 @@
 #include "net/base/host_port_pair.h"
 #include "net/base/ip_endpoint.h"
 #include "net/dns/public/resolve_error_info.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/navigation/impression.h"
 #include "third_party/blink/public/mojom/loader/referrer.mojom-forward.h"
 #include "url/gurl.h"
@@ -304,10 +304,10 @@
   net::HttpResponseInfo::ConnectionInfo http_connection_info_ =
       net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN;
   net::ResolveErrorInfo resolve_error_info_ = net::ResolveErrorInfo(net::OK);
-  base::Optional<net::SSLInfo> ssl_info_;
-  base::Optional<blink::PageState> page_state_;
-  base::Optional<url::Origin> origin_;
-  base::Optional<blink::Impression> impression_;
+  absl::optional<net::SSLInfo> ssl_info_;
+  absl::optional<blink::PageState> page_state_;
+  absl::optional<url::Origin> origin_;
+  absl::optional<blink::Impression> impression_;
   int64_t post_id_ = -1;
 
   // Any DNS aliases, as read from CNAME records, for the request URL that
@@ -327,7 +327,7 @@
 
   bool history_list_was_cleared_ = false;
   bool should_replace_current_entry_ = false;
-  base::Optional<bool> did_create_new_entry_;
+  absl::optional<bool> did_create_new_entry_;
   bool was_aborted_prior_to_ready_to_commit_ = false;
 
   bool early_hints_preload_link_header_received_ = false;
@@ -346,7 +346,7 @@
   // Holds the last ThrottleCheckResult calculated by the navigation's
   // throttles. Will be unset before WillStartRequest is finished. Will be unset
   // while throttles are being run, but before they finish.
-  base::Optional<NavigationThrottle::ThrottleCheckResult>
+  absl::optional<NavigationThrottle::ThrottleCheckResult>
       last_throttle_check_result_;
 
   // GlobalRequestID for the associated NavigationHandle. Only valid after
diff --git a/content/test/navigation_simulator_unittest.cc b/content/test/navigation_simulator_unittest.cc
index b758c65..b5047d088 100644
--- a/content/test/navigation_simulator_unittest.cc
+++ b/content/test/navigation_simulator_unittest.cc
@@ -37,7 +37,7 @@
     : public RenderViewHostImplTestHarness,
       public WebContentsObserver,
       public testing::WithParamInterface<
-          std::tuple<base::Optional<TestNavigationThrottle::ThrottleMethod>,
+          std::tuple<absl::optional<TestNavigationThrottle::ThrottleMethod>,
                      TestNavigationThrottle::ResultSynchrony>> {
  public:
   CancellingNavigationSimulatorTest() {}
@@ -78,7 +78,7 @@
 
   void OnWillFailRequestCalled() { will_fail_request_called_ = true; }
 
-  base::Optional<TestNavigationThrottle::ThrottleMethod> cancel_time_;
+  absl::optional<TestNavigationThrottle::ThrottleMethod> cancel_time_;
   TestNavigationThrottle::ResultSynchrony sync_;
   std::unique_ptr<NavigationSimulator> simulator_;
   bool did_finish_navigation_ = false;
@@ -267,7 +267,7 @@
         ::testing::Values(TestNavigationThrottle::WILL_START_REQUEST,
                           TestNavigationThrottle::WILL_REDIRECT_REQUEST,
                           TestNavigationThrottle::WILL_PROCESS_RESPONSE,
-                          base::nullopt),
+                          absl::nullopt),
         ::testing::Values(TestNavigationThrottle::SYNCHRONOUS,
                           TestNavigationThrottle::ASYNCHRONOUS)));
 
diff --git a/content/test/portal/portal_activated_observer.h b/content/test/portal/portal_activated_observer.h
index f0ef3424..8d412cb5 100644
--- a/content/test/portal/portal_activated_observer.h
+++ b/content/test/portal/portal_activated_observer.h
@@ -6,8 +6,8 @@
 #define CONTENT_TEST_PORTAL_PORTAL_ACTIVATED_OBSERVER_H_
 
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/test/portal/portal_interceptor_for_testing.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/portal/portal.mojom-forward.h"
 
 namespace base {
@@ -52,7 +52,7 @@
 
   const base::WeakPtr<PortalInterceptorForTesting> interceptor_;
   bool has_activated_ = false;
-  base::Optional<blink::mojom::PortalActivateResult> result_;
+  absl::optional<blink::mojom::PortalActivateResult> result_;
   base::RunLoop* run_loop_ = nullptr;
 };
 
diff --git a/content/test/test_navigation_url_loader.cc b/content/test/test_navigation_url_loader.cc
index 1ac481db..3514c85 100644
--- a/content/test/test_navigation_url_loader.cc
+++ b/content/test/test_navigation_url_loader.cc
@@ -101,7 +101,7 @@
       mojo::ScopedDataPipeConsumerHandle(),
       GlobalRequestID::MakeBrowserInitiated(), false,
       blink::NavigationDownloadPolicy(),
-      request_info_->isolation_info.network_isolation_key(), base::nullopt,
+      request_info_->isolation_info.network_isolation_key(), absl::nullopt,
       std::move(early_hints));
 }
 
diff --git a/content/test/test_navigation_url_loader_delegate.cc b/content/test/test_navigation_url_loader_delegate.cc
index 6c8ec7de..97555b4 100644
--- a/content/test/test_navigation_url_loader_delegate.cc
+++ b/content/test/test_navigation_url_loader_delegate.cc
@@ -62,7 +62,7 @@
     bool is_download,
     blink::NavigationDownloadPolicy download_policy,
     net::NetworkIsolationKey network_isolation_key,
-    base::Optional<SubresourceLoaderParams> subresource_loader_params,
+    absl::optional<SubresourceLoaderParams> subresource_loader_params,
     EarlyHints early_hints) {
   on_request_handled_counter_++;
   response_head_ = std::move(response_head);
diff --git a/content/test/test_navigation_url_loader_delegate.h b/content/test/test_navigation_url_loader_delegate.h
index 7a3deacd..27bc81e 100644
--- a/content/test/test_navigation_url_loader_delegate.h
+++ b/content/test/test_navigation_url_loader_delegate.h
@@ -9,10 +9,10 @@
 
 #include "base/macros.h"
 #include "base/memory/ref_counted.h"
-#include "base/optional.h"
 #include "content/browser/loader/navigation_url_loader_delegate.h"
 #include "net/url_request/redirect_info.h"
 #include "services/network/public/mojom/url_response_head.mojom-forward.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace base {
 class RunLoop;
@@ -65,7 +65,7 @@
       bool is_download,
       blink::NavigationDownloadPolicy download_policy,
       net::NetworkIsolationKey network_isolation_key,
-      base::Optional<SubresourceLoaderParams> subresource_loader_params,
+      absl::optional<SubresourceLoaderParams> subresource_loader_params,
       EarlyHints early_hints) override;
   void OnRequestFailed(
       const network::URLLoaderCompletionStatus& status) override;
diff --git a/content/test/test_overscroll_delegate.cc b/content/test/test_overscroll_delegate.cc
index 84114970..41a72d7 100644
--- a/content/test/test_overscroll_delegate.cc
+++ b/content/test/test_overscroll_delegate.cc
@@ -50,7 +50,7 @@
   delta_x_ = delta_y_ = 0.f;
 }
 
-base::Optional<float> TestOverscrollDelegate::GetMaxOverscrollDelta() const {
+absl::optional<float> TestOverscrollDelegate::GetMaxOverscrollDelta() const {
   return delta_cap_;
 }
 
diff --git a/content/test/test_overscroll_delegate.h b/content/test/test_overscroll_delegate.h
index 7b42430..ec6d3c0 100644
--- a/content/test/test_overscroll_delegate.h
+++ b/content/test/test_overscroll_delegate.h
@@ -7,9 +7,9 @@
 
 #include <vector>
 
-#include "base/optional.h"
 #include "content/browser/renderer_host/overscroll_controller.h"
 #include "content/browser/renderer_host/overscroll_controller_delegate.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "ui/gfx/geometry/size.h"
 
 namespace content {
@@ -40,11 +40,11 @@
                               OverscrollMode new_mode,
                               OverscrollSource source,
                               cc::OverscrollBehavior behavior) override;
-  base::Optional<float> GetMaxOverscrollDelta() const override;
+  absl::optional<float> GetMaxOverscrollDelta() const override;
 
   gfx::Size display_size_;
 
-  base::Optional<float> delta_cap_;
+  absl::optional<float> delta_cap_;
   OverscrollMode current_mode_;
   OverscrollMode completed_mode_;
   std::vector<OverscrollMode> historical_modes_;
diff --git a/content/test/test_render_frame.cc b/content/test/test_render_frame.cc
index 370555c..bbe6768 100644
--- a/content/test/test_render_frame.cc
+++ b/content/test/test_render_frame.cc
@@ -9,7 +9,6 @@
 #include <vector>
 
 #include "base/callback_helpers.h"
-#include "base/optional.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "base/unguessable_token.h"
 #include "build/build_config.h"
@@ -27,6 +26,7 @@
 #include "net/base/data_url.h"
 #include "services/network/public/cpp/not_implemented_url_loader_factory.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/mojom/frame/frame_replication_state.mojom.h"
 #include "third_party/blink/public/web/web_local_frame.h"
@@ -206,7 +206,7 @@
       last_browser_interface_broker_receiver_;
 
   size_t request_overlay_routing_token_called_ = 0;
-  base::Optional<base::UnguessableToken> overlay_routing_token_;
+  absl::optional<base::UnguessableToken> overlay_routing_token_;
 
   bool is_page_state_updated_ = false;
 
@@ -253,7 +253,7 @@
       std::move(common_params), std::move(commit_params), std::move(head),
       mojo::ScopedDataPipeConsumerHandle(),
       network::mojom::URLLoaderClientEndpointsPtr(),
-      std::move(pending_factory_bundle), base::nullopt,
+      std::move(pending_factory_bundle), absl::nullopt,
       blink::mojom::ControllerServiceWorkerInfoPtr(),
       blink::mojom::ServiceWorkerContainerInfoForClientPtr(),
       mojo::NullRemote() /* prefetch_loader_factory */,
@@ -276,7 +276,7 @@
     mojom::CommitNavigationParamsPtr commit_params,
     int error_code,
     const net::ResolveErrorInfo& resolve_error_info,
-    const base::Optional<std::string>& error_page_content) {
+    const absl::optional<std::string>& error_page_content) {
   mock_navigation_client_.reset();
   BindNavigationClient(
       mock_navigation_client_.BindNewEndpointAndPassDedicatedReceiver());
@@ -306,7 +306,7 @@
         std::make_unique<blink::WebPolicyContainer>(
             blink::WebPolicyContainerPolicies(),
             mock_policy_container_host.BindNewEndpointAndPassDedicatedRemote());
-    next_navigation_html_override_ = base::nullopt;
+    next_navigation_html_override_ = absl::nullopt;
     frame_->CommitNavigation(std::move(navigation_params),
                              nullptr /* extra_data */);
     return;
diff --git a/content/test/test_render_frame.h b/content/test/test_render_frame.h
index 1bfcce9..698db83 100644
--- a/content/test/test_render_frame.h
+++ b/content/test/test_render_frame.h
@@ -8,7 +8,6 @@
 #include <memory>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/common/frame.mojom-forward.h"
 #include "content/common/navigation_params.mojom-forward.h"
 #include "content/renderer/render_frame_impl.h"
@@ -16,6 +15,7 @@
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/remote.h"
 #include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/input/input_handler.mojom.h"
 
 namespace content {
@@ -43,7 +43,7 @@
                          mojom::CommitNavigationParamsPtr request_params,
                          int error_code,
                          const net::ResolveErrorInfo& resolve_error_info,
-                         const base::Optional<std::string>& error_page_content);
+                         const absl::optional<std::string>& error_page_content);
   void BeginNavigation(std::unique_ptr<blink::WebNavigationInfo> info) override;
 
   mojom::DidCommitProvisionalLoadParamsPtr TakeLastCommitParams();
@@ -75,7 +75,7 @@
   mojom::FrameHost* GetFrameHost() override;
 
   std::unique_ptr<MockFrameHost> mock_frame_host_;
-  base::Optional<std::string> next_navigation_html_override_;
+  absl::optional<std::string> next_navigation_html_override_;
 
   mojo::AssociatedRemote<mojom::NavigationClient> mock_navigation_client_;
 
diff --git a/content/test/test_render_frame_host.cc b/content/test/test_render_frame_host.cc
index e42a5b0..7529861 100644
--- a/content/test/test_render_frame_host.cc
+++ b/content/test/test_render_frame_host.cc
@@ -9,7 +9,6 @@
 #include <utility>
 
 #include "base/guid.h"
-#include "base/optional.h"
 #include "base/run_loop.h"
 #include "content/browser/renderer_host/frame_tree.h"
 #include "content/browser/renderer_host/navigation_request.h"
@@ -32,6 +31,7 @@
 #include "net/base/load_flags.h"
 #include "net/http/http_response_headers.h"
 #include "services/network/public/cpp/parsed_headers.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
 #include "third_party/blink/public/common/frame/frame_policy.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom.h"
@@ -224,7 +224,7 @@
 }
 
 void TestRenderFrameHost::SimulateManifestURLUpdate(
-    const base::Optional<GURL>& manifest_url) {
+    const absl::optional<GURL>& manifest_url) {
   UpdateManifestURL(manifest_url);
 }
 
@@ -304,7 +304,7 @@
 
   mojom::BeginNavigationParamsPtr begin_params =
       mojom::BeginNavigationParams::New(
-          base::nullopt /* initiator_frame_token */,
+          absl::nullopt /* initiator_frame_token */,
           std::string() /* headers */, net::LOAD_NORMAL,
           false /* skip_service_worker */,
           blink::mojom::RequestContextType::HYPERLINK,
@@ -315,11 +315,11 @@
           GURL() /* searchable_form_url */,
           std::string() /* searchable_form_encoding */,
           GURL() /* client_side_redirect_url */,
-          base::nullopt /* devtools_initiator_info */,
-          nullptr /* trust_token_params */, base::nullopt /* impression */,
+          absl::nullopt /* devtools_initiator_info */,
+          nullptr /* trust_token_params */, absl::nullopt /* impression */,
           base::TimeTicks() /* renderer_before_unload_start */,
           base::TimeTicks() /* renderer_before_unload_end */,
-          base::nullopt /* web_bundle_token */);
+          absl::nullopt /* web_bundle_token */);
   auto common_params = CreateCommonNavigationParams();
   common_params->url = url;
   common_params->initiator_origin = GetLastCommittedOrigin();
@@ -339,7 +339,7 @@
 }
 
 void TestRenderFrameHost::SimulateDidChangeOpener(
-    const base::Optional<blink::LocalFrameToken>& opener_frame_token) {
+    const absl::optional<blink::LocalFrameToken>& opener_frame_token) {
   DidChangeOpener(opener_frame_token);
 }
 
@@ -353,7 +353,7 @@
                            /* was_fetched_via_cache=*/false,
                            /* is_signed_exchange_inner_response=*/false,
                            net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN,
-                           base::nullopt, nullptr, {} /* dns_aliases */);
+                           absl::nullopt, nullptr, {} /* dns_aliases */);
 }
 
 void TestRenderFrameHost::PrepareForCommitDeprecatedForNavigationSimulator(
@@ -361,7 +361,7 @@
     bool was_fetched_via_cache,
     bool is_signed_exchange_inner_response,
     net::HttpResponseInfo::ConnectionInfo connection_info,
-    base::Optional<net::SSLInfo> ssl_info,
+    absl::optional<net::SSLInfo> ssl_info,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     const std::vector<std::string>& dns_aliases) {
   PrepareForCommitInternal(remote_endpoint, was_fetched_via_cache,
@@ -374,7 +374,7 @@
     bool was_fetched_via_cache,
     bool is_signed_exchange_inner_response,
     net::HttpResponseInfo::ConnectionInfo connection_info,
-    base::Optional<net::SSLInfo> ssl_info,
+    absl::optional<net::SSLInfo> ssl_info,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     const std::vector<std::string>& dns_aliases) {
   NavigationRequest* request = frame_tree_node_->navigation_request();
@@ -484,7 +484,7 @@
     network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
-    base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+    absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
         subresource_overrides,
     blink::mojom::ControllerServiceWorkerInfoPtr controller,
     blink::mojom::ServiceWorkerContainerInfoForClientPtr container_info,
@@ -505,7 +505,7 @@
     bool has_stale_copy_in_cache,
     int32_t error_code,
     int32_t extended_error_code,
-    const base::Optional<std::string>& error_page_content,
+    const absl::optional<std::string>& error_page_content,
     std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
         subresource_loader_factories,
     blink::mojom::PolicyContainerPtr policy_container) {
diff --git a/content/test/test_render_frame_host.h b/content/test/test_render_frame_host.h
index e4cafa2..27b7ddf 100644
--- a/content/test/test_render_frame_host.h
+++ b/content/test/test_render_frame_host.h
@@ -12,7 +12,6 @@
 #include <vector>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "content/browser/renderer_host/render_frame_host_impl.h"
 #include "content/common/navigation_client.mojom-forward.h"
 #include "content/common/navigation_params.mojom-forward.h"
@@ -24,6 +23,7 @@
 #include "content/test/test_render_widget_host.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/mojom/bluetooth/web_bluetooth.mojom-forward.h"
 #include "third_party/blink/public/mojom/security_context/insecure_request_policy.mojom-forward.h"
@@ -93,7 +93,7 @@
   const std::vector<std::string>& GetConsoleMessages() override;
   int GetHeavyAdIssueCount(HeavyAdIssueType type) override;
   void SimulateManifestURLUpdate(
-      const base::Optional<GURL>& manifest_url) override;
+      const absl::optional<GURL>& manifest_url) override;
 
   void SendNavigate(int nav_entry_id,
                     bool did_create_new_entry,
@@ -122,7 +122,7 @@
                                               bool has_user_gesture);
 
   void SimulateDidChangeOpener(
-      const base::Optional<blink::LocalFrameToken>& opener_frame_token);
+      const absl::optional<blink::LocalFrameToken>& opener_frame_token);
 
   void DidEnforceInsecureRequestPolicy(
       blink::mojom::InsecureRequestPolicy policy);
@@ -148,7 +148,7 @@
       bool was_fetched_via_cache,
       bool is_signed_exchange_inner_response,
       net::HttpResponseInfo::ConnectionInfo connection_info,
-      base::Optional<net::SSLInfo> ssl_info,
+      absl::optional<net::SSLInfo> ssl_info,
       scoped_refptr<net::HttpResponseHeaders> response_headers,
       const std::vector<std::string>& dns_aliases);
 
@@ -219,7 +219,7 @@
       network::mojom::URLLoaderClientEndpointsPtr url_loader_client_endpoints,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
-      base::Optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
+      absl::optional<std::vector<blink::mojom::TransferrableURLLoaderPtr>>
           subresource_overrides,
       blink::mojom::ControllerServiceWorkerInfoPtr
           controller_service_worker_info,
@@ -236,7 +236,7 @@
       bool has_stale_copy_in_cache,
       int32_t error_code,
       int32_t extended_error_code,
-      const base::Optional<std::string>& error_page_content,
+      const absl::optional<std::string>& error_page_content,
       std::unique_ptr<blink::PendingURLLoaderFactoryBundle>
           subresource_loader_factories,
       blink::mojom::PolicyContainerPtr policy_container) override;
@@ -253,7 +253,7 @@
       bool was_fetched_via_cache,
       bool is_signed_exchange_inner_response,
       net::HttpResponseInfo::ConnectionInfo connection_info,
-      base::Optional<net::SSLInfo> ssl_info,
+      absl::optional<net::SSLInfo> ssl_info,
       scoped_refptr<net::HttpResponseHeaders> response_headers,
       const std::vector<std::string>& dns_aliases);
 
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc
index b287255..a38339db 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -6,7 +6,6 @@
 
 #include <memory>
 
-#include "base/optional.h"
 #include "base/strings/utf_string_conversions.h"
 #include "build/build_config.h"
 #include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
@@ -31,6 +30,7 @@
 #include "content/test/test_web_contents.h"
 #include "media/base/video_frame.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/page_state/page_state.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
 #include "third_party/blink/public/mojom/page/drag.mojom.h"
@@ -226,10 +226,10 @@
   if (display_feature)
     display_feature_ = *display_feature;
   else
-    display_feature_ = base::nullopt;
+    display_feature_ = absl::nullopt;
 }
 
-base::Optional<DisplayFeature> TestRenderWidgetHostView::GetDisplayFeature() {
+absl::optional<DisplayFeature> TestRenderWidgetHostView::GetDisplayFeature() {
   return display_feature_;
 }
 
@@ -262,11 +262,11 @@
 }
 
 bool TestRenderViewHost::CreateTestRenderView() {
-  return CreateRenderView(base::nullopt, MSG_ROUTING_NONE, false);
+  return CreateRenderView(absl::nullopt, MSG_ROUTING_NONE, false);
 }
 
 bool TestRenderViewHost::CreateRenderView(
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     int proxy_route_id,
     bool window_was_created_with_opener) {
   DCHECK(!IsRenderViewLive());
diff --git a/content/test/test_render_view_host.h b/content/test/test_render_view_host.h
index 143d813..29bf243 100644
--- a/content/test/test_render_view_host.h
+++ b/content/test/test_render_view_host.h
@@ -130,7 +130,7 @@
  protected:
   // RenderWidgetHostViewBase:
   void UpdateBackgroundColor() override;
-  base::Optional<DisplayFeature> GetDisplayFeature() override;
+  absl::optional<DisplayFeature> GetDisplayFeature() override;
   void SetDisplayFeatureForTesting(
       const DisplayFeature* display_feature) override;
 
@@ -151,7 +151,7 @@
   std::unique_ptr<aura::Window> window_;
 #endif
 
-  base::Optional<DisplayFeature> display_feature_;
+  absl::optional<DisplayFeature> display_feature_;
 };
 
 // TestRenderViewHost ----------------------------------------------------------
@@ -203,7 +203,7 @@
   // RenderViewHostImpl overrides.
   MockRenderProcessHost* GetProcess() override;
   bool CreateRenderView(
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       int proxy_route_id,
       bool window_was_created_with_opener) override;
   bool IsTestRenderViewHost() const override;
@@ -224,7 +224,7 @@
   }
 
   // The opener frame route id passed to CreateRenderView().
-  const base::Optional<blink::FrameToken>& opener_frame_token() const {
+  const absl::optional<blink::FrameToken>& opener_frame_token() const {
     return opener_frame_token_;
   }
 
@@ -251,7 +251,7 @@
   int* delete_counter_;
 
   // See opener_frame_token() above.
-  base::Optional<blink::FrameToken> opener_frame_token_;
+  absl::optional<blink::FrameToken> opener_frame_token_;
 
   DISALLOW_COPY_AND_ASSIGN(TestRenderViewHost);
 };
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index b3c8821..abd057a 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -230,7 +230,7 @@
 
 bool TestWebContents::CreateRenderViewForRenderManager(
     RenderViewHost* render_view_host,
-    const base::Optional<blink::FrameToken>& opener_frame_token,
+    const absl::optional<blink::FrameToken>& opener_frame_token,
     RenderFrameProxyHost* proxy_host) {
   const auto proxy_routing_id =
       proxy_host ? proxy_host->GetRoutingID() : MSG_ROUTING_NONE;
diff --git a/content/test/test_web_contents.h b/content/test/test_web_contents.h
index 842c7ca..4a46cda 100644
--- a/content/test/test_web_contents.h
+++ b/content/test/test_web_contents.h
@@ -14,7 +14,6 @@
 #include <utility>
 #include <vector>
 
-#include "base/optional.h"
 #include "base/unguessable_token.h"
 #include "content/browser/site_instance_impl.h"
 #include "content/browser/web_contents/web_contents_impl.h"
@@ -23,6 +22,7 @@
 #include "content/test/test_render_view_host.h"
 #include "mojo/public/cpp/bindings/pending_remote.h"
 #include "mojo/public/cpp/bindings/remote.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/loader/pause_subresource_loading_handle.mojom-forward.h"
 #include "ui/base/page_transition_types.h"
 
@@ -98,7 +98,7 @@
   // Prevent interaction with views.
   bool CreateRenderViewForRenderManager(
       RenderViewHost* render_view_host,
-      const base::Optional<blink::FrameToken>& opener_frame_token,
+      const absl::optional<blink::FrameToken>& opener_frame_token,
       RenderFrameProxyHost* proxy_host) override;
 
   // Returns a clone of this TestWebContents. The returned object is also a
@@ -192,7 +192,7 @@
   std::map<GURL, std::list<std::pair<int, ImageDownloadCallback>>>
       pending_image_downloads_;
   GURL last_committed_url_;
-  base::Optional<std::u16string> title_;
+  absl::optional<std::u16string> title_;
   bool pause_subresource_loading_called_;
   base::UnguessableToken audio_group_id_;
   bool is_page_frozen_;
diff --git a/content/test/url_loader_interceptor_test.cc b/content/test/url_loader_interceptor_test.cc
index faf9cb0..084141f 100644
--- a/content/test/url_loader_interceptor_test.cc
+++ b/content/test/url_loader_interceptor_test.cc
@@ -162,7 +162,7 @@
       int render_process_id,
       URLLoaderFactoryType type,
       const url::Origin& request_initiator,
-      base::Optional<int64_t> navigation_id,
+      absl::optional<int64_t> navigation_id,
       ukm::SourceIdObj ukm_source_id,
       mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
       mojo::PendingRemote<network::mojom::TrustedURLLoaderHeaderClient>*
diff --git a/content/utility/utility_main.cc b/content/utility/utility_main.cc
index 283ee84..4b30d8f 100644
--- a/content/utility/utility_main.cc
+++ b/content/utility/utility_main.cc
@@ -6,7 +6,6 @@
 #include "base/command_line.h"
 #include "base/debug/leak_annotations.h"
 #include "base/message_loop/message_pump_type.h"
-#include "base/optional.h"
 #include "base/power_monitor/power_monitor.h"
 #include "base/run_loop.h"
 #include "base/task/single_thread_task_executor.h"
@@ -26,6 +25,7 @@
 #include "printing/buildflags/buildflags.h"
 #include "sandbox/policy/sandbox.h"
 #include "services/tracing/public/cpp/trace_startup.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/icu/source/common/unicode/unistr.h"
 #include "third_party/icu/source/i18n/unicode/timezone.h"
 
@@ -190,7 +190,7 @@
   // TODO(leonhsl): Once http://crbug.com/646833 got resolved, re-enable
   // base::HighResolutionTimerManager here for future possible usage of high
   // resolution timer in service utility process.
-  base::Optional<base::HighResolutionTimerManager> hi_res_timer_manager;
+  absl::optional<base::HighResolutionTimerManager> hi_res_timer_manager;
   if (base::PowerMonitor::IsInitialized()) {
     hi_res_timer_manager.emplace();
   }
diff --git a/content/utility/utility_thread_impl.cc b/content/utility/utility_thread_impl.cc
index ae7584f9..363574f 100644
--- a/content/utility/utility_thread_impl.cc
+++ b/content/utility/utility_thread_impl.cc
@@ -16,7 +16,6 @@
 #include "base/memory/scoped_refptr.h"
 #include "base/memory/weak_ptr.h"
 #include "base/no_destructor.h"
-#include "base/optional.h"
 #include "base/sequenced_task_runner.h"
 #include "base/trace_event/trace_log.h"
 #include "build/build_config.h"
@@ -30,6 +29,7 @@
 #include "mojo/public/cpp/bindings/binder_map.h"
 #include "mojo/public/cpp/bindings/pending_receiver.h"
 #include "mojo/public/cpp/bindings/service_factory.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 namespace content {
 
@@ -85,8 +85,8 @@
                        std::move(*receiver), std::move(termination_callback)));
   }
 
-  static base::Optional<ServiceBinderImpl>& GetInstanceStorage() {
-    static base::NoDestructor<base::Optional<ServiceBinderImpl>> storage;
+  static absl::optional<ServiceBinderImpl>& GetInstanceStorage() {
+    static base::NoDestructor<absl::optional<ServiceBinderImpl>> storage;
     return *storage;
   }
 
diff --git a/content/web_test/browser/fake_bluetooth_chooser.cc b/content/web_test/browser/fake_bluetooth_chooser.cc
index 438789b3..5814109 100644
--- a/content/web_test/browser/fake_bluetooth_chooser.cc
+++ b/content/web_test/browser/fake_bluetooth_chooser.cc
@@ -27,8 +27,8 @@
           IMMEDIATE_TIMEOUT);
 
   client_->OnEvent(mojom::FakeBluetoothChooserEvent::New(
-      mojom::ChooserEventType::CHOOSER_CLOSED, /*origin=*/base::nullopt,
-      /*peripheral_address=*/base::nullopt));
+      mojom::ChooserEventType::CHOOSER_CLOSED, /*origin=*/absl::nullopt,
+      /*peripheral_address=*/absl::nullopt));
 }
 
 void FakeBluetoothChooser::OnRunBluetoothChooser(
@@ -37,7 +37,7 @@
   event_handler_ = event_handler;
   client_->OnEvent(mojom::FakeBluetoothChooserEvent::New(
       mojom::ChooserEventType::CHOOSER_OPENED, origin,
-      /*peripheral_address=*/base::nullopt));
+      /*peripheral_address=*/absl::nullopt));
 }
 
 // mojom::FakeBluetoothChooser overrides
@@ -51,16 +51,16 @@
   DCHECK(event_handler_);
   event_handler_.Run(BluetoothChooserEvent::CANCELLED, std::string());
   client_->OnEvent(mojom::FakeBluetoothChooserEvent::New(
-      mojom::ChooserEventType::CHOOSER_CLOSED, /*origin=*/base::nullopt,
-      /*peripheral_address=*/base::nullopt));
+      mojom::ChooserEventType::CHOOSER_CLOSED, /*origin=*/absl::nullopt,
+      /*peripheral_address=*/absl::nullopt));
 }
 
 void FakeBluetoothChooser::Rescan() {
   DCHECK(event_handler_);
   event_handler_.Run(BluetoothChooserEvent::RESCAN, std::string());
   client_->OnEvent(mojom::FakeBluetoothChooserEvent::New(
-      mojom::ChooserEventType::DISCOVERING, /*origin=*/base::nullopt,
-      /*peripheral_address=*/base::nullopt));
+      mojom::ChooserEventType::DISCOVERING, /*origin=*/absl::nullopt,
+      /*peripheral_address=*/absl::nullopt));
 }
 
 // BluetoothChooser overrides
@@ -110,7 +110,7 @@
                                              int signal_strength_level) {
   client_->OnEvent(mojom::FakeBluetoothChooserEvent::New(
       mojom::ChooserEventType::ADD_OR_UPDATE_DEVICE,
-      /*origin=*/base::nullopt, /*peripheral_address=*/device_id));
+      /*origin=*/absl::nullopt, /*peripheral_address=*/device_id));
 }
 
 }  // namespace content
diff --git a/content/web_test/browser/web_test_background_fetch_delegate.cc b/content/web_test/browser/web_test_background_fetch_delegate.cc
index 1696314e..22b57e2 100644
--- a/content/web_test/browser/web_test_background_fetch_delegate.cc
+++ b/content/web_test/browser/web_test_background_fetch_delegate.cc
@@ -313,8 +313,8 @@
 
 void WebTestBackgroundFetchDelegate::UpdateUI(
     const std::string& job_unique_id,
-    const base::Optional<std::string>& title,
-    const base::Optional<SkBitmap>& icon) {
+    const absl::optional<std::string>& title,
+    const absl::optional<SkBitmap>& icon) {
   background_fetch_client_->client()->OnUIUpdated(job_unique_id);
 }
 
diff --git a/content/web_test/browser/web_test_background_fetch_delegate.h b/content/web_test/browser/web_test_background_fetch_delegate.h
index 036fbda..a12583b2 100644
--- a/content/web_test/browser/web_test_background_fetch_delegate.h
+++ b/content/web_test/browser/web_test_background_fetch_delegate.h
@@ -8,9 +8,9 @@
 #include <memory>
 
 #include "base/macros.h"
-#include "base/optional.h"
 #include "components/download/public/background_service/client.h"
 #include "content/public/browser/background_fetch_delegate.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 
 class SimpleFactoryKey;
 
@@ -42,8 +42,8 @@
   void Abort(const std::string& job_unique_id) override;
   void MarkJobComplete(const std::string& job_unique_id) override;
   void UpdateUI(const std::string& job_unique_id,
-                const base::Optional<std::string>& title,
-                const base::Optional<SkBitmap>& icon) override;
+                const absl::optional<std::string>& title,
+                const absl::optional<SkBitmap>& icon) override;
 
  private:
   class WebTestBackgroundFetchDownloadClient;
diff --git a/content/web_test/browser/web_test_bluetooth_adapter_provider.cc b/content/web_test/browser/web_test_bluetooth_adapter_provider.cc
index 6ad74e5c..88c2f7f 100644
--- a/content/web_test/browser/web_test_bluetooth_adapter_provider.cc
+++ b/content/web_test/browser/web_test_bluetooth_adapter_provider.cc
@@ -709,7 +709,7 @@
       measurement_interval.get();
 
   ON_CALL(*measurement_interval, ReadRemoteCharacteristic_(_))
-      .WillByDefault(RunCallbackWithResult<0>(/*error_code=*/base::nullopt,
+      .WillByDefault(RunCallbackWithResult<0>(/*error_code=*/absl::nullopt,
                                               std::vector<uint8_t>({1})));
 
   ON_CALL(*measurement_interval, WriteRemoteCharacteristic_(_, _, _, _))
@@ -737,7 +737,7 @@
                        BluetoothRemoteGattDescriptor::ValueCallback& callback) {
               std::vector<uint8_t> value(descriptorName.begin(),
                                          descriptorName.end());
-              std::move(callback).Run(/*error_code=*/base::nullopt, value);
+              std::move(callback).Run(/*error_code=*/absl::nullopt, value);
             }));
 
     ON_CALL(*user_description, WriteRemoteDescriptor_(_, _, _))
@@ -1022,7 +1022,7 @@
             base::OnceClosure pending;
             if (succeeds) {
               pending = base::BindOnce(std::move(callback),
-                                       /*error_code=*/base::nullopt,
+                                       /*error_code=*/absl::nullopt,
                                        std::vector<uint8_t>({1}));
             } else {
               pending = base::BindOnce(std::move(callback),
@@ -1125,7 +1125,7 @@
             base::OnceClosure pending;
             if (succeeds) {
               pending = base::BindOnce(std::move(callback),
-                                       /*error_code=*/base::nullopt,
+                                       /*error_code=*/absl::nullopt,
                                        std::vector<uint8_t>({1}));
             } else {
               pending = base::BindOnce(std::move(callback),
@@ -1523,10 +1523,10 @@
 
     // Read response.
     std::vector<uint8_t> device_name_value;
-    if (base::Optional<std::string> name = device->GetName())
+    if (absl::optional<std::string> name = device->GetName())
       device_name_value.assign(name.value().begin(), name.value().end());
     ON_CALL(*device_name, ReadRemoteCharacteristic_(_))
-        .WillByDefault(RunCallbackWithResult<0>(/*error_code=*/base::nullopt,
+        .WillByDefault(RunCallbackWithResult<0>(/*error_code=*/absl::nullopt,
                                                 device_name_value));
 
     // Write response.
@@ -1554,7 +1554,7 @@
 
     ON_CALL(*peripheral_privacy_flag, ReadRemoteCharacteristic_(_))
         .WillByDefault(
-            RunCallbackWithResult<0>(/*error_code=*/base::nullopt, value));
+            RunCallbackWithResult<0>(/*error_code=*/absl::nullopt, value));
 
     // Crash if WriteRemoteCharacteristic called. Not using GoogleMock's Expect
     // because this is used in web tests that may not report a mock
@@ -1622,7 +1622,7 @@
 
   ON_CALL(*body_sensor_location_chest, ReadRemoteCharacteristic_(_))
       .WillByDefault(RunCallbackWithResult<0>(
-          /*error_code=*/base::nullopt, std::vector<uint8_t>({1} /* Chest */)));
+          /*error_code=*/absl::nullopt, std::vector<uint8_t>({1} /* Chest */)));
 
   // Body Sensor Location Characteristic (Wrist)
   std::unique_ptr<NiceMockBluetoothGattCharacteristic>
@@ -1632,7 +1632,7 @@
 
   ON_CALL(*body_sensor_location_wrist, ReadRemoteCharacteristic_(_))
       .WillByDefault(RunCallbackWithResult<0>(
-          /*error_code=*/base::nullopt, std::vector<uint8_t>({2} /* Wrist */)));
+          /*error_code=*/absl::nullopt, std::vector<uint8_t>({2} /* Wrist */)));
 
   heart_rate->AddMockCharacteristic(std::move(heart_rate_measurement));
   heart_rate->AddMockCharacteristic(std::move(body_sensor_location_chest));
diff --git a/content/web_test/browser/web_test_control_host.cc b/content/web_test/browser/web_test_control_host.cc
index 3de88017..068df38 100644
--- a/content/web_test/browser/web_test_control_host.cc
+++ b/content/web_test/browser/web_test_control_host.cc
@@ -1624,15 +1624,15 @@
 void WebTestControlHost::SimulateWebNotificationClick(
     const std::string& title,
     int32_t action_index,
-    const base::Optional<std::u16string>& reply) {
+    const absl::optional<std::u16string>& reply) {
   auto* client = WebTestContentBrowserClient::Get();
   auto* context = client->GetWebTestBrowserContext();
   auto* service = client->GetPlatformNotificationService(context);
   static_cast<MockPlatformNotificationService*>(service)->SimulateClick(
       title,
       action_index == std::numeric_limits<int32_t>::min()
-          ? base::Optional<int>()
-          : base::Optional<int>(action_index),
+          ? absl::optional<int>()
+          : absl::optional<int>(action_index),
       reply);
 }
 
diff --git a/content/web_test/browser/web_test_control_host.h b/content/web_test/browser/web_test_control_host.h
index fedfebf..84aadb0 100644
--- a/content/web_test/browser/web_test_control_host.h
+++ b/content/web_test/browser/web_test_control_host.h
@@ -236,7 +236,7 @@
   void SimulateWebNotificationClick(
       const std::string& title,
       int32_t action_index,
-      const base::Optional<std::u16string>& reply) override;
+      const absl::optional<std::u16string>& reply) override;
   void SimulateWebNotificationClose(const std::string& title,
                                     bool by_user) override;
   void SimulateWebContentIndexDelete(const std::string& id) override;
@@ -377,8 +377,8 @@
 
   mojom::WebTestRendererDumpResultPtr renderer_dump_result_;
   std::string navigation_history_dump_;
-  base::Optional<SkBitmap> pixel_dump_;
-  base::Optional<std::string> layout_dump_;
+  absl::optional<SkBitmap> pixel_dump_;
+  absl::optional<std::string> layout_dump_;
   std::string actual_pixel_hash_;
   // By default a test that opens other windows will have them closed at the end
   // of the test before checking for leaks. It may specify that it has closed
diff --git a/content/web_test/browser/web_test_download_manager_delegate.cc b/content/web_test/browser/web_test_download_manager_delegate.cc
index d61150f..e86d30a 100644
--- a/content/web_test/browser/web_test_download_manager_delegate.cc
+++ b/content/web_test/browser/web_test_download_manager_delegate.cc
@@ -48,7 +48,7 @@
     const content::WebContents::Getter& web_contents_getter,
     const GURL& url,
     const std::string& request_method,
-    base::Optional<url::Origin> request_initiator,
+    absl::optional<url::Origin> request_initiator,
     bool from_download_cross_origin_redirect,
     bool content_initiated,
     content::CheckDownloadAllowedCallback check_download_allowed_cb) {
diff --git a/content/web_test/browser/web_test_download_manager_delegate.h b/content/web_test/browser/web_test_download_manager_delegate.h
index 1dc0457c..aff924f 100644
--- a/content/web_test/browser/web_test_download_manager_delegate.h
+++ b/content/web_test/browser/web_test_download_manager_delegate.h
@@ -30,7 +30,7 @@
       const content::WebContents::Getter& web_contents_getter,
       const GURL& url,
       const std::string& request_method,
-      base::Optional<url::Origin> request_initiator,
+      absl::optional<url::Origin> request_initiator,
       bool from_download_cross_origin_redirect,
       bool content_initiated,
       content::CheckDownloadAllowedCallback check_download_allowed_cb) override;
diff --git a/content/web_test/browser/web_test_push_messaging_service.cc b/content/web_test/browser/web_test_push_messaging_service.cc
index fd3e760..25fbbcfd 100644
--- a/content/web_test/browser/web_test_push_messaging_service.cc
+++ b/content/web_test/browser/web_test_push_messaging_service.cc
@@ -6,13 +6,13 @@
 
 #include "base/bind.h"
 #include "base/callback.h"
-#include "base/optional.h"
 #include "base/stl_util.h"
 #include "base/time/time.h"
 #include "content/public/browser/permission_type.h"
 #include "content/web_test/browser/web_test_browser_context.h"
 #include "content/web_test/browser/web_test_content_browser_client.h"
 #include "content/web_test/browser/web_test_permission_manager.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/mojom/push_messaging/push_messaging_status.mojom.h"
 #include "third_party/blink/public/mojom/service_worker/service_worker_registration.mojom.h"
 
@@ -98,7 +98,7 @@
   } else {
     std::move(callback).Run(
         "registration_id", GURL::EmptyGURL() /* endpoint */,
-        base::nullopt /* expiration_time */,
+        absl::nullopt /* expiration_time */,
         std::vector<uint8_t>() /* p256dh */, std::vector<uint8_t>() /* auth */,
         blink::mojom::PushRegistrationStatus::PERMISSION_DENIED);
   }
diff --git a/content/web_test/renderer/event_sender.cc b/content/web_test/renderer/event_sender.cc
index 930efff..ef38e8e 100644
--- a/content/web_test/renderer/event_sender.cc
+++ b/content/web_test/renderer/event_sender.cc
@@ -1252,7 +1252,7 @@
 EventSender::~EventSender() {}
 
 void EventSender::Reset() {
-  current_drag_data_ = base::nullopt;
+  current_drag_data_ = absl::nullopt;
   current_drag_effect_ = ui::mojom::DragOperation::kNone;
   current_drag_effects_allowed_ = blink::kDragOperationNone;
   current_pointer_state_.clear();
@@ -2632,7 +2632,7 @@
   } else {
     MainFrameWidget()->DragTargetDragLeave(gfx::PointF(), gfx::PointF());
   }
-  current_drag_data_ = base::nullopt;
+  current_drag_data_ = absl::nullopt;
   MainFrameWidget()->DragSourceEndedAt(event.PositionInWidget(),
                                        event.PositionInScreen(),
                                        current_drag_effect_, base::DoNothing());
diff --git a/content/web_test/renderer/event_sender.h b/content/web_test/renderer/event_sender.h
index cd28eadc..148bd20 100644
--- a/content/web_test/renderer/event_sender.h
+++ b/content/web_test/renderer/event_sender.h
@@ -15,9 +15,9 @@
 #include "base/containers/circular_deque.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "base/time/time.h"
 #include "build/build_config.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/common/input/web_input_event.h"
 #include "third_party/blink/public/common/input/web_mouse_wheel_event.h"
 #include "third_party/blink/public/common/input/web_touch_point.h"
@@ -273,7 +273,7 @@
 
   std::unique_ptr<blink::ContextMenuData> last_context_menu_data_;
 
-  base::Optional<blink::WebDragData> current_drag_data_;
+  absl::optional<blink::WebDragData> current_drag_data_;
 
   // Location of the touch point that initiated a gesture.
   gfx::PointF current_gesture_location_;
diff --git a/content/web_test/renderer/fake_screen_orientation_impl.cc b/content/web_test/renderer/fake_screen_orientation_impl.cc
index 2dc9153..b9a9bb58 100644
--- a/content/web_test/renderer/fake_screen_orientation_impl.cc
+++ b/content/web_test/renderer/fake_screen_orientation_impl.cc
@@ -56,10 +56,10 @@
   return false;
 }
 
-base::Optional<blink::mojom::ScreenOrientation>
+absl::optional<blink::mojom::ScreenOrientation>
 FakeScreenOrientationImpl::CurrentOrientationType() const {
   if (is_disabled_)
-    return base::nullopt;
+    return absl::nullopt;
   return current_orientation_;
 }
 
diff --git a/content/web_test/renderer/fake_screen_orientation_impl.h b/content/web_test/renderer/fake_screen_orientation_impl.h
index 8f94570f..de0bab4 100644
--- a/content/web_test/renderer/fake_screen_orientation_impl.h
+++ b/content/web_test/renderer/fake_screen_orientation_impl.h
@@ -35,7 +35,7 @@
   bool UpdateDeviceOrientation(blink::WebView* web_view,
                                blink::mojom::ScreenOrientation orientation);
 
-  base::Optional<blink::mojom::ScreenOrientation> CurrentOrientationType()
+  absl::optional<blink::mojom::ScreenOrientation> CurrentOrientationType()
       const;
   bool IsDisabled() const { return is_disabled_; }
   void SetDisabled(blink::WebView* web_view, bool disabled);
diff --git a/content/web_test/renderer/test_runner.cc b/content/web_test/renderer/test_runner.cc
index 3ad64c7..6b78711 100644
--- a/content/web_test/renderer/test_runner.cc
+++ b/content/web_test/renderer/test_runner.cc
@@ -1783,7 +1783,7 @@
 
   std::string title;
   int action_index = std::numeric_limits<int32_t>::min();
-  base::Optional<std::u16string> reply;
+  absl::optional<std::u16string> reply;
 
   if (!args->GetNext(&title)) {
     args->ThrowError();
diff --git a/content/web_test/renderer/test_runner.h b/content/web_test/renderer/test_runner.h
index c757b2d..ef0a047 100644
--- a/content/web_test/renderer/test_runner.h
+++ b/content/web_test/renderer/test_runner.h
@@ -18,7 +18,6 @@
 #include "base/files/file_path.h"
 #include "base/macros.h"
 #include "base/memory/weak_ptr.h"
-#include "base/optional.h"
 #include "content/web_test/common/web_test.mojom.h"
 #include "content/web_test/common/web_test_bluetooth_fake_adapter_setter.mojom.h"
 #include "content/web_test/common/web_test_constants.h"
@@ -27,6 +26,7 @@
 #include "content/web_test/renderer/gamepad_controller.h"
 #include "content/web_test/renderer/layout_dump.h"
 #include "content/web_test/renderer/web_test_content_settings_client.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "third_party/blink/public/platform/web_effective_connection_type.h"
 #include "third_party/blink/public/platform/web_url.h"
 #include "third_party/skia/include/core/SkBitmap.h"
@@ -290,7 +290,7 @@
     bool is_frozen() const { return GetStateValue(kKeyFrozen); }
 
     bool GetStateValue(const char* key) const {
-      base::Optional<bool> value = states_.current_values().FindBoolPath(key);
+      absl::optional<bool> value = states_.current_values().FindBoolPath(key);
       DCHECK(value.has_value());
       return value.value();
     }
diff --git a/content/web_test/renderer/test_websocket_handshake_throttle_provider.cc b/content/web_test/renderer/test_websocket_handshake_throttle_provider.cc
index d6787a2..9f2662f4 100644
--- a/content/web_test/renderer/test_websocket_handshake_throttle_provider.cc
+++ b/content/web_test/renderer/test_websocket_handshake_throttle_provider.cc
@@ -67,7 +67,7 @@
 
     auto wrapper = base::BindOnce(
         [](CompletionCallback callback) {
-          std::move(callback).Run(base::nullopt);
+          std::move(callback).Run(absl::nullopt);
         },
         std::move(completion_callback));
 
diff --git a/content/web_test/renderer/web_frame_test_proxy.cc b/content/web_test/renderer/web_frame_test_proxy.cc
index ff3041b8..d542136d 100644
--- a/content/web_test/renderer/web_frame_test_proxy.cc
+++ b/content/web_test/renderer/web_frame_test_proxy.cc
@@ -139,7 +139,7 @@
 
   void DidStartNavigation(
       const GURL& url,
-      base::Optional<blink::WebNavigationType> navigation_type) override {
+      absl::optional<blink::WebNavigationType> navigation_type) override {
     if (test_runner_->ShouldDumpFrameLoadCallbacks()) {
       std::string description = frame_proxy()->GetFrameDescriptionForWebTests();
       test_runner_->PrintMessage(description + " - DidStartNavigation\n");
@@ -418,7 +418,7 @@
 
 void WebFrameTestProxy::UpdateContextMenuDataForTesting(
     const blink::ContextMenuData& context_menu_data,
-    const base::Optional<gfx::Point>& location) {
+    const absl::optional<gfx::Point>& location) {
   blink::FrameWidgetTestHelper* frame_widget =
       GetLocalRootFrameWidgetTestHelper();
   frame_widget->GetEventSender()->SetContextMenuData(context_menu_data);
@@ -695,7 +695,7 @@
     blink::WebSetSinkIdCompleteCallback completion_callback) {
   std::string device_id = sink_id.Utf8();
   if (device_id == "valid" || device_id.empty())
-    std::move(completion_callback).Run(/*error =*/base::nullopt);
+    std::move(completion_callback).Run(/*error =*/absl::nullopt);
   else if (device_id == "unauthorized")
     std::move(completion_callback)
         .Run(blink::WebSetSinkIdError::kNotAuthorized);
diff --git a/content/web_test/renderer/web_frame_test_proxy.h b/content/web_test/renderer/web_frame_test_proxy.h
index d366b6a..f1762cae 100644
--- a/content/web_test/renderer/web_frame_test_proxy.h
+++ b/content/web_test/renderer/web_frame_test_proxy.h
@@ -70,7 +70,7 @@
   blink::WebEffectiveConnectionType GetEffectiveConnectionType() override;
   void UpdateContextMenuDataForTesting(
       const blink::ContextMenuData& context_menu_data,
-      const base::Optional<gfx::Point>&) override;
+      const absl::optional<gfx::Point>&) override;
   void DidDispatchPingLoader(const blink::WebURL& url) override;
   void WillSendRequest(blink::WebURLRequest& request,
                        ForRedirect for_redirect) override;