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

Side by Side Diff: chrome/browser/ui/webui/signin_internals_ui.cc

Issue 421583002: Show GAIA/cookie accounts on the signin-internals page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit tests fix up Created 6 years, 4 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 | Annotate | Revision Log
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/ui/webui/signin_internals_ui.h" 5 #include "chrome/browser/ui/webui/signin_internals_ui.h"
6 6
7 #include "base/hash.h" 7 #include "base/hash.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/signin/about_signin_internals_factory.h" 9 #include "chrome/browser/signin/about_signin_internals_factory.h"
10 #include "chrome/common/url_constants.h" 10 #include "chrome/common/url_constants.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 AboutSigninInternalsFactory::GetForProfile(profile); 65 AboutSigninInternalsFactory::GetForProfile(profile);
66 // TODO(vishwath): The UI would look better if we passed in a dict with some 66 // TODO(vishwath): The UI would look better if we passed in a dict with some
67 // reasonable defaults, so the about:signin-internals page doesn't look 67 // reasonable defaults, so the about:signin-internals page doesn't look
68 // empty in incognito mode. Alternatively, we could force about:signin to 68 // empty in incognito mode. Alternatively, we could force about:signin to
69 // open in non-incognito mode always (like about:settings for ex.). 69 // open in non-incognito mode always (like about:settings for ex.).
70 if (about_signin_internals) { 70 if (about_signin_internals) {
71 const std::string& reply_handler = 71 const std::string& reply_handler =
72 "chrome.signin.getSigninInfo.handleReply"; 72 "chrome.signin.getSigninInfo.handleReply";
73 web_ui()->CallJavascriptFunction( 73 web_ui()->CallJavascriptFunction(
74 reply_handler, *about_signin_internals->GetSigninStatus()); 74 reply_handler, *about_signin_internals->GetSigninStatus());
75 about_signin_internals->GetCookieAccountsAsync();
75 76
76 return true; 77 return true;
77 } 78 }
78 } 79 }
79 return false; 80 return false;
80 } 81 }
81 82
82 void SignInInternalsUI::OnSigninStateChanged( 83 void SignInInternalsUI::OnSigninStateChanged(
83 scoped_ptr<base::DictionaryValue> info) { 84 scoped_ptr<base::DictionaryValue> info) {
84 const std::string& event_handler = "chrome.signin.onSigninInfoChanged.fire"; 85 const std::string& event_handler = "chrome.signin.onSigninInfoChanged.fire";
85 web_ui()->CallJavascriptFunction(event_handler, *info); 86 web_ui()->CallJavascriptFunction(event_handler, *info);
86 } 87 }
88
89 void SignInInternalsUI::OnCookieAccountsFetched(
90 scoped_ptr<base::DictionaryValue> info) {
91 const std::string& event_handler =
92 "chrome.signin.onCookieAccountsFetched.fire";
Evan Stade 2014/08/08 19:33:54 nit: just inline the string literal (here and 2 pl
Mike Lerman 2014/08/08 20:02:04 Done.
93 web_ui()->CallJavascriptFunction(event_handler, *info);
94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698