Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9820)

Unified Diff: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc

Issue 914363003: Remove OneClickSigninHelper since it is no longer used. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ocl
Patch Set: rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
diff --git a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
index b46b3f78fe9c1be4996c2cad896ccb873206237a..3d859531b77ffd15016748238c789338f30eda26 100644
--- a/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
+++ b/chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.cc
@@ -79,10 +79,6 @@
#include "chrome/browser/supervised_user/supervised_user_resource_throttle.h"
#endif
-#if defined(ENABLE_ONE_CLICK_SIGNIN)
-#include "chrome/browser/ui/sync/one_click_signin_helper.h"
-#endif
-
#if defined(USE_SYSTEM_PROTOBUF)
#include <google/protobuf/repeated_field.h>
#else
@@ -439,10 +435,6 @@ void ChromeResourceDispatcherHostDelegate::RequestBeginning(
request->SetExtraRequestHeaders(headers);
}
-#if defined(ENABLE_ONE_CLICK_SIGNIN)
- AppendChromeSyncGaiaHeader(request, resource_context);
-#endif
-
#if defined(ENABLE_CONFIGURATION_POLICY)
if (io_data->policy_header_helper())
io_data->policy_header_helper()->AddPolicyHeaders(request->url(), request);
@@ -593,28 +585,6 @@ void ChromeResourceDispatcherHostDelegate::AppendStandardResourceThrottles(
}
}
-#if defined(ENABLE_ONE_CLICK_SIGNIN)
-void ChromeResourceDispatcherHostDelegate::AppendChromeSyncGaiaHeader(
- net::URLRequest* request,
- content::ResourceContext* resource_context) {
- static const char kAllowChromeSignIn[] = "Allow-Chrome-SignIn";
-
- ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
- OneClickSigninHelper::Offer offer =
- OneClickSigninHelper::CanOfferOnIOThread(request, io_data);
- switch (offer) {
- case OneClickSigninHelper::CAN_OFFER:
- request->SetExtraRequestHeaderByName(kAllowChromeSignIn, "1", false);
- break;
- case OneClickSigninHelper::DONT_OFFER:
- request->RemoveRequestHeaderByName(kAllowChromeSignIn);
- break;
- case OneClickSigninHelper::IGNORE_REQUEST:
- break;
- }
-}
-#endif
-
bool ChromeResourceDispatcherHostDelegate::ShouldForceDownloadResource(
const GURL& url, const std::string& mime_type) {
#if defined(ENABLE_EXTENSIONS)
@@ -703,15 +673,6 @@ void ChromeResourceDispatcherHostDelegate::OnResponseStarted(
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
ProfileIOData* io_data = ProfileIOData::FromResourceContext(resource_context);
-#if defined(ENABLE_ONE_CLICK_SIGNIN)
- // See if the response contains the Google-Accounts-SignIn header. If so,
- // then the user has just finished signing in, and the server is allowing the
- // browser to suggest connecting the user's profile to the account.
- OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data,
- info->GetChildID(),
- info->GetRouteID());
-#endif
-
// See if the response contains the X-Chrome-Manage-Accounts header. If so
// show the profile avatar bubble so that user can complete signin/out action
// the native UI.
@@ -761,16 +722,6 @@ void ChromeResourceDispatcherHostDelegate::OnRequestRedirected(
const ResourceRequestInfo* info = ResourceRequestInfo::ForRequest(request);
-#if defined(ENABLE_ONE_CLICK_SIGNIN)
- // See if the response contains the Google-Accounts-SignIn header. If so,
- // then the user has just finished signing in, and the server is allowing the
- // browser to suggest connecting the user's profile to the account.
- OneClickSigninHelper::ShowInfoBarIfPossible(request, io_data,
- info->GetChildID(),
- info->GetRouteID());
- AppendChromeSyncGaiaHeader(request, resource_context);
-#endif
-
// In the Mirror world, Chrome should append a X-Chrome-Connected header to
// all Gaia requests from a connected profile so Gaia could return a 204
// response and let Chrome handle the action with native UI. The only

Powered by Google App Engine
This is Rietveld 408576698