Migrate to NOTREACHED() in extensions/
NOTREACHED() and NOTREACHED_IN_MIGRATION() are both CHECK-fatal now. The former is [[noreturn]] so this CL also performs dead-code removal after the NOTREACHED(). This CL does not attempt to do additional rewrites of any surrounding code, like: if (!foo) { NOTREACHED(); } to CHECK(foo); Those transforms take a non-trivial amount of time (and there are thousands of instances). Cleanup can be left as an exercise for the reader. Bug: 40580068 Change-Id: I80696f361f79908132f9a0e3d8654592f2e37c13 Low-Coverage-Reason: OTHER Should-be-unreachable code Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5951563 Commit-Queue: Peter Boström <pbos@chromium.org> Reviewed-by: Emilia Paz <emiliapaz@chromium.org> Reviewed-by: Sam McNally <sammc@chromium.org> Cr-Commit-Position: refs/heads/main@{#1371865}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
896122f527
commit
38412897b2
extensions
browser
activity.ccblocklist_extension_prefs.ccbrowser_frame_context_data.ccembedder_user_script_loader.ccextension_function.ccextension_function_dispatcher.ccextension_icon_placeholder.ccextension_pref_value_map.ccextension_prefs.ccextension_user_script_loader.ccimage_loader.ccmock_extension_system.ccpref_names.ccprocess_manager.ccrenderer_startup_helper.ccsandboxed_unpacker.cctest_extensions_browser_client.cc
api
app_current_window_internal
audio
bluetooth
bluetooth_low_energy
clipboard
content_settings
declarative
declarative_net_request
extension_url_pattern_index_matcher.ccfile_sequence_helper.ccflat_ruleset_indexer.ccindexed_rule.ccregex_rules_matcher.ccruleset_manager.ccruleset_matcher.ccutils.cc
declarative_webrequest
device_permissions_manager.ccfeedback_private
guest_view
web_view
lock_screen_data
management
media_perception_private
messaging
networking_private
power
runtime
serial
socket
sockets_udp
storage
settings_namespace.ccsettings_test_util.ccstorage_api_unittest.ccstorage_area_namespace.ccstorage_frontend.ccvalue_store_util.cc
system_display
system_info
usb
web_contents_capture_client.ccweb_request
guest_view
app_view
extension_options
mime_handler_view
web_view
updater
user_script_manager.ccwarning_set.cccommon
renderer
api
app_window_custom_bindings.cc
binding_generating_native_handler.ccautomation
declarative_content_hooks_delegate.ccdom_hooks_delegate.ccmessaging
gin_port.ccmessaging_util.ccnative_renderer_messaging_service_unittest.ccone_time_message_handler.cc
runtime_hooks_delegate.ccbindings
api_binding_bridge.ccapi_binding_hooks.ccapi_binding_js_util.ccapi_binding_util.ccapi_event_handler.ccapi_last_error.ccapi_response_validator.ccargument_spec.cc
chrome_setting.ccdispatcher.ccextension_localization_throttle.ccextension_localization_throttle_unittest.ccgc_callback_unittest.ccmodule_system.ccnative_extension_bindings_system.ccobject_backed_native_handler.ccsafe_builtins.ccscript_context.ccscript_injection.ccscript_injection_manager.ccscripts_run_info.ccstorage_area.ccuser_script_set_manager.ccshell
browser
test
@ -46,8 +46,7 @@ const char* Activity::ToString(Type type) {
|
||||
case DEBUGGER:
|
||||
return "DEBUGGER";
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
@ -57,8 +57,6 @@ const char kRequiresFramelessWindow[] =
|
||||
const char kAlwaysOnTopPermission[] =
|
||||
"The \"app.window.alwaysOnTop\" permission is required.";
|
||||
|
||||
const char kInvalidParameters[] = "Invalid parameters.";
|
||||
|
||||
const int kUnboundedSize = SizeConstraints::kUnboundedSize;
|
||||
|
||||
void GetBoundsFields(const Bounds& bounds_spec, gfx::Rect* bounds) {
|
||||
@ -206,8 +204,7 @@ AppCurrentWindowInternalSetBoundsFunction::Run() {
|
||||
|
||||
bounds::BoundsType bounds_type = bounds::GetBoundsType(params->bounds_type);
|
||||
if (bounds_type == bounds::INVALID_TYPE) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return RespondNow(Error(kInvalidParameters));
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Start with the current bounds, and change any values that are specified in
|
||||
@ -245,7 +242,7 @@ AppCurrentWindowInternalSetBoundsFunction::Run() {
|
||||
break;
|
||||
}
|
||||
case bounds::INVALID_TYPE:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
if (original_window_bounds != window_bounds) {
|
||||
@ -276,8 +273,7 @@ AppCurrentWindowInternalSetSizeConstraintsFunction::Run() {
|
||||
bounds::BoundsType bounds_type = bounds::GetBoundsType(params->bounds_type);
|
||||
if (bounds_type != bounds::INNER_BOUNDS &&
|
||||
bounds_type != bounds::OUTER_BOUNDS) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return RespondNow(Error(kInvalidParameters));
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
gfx::Size original_min_size =
|
||||
|
@ -43,8 +43,7 @@ void AudioDeviceIdCalculator::LoadStableIdMap() {
|
||||
for (size_t i = 0; i < ids_list.size(); ++i) {
|
||||
const std::string* audio_service_stable_id = ids_list[i].GetIfString();
|
||||
if (!audio_service_stable_id) {
|
||||
NOTREACHED_IN_MIGRATION() << "Non string stable device ID.";
|
||||
continue;
|
||||
NOTREACHED() << "Non string stable device ID.";
|
||||
}
|
||||
stable_id_map_[*audio_service_stable_id] = base::NumberToString(i);
|
||||
}
|
||||
|
@ -64,8 +64,7 @@ api::audio::DeviceType GetAsAudioApiDeviceType(AudioDeviceType type) {
|
||||
return api::audio::DeviceType::kOther;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return api::audio::DeviceType::kOther;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -18,8 +18,7 @@ api::audio::StreamType ConvertStreamTypeFromMojom(
|
||||
case crosapi::mojom::StreamType::kOutput:
|
||||
return api::audio::StreamType::kOutput;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return api::audio::StreamType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
crosapi::mojom::StreamType ConvertStreamTypeToMojom(
|
||||
@ -32,8 +31,7 @@ crosapi::mojom::StreamType ConvertStreamTypeToMojom(
|
||||
case api::audio::StreamType::kOutput:
|
||||
return crosapi::mojom::StreamType::kOutput;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return crosapi::mojom::StreamType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
api::audio::DeviceType ConvertDeviceTypeFromMojom(
|
||||
@ -74,8 +72,7 @@ api::audio::DeviceType ConvertDeviceTypeFromMojom(
|
||||
case crosapi::mojom::DeviceType::kOther:
|
||||
return api::audio::DeviceType::kOther;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return api::audio::DeviceType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
crosapi::mojom::DeviceType ConvertDeviceTypeToMojom(
|
||||
@ -116,8 +113,7 @@ crosapi::mojom::DeviceType ConvertDeviceTypeToMojom(
|
||||
case api::audio::DeviceType::kOther:
|
||||
return crosapi::mojom::DeviceType::kOther;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return crosapi::mojom::DeviceType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::unique_ptr<api::audio::DeviceFilter> ConvertDeviceFilterFromMojom(
|
||||
|
@ -197,7 +197,7 @@ device::BluetoothFilterType ToBluetoothDeviceFilterType(FilterType type) {
|
||||
case FilterType::kKnown:
|
||||
return device::BluetoothFilterType::KNOWN;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -176,8 +176,7 @@ bt_private::ConnectResultType DeviceConnectErrorToConnectResult(
|
||||
case device::BluetoothDevice::ERROR_SOCKET:
|
||||
return bt_private::ConnectResultType::kSocketError;
|
||||
case device::BluetoothDevice::NUM_CONNECT_ERROR_CODES:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
return bt_private::ConnectResultType::kNone;
|
||||
}
|
||||
@ -446,7 +445,7 @@ void BluetoothPrivateSetPairingResponseFunction::DoWork(
|
||||
device->CancelPairing();
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -139,12 +139,10 @@ std::string StatusToString(BluetoothLowEnergyEventRouter::Status status) {
|
||||
case BluetoothLowEnergyEventRouter::kStatusErrorWakelock:
|
||||
return kErrorWakelock;
|
||||
case BluetoothLowEnergyEventRouter::kStatusSuccess:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
default:
|
||||
return kErrorOperationFailed;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
extensions::BluetoothLowEnergyEventRouter* GetEventRouter(
|
||||
|
@ -255,12 +255,9 @@ DeviceConnectErrorCodeToStatus(BluetoothDevice::ConnectErrorCode error_code) {
|
||||
case device::BluetoothDevice::ConnectErrorCode::ERROR_SOCKET:
|
||||
return extensions::BluetoothLowEnergyEventRouter::kStatusErrorSocket;
|
||||
case BluetoothDevice::NUM_CONNECT_ERROR_CODES:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return extensions::BluetoothLowEnergyEventRouter::
|
||||
kStatusErrorInvalidArguments;
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return extensions::BluetoothLowEnergyEventRouter::kStatusErrorFailed;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -102,7 +102,7 @@ bool ClipboardSetImageDataFunction::IsAdditionalItemsParamValid(
|
||||
has_text_html = true;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
// Check maximum length of the string data.
|
||||
if (item.data.length() > max_item_data_bytes)
|
||||
|
@ -25,8 +25,7 @@ std::string GetDefaultPort(const std::string& scheme) {
|
||||
return "80";
|
||||
if (scheme == url::kHttpsScheme)
|
||||
return "443";
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::string();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -311,8 +311,7 @@ const OriginValueMap* ContentSettingsStore::GetValueMap(
|
||||
return &entry->settings;
|
||||
case ChromeSettingScope::kRegularOnly:
|
||||
// TODO(bauerb): Implement regular-only content settings.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
case ChromeSettingScope::kIncognitoPersistent:
|
||||
return &entry->incognito_persistent_settings;
|
||||
case ChromeSettingScope::kIncognitoSessionOnly:
|
||||
@ -321,8 +320,7 @@ const OriginValueMap* ContentSettingsStore::GetValueMap(
|
||||
break;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void ContentSettingsStore::ClearContentSettingsForExtension(
|
||||
|
@ -235,8 +235,7 @@ void EventsEventAddRulesFunction::RecordUMA(
|
||||
type = kDeclarativeWebRequestWebviewAddRules;
|
||||
break;
|
||||
case DeclarativeAPIType::kUnknown:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
RecordUMAHelper(type);
|
||||
}
|
||||
@ -276,8 +275,7 @@ void EventsEventRemoveRulesFunction::RecordUMA(
|
||||
type = kDeclarativeWebRequestWebviewRemoveRules;
|
||||
break;
|
||||
case DeclarativeAPIType::kUnknown:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
RecordUMAHelper(type);
|
||||
}
|
||||
@ -321,8 +319,7 @@ void EventsEventGetRulesFunction::RecordUMA(
|
||||
type = kDeclarativeWebRequestWebviewGetRules;
|
||||
break;
|
||||
case DeclarativeAPIType::kUnknown:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
RecordUMAHelper(type);
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ std::optional<RequestAction> ExtensionUrlPatternIndexMatcher::GetActionHelper(
|
||||
case flat::ActionType_allow_all_requests:
|
||||
case flat::ActionType_modify_headers:
|
||||
case flat::ActionType_count:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
@ -230,8 +230,7 @@ ExtensionUrlPatternIndexMatcher::GetMatchersForStage(
|
||||
return headers_received_matchers_;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return before_request_matchers_;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void ExtensionUrlPatternIndexMatcher::SetDisabledRuleIds(
|
||||
|
@ -161,8 +161,7 @@ UpdateDynamicRulesStatus GetUpdateDynamicRuleStatus(LoadRulesetResult result) {
|
||||
break;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return UpdateDynamicRulesStatus::kSuccess;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Helper to create the new list of dynamic rules. Returns false on failure and
|
||||
|
@ -471,8 +471,7 @@ FlatRulesetIndexer::GetBuilders(const IndexedRule& indexed_rule) {
|
||||
case dnr_api::RuleActionType::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return {};
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace extensions::declarative_net_request
|
||||
|
@ -438,8 +438,7 @@ uint8_t GetActionTypePriority(dnr_api::RuleActionType action_type) {
|
||||
case dnr_api::RuleActionType::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return 0;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void RecordLargeRegexUMA(bool is_large_regex) {
|
||||
|
@ -74,7 +74,7 @@ bool ActionTypeAllowsMultipleActions(flat::ActionType action_type) {
|
||||
case flat::ActionType_modify_headers:
|
||||
return true;
|
||||
case flat::ActionType_count:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -356,8 +356,7 @@ std::optional<RequestAction> RegexRulesMatcher::CreateActionFromInfo(
|
||||
return CreateAllowAllRequestsAction(params, rule);
|
||||
case flat::ActionType_modify_headers:
|
||||
case flat::ActionType_count:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
@ -410,8 +409,7 @@ const RegexRulesMatcher::MatchHelper& RegexRulesMatcher::GetMatcherForStage(
|
||||
return headers_received_matcher_;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return before_request_matcher_;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace extensions::declarative_net_request
|
||||
|
@ -329,8 +329,7 @@ std::optional<RequestAction> RulesetManager::GetAction(
|
||||
case RequestAction::Type::ALLOW_ALL_REQUESTS:
|
||||
return 1;
|
||||
case RequestAction::Type::MODIFY_HEADERS:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return 0;
|
||||
NOTREACHED();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -372,8 +372,7 @@ size_t RulesetMatcher::GetRulesCount(RulesetMatchingStage stage) const {
|
||||
regex_matcher_.GetHeadersReceivedRulesCount();
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return 0u;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
size_t RulesetMatcher::GetRegexRulesCount(RulesetMatchingStage stage) const {
|
||||
@ -384,8 +383,7 @@ size_t RulesetMatcher::GetRegexRulesCount(RulesetMatchingStage stage) const {
|
||||
return regex_matcher_.GetHeadersReceivedRulesCount();
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return 0u;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace extensions::declarative_net_request
|
||||
|
@ -228,8 +228,7 @@ dnr_api::ResourceType GetDNRResourceType(WebRequestResourceType resource_type) {
|
||||
case WebRequestResourceType::WEBBUNDLE:
|
||||
return dnr_api::ResourceType::kWebbundle;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return dnr_api::ResourceType::kOther;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Maps dnr_api::ResourceType to WebRequestResourceType.
|
||||
@ -267,11 +266,9 @@ WebRequestResourceType GetWebRequestResourceType(
|
||||
case dnr_api::ResourceType::kWebbundle:
|
||||
return WebRequestResourceType::WEBBUNDLE;
|
||||
case dnr_api::ResourceType::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WebRequestResourceType::OTHER;
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WebRequestResourceType::OTHER;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
dnr_api::RequestDetails CreateRequestDetails(const WebRequestInfo& request) {
|
||||
@ -339,8 +336,7 @@ flat::ActionType ConvertToFlatActionType(dnr_api::RuleActionType action_type) {
|
||||
case dnr_api::RuleActionType::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return flat::ActionType_block;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::string GetPublicRulesetID(const Extension& extension,
|
||||
@ -720,8 +716,7 @@ std::string GetParseError(ParseResult error_reason, int rule_id) {
|
||||
kErrorResponseHeaderRuleCannotModifyRequestHeaders,
|
||||
base::NumberToString(rule_id));
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::string();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
flat_rule::ElementType GetElementType(WebRequestResourceType web_request_type) {
|
||||
@ -757,8 +752,7 @@ flat_rule::ElementType GetElementType(WebRequestResourceType web_request_type) {
|
||||
case WebRequestResourceType::WEB_TRANSPORT:
|
||||
return flat_rule::ElementType_WEBTRANSPORT;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return flat_rule::ElementType_OTHER;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
flat_rule::ElementType GetElementType(dnr_api::ResourceType resource_type) {
|
||||
@ -796,8 +790,7 @@ flat_rule::ElementType GetElementType(dnr_api::ResourceType resource_type) {
|
||||
case dnr_api::ResourceType::kOther:
|
||||
return flat_rule::ElementType_OTHER;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return flat_rule::ElementType_NONE;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Maps an HTTP request method string to flat_rule::RequestMethod.
|
||||
@ -841,8 +834,7 @@ flat_rule::RequestMethod GetRequestMethod(
|
||||
dnr_api::RequestMethod request_method) {
|
||||
switch (request_method) {
|
||||
case dnr_api::RequestMethod::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return flat_rule::RequestMethod_NONE;
|
||||
NOTREACHED();
|
||||
case dnr_api::RequestMethod::kConnect:
|
||||
return flat_rule::RequestMethod_CONNECT;
|
||||
case dnr_api::RequestMethod::kDelete:
|
||||
@ -862,8 +854,7 @@ flat_rule::RequestMethod GetRequestMethod(
|
||||
case dnr_api::RequestMethod::kPut:
|
||||
return flat_rule::RequestMethod_PUT;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return flat_rule::RequestMethod_NONE;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
flat_rule::RequestMethod GetRequestMethod(
|
||||
|
@ -1000,8 +1000,7 @@ std::string WebRequestRequestCookieAction::GetName() const {
|
||||
case helpers::REMOVE:
|
||||
return keys::kRemoveRequestCookieType;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::optional<EventResponseDelta> WebRequestRequestCookieAction::CreateDelta(
|
||||
@ -1048,8 +1047,7 @@ std::string WebRequestResponseCookieAction::GetName() const {
|
||||
case helpers::REMOVE:
|
||||
return keys::kRemoveResponseCookieType;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::optional<EventResponseDelta> WebRequestResponseCookieAction::CreateDelta(
|
||||
|
@ -428,8 +428,7 @@ bool HeaderMatcher::StringMatchTest::Matches(
|
||||
}
|
||||
}
|
||||
// We never get past the "switch", but the compiler worries about no return.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
HeaderMatcher::StringMatchTest::StringMatchTest(const std::string& data,
|
||||
@ -480,9 +479,7 @@ HeaderMatcher::HeaderMatchTest::Create(const base::Value::Dict& tests) {
|
||||
} else if (entry.first == keys::kValueEqualsKey) {
|
||||
match_type = StringMatchTest::kEquals;
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION(); // JSON schema type checking should prevent
|
||||
// this.
|
||||
return nullptr;
|
||||
NOTREACHED(); // JSON schema type checking should prevent this.
|
||||
}
|
||||
const base::Value* content = &entry.second;
|
||||
|
||||
@ -503,9 +500,7 @@ HeaderMatcher::HeaderMatchTest::Create(const base::Value::Dict& tests) {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
NOTREACHED_IN_MIGRATION(); // JSON schema type checking should prevent
|
||||
// this.
|
||||
return nullptr;
|
||||
NOTREACHED(); // JSON schema type checking should prevent this.
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -735,8 +730,7 @@ bool ParseListOfStages(const base::Value& value, int* out_stages) {
|
||||
} else if (stage_name == keys::kOnAuthRequiredEnum) {
|
||||
stages |= ON_AUTH_REQUIRED;
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION(); // JSON schema checks prevent getting here.
|
||||
return false;
|
||||
NOTREACHED(); // JSON schema checks prevent getting here.
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -273,8 +273,7 @@ base::Value::Dict GetDictFromArray(
|
||||
entry->GetList().Append(*value);
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION(); // We never put other Values here.
|
||||
return base::Value::Dict();
|
||||
NOTREACHED(); // We never put other Values here.
|
||||
}
|
||||
} else {
|
||||
dict.Set(*name, *value);
|
||||
|
@ -83,8 +83,7 @@ const char* TypeToString(DevicePermissionEntry::Type type) {
|
||||
case DevicePermissionEntry::Type::HID:
|
||||
return kDeviceTypeHid;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Persists a DevicePermissionEntry in ExtensionPrefs.
|
||||
@ -603,7 +602,7 @@ void DevicePermissionsManager::RemoveEntry(
|
||||
} else if (entry->type_ == DevicePermissionEntry::Type::HID) {
|
||||
device_permissions->ephemeral_hid_devices_.erase(entry->device_guid_);
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -374,9 +374,7 @@ ExtensionFunction::ResponseAction FeedbackPrivateReadLogSourceFunction::Run() {
|
||||
|
||||
return RespondLater();
|
||||
#else
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "API function is not supported on this platform.";
|
||||
return RespondNow(Error("API function is not supported on this platform."));
|
||||
NOTREACHED() << "API function is not supported on this platform.";
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
}
|
||||
|
||||
|
@ -426,9 +426,8 @@ std::string WebViewInternalCaptureVisibleRegionFunction::GetErrorMessage(
|
||||
reason_description = "screenshot has been disabled";
|
||||
break;
|
||||
case OK:
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
NOTREACHED()
|
||||
<< "GetErrorMessage should not be called with a successful result";
|
||||
return "";
|
||||
}
|
||||
return ErrorUtils::FormatErrorMessage("Failed to capture webview: *",
|
||||
reason_description);
|
||||
@ -534,8 +533,7 @@ bool WebViewInternalExecuteCodeFunction::LoadFileForEmbedder(
|
||||
|
||||
switch (host_id().type) {
|
||||
case mojom::HostID::HostType::kExtensions:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
case mojom::HostID::HostType::kControlledFrameEmbedder:
|
||||
url_fetcher_ = std::make_unique<ControlledFrameEmbedderURLFetcher>(
|
||||
source_process_id(), render_frame_host()->GetRoutingID(), file_url,
|
||||
@ -774,7 +772,7 @@ ExtensionFunction::ResponseAction WebViewInternalSetZoomModeFunction::Run() {
|
||||
zoom_mode = ZoomController::ZOOM_MODE_DISABLED;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
GetGuest().SetZoomMode(zoom_mode);
|
||||
@ -804,7 +802,7 @@ ExtensionFunction::ResponseAction WebViewInternalGetZoomModeFunction::Run() {
|
||||
zoom_mode = web_view_internal::ZoomMode::kDisabled;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return RespondNow(WithArguments(web_view_internal::ToString(zoom_mode)));
|
||||
@ -982,7 +980,7 @@ ExtensionFunction::ResponseAction WebViewInternalSetPermissionFunction::Run() {
|
||||
case api::web_view_internal::SetPermissionAction::kDefault:
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::string user_input;
|
||||
|
@ -23,8 +23,7 @@ std::string GetErrorString(lock_screen_data::OperationResult result) {
|
||||
switch (result) {
|
||||
case lock_screen_data::OperationResult::kSuccess:
|
||||
case lock_screen_data::OperationResult::kCount:
|
||||
NOTREACHED_IN_MIGRATION() << "Expected a failure code.";
|
||||
return "Unknown";
|
||||
NOTREACHED() << "Expected a failure code.";
|
||||
case lock_screen_data::OperationResult::kFailed:
|
||||
return "Unknown";
|
||||
case lock_screen_data::OperationResult::kInvalidKey:
|
||||
@ -36,8 +35,7 @@ std::string GetErrorString(lock_screen_data::OperationResult result) {
|
||||
case lock_screen_data::OperationResult::kUnknownExtension:
|
||||
return "Not found";
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown operation status";
|
||||
return "Unknown";
|
||||
NOTREACHED() << "Unknown operation status";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -308,8 +308,7 @@ bool LockScreenItemStorage::IsContextAllowed(content::BrowserContext* context) {
|
||||
case SessionLockedState::kNotLocked:
|
||||
return context_ == context;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown session locked state";
|
||||
return false;
|
||||
NOTREACHED() << "Unknown session locked state";
|
||||
}
|
||||
|
||||
void LockScreenItemStorage::CreateItemImpl(const ExtensionId& extension_id,
|
||||
|
@ -255,7 +255,7 @@ management::ExtensionInfo CreateExtensionInfo(
|
||||
break;
|
||||
case LAUNCH_TYPE_INVALID:
|
||||
case NUM_LAUNCH_TYPES:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
info.available_launch_types = GetAvailableLaunchTypes(extension, delegate);
|
||||
@ -997,7 +997,7 @@ ExtensionFunction::ResponseAction ManagementSetLaunchTypeFunction::Run() {
|
||||
launch_type = LAUNCH_TYPE_WINDOW;
|
||||
break;
|
||||
case management::LaunchType::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
delegate->SetLaunchType(browser_context(), params->id, launch_type);
|
||||
|
@ -28,8 +28,7 @@ HotwordType HotwordTypeProtoToIdl(const mri::HotwordDetection::Type& type) {
|
||||
case mri::HotwordDetection::OK_GOOGLE:
|
||||
return HotwordType::kOkGoogle;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown hotword type: " << type;
|
||||
return HotwordType::kUnknownType;
|
||||
NOTREACHED() << "Unknown hotword type: " << type;
|
||||
}
|
||||
|
||||
Hotword HotwordProtoToIdl(const mri::HotwordDetection::Hotword& hotword) {
|
||||
@ -159,8 +158,7 @@ LightCondition LightConditionProtoToIdl(
|
||||
case mri::VideoHumanPresenceDetection::BLACK_FRAME:
|
||||
return LightCondition::kBlackFrame;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown light condition: " << condition;
|
||||
return LightCondition::kUnspecified;
|
||||
NOTREACHED() << "Unknown light condition: " << condition;
|
||||
}
|
||||
}
|
||||
|
||||
@ -262,7 +260,7 @@ DistanceUnits DistanceUnitsProtoToIdl(const mri::Distance& distance) {
|
||||
case mri::Distance::UNITS_UNSPECIFIED:
|
||||
return DistanceUnits::kUnspecified;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown distance units: " << distance.units();
|
||||
NOTREACHED() << "Unknown distance units: " << distance.units();
|
||||
}
|
||||
return DistanceUnits::kUnspecified;
|
||||
}
|
||||
@ -288,8 +286,7 @@ FramePerceptionType FramePerceptionTypeProtoToIdl(int type) {
|
||||
case mri::FramePerception::MOTION_DETECTION:
|
||||
return FramePerceptionType::kMotionDetection;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown frame perception type: " << type;
|
||||
return FramePerceptionType::kUnknownType;
|
||||
NOTREACHED() << "Unknown frame perception type: " << type;
|
||||
}
|
||||
|
||||
EntityType EntityTypeProtoToIdl(const mri::Entity& entity) {
|
||||
@ -306,7 +303,7 @@ EntityType EntityTypeProtoToIdl(const mri::Entity& entity) {
|
||||
case mri::Entity::UNSPECIFIED:
|
||||
return EntityType::kUnspecified;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown entity type: " << entity.type();
|
||||
NOTREACHED() << "Unknown entity type: " << entity.type();
|
||||
}
|
||||
return EntityType::kUnspecified;
|
||||
}
|
||||
@ -403,8 +400,7 @@ ImageFormat ImageFormatProtoToIdl(const mri::ImageFrame& image_frame) {
|
||||
case mri::ImageFrame::FORMAT_UNSPECIFIED:
|
||||
return ImageFormat::kNone;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Unknown image format: " << image_frame.format();
|
||||
NOTREACHED() << "Unknown image format: " << image_frame.format();
|
||||
}
|
||||
return ImageFormat::kNone;
|
||||
}
|
||||
@ -474,8 +470,7 @@ Status StateStatusProtoToIdl(const mri::State& state) {
|
||||
case mri::State::STATUS_UNSPECIFIED:
|
||||
return Status::kNone;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Reached status not in switch.";
|
||||
return Status::kNone;
|
||||
NOTREACHED() << "Reached status not in switch.";
|
||||
}
|
||||
|
||||
mri::State::Status StateStatusIdlToProto(const State& state) {
|
||||
@ -496,8 +491,7 @@ mri::State::Status StateStatusIdlToProto(const State& state) {
|
||||
case Status::kNone:
|
||||
return mri::State::STATUS_UNSPECIFIED;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Reached status not in switch.";
|
||||
return mri::State::STATUS_UNSPECIFIED;
|
||||
NOTREACHED() << "Reached status not in switch.";
|
||||
}
|
||||
|
||||
Feature FeatureProtoToIdl(int feature) {
|
||||
@ -515,8 +509,7 @@ Feature FeatureProtoToIdl(int feature) {
|
||||
case mri::State::FEATURE_UNSET:
|
||||
return Feature::kNone;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Reached feature not in switch.";
|
||||
return Feature::kNone;
|
||||
NOTREACHED() << "Reached feature not in switch.";
|
||||
}
|
||||
|
||||
mri::State::Feature FeatureIdlToProto(const Feature& feature) {
|
||||
@ -534,8 +527,7 @@ mri::State::Feature FeatureIdlToProto(const Feature& feature) {
|
||||
case Feature::kNone:
|
||||
return mri::State::FEATURE_UNSET;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Reached feature not in switch.";
|
||||
return mri::State::FEATURE_UNSET;
|
||||
NOTREACHED() << "Reached feature not in switch.";
|
||||
}
|
||||
|
||||
base::Value NamedTemplateArgumentValueProtoToValue(
|
||||
@ -548,9 +540,8 @@ base::Value NamedTemplateArgumentValueProtoToValue(
|
||||
case mri::State::NamedTemplateArgument::ValueCase::VALUE_NOT_SET:
|
||||
return base::Value();
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown NamedTemplateArgument::ValueCase "
|
||||
<< named_template_argument.value_case();
|
||||
return base::Value();
|
||||
NOTREACHED() << "Unknown NamedTemplateArgument::ValueCase "
|
||||
<< named_template_argument.value_case();
|
||||
}
|
||||
|
||||
bool NamedTemplateArgumentProtoToIdl(
|
||||
@ -585,9 +576,8 @@ mri::State::NamedTemplateArgument NamedTemplateArgumentIdlToProto(
|
||||
named_template_argument_proto.set_num(
|
||||
*named_template_argument.value->as_number);
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Failed to convert NamedTemplateARgument::Value IDL to "
|
||||
"Proto, unkown value type.";
|
||||
NOTREACHED() << "Failed to convert NamedTemplateARgument::Value IDL to "
|
||||
"Proto, unkown value type.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -714,8 +714,7 @@ bool ExtensionMessagePort::IsServiceWorkerActivity(
|
||||
return is_for_onetime_channel() || should_have_strong_keepalive();
|
||||
default:
|
||||
// Extension message port should not check for other activity types.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1077,8 +1077,7 @@ void MessageService::OnOpenChannelAllowed(
|
||||
|
||||
auto pending_for_incognito = pending_incognito_channels_.find(channel_id);
|
||||
if (pending_for_incognito == pending_incognito_channels_.end()) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
PendingMessagesQueue pending_messages;
|
||||
pending_messages.swap(pending_for_incognito->second);
|
||||
|
@ -18,14 +18,12 @@ NetworkingPrivateDelegate::~NetworkingPrivateDelegate() = default;
|
||||
|
||||
void NetworkingPrivateDelegate::AddObserver(
|
||||
NetworkingPrivateDelegateObserver* observer) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Class does not use NetworkingPrivateDelegateObserver";
|
||||
NOTREACHED() << "Class does not use NetworkingPrivateDelegateObserver";
|
||||
}
|
||||
|
||||
void NetworkingPrivateDelegate::RemoveObserver(
|
||||
NetworkingPrivateDelegateObserver* observer) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Class does not use NetworkingPrivateDelegateObserver";
|
||||
NOTREACHED() << "Class does not use NetworkingPrivateDelegateObserver";
|
||||
}
|
||||
|
||||
void NetworkingPrivateDelegate::StartActivate(
|
||||
|
@ -70,15 +70,17 @@ NetworkingPrivateDelegateFactory::BuildServiceInstanceForBrowserContext(
|
||||
delegate =
|
||||
std::make_unique<NetworkingPrivateServiceClient>(std::move(wifi_service));
|
||||
#else
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
delegate = nullptr;
|
||||
NOTREACHED();
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || \
|
||||
BUILDFLAG(IS_MAC)
|
||||
if (ui_factory_) {
|
||||
delegate->set_ui_delegate(ui_factory_->CreateDelegate());
|
||||
}
|
||||
|
||||
return delegate;
|
||||
#endif
|
||||
}
|
||||
|
||||
BrowserContext* NetworkingPrivateDelegateFactory::GetBrowserContextToUse(
|
||||
|
@ -28,9 +28,7 @@ device::mojom::WakeLockType LevelToWakeLockType(api::power::Level level) {
|
||||
case api::power::Level::kNone:
|
||||
return device::mojom::WakeLockType::kPreventDisplaySleep;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Unhandled power level: " << api::power::ToString(level);
|
||||
return device::mojom::WakeLockType::kPreventDisplaySleep;
|
||||
NOTREACHED() << "Unhandled power level: " << api::power::ToString(level);
|
||||
}
|
||||
|
||||
base::LazyInstance<BrowserContextKeyedAPIFactory<PowerAPI>>::DestructorAtExit
|
||||
|
@ -92,8 +92,7 @@ class FakeWakeLockManager {
|
||||
requests_.push_back(UNBLOCK_APP_SUSPENSION);
|
||||
break;
|
||||
case device::mojom::WakeLockType::kPreventDisplaySleepAllowDimming:
|
||||
NOTREACHED_IN_MIGRATION() << "Unexpected wake lock type " << type;
|
||||
break;
|
||||
NOTREACHED() << "Unexpected wake lock type " << type;
|
||||
}
|
||||
|
||||
type_ = type;
|
||||
@ -110,8 +109,7 @@ class FakeWakeLockManager {
|
||||
requests_.push_back(BLOCK_DISPLAY_SLEEP);
|
||||
break;
|
||||
case device::mojom::WakeLockType::kPreventDisplaySleepAllowDimming:
|
||||
NOTREACHED_IN_MIGRATION() << "Unexpected wake lock type " << type;
|
||||
break;
|
||||
NOTREACHED() << "Unexpected wake lock type " << type;
|
||||
}
|
||||
|
||||
type_ = type;
|
||||
@ -130,8 +128,7 @@ class FakeWakeLockManager {
|
||||
requests_.push_back(UNBLOCK_DISPLAY_SLEEP);
|
||||
break;
|
||||
case device::mojom::WakeLockType::kPreventDisplaySleepAllowDimming:
|
||||
NOTREACHED_IN_MIGRATION() << "Unexpected wake lock type " << type_;
|
||||
break;
|
||||
NOTREACHED() << "Unexpected wake lock type " << type_;
|
||||
}
|
||||
is_active_ = false;
|
||||
}
|
||||
|
@ -92,7 +92,6 @@ constexpr char kErrorOnlyKioskModeAllowed[] =
|
||||
"API available only for ChromeOS kiosk mode.";
|
||||
constexpr char kErrorOnlyFirstExtensionAllowed[] =
|
||||
"Not the first extension to call this API.";
|
||||
constexpr char kErrorInvalidStatus[] = "Invalid restart request status.";
|
||||
constexpr char kErrorRequestedTooSoon[] =
|
||||
"Restart was requested too soon. It was throttled instead.";
|
||||
|
||||
@ -768,8 +767,7 @@ ExtensionFunction::ResponseAction RuntimeRestartAfterDelayFunction::Run() {
|
||||
return RespondNow(NoArguments());
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return RespondNow(Error(kErrorInvalidStatus));
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ExtensionFunction::ResponseAction RuntimeGetPlatformInfoFunction::Run() {
|
||||
|
@ -140,10 +140,10 @@ class FakeSerialPort : public device::mojom::SerialPort {
|
||||
return;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void Drain(DrainCallback callback) override { NOTREACHED_IN_MIGRATION(); }
|
||||
void Drain(DrainCallback callback) override { NOTREACHED(); }
|
||||
|
||||
void GetControlSignals(GetControlSignalsCallback callback) override {
|
||||
auto signals = device::mojom::SerialPortControlSignals::New();
|
||||
@ -214,7 +214,7 @@ class FakeSerialPort : public device::mojom::SerialPort {
|
||||
return;
|
||||
}
|
||||
// The code should not reach other cases.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void DoRead(MojoResult result, const mojo::HandleSignalsState& state) {
|
||||
|
@ -138,7 +138,7 @@ void AppFirewallHoleManager::Close(AppFirewallHole* hole) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void AppFirewallHoleManager::OnAppWindowRemoved(AppWindow* app_window) {
|
||||
|
@ -140,10 +140,7 @@ void SocketApiFunction::OpenFirewallHole(const std::string& address,
|
||||
if (!net::HostStringIsLocalhost(address)) {
|
||||
net::IPEndPoint local_address;
|
||||
if (!socket->GetLocalAddress(&local_address)) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Cannot get address of recently bound socket.";
|
||||
Respond(ErrorWithCode(-1, kFirewallFailure));
|
||||
return;
|
||||
NOTREACHED() << "Cannot get address of recently bound socket.";
|
||||
}
|
||||
|
||||
AppFirewallHoleManager* manager =
|
||||
@ -318,8 +315,7 @@ ExtensionFunction::ResponseAction SocketCreateFunction::Work() {
|
||||
break;
|
||||
}
|
||||
case extensions::api::socket::SocketType::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return RespondNow(NoArguments());
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
DCHECK(socket);
|
||||
@ -374,9 +370,7 @@ ExtensionFunction::ResponseAction SocketConnectFunction::Work() {
|
||||
operation_type = SocketPermissionRequest::UDP_SEND_TO;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown socket type.";
|
||||
operation_type = SocketPermissionRequest::NONE;
|
||||
break;
|
||||
NOTREACHED() << "Unknown socket type.";
|
||||
}
|
||||
|
||||
SocketPermission::CheckParam param(operation_type, hostname_, port_);
|
||||
|
@ -70,7 +70,7 @@ class TestUdpEchoServer::Core {
|
||||
udp_listener_receiver_.BindNewPipeAndPassRemote());
|
||||
|
||||
server_socket_.set_disconnect_handler(
|
||||
base::BindLambdaForTesting([]() { NOTREACHED_IN_MIGRATION(); }));
|
||||
base::BindLambdaForTesting([]() { NOTREACHED(); }));
|
||||
|
||||
net::IPEndPoint server_addr(net::IPAddress::IPv4Localhost(), 0);
|
||||
auto server_helper =
|
||||
|
@ -27,8 +27,7 @@ std::string ToString(Namespace settings_namespace) {
|
||||
case INVALID:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::string();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace settings_namespace
|
||||
|
@ -96,7 +96,7 @@ scoped_refptr<const Extension> AddExtensionWithIdAndPermissions(
|
||||
}
|
||||
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::string error;
|
||||
|
@ -240,48 +240,32 @@ TEST_F(StorageApiUnittest, GetBytesInUseIntOverflow) {
|
||||
|
||||
size_t GetBytesInUse() override { return bytes_in_use_; }
|
||||
|
||||
ReadResult Get(const std::string& key) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return ReadResult(Status());
|
||||
}
|
||||
ReadResult Get(const std::string& key) override { NOTREACHED(); }
|
||||
|
||||
ReadResult Get(const std::vector<std::string>& keys) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return ReadResult(Status());
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ReadResult Get() override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return ReadResult(Status());
|
||||
}
|
||||
ReadResult Get() override { NOTREACHED(); }
|
||||
|
||||
WriteResult Set(WriteOptions options,
|
||||
const std::string& key,
|
||||
const base::Value& value) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WriteResult(Status());
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
WriteResult Set(WriteOptions options,
|
||||
const base::Value::Dict& values) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WriteResult(Status());
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
WriteResult Remove(const std::string& key) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WriteResult(Status());
|
||||
}
|
||||
WriteResult Remove(const std::string& key) override { NOTREACHED(); }
|
||||
|
||||
WriteResult Remove(const std::vector<std::string>& keys) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WriteResult(Status());
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
WriteResult Clear() override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WriteResult(Status());
|
||||
}
|
||||
WriteResult Clear() override { NOTREACHED(); }
|
||||
|
||||
private:
|
||||
size_t bytes_in_use_ = 0;
|
||||
|
@ -26,8 +26,7 @@ const char* StorageAreaToString(StorageAreaNamespace storage_area) {
|
||||
case StorageAreaNamespace::kSession:
|
||||
return kSessionString;
|
||||
case StorageAreaNamespace::kInvalid:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,8 +42,7 @@ settings_namespace::Namespace StorageAreaToSettingsNamespace(
|
||||
case StorageAreaNamespace::kSession:
|
||||
return settings_namespace::INVALID;
|
||||
case StorageAreaNamespace::kInvalid:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return settings_namespace::INVALID;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,7 @@ events::HistogramValue StorageAreaToEventHistogram(
|
||||
case StorageAreaNamespace::kSession:
|
||||
return events::STORAGE_SESSION_ON_CHANGE;
|
||||
case StorageAreaNamespace::kInvalid:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return events::UNKNOWN;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ base::FilePath GetValueStoreDir(
|
||||
dir = base::FilePath(kManagedSettingsDirectoryName);
|
||||
break;
|
||||
case settings_namespace::INVALID:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
return dir.AppendASCII(id);
|
||||
}
|
||||
|
@ -106,12 +106,12 @@ void DisplayInfoProvider::SetDisplayProperties(
|
||||
const std::string& display_id,
|
||||
const api::system_display::DisplayProperties& properties,
|
||||
ErrorCallback callback) {
|
||||
NOTREACHED_IN_MIGRATION() << "SetDisplayProperties not implemented";
|
||||
NOTREACHED() << "SetDisplayProperties not implemented";
|
||||
}
|
||||
|
||||
void DisplayInfoProvider::SetDisplayLayout(const DisplayLayoutList& layouts,
|
||||
ErrorCallback callback) {
|
||||
NOTREACHED_IN_MIGRATION() << "SetDisplayLayout not implemented";
|
||||
NOTREACHED() << "SetDisplayLayout not implemented";
|
||||
}
|
||||
|
||||
void DisplayInfoProvider::EnableUnifiedDesktop(bool enable) {}
|
||||
@ -148,9 +148,7 @@ void DisplayInfoProvider::GetAllDisplaysInfo(
|
||||
|
||||
void DisplayInfoProvider::GetDisplayLayout(
|
||||
base::OnceCallback<void(DisplayLayoutList result)> callback) {
|
||||
NOTREACHED_IN_MIGRATION(); // Implemented on Chrome OS only in override.
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(callback), DisplayLayoutList()));
|
||||
NOTREACHED(); // Implemented on Chrome OS only in override.
|
||||
}
|
||||
|
||||
void DisplayInfoProvider::StartObserving() {
|
||||
@ -181,32 +179,27 @@ bool DisplayInfoProvider::OverscanCalibrationComplete(const std::string& id) {
|
||||
|
||||
void DisplayInfoProvider::ShowNativeTouchCalibration(const std::string& id,
|
||||
ErrorCallback callback) {
|
||||
NOTREACHED_IN_MIGRATION(); // Implemented on Chrome OS only in override.
|
||||
NOTREACHED(); // Implemented on Chrome OS only in override.
|
||||
}
|
||||
|
||||
bool DisplayInfoProvider::StartCustomTouchCalibration(const std::string& id) {
|
||||
NOTREACHED_IN_MIGRATION(); // Implemented on Chrome OS only in override.
|
||||
return false;
|
||||
NOTREACHED(); // Implemented on Chrome OS only in override.
|
||||
}
|
||||
|
||||
bool DisplayInfoProvider::CompleteCustomTouchCalibration(
|
||||
const api::system_display::TouchCalibrationPairQuad& pairs,
|
||||
const api::system_display::Bounds& bounds) {
|
||||
NOTREACHED_IN_MIGRATION(); // Implemented on Chrome OS only in override.
|
||||
return false;
|
||||
NOTREACHED(); // Implemented on Chrome OS only in override.
|
||||
}
|
||||
|
||||
bool DisplayInfoProvider::ClearTouchCalibration(const std::string& id) {
|
||||
NOTREACHED_IN_MIGRATION(); // Implemented on Chrome OS only in override.
|
||||
return false;
|
||||
NOTREACHED(); // Implemented on Chrome OS only in override.
|
||||
}
|
||||
|
||||
void DisplayInfoProvider::SetMirrorMode(
|
||||
const api::system_display::MirrorModeInfo& info,
|
||||
ErrorCallback callback) {
|
||||
NOTREACHED_IN_MIGRATION(); // Implemented on Chrome OS only in override.
|
||||
base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
FROM_HERE, base::BindOnce(std::move(callback), "Not supported"));
|
||||
NOTREACHED(); // Implemented on Chrome OS only in override.
|
||||
}
|
||||
|
||||
void DisplayInfoProvider::DispatchOnDisplayChangedEvent() {
|
||||
|
@ -250,7 +250,7 @@ void HandleListenerAddedOrRemoved(content::BrowserContext* context,
|
||||
return;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown event name: " << event_name;
|
||||
NOTREACHED() << "Unknown event name: " << event_name;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -141,8 +141,7 @@ bool ConvertDirectionFromApi(const Direction& input,
|
||||
*output = UsbTransferDirection::OUTBOUND;
|
||||
return true;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,8 +161,7 @@ bool ConvertRequestTypeFromApi(const RequestType& input,
|
||||
*output = UsbControlTransferType::RESERVED;
|
||||
return true;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -183,8 +181,7 @@ bool ConvertRecipientFromApi(const Recipient& input,
|
||||
*output = UsbControlTransferRecipient::OTHER;
|
||||
return true;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,8 +241,7 @@ TransferType ConvertTransferTypeToApi(const UsbTransferType& input) {
|
||||
case UsbTransferType::BULK:
|
||||
return usb::TransferType::kBulk;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return usb::TransferType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -256,8 +252,7 @@ Direction ConvertDirectionToApi(const UsbTransferDirection& input) {
|
||||
case UsbTransferDirection::OUTBOUND:
|
||||
return usb::Direction::kOut;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return usb::Direction::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -273,8 +268,7 @@ SynchronizationType ConvertSynchronizationTypeToApi(
|
||||
case UsbSynchronizationType::SYNCHRONOUS:
|
||||
return usb::SynchronizationType::kSynchronous;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return usb::SynchronizationType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -293,8 +287,7 @@ usb::UsageType ConvertUsageTypeToApi(const UsbUsageType& input) {
|
||||
case UsbUsageType::RESERVED:
|
||||
return usb::UsageType::kNone;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return usb::UsageType::kNone;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,7 +94,7 @@ std::optional<std::string> WebContentsCaptureClient::EncodeBitmap(
|
||||
mime_type = kMimeTypePng;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION() << "Invalid image format.";
|
||||
NOTREACHED() << "Invalid image format.";
|
||||
}
|
||||
|
||||
if (!data) {
|
||||
|
@ -143,9 +143,7 @@ events::HistogramValue GetEventHistogramValue(const std::string& event_name) {
|
||||
|
||||
// There is no histogram value for this event name. It should be added to
|
||||
// either the mapping here, or in guest_view_events.
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Event " << event_name << " must have a histogram value";
|
||||
return events::UNKNOWN;
|
||||
NOTREACHED() << "Event " << event_name << " must have a histogram value";
|
||||
}
|
||||
|
||||
const char* GetRequestStageAsString(WebRequestEventRouter::EventTypes type) {
|
||||
@ -171,8 +169,7 @@ const char* GetRequestStageAsString(WebRequestEventRouter::EventTypes type) {
|
||||
case WebRequestEventRouter::kOnCompleted:
|
||||
return keys::kOnCompleted;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "Not reached";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void LogRequestAction(RequestAction action) {
|
||||
@ -607,8 +604,7 @@ helpers::EventResponseDelta CalculateDelta(
|
||||
response->extension_id, response->extension_install_time,
|
||||
response->cancel, response->auth_credentials);
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return helpers::EventResponseDelta("", base::Time());
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -2438,7 +2434,7 @@ int WebRequestEventRouter::ExecuteDeltas(
|
||||
blocked_request.response_deltas, blocked_request.auth_credentials,
|
||||
&ignored_actions);
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
SendMessages(browser_context, blocked_request);
|
||||
|
@ -351,9 +351,7 @@ std::unique_ptr<FormDataParser> FormDataParser::CreateFromContentTypeHeader(
|
||||
case ERROR_CHOICE:
|
||||
return nullptr;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION(); // Some compilers do not believe this is
|
||||
// unreachable.
|
||||
return nullptr;
|
||||
NOTREACHED(); // Some compilers do not believe this is unreachable.
|
||||
}
|
||||
|
||||
FormDataParser::FormDataParser() = default;
|
||||
|
@ -380,8 +380,7 @@ struct DNRHeaderAction {
|
||||
case dnr_api::HeaderOperation::kRemove:
|
||||
return true;
|
||||
case dnr_api::HeaderOperation::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return true;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -463,7 +462,7 @@ bool ModifyRequestHeadersForAction(
|
||||
break;
|
||||
}
|
||||
case dnr_api::HeaderOperation::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
request_headers_modified |= header_modified;
|
||||
@ -561,7 +560,7 @@ bool ModifyResponseHeadersForAction(
|
||||
break;
|
||||
}
|
||||
case dnr_api::HeaderOperation::kNone:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
response_headers_modified |= header_modified;
|
||||
|
@ -180,8 +180,7 @@ PermissionsData::PageAccess CanExtensionAccessURLInternal(
|
||||
: PermissionsData::PageAccess::kDenied;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return PermissionsData::PageAccess::kDenied;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Returns true if |request|.url is of the form clients[0-9]*.google.com.
|
||||
|
@ -904,7 +904,7 @@ void WebRequestProxyingURLLoaderFactory::InProgressRequest::
|
||||
pending_follow_redirect_params_->modified_headers.SetHeader(
|
||||
set_header, *header_value);
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1030,8 +1030,7 @@ void WebRequestProxyingURLLoaderFactory::InProgressRequest::
|
||||
state_ = State::kRejectedByOnAuthRequired;
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
auth_credentials_ = std::nullopt;
|
||||
|
@ -486,8 +486,7 @@ void WebRequestProxyingWebSocket::OnAuthRequiredComplete(
|
||||
break;
|
||||
case WebRequestEventRouter::AuthRequiredResponse::
|
||||
AUTH_REQUIRED_RESPONSE_IO_PENDING:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -116,8 +116,7 @@ WebRequestResourceType ToWebRequestResourceType(
|
||||
case network::mojom::RequestDestination::kSpeculationRules:
|
||||
return WebRequestResourceType::OTHER;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return WebRequestResourceType::OTHER;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
const char* WebRequestResourceTypeToString(WebRequestResourceType type) {
|
||||
|
@ -79,9 +79,7 @@ BitMapBlocklistState BlocklistStateToBitMapBlocklistState(
|
||||
case BLOCKLISTED_POTENTIALLY_UNWANTED:
|
||||
return BitMapBlocklistState::BLOCKLISTED_POTENTIALLY_UNWANTED;
|
||||
case BLOCKLISTED_UNKNOWN:
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "The unknown state should not be added into prefs.";
|
||||
return BitMapBlocklistState::NOT_BLOCKLISTED;
|
||||
NOTREACHED() << "The unknown state should not be added into prefs.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,13 +74,11 @@ url::Origin BrowserFrameContextData::GetOrigin() const {
|
||||
// BrowserFrameContextData::CanAccess is unable to replicate all of the
|
||||
// WebSecurityOrigin::CanAccess checks, so these methods should not be called.
|
||||
bool BrowserFrameContextData::CanAccess(const url::Origin& target) const {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return true;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool BrowserFrameContextData::CanAccess(const FrameContextData& target) const {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return true;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
uintptr_t BrowserFrameContextData::GetId() const {
|
||||
|
@ -151,8 +151,7 @@ void EmbedderUserScriptLoader::CreateEmbedderURLFetchers(
|
||||
NOTREACHED();
|
||||
#endif
|
||||
case extensions::mojom::HostID::HostType::kExtensions:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
fetchers_.push_back(std::move(fetcher));
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ bool ExtensionFunction::ShouldKeepWorkerAliveIndefinitely() {
|
||||
void ExtensionFunction::OnResponseAck() {
|
||||
// Derived classes must override this if they require and implement an
|
||||
// ACK from the renderer.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ExtensionFunction::ResponseValue ExtensionFunction::NoArguments() {
|
||||
|
@ -111,9 +111,7 @@ const char* ToString(bad_message::BadMessageReason bad_message_code) {
|
||||
case bad_message::BadMessageReason::EFD_INVALID_EXTENSION_ID_FOR_PROCESS:
|
||||
return "LocalFrameHost::Request: renderer never hosted such extension";
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "LocalFrameHost::Request encountered unrecognized validation "
|
||||
"error.";
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,8 +36,7 @@ ui::ResourceBundle::FontStyle GetFontStyleForIconSize(
|
||||
case extension_misc::EXTENSION_ICON_GIGANTOR:
|
||||
return ui::ResourceBundle::LargeFont;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return ui::ResourceBundle::MediumFont;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Returns the background image to use for the given icon |size|.
|
||||
|
@ -72,11 +72,10 @@ bool ExtensionPrefValueMap::CanExtensionControlPref(
|
||||
bool incognito) const {
|
||||
auto ext = entries_.find(extension_id);
|
||||
if (ext == entries_.end()) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Extension " << extension_id
|
||||
<< " is not registered but accesses pref " << pref_key
|
||||
<< " (incognito: " << incognito << ")." << " http://crbug.com/454513";
|
||||
return false;
|
||||
NOTREACHED() << "Extension " << extension_id
|
||||
<< " is not registered but accesses pref " << pref_key
|
||||
<< " (incognito: " << incognito << ")."
|
||||
<< " http://crbug.com/454513";
|
||||
}
|
||||
|
||||
if (incognito && !ext->second->incognito_enabled)
|
||||
@ -191,8 +190,7 @@ PrefValueMap* ExtensionPrefValueMap::GetExtensionPrefValueMap(
|
||||
case ChromeSettingScope::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
const PrefValueMap* ExtensionPrefValueMap::GetExtensionPrefValueMap(
|
||||
@ -212,8 +210,7 @@ const PrefValueMap* ExtensionPrefValueMap::GetExtensionPrefValueMap(
|
||||
case ChromeSettingScope::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void ExtensionPrefValueMap::GetExtensionControlledKeys(
|
||||
|
@ -467,9 +467,7 @@ void ExtensionPrefs::MakePathsRelative() {
|
||||
for (const std::string& key : absolute_keys) {
|
||||
std::unique_ptr<prefs::DictionaryValueUpdate> extension_dict;
|
||||
if (!update_dict->GetDictionaryWithoutPathExpansion(key, &extension_dict)) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Control should never reach here for extension " << key;
|
||||
continue;
|
||||
NOTREACHED() << "Control should never reach here for extension " << key;
|
||||
}
|
||||
std::string path_string;
|
||||
extension_dict->GetString(kPrefPath, &path_string);
|
||||
@ -554,8 +552,7 @@ void ExtensionPrefs::UpdateExtensionPref(
|
||||
std::string_view key,
|
||||
std::optional<base::Value> data_value) {
|
||||
if (!crx_file::id_util::IdIsValid(extension_id)) {
|
||||
NOTREACHED_IN_MIGRATION() << "Invalid extension_id " << extension_id;
|
||||
return;
|
||||
NOTREACHED() << "Invalid extension_id " << extension_id;
|
||||
}
|
||||
ScopedExtensionPrefUpdate update(prefs_, extension_id);
|
||||
if (data_value) {
|
||||
@ -1469,8 +1466,7 @@ std::optional<ExtensionInfo> ExtensionPrefs::GetInstalledInfoHelper(
|
||||
location != ManifestLocation::kComponent &&
|
||||
!Manifest::IsUnpackedLocation(location) &&
|
||||
!Manifest::IsExternalLocation(location)) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::nullopt;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
const base::Value* manifest = extension.Find(kPrefManifest);
|
||||
@ -2152,8 +2148,7 @@ bool ExtensionPrefs::GetUserExtensionPrefIntoContainer(
|
||||
*id_container_out, id_container_out->end());
|
||||
for (const auto& entry : user_pref_value->GetList()) {
|
||||
if (!entry.is_string()) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
continue;
|
||||
NOTREACHED();
|
||||
}
|
||||
insert_iterator = entry.GetString();
|
||||
}
|
||||
|
@ -318,7 +318,7 @@ void LoadUserScripts(
|
||||
dynamic_script_length += script_files_length;
|
||||
break;
|
||||
case UserScript::Source::kWebUIScript:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,7 +262,7 @@ void AppViewGuest::DidInitialize(const base::Value::Dict& create_params) {
|
||||
void AppViewGuest::MaybeRecreateGuestContents(
|
||||
content::RenderFrameHost* outer_contents_frame) {
|
||||
// This situation is not possible for AppView.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
const char* AppViewGuest::GetAPINamespace() const {
|
||||
|
@ -115,7 +115,7 @@ void ExtensionOptionsGuest::DidInitialize(
|
||||
void ExtensionOptionsGuest::MaybeRecreateGuestContents(
|
||||
content::RenderFrameHost* outer_contents_frame) {
|
||||
// This situation is not possible for ExtensionOptions.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void ExtensionOptionsGuest::GuestViewDidStopLoading() {
|
||||
@ -213,8 +213,7 @@ bool ExtensionOptionsGuest::HandleContextMenu(
|
||||
|
||||
bool ExtensionOptionsGuest::ShouldResumeRequestsForCreatedWindow() {
|
||||
// Not reached due to the use of `CreateCustomWebContents`.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return true;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
|
@ -227,7 +227,7 @@ void MimeHandlerViewGuest::DidInitialize(
|
||||
void MimeHandlerViewGuest::MaybeRecreateGuestContents(
|
||||
content::RenderFrameHost* outer_contents_frame) {
|
||||
// This situation is not possible for MimeHandlerView.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void MimeHandlerViewGuest::EmbedderFullscreenToggled(bool entered_fullscreen) {
|
||||
@ -381,8 +381,7 @@ bool MimeHandlerViewGuest::IsFullscreenForTabOrPending(
|
||||
|
||||
bool MimeHandlerViewGuest::ShouldResumeRequestsForCreatedWindow() {
|
||||
// Not reached due to the use of `CreateCustomWebContents`.
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return true;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
|
@ -29,8 +29,7 @@ std::string JavaScriptDialogTypeToString(
|
||||
case content::JAVASCRIPT_DIALOG_TYPE_PROMPT:
|
||||
return "prompt";
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown JavaScript Message Type.";
|
||||
return "unknown";
|
||||
NOTREACHED() << "Unknown JavaScript Message Type.";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -157,8 +157,7 @@ std::string WindowOpenDispositionToString(
|
||||
case WindowOpenDisposition::NEW_POPUP:
|
||||
return "new_popup";
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown Window Open Disposition";
|
||||
return "ignore";
|
||||
NOTREACHED() << "Unknown Window Open Disposition";
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,8 +187,7 @@ static std::string TerminationStatusToString(base::TerminationStatus status) {
|
||||
case base::TERMINATION_STATUS_MAX_ENUM:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION() << "Unknown Termination Status.";
|
||||
return "unknown";
|
||||
NOTREACHED() << "Unknown Termination Status.";
|
||||
}
|
||||
|
||||
std::string GetStoragePartitionIdFromPartitionConfig(
|
||||
@ -1049,8 +1047,7 @@ void WebViewGuest::ReportFrameNameChange(const std::string& name) {
|
||||
void WebViewGuest::PushWebViewStateToIOThread(
|
||||
content::RenderFrameHost* guest_host) {
|
||||
if (!guest_host->GetSiteInstance()->IsGuest()) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
auto storage_partition_config =
|
||||
guest_host->GetSiteInstance()->GetStoragePartitionConfig();
|
||||
|
@ -55,8 +55,7 @@ static std::string PermissionTypeToString(WebViewPermissionType type) {
|
||||
case WEB_VIEW_PERMISSION_TYPE_POINTER_LOCK:
|
||||
return webview::kPermissionTypePointerLock;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::string();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,8 +51,7 @@ bool ShouldResizeImageRepresentation(
|
||||
case ImageLoader::ImageRepresentation::NEVER_RESIZE:
|
||||
return false;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,7 +86,7 @@ void MockExtensionSystem::InstallUpdate(
|
||||
const base::FilePath& temp_dir,
|
||||
bool install_immediately,
|
||||
InstallUpdateCallback install_update_callback) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void MockExtensionSystem::PerformActionBasedOnOmahaAttributes(
|
||||
@ -96,8 +96,7 @@ void MockExtensionSystem::PerformActionBasedOnOmahaAttributes(
|
||||
bool MockExtensionSystem::FinishDelayedInstallationIfReady(
|
||||
const ExtensionId& extension_id,
|
||||
bool install_immediately) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
@ -29,8 +29,7 @@ bool ScopeToPrefName(ChromeSettingScope scope, std::string* result) {
|
||||
case ChromeSettingScope::kNone:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
const char kPrefPreferences[] = "preferences";
|
||||
|
@ -166,8 +166,7 @@ struct ProcessManager::ExtensionRenderFrameData {
|
||||
case extensions::mojom::ViewType::kExtensionSidePanel:
|
||||
return false;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -294,13 +294,9 @@ void RendererStartupHelper::ActivateExtensionInProcess(
|
||||
// The extension should have been loaded already. Dump without crashing to
|
||||
// debug crbug.com/528026.
|
||||
if (!base::Contains(extension_process_map_, extension.id())) {
|
||||
#if DCHECK_IS_ON()
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
DUMP_WILL_BE_NOTREACHED()
|
||||
<< "Extension " << extension.id() << " activated before loading";
|
||||
#else
|
||||
base::debug::DumpWithoutCrashing();
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
if (!util::IsExtensionVisibleToContext(extension,
|
||||
@ -576,9 +572,7 @@ void RendererStartupHelper::GetMessageBundle(
|
||||
const Extension* imported_extension =
|
||||
extension_set.GetByID(import.extension_id);
|
||||
if (!imported_extension) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Missing shared module " << import.extension_id;
|
||||
continue;
|
||||
NOTREACHED() << "Missing shared module " << import.extension_id;
|
||||
}
|
||||
paths_to_load.push_back(imported_extension->path());
|
||||
}
|
||||
|
@ -669,8 +669,7 @@ void SandboxedUnpacker::OnImageSanitizationDone(
|
||||
u"ERROR_SAVING_THEME_IMAGE");
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ReportFailure(failure_reason, error);
|
||||
@ -735,8 +734,7 @@ void SandboxedUnpacker::MessageCatalogsSanitized(
|
||||
u"ERROR_SAVING_CATALOG");
|
||||
break;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ReportFailure(failure_reason, error);
|
||||
@ -919,8 +917,7 @@ std::u16string SandboxedUnpacker::FailureReasonToString16(
|
||||
case SandboxedUnpackerFailureReason::DEPRECATED_ERROR_PARSING_DNR_RULESET:
|
||||
case SandboxedUnpackerFailureReason::NUM_FAILURE_REASONS:
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::u16string();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@ void TestExtensionsBrowserClient::LoadResourceFromResourceBundle(
|
||||
scoped_refptr<net::HttpResponseHeaders> headers,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderClient> client) {
|
||||
// Should not be called because GetBundleResourcePath() returned empty path.
|
||||
NOTREACHED_IN_MIGRATION() << "Resource is not from a bundle.";
|
||||
NOTREACHED() << "Resource is not from a bundle.";
|
||||
}
|
||||
|
||||
bool TestExtensionsBrowserClient::AllowCrossRendererResourceLoad(
|
||||
|
@ -1466,10 +1466,8 @@ bool ExtensionDownloader::IterateFetchCredentialsAfterFailure(
|
||||
}
|
||||
return false;
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
}
|
||||
|
||||
void ExtensionDownloader::OnAccessTokenFetchComplete(
|
||||
|
@ -66,8 +66,7 @@ std::optional<base::FilePath> ExtensionInstaller::GetInstalledFile(
|
||||
}
|
||||
|
||||
bool ExtensionInstaller::Uninstall() {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
ExtensionInstaller::~ExtensionInstaller() = default;
|
||||
|
@ -91,8 +91,7 @@ std::string ManifestFetchData::GetSimpleLocationString(ManifestLocation loc) {
|
||||
result = kPolicyLocation;
|
||||
break;
|
||||
case ManifestLocation::kInvalidLocation:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
break;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return result;
|
||||
@ -147,8 +146,7 @@ bool ManifestFetchData::AddExtension(const std::string& id,
|
||||
DCHECK(!is_all_external_policy_download_ ||
|
||||
extension_location == ManifestLocation::kExternalPolicyDownload);
|
||||
if (base::Contains(extensions_data_, id)) {
|
||||
NOTREACHED_IN_MIGRATION() << "Duplicate extension id " << id;
|
||||
return false;
|
||||
NOTREACHED() << "Duplicate extension id " << id;
|
||||
}
|
||||
|
||||
if (fetch_priority_ != DownloadFetchPriority::kForeground) {
|
||||
@ -280,7 +278,7 @@ bool ManifestFetchData::DidPing(const ExtensionId& extension_id,
|
||||
else if (type == ACTIVE)
|
||||
value = i->second.active_days;
|
||||
else
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
return value == kNeverPinged || value > 0;
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ class FakeUpdateClient : public update_client::UpdateClient {
|
||||
CrxStateChangeCallback crx_state_change_callback,
|
||||
bool is_foreground,
|
||||
update_client::Callback callback) override {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool GetCrxUpdateState(
|
||||
|
@ -75,8 +75,7 @@ EmbedderUserScriptLoader* UserScriptManager::GetUserScriptLoaderForEmbedder(
|
||||
case mojom::HostID::HostType::kExtensions:
|
||||
break;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return nullptr;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
void UserScriptManager::SetUserScriptSourceEnabledForExtensions(
|
||||
|
@ -175,8 +175,7 @@ std::string Warning::GetLocalizedMessage(const ExtensionSet* extensions) const {
|
||||
return l10n_util::GetStringFUTF8(message_id_, final_parameters[0],
|
||||
final_parameters[1], final_parameters[2], final_parameters[3]);
|
||||
default:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::string();
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,8 +45,7 @@ const char* ConvertMessagingSourceTypeToString(
|
||||
case MessagingEndpoint::Type::kNativeApp:
|
||||
return "NativeApp";
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "<unrecognized enum value>";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
base::debug::ScopedCrashKeyString CreateExtensionIdOrNativeAppNameScopedKey(
|
||||
@ -66,10 +65,7 @@ base::debug::ScopedCrashKeyString CreateExtensionIdOrNativeAppNameScopedKey(
|
||||
endpoint.native_app_name.value_or("<base::nullopt>"));
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return base::debug::ScopedCrashKeyString(
|
||||
GetMessagingSourceExtensionIdCrashKey(),
|
||||
endpoint.extension_id.value_or("<unrecognized MessagingEndpoint::Type>"));
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -162,8 +162,7 @@ std::unique_ptr<UserScript> ParseSerializedUserScript(
|
||||
serialized_script.id, UserScript::kManifestContentScriptPrefix);
|
||||
break;
|
||||
case api::scripts_internal::Source::kNone:
|
||||
NOTREACHED_IN_MIGRATION(); // This should have been caught by our
|
||||
// parsing.
|
||||
NOTREACHED(); // This should have been caught by our parsing.
|
||||
}
|
||||
|
||||
if (!source_matches_id) {
|
||||
|
@ -156,9 +156,7 @@ std::set<EventFilter::MatcherID> EventFilter::MatchEvent(
|
||||
for (const auto& id_key : matching_condition_set_ids) {
|
||||
auto matcher_id = condition_set_id_to_event_matcher_id_.find(id_key);
|
||||
if (matcher_id == condition_set_id_to_event_matcher_id_.end()) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "id not found in condition set map (" << id_key << ")";
|
||||
continue;
|
||||
NOTREACHED() << "id not found in condition set map (" << id_key << ")";
|
||||
}
|
||||
MatcherID id = matcher_id->second;
|
||||
auto matcher_entry = matcher_map.find(id);
|
||||
|
@ -177,8 +177,7 @@ bool ComputeExtensionID(const base::Value::Dict& manifest,
|
||||
// reloading the extension.
|
||||
*extension_id = crx_file::id_util::GenerateIdForPath(path);
|
||||
if (extension_id->empty()) {
|
||||
NOTREACHED_IN_MIGRATION() << "Could not create ID from path.";
|
||||
return false;
|
||||
NOTREACHED() << "Could not create ID from path.";
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -457,8 +457,7 @@ bool GetValidLocales(const base::FilePath& locale_path,
|
||||
while (!(locale_folder = locales.Next()).empty()) {
|
||||
std::string locale_name = locale_folder.BaseName().MaybeAsASCII();
|
||||
if (locale_name.empty()) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
continue; // Not ASCII.
|
||||
NOTREACHED(); // Not ASCII.
|
||||
}
|
||||
if (!AddLocale(
|
||||
chrome_locales, locale_folder, locale_name, valid_locales, error)) {
|
||||
@ -549,8 +548,7 @@ bool ShouldSkipValidation(const base::FilePath& locales_path,
|
||||
// '.svn' directories.
|
||||
base::FilePath relative_path;
|
||||
if (!locales_path.AppendRelativePath(locale_path, &relative_path)) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return true;
|
||||
NOTREACHED();
|
||||
}
|
||||
std::string subdir = relative_path.MaybeAsASCII();
|
||||
if (subdir.empty())
|
||||
|
@ -64,7 +64,7 @@ std::unique_ptr<FeatureProvider> ExtensionsClient::CreateFeatureProvider(
|
||||
} else if (name == "behavior") {
|
||||
method = &ExtensionsAPIProvider::AddBehaviorFeatures;
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
for (const auto& api_provider : api_providers_)
|
||||
((*api_provider).*method)(feature_provider.get());
|
||||
|
@ -98,10 +98,9 @@ std::string GetDisplayName(Manifest::Type type) {
|
||||
case Manifest::TYPE_CHROMEOS_SYSTEM_EXTENSION:
|
||||
return "chromeos system extension";
|
||||
case Manifest::NUM_LOAD_TYPES:
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// Gets a human-readable name for the given context type, suitable for giving
|
||||
@ -135,8 +134,7 @@ std::string GetDisplayName(mojom::ContextType context) {
|
||||
case mojom::ContextType::kUserScript:
|
||||
return "user script";
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return "";
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
std::string GetDisplayName(mojom::FeatureSessionType session_type) {
|
||||
@ -406,8 +404,7 @@ std::string SimpleFeature::GetAvailabilityMessage(
|
||||
name().c_str());
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return std::string();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
Feature::Availability SimpleFeature::CreateAvailability(
|
||||
@ -515,8 +512,7 @@ bool SimpleFeature::MatchesManifestLocation(
|
||||
case SimpleFeature::UNPACKED_LOCATION:
|
||||
return Manifest::IsUnpackedLocation(manifest_location);
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
bool SimpleFeature::MatchesSessionTypes(
|
||||
|
@ -27,8 +27,7 @@ struct EnumTraits<extensions::mojom::Channel, version_info::Channel> {
|
||||
case version_info::Channel::STABLE:
|
||||
return extensions::mojom::Channel::kStable;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return extensions::mojom::Channel::kUnknown;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
static bool FromMojom(extensions::mojom::Channel input,
|
||||
@ -50,9 +49,7 @@ struct EnumTraits<extensions::mojom::Channel, version_info::Channel> {
|
||||
*out = version_info::Channel::STABLE;
|
||||
return true;
|
||||
}
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
*out = version_info::Channel::UNKNOWN;
|
||||
return false;
|
||||
NOTREACHED();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -19,8 +19,7 @@ mojom::RunLocation ConvertRunLocation(api::extension_types::RunAt run_at) {
|
||||
return mojom::RunLocation::kDocumentStart;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return mojom::RunLocation::kDocumentIdle;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
api::extension_types::RunAt ConvertRunLocationForAPI(
|
||||
@ -40,8 +39,7 @@ api::extension_types::RunAt ConvertRunLocationForAPI(
|
||||
break;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return api::extension_types::RunAt::kDocumentIdle;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
mojom::ExecutionWorld ConvertExecutionWorld(
|
||||
@ -72,8 +70,7 @@ api::extension_types::ExecutionWorld ConvertExecutionWorldForAPI(
|
||||
return api::extension_types::ExecutionWorld::kUserScript;
|
||||
}
|
||||
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return api::extension_types::ExecutionWorld::kIsolated;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
|
@ -81,23 +81,20 @@ void AppWindowCustomBindings::GetFrame(
|
||||
void AppWindowCustomBindings::ResumeParser(
|
||||
const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
if (args.Length() != 1 || !args[0]->IsString()) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
content::RenderFrame* app_frame =
|
||||
ExtensionFrameHelper::FindFrameFromFrameTokenString(context()->isolate(),
|
||||
args[0]);
|
||||
if (!app_frame) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
blink::WebDocumentLoader* loader =
|
||||
app_frame->GetWebFrame()->GetDocumentLoader();
|
||||
if (!loader) {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
loader->ResumeParser();
|
||||
|
@ -87,8 +87,7 @@ api::automation::EventType AXEventToAutomationEventType(
|
||||
api::automation::EventType automation_event_type =
|
||||
api::automation::ParseEventType(val);
|
||||
if (automation_event_type == api::automation::EventType::kNone) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Missing mapping from ax::mojom::Event: " << val;
|
||||
NOTREACHED() << "Missing mapping from ax::mojom::Event: " << val;
|
||||
}
|
||||
|
||||
enum_map->emplace_back(automation_event_type);
|
||||
@ -114,8 +113,8 @@ api::automation::EventType AXGeneratedEventToAutomationEventType(
|
||||
api::automation::EventType automation_event_type =
|
||||
api::automation::ParseEventType(val);
|
||||
if (automation_event_type == api::automation::EventType::kNone) {
|
||||
NOTREACHED_IN_MIGRATION()
|
||||
<< "Missing mapping from ui::AXEventGenerator::Event: " << val;
|
||||
NOTREACHED() << "Missing mapping from ui::AXEventGenerator::Event: "
|
||||
<< val;
|
||||
}
|
||||
|
||||
enum_map->emplace_back(automation_event_type);
|
||||
|
@ -222,8 +222,7 @@ void DeclarativeContentHooksDelegate::HandleCall(
|
||||
v8::Local<v8::Object> this_object = info.This();
|
||||
if (this_object.IsEmpty()) {
|
||||
// Crazy script (e.g. declarativeContent.Foo.apply(null, args);).
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
return;
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
// TODO(devlin): Find a way to use APISignature here? It's a little awkward
|
||||
|
@ -49,7 +49,7 @@ APIBindingHooks::RequestResult DOMHooksDelegate::HandleRequest(
|
||||
result.return_value =
|
||||
OpenOrClosedShadowRoot(script_context, *parse_result.arguments);
|
||||
} else {
|
||||
NOTREACHED_IN_MIGRATION();
|
||||
NOTREACHED();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user