Commit 354b86b8 authored by George Burgess IV's avatar George Burgess IV Committed by Commit Bot

network: fix an instance of bugprone-unused-raii

It seems that this constructor call was intended to be used as a scope
guard. In order for that to happen, there has to be a variable name
here.

Bug: 1130379
Change-Id: I895e76e1f450b944791679e8e2a4df09d5b317f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2420914Reviewed-by: default avatarClark DuVall <cduvall@chromium.org>
Commit-Queue: George Burgess <gbiv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808907}
parent 01f70ed0
......@@ -131,14 +131,13 @@ class RestrictedCookieManager::Listener : public base::LinkNode<Listener> {
// TODO(pwnall): add a constructor w/options to net::CookieChangeDispatcher.
cookie_store_subscription_ =
cookie_store->GetChangeDispatcher().AddCallbackForUrl(
url,
base::BindRepeating(
&Listener::OnCookieChange,
// Safe because net::CookieChangeDispatcher guarantees that the
// callback will stop being called immediately after we remove
// the subscription, and the cookie store lives on the same
// thread as we do.
base::Unretained(this)));
url, base::BindRepeating(
&Listener::OnCookieChange,
// Safe because net::CookieChangeDispatcher guarantees that
// the callback will stop being called immediately after we
// remove the subscription, and the cookie store lives on
// the same thread as we do.
base::Unretained(this)));
}
~Listener() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); }
......@@ -569,13 +568,14 @@ bool RestrictedCookieManager::ValidateAccessToCookiesAt(
base::debug::AllocateCrashKeyString(
"restricted_cookie_manager_bound_origin",
base::debug::CrashKeySize::Size256);
base::debug::ScopedCrashKeyString(bound_origin, origin_.GetDebugString());
base::debug::ScopedCrashKeyString scoped_key_string_bound(
bound_origin, origin_.GetDebugString());
static base::debug::CrashKeyString* url_origin =
base::debug::AllocateCrashKeyString(
"restricted_cookie_manager_url_origin",
base::debug::CrashKeySize::Size256);
base::debug::ScopedCrashKeyString(
base::debug::ScopedCrashKeyString scoped_key_string_url(
url_origin, url::Origin::Create(url).GetDebugString());
base::debug::DumpWithoutCrashing();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment