base::WeakPtrFactory<LanguageDetectionModel> weak_ptr_factory_{this};Blink Style Guide: Prefer blink:: types over STL and base types. Since `LanguageDetectionModel` is a `GarbageCollected` type, the idiomatic pattern for managing its lifetime in callbacks is to use `WeakPersistent` with `WrapWeakPersistent` and `WTF::BindOnce`, rather than `base::WeakPtrFactory`.
To keep this interaction as brief and non-intrusive as possible, please consider responding with one of following options:
**Done** | **Won't fix**: reason | **b/<bug_id>** | **Invalid:** reason
_This comment was generated by [Experimental Blink C++ Code Review Agent](http://go/blink-c++-code-review-agent)._
_AI reviews can sometimes be inaccurate; We appreciate your 🙏 feedback 🙏 to help us improve._
_[File a bug](http://go/blink-c++-code-review-agent-feedback) | [Provide feedback on chat](https://chat.google.com/room/AAQA0zhQHe0?cls=4) | [Opt-out](https://ganpati2.corp.google.com/group/peep-genai-blink-agent-optout.prod)_
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |