Commit 090312ec authored by stevet@chromium.org's avatar stevet@chromium.org

Added machine names to about:sessions.

BUG=98836
TEST=Enable Open Tab syncing and sync some open tabs between two clients. Ensure that the about:sessions page displays the machine names under the sessions list.


Review URL: http://codereview.chromium.org/8590031

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110514 0039d316-1c4b-4281-b951-d872f2087c98
parent c4cc74ce
...@@ -82,8 +82,9 @@ function transformWindow(window) { ...@@ -82,8 +82,9 @@ function transformWindow(window) {
*/ */
function transformSession(session) { function transformSession(session) {
var sessionDiv = document.createElement('div'); var sessionDiv = document.createElement('div');
var sessionName = session.name.length == 0 ? 'Session' : session.name;
sessionDiv.className = "session"; sessionDiv.className = "session";
sessionDiv.appendChild(createTitleDiv('session-title', 'Session')); sessionDiv.appendChild(createTitleDiv('session-title', sessionName));
addItems(sessionDiv, session.windows, transformWindow); addItems(sessionDiv, session.windows, transformWindow);
return sessionDiv; return sessionDiv;
} }
......
...@@ -184,6 +184,7 @@ void SessionsDOMHandler::GetSessionList( ...@@ -184,6 +184,7 @@ void SessionsDOMHandler::GetSessionList(
const browser_sync::SyncedSession* session = *it; const browser_sync::SyncedSession* session = *it;
scoped_ptr<DictionaryValue> session_data(new DictionaryValue()); scoped_ptr<DictionaryValue> session_data(new DictionaryValue());
session_data->SetString("tag", session->session_tag); session_data->SetString("tag", session->session_tag);
session_data->SetString("name", session->session_name);
scoped_ptr<ListValue> window_list(new ListValue()); scoped_ptr<ListValue> window_list(new ListValue());
GetWindowList(session->windows, window_list.get()); GetWindowList(session->windows, window_list.get());
session_data->Set("windows", window_list.release()); session_data->Set("windows", window_list.release());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment