#include "chrome/browser/ui/webui/suggest_internals/suggest_internals_handler.h"
#include "base/strings/string_number_conversions.h"
#include "base/time/time.h"
#include "chrome/browser/autocomplete/remote_suggestions_service_factory.h"
#include "components/variations/net/variations_http_headers.h"
#include "services/network/public/cpp/resource_request.h"
SuggestInternalsHandler::SuggestInternalsHandler(
mojo::PendingReceiver<suggest_internals::mojom::PageHandler>
pending_page_handler,
Profile* profile,
content::WebContents* web_contents)
: … { … }
SuggestInternalsHandler::~SuggestInternalsHandler() = default;
void SuggestInternalsHandler::SetPage(
mojo::PendingRemote<suggest_internals::mojom::Page> pending_page) { … }
void SuggestInternalsHandler::HardcodeResponse(
const std::string& response,
HardcodeResponseCallback callback) { … }
void SuggestInternalsHandler::OnSuggestRequestCreated(
const base::UnguessableToken& request_id,
const network::ResourceRequest* request) { … }
void SuggestInternalsHandler::OnSuggestRequestStarted(
const base::UnguessableToken& request_id,
network::SimpleURLLoader* loader,
const std::string& request_body) { … }
void SuggestInternalsHandler::OnSuggestRequestCompleted(
const base::UnguessableToken& request_id,
const int response_code,
const std::unique_ptr<std::string>& response_body) { … }