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

Unified Diff: chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js

Issue 1900913002: Settings People Revamp: Split Profile Info out into its own handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/resources/settings/people_page/profile_info_browser_proxy.js
diff --git a/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js
new file mode 100644
index 0000000000000000000000000000000000000000..fda3cd487444cee2f696fc061aeb95898a395883
--- /dev/null
+++ b/chrome/browser/resources/settings/people_page/profile_info_browser_proxy.js
@@ -0,0 +1,50 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+/**
+ * @fileoverview A helper object used from the the People section to get the
+ * profile info, which consists of the profile name and icon. Used for both
+ * Chrome browser and ChromeOS.
+ */
+cr.exportPath('settings');
+
+/**
+ * An object describing the profile.
+ * @typedef {{
+ * name: string,
+ * iconUrl: string
+ * }}
+ */
+settings.ProfileInfo;
+
+cr.define('settings', function() {
+ /** @interface */
+ function ProfileInfoBrowserProxy() {}
+
+ ProfileInfoBrowserProxy.prototype = {
+ /**
+ * Returns a Promise for the profile info.
+ * @return {!Promise<!settings.ProfileInfo>}
+ */
+ getProfileInfo: function() {},
+ };
+
+ /**
+ * @constructor
+ * @implements {ProfileInfoBrowserProxy}
+ */
+ function ProfileInfoBrowserProxyImpl() {}
+ cr.addSingletonGetter(ProfileInfoBrowserProxyImpl);
+
+ ProfileInfoBrowserProxyImpl.prototype = {
+ /** @override */
+ getProfileInfo: function() {
+ return cr.sendWithPromise('getProfileInfo');
+ },
+ };
+
+ return {
+ ProfileInfoBrowserProxyImpl: ProfileInfoBrowserProxyImpl,
+ };
+});

Powered by Google App Engine
This is Rietveld 408576698