Commit e4d3e6b1 authored by Raphael Kubo da Costa's avatar Raphael Kubo da Costa Committed by Commit Bot

DevTools: Fix GCC build after 8d49c506.

Commit 8d49c506 ("DevTools: implement a URLLoader-based request interception
proxy") introduced code that triggers GCC bug 71882: declaring a class from
an unnamed namespace as a friend of a class inside a named namespace does
not work.

    ../../content/browser/devtools/devtools_url_loader_interceptor.cc: In member function ‘void content::{anonymous}::InterceptionJob::NotifyClient(std::unique_ptr<content::InterceptedRequestInfo>)’:             ../../content/browser/devtools/devtools_url_loader_interceptor.cc:907:36: error: ‘content::{anonymous}::RequestInterceptedCallback content::DevToolsURLLoaderInterceptor::Impl::request_intercepted_callback_’ is private within this context
           base::BindOnce(interceptor_->request_intercepted_callback_,
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../content/browser/devtools/devtools_url_loader_interceptor.cc:342:30: note: declared private here
       RequestInterceptedCallback request_intercepted_callback_;
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../content/browser/devtools/devtools_url_loader_interceptor.cc: In member function ‘void content::{anonymous}::InterceptionJob::Shutdown()’:
    ../../content/browser/devtools/devtools_url_loader_interceptor.cc:913:32: error: ‘void content::DevToolsURLLoaderInterceptor::Impl::RemoveJob(const string&)’ is private within this context
         interceptor_->RemoveJob(id_);
                                    ^
    ../../content/browser/devtools/devtools_url_loader_interceptor.cc:339:8: note: declared private here
       void RemoveJob(const std::string& id) { jobs_.erase(id); }
            ^~~~~~~~~

Work around the issue by fully specifying |InterceptionJob|'s namespace when
declaring it a friend of |DevToolsURLLoaderInterceptor::Impl|.

Change-Id: I565e169586ae0ce6ce1cd0ddbc36bd404847b386
Reviewed-on: https://chromium-review.googlesource.com/966601Reviewed-by: default avatarAndrey Kosyakov <caseq@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#543761}
parent d49c7428
...@@ -320,7 +320,7 @@ class DevToolsURLLoaderInterceptor::Impl ...@@ -320,7 +320,7 @@ class DevToolsURLLoaderInterceptor::Impl
} }
private: private:
friend class InterceptionJob; friend class content::InterceptionJob;
template <typename Callback> template <typename Callback>
InterceptionJob* FindJob(const std::string& id, InterceptionJob* FindJob(const std::string& id,
......
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