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

Side by Side Diff: chrome/browser/loader/chrome_resource_dispatcher_host_delegate.cc

Issue 2918403009: [Dice] Parse the Dice response header (Closed)
Patch Set: rebase Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h" 5 #include "chrome/browser/loader/chrome_resource_dispatcher_host_delegate.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
837 // the content area. 837 // the content area.
838 // 838 //
839 // For example, on Android, for users that are signed in to Chrome, the 839 // For example, on Android, for users that are signed in to Chrome, the
840 // identity is mirrored into the content area. To do so, Chrome appends a 840 // identity is mirrored into the content area. To do so, Chrome appends a
841 // X-Chrome-Connected header to all Gaia requests from a connected profile so 841 // X-Chrome-Connected header to all Gaia requests from a connected profile so
842 // Gaia could return a 204 response and let Chrome handle the action with 842 // Gaia could return a 204 response and let Chrome handle the action with
843 // native UI. The only exception is requests from gaia webview, since the 843 // native UI. The only exception is requests from gaia webview, since the
844 // native profile management UI is built on top of it. 844 // native profile management UI is built on top of it.
845 signin::FixAccountConsistencyRequestHeader( 845 signin::FixAccountConsistencyRequestHeader(
846 request, redirect_url, io_data, info->GetChildID(), info->GetRouteID()); 846 request, redirect_url, io_data, info->GetChildID(), info->GetRouteID());
847 #if !defined(OS_IOS) && !defined(OS_ANDROID)
848 signin::ProcessDiceResponseHeaderIfExists(request, io_data);
msarda 2017/06/12 11:52:21 It looks like the Mirror response header (ManageAc
droger 2017/06/12 12:39:14 The Dice header is only seen on redirects currentl
msarda 2017/06/12 14:03:42 I think we're basically adding too much logic for
droger 2017/06/12 16:12:58 I understand. I merged the Dice and Mirror functio
849 #endif
847 850
848 if (io_data->loading_predictor_observer()) { 851 if (io_data->loading_predictor_observer()) {
849 io_data->loading_predictor_observer()->OnRequestRedirected( 852 io_data->loading_predictor_observer()->OnRequestRedirected(
850 request, redirect_url, info->GetWebContentsGetterForRequest()); 853 request, redirect_url, info->GetWebContentsGetterForRequest());
851 } 854 }
852 855
853 if (io_data->policy_header_helper()) 856 if (io_data->policy_header_helper())
854 io_data->policy_header_helper()->AddPolicyHeaders(redirect_url, request); 857 io_data->policy_header_helper()->AddPolicyHeaders(redirect_url, request);
855 } 858 }
856 859
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 &ChromeResourceDispatcherHostDelegate::OnAbortedFrameLoad, 976 &ChromeResourceDispatcherHostDelegate::OnAbortedFrameLoad,
974 base::Unretained(this), url, request_loading_time)); 977 base::Unretained(this), url, request_loading_time));
975 return; 978 return;
976 } 979 }
977 980
978 std::string metric_name = (request_loading_time.InMilliseconds() < 100 ? 981 std::string metric_name = (request_loading_time.InMilliseconds() < 100 ?
979 "Net.ErrAborted.Fast" : "Net.ErrAborted.Slow"); 982 "Net.ErrAborted.Fast" : "Net.ErrAborted.Slow");
980 rappor::SampleDomainAndRegistryFromGURL( 983 rappor::SampleDomainAndRegistryFromGURL(
981 g_browser_process->rappor_service(), metric_name, url); 984 g_browser_process->rappor_service(), metric_name, url);
982 } 985 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/signin/chrome_signin_helper.h » ('j') | chrome/browser/signin/chrome_signin_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698