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

Side by Side Diff: chrome/browser/ui/user_manager.cc

Issue 1473543002: Implement newly designed sign-in related histograms for desktop platorms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ui/user_manager.h" 5 #include "chrome/browser/ui/user_manager.h"
6 6
7 #include "chrome/browser/signin/signin_promo.h" 7 #include "chrome/browser/signin/signin_promo.h"
8 #include "components/guest_view/browser/guest_view_manager.h" 8 #include "components/guest_view/browser/guest_view_manager.h"
9 #include "google_apis/gaia/gaia_urls.h" 9 #include "google_apis/gaia/gaia_urls.h"
10 10
(...skipping 26 matching lines...) Expand all
37 if (url.ReplaceComponents(replacements) == 37 if (url.ReplaceComponents(replacements) ==
38 GaiaUrls::GetInstance()->signin_completed_continue_url()) { 38 GaiaUrls::GetInstance()->signin_completed_continue_url()) {
39 CloseReauthDialog(); 39 CloseReauthDialog();
40 return; 40 return;
41 } 41 }
42 42
43 // If still observing the top level web contents, try to find the embedded 43 // If still observing the top level web contents, try to find the embedded
44 // webview and observe it instead. The webview may not be found in the 44 // webview and observe it instead. The webview may not be found in the
45 // initial page load since it loads asynchronously. 45 // initial page load since it loads asynchronously.
46 if (url.GetOrigin() != 46 if (url.GetOrigin() !=
47 signin::GetReauthURLWithEmail(email_address_).GetOrigin()) { 47 signin::GetReauthURLWithEmail(
48 signin_metrics::AccessPoint::ACCESS_POINT_USER_MANAGER,
49 signin_metrics::Reason::REASON_UNLOCK, email_address_)
50 .GetOrigin()) {
48 return; 51 return;
49 } 52 }
50 53
51 std::set<content::WebContents*> content_set; 54 std::set<content::WebContents*> content_set;
52 guest_view::GuestViewManager* manager = 55 guest_view::GuestViewManager* manager =
53 guest_view::GuestViewManager::FromBrowserContext( 56 guest_view::GuestViewManager::FromBrowserContext(
54 web_contents()->GetBrowserContext()); 57 web_contents()->GetBrowserContext());
55 if (manager) 58 if (manager)
56 manager->ForEachGuest(web_contents(), base::Bind(&AddToSet, &content_set)); 59 manager->ForEachGuest(web_contents(), base::Bind(&AddToSet, &content_set));
57 DCHECK_LE(content_set.size(), 1U); 60 DCHECK_LE(content_set.size(), 1U);
58 if (!content_set.empty()) 61 if (!content_set.empty())
59 Observe(*content_set.begin()); 62 Observe(*content_set.begin());
60 } 63 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698