Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / frame / browser_non_client_frame_view.cc
index 73a8809..d83a382 100644 (file)
@@ -7,16 +7,17 @@
 #include "chrome/browser/browser_process.h"
 #include "chrome/browser/profiles/avatar_menu.h"
 #include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/profiles/profile_avatar_icon_util.h"
 #include "chrome/browser/profiles/profile_info_cache.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/profiles/profiles_state.h"
 #include "chrome/browser/ui/view_ids.h"
-#include "chrome/browser/ui/views/avatar_label.h"
-#include "chrome/browser/ui/views/avatar_menu_button.h"
 #include "chrome/browser/ui/views/frame/browser_view.h"
 #include "chrome/browser/ui/views/frame/taskbar_decorator.h"
-#include "chrome/browser/ui/views/new_avatar_button.h"
-#include "chrome/common/profile_management_switches.h"
+#include "chrome/browser/ui/views/profiles/avatar_label.h"
+#include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
+#include "chrome/browser/ui/views/profiles/new_avatar_button.h"
+#include "components/signin/core/common/profile_management_switches.h"
 #include "grit/generated_resources.h"
 #include "grit/theme_resources.h"
 #include "third_party/skia/include/core/SkColor.h"
@@ -91,9 +92,10 @@ void BrowserNonClientFrameView::UpdateAvatarInfo() {
   base::string16 text;
   bool is_rectangle = false;
   if (browser_view_->IsGuestSession()) {
-    avatar = rb.GetImageNamed(browser_view_->GetGuestIconResourceID());
+    avatar = rb.
+        GetImageNamed(profiles::GetPlaceholderAvatarIconResourceID());
   } else if (browser_view_->IsOffTheRecord()) {
-    avatar = rb.GetImageNamed(browser_view_->GetOTRIconResourceID());
+    avatar = rb.GetImageNamed(IDR_OTR_ICON);
     // TODO(nkostylev): Allow this on ChromeOS once the ChromeOS test
     // environment handles profile directories correctly.
 #if !defined(OS_CHROMEOS)
@@ -143,7 +145,7 @@ void BrowserNonClientFrameView::UpdateAvatarInfo() {
 void BrowserNonClientFrameView::UpdateNewStyleAvatarInfo(
     views::ButtonListener* listener,
     const NewAvatarButton::AvatarButtonStyle style) {
-  DCHECK(switches::IsNewProfileManagement());
+  DCHECK(switches::IsNewAvatarMenu());
   // This should never be called in incognito mode.
   DCHECK(browser_view_->IsRegularOrGuestSession());