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> { ...@@ -131,14 +131,13 @@ class RestrictedCookieManager::Listener : public base::LinkNode<Listener> {
// TODO(pwnall): add a constructor w/options to net::CookieChangeDispatcher. // TODO(pwnall): add a constructor w/options to net::CookieChangeDispatcher.
cookie_store_subscription_ = cookie_store_subscription_ =
cookie_store->GetChangeDispatcher().AddCallbackForUrl( cookie_store->GetChangeDispatcher().AddCallbackForUrl(
url, url, base::BindRepeating(
base::BindRepeating( &Listener::OnCookieChange,
&Listener::OnCookieChange, // Safe because net::CookieChangeDispatcher guarantees that
// Safe because net::CookieChangeDispatcher guarantees that the // the callback will stop being called immediately after we
// callback will stop being called immediately after we remove // remove the subscription, and the cookie store lives on
// the subscription, and the cookie store lives on the same // the same thread as we do.
// thread as we do. base::Unretained(this)));
base::Unretained(this)));
} }
~Listener() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); } ~Listener() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); }
...@@ -569,13 +568,14 @@ bool RestrictedCookieManager::ValidateAccessToCookiesAt( ...@@ -569,13 +568,14 @@ bool RestrictedCookieManager::ValidateAccessToCookiesAt(
base::debug::AllocateCrashKeyString( base::debug::AllocateCrashKeyString(
"restricted_cookie_manager_bound_origin", "restricted_cookie_manager_bound_origin",
base::debug::CrashKeySize::Size256); 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 = static base::debug::CrashKeyString* url_origin =
base::debug::AllocateCrashKeyString( base::debug::AllocateCrashKeyString(
"restricted_cookie_manager_url_origin", "restricted_cookie_manager_url_origin",
base::debug::CrashKeySize::Size256); base::debug::CrashKeySize::Size256);
base::debug::ScopedCrashKeyString( base::debug::ScopedCrashKeyString scoped_key_string_url(
url_origin, url::Origin::Create(url).GetDebugString()); url_origin, url::Origin::Create(url).GetDebugString());
base::debug::DumpWithoutCrashing(); 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