| Index: chrome/browser/ui/webui/settings/people_handler.cc
|
| diff --git a/chrome/browser/ui/webui/settings/people_handler.cc b/chrome/browser/ui/webui/settings/people_handler.cc
|
| index 2cf3fe0ce14761b86577db93de2cd3facb54df8d..f180eb4ab9d2e91f18fe89962ec55cef31bc1190 100644
|
| --- a/chrome/browser/ui/webui/settings/people_handler.cc
|
| +++ b/chrome/browser/ui/webui/settings/people_handler.cc
|
| @@ -215,15 +215,10 @@
|
| ProfileSyncServiceFactory::GetInstance()->GetForProfile(profile_));
|
| if (sync_service)
|
| sync_service_observer_.Add(sync_service);
|
| -
|
| - g_browser_process->profile_manager()->GetProfileInfoCache().AddObserver(this);
|
| }
|
|
|
| PeopleHandler::~PeopleHandler() {
|
| - g_browser_process->profile_manager()->
|
| - GetProfileInfoCache().RemoveObserver(this);
|
| -
|
| - // Early exit if running unit tests (no actual WebUI is attached).
|
| + // Just exit if running unit tests (no actual WebUI is attached).
|
| if (!web_ui())
|
| return;
|
|
|
| @@ -262,9 +257,6 @@
|
| }
|
|
|
| void PeopleHandler::RegisterMessages() {
|
| - web_ui()->RegisterMessageCallback(
|
| - "getProfileInfo",
|
| - base::Bind(&PeopleHandler::HandleGetProfileInfo, base::Unretained(this)));
|
| web_ui()->RegisterMessageCallback(
|
| "SyncSetupDidClosePage",
|
| base::Bind(&PeopleHandler::OnDidClosePage, base::Unretained(this)));
|
| @@ -438,16 +430,6 @@
|
| : nullptr;
|
| }
|
|
|
| -void PeopleHandler::HandleGetProfileInfo(const base::ListValue* args) {
|
| - std::string name;
|
| - std::string icon_url;
|
| - GetAccountNameAndIcon(*profile_, &name, &icon_url);
|
| -
|
| - web_ui()->CallJavascriptFunction("settings.SyncPrivateApi.receiveProfileInfo",
|
| - base::StringValue(name),
|
| - base::StringValue(icon_url));
|
| -}
|
| -
|
| void PeopleHandler::HandleConfigure(const base::ListValue* args) {
|
| DCHECK(!sync_startup_tracker_);
|
| std::string json;
|
| @@ -783,17 +765,6 @@
|
| UpdateSyncState();
|
| }
|
|
|
| -void PeopleHandler::OnProfileNameChanged(
|
| - const base::FilePath& /* profile_path */,
|
| - const base::string16& /* old_profile_name */) {
|
| - HandleGetProfileInfo(nullptr);
|
| -}
|
| -
|
| -void PeopleHandler::OnProfileAvatarChanged(
|
| - const base::FilePath& /* profile_path */) {
|
| - HandleGetProfileInfo(nullptr);
|
| -}
|
| -
|
| scoped_ptr<base::DictionaryValue> PeopleHandler::GetSyncStateDictionary() {
|
| // The items which are to be written into |sync_status| are also described in
|
| // chrome/browser/resources/options/browser_options.js in @typedef
|
| @@ -843,6 +814,12 @@
|
| sync_status->SetBoolean("signedIn", signin->IsAuthenticated());
|
| sync_status->SetBoolean("hasUnrecoverableError",
|
| service && service->HasUnrecoverableError());
|
| +
|
| + std::string name;
|
| + std::string icon_url;
|
| + GetAccountNameAndIcon(*profile_, &name, &icon_url);
|
| + sync_status->SetString("name", name);
|
| + sync_status->SetString("iconURL", icon_url);
|
|
|
| return sync_status;
|
| }
|
|
|