Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / frame / browser_non_client_frame_view.cc
index ac0fda3..041e4dd 100644 (file)
@@ -21,7 +21,6 @@
 #include "grit/generated_resources.h"
 #include "grit/theme_resources.h"
 #include "third_party/skia/include/core/SkColor.h"
-#include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
 #include "ui/base/theme_provider.h"
 #include "ui/gfx/image/image.h"
@@ -47,7 +46,7 @@ void BrowserNonClientFrameView::VisibilityChanged(views::View* starting_from,
   // DrawTaskBarDecoration() has no effect. Therefore we need to call it again
   // once the window is visible.
   if (!browser_view_->IsRegularOrGuestSession() ||
-      !switches::IsNewProfileManagement())
+      !switches::IsNewAvatarMenu())
     UpdateAvatarInfo();
 }
 
@@ -149,7 +148,7 @@ void BrowserNonClientFrameView::UpdateNewStyleAvatarInfo(
   if (browser_view_->ShouldShowAvatar()) {
     if (!new_avatar_button_) {
       base::string16 profile_name = profiles::GetAvatarNameForProfile(
-          browser_view_->browser()->profile());
+          browser_view_->browser()->profile()->GetPath());
       new_avatar_button_ = new NewAvatarButton(
           listener, profile_name, style, browser_view_->browser());
       new_avatar_button_->set_id(VIEW_ID_NEW_AVATAR_BUTTON);