Index: ash/shell/content_client/shell_browser_main_parts.cc |
diff --git a/ash/shell/content_client/shell_browser_main_parts.cc b/ash/shell/content_client/shell_browser_main_parts.cc |
index 8c2a37a3e3f75056727a3d9e613fe8cabcead959..9460486a4875842642d3c38a86633ba119e300e6 100644 |
--- a/ash/shell/content_client/shell_browser_main_parts.cc |
+++ b/ash/shell/content_client/shell_browser_main_parts.cc |
@@ -18,6 +18,7 @@ |
#include "base/strings/string_number_conversions.h" |
#include "base/threading/thread.h" |
#include "base/threading/thread_restrictions.h" |
+#include "content/public/browser/context_factory.h" |
#include "content/public/common/content_switches.h" |
#include "content/shell/browser/shell_browser_context.h" |
#include "content/shell/browser/shell_net_log.h" |
@@ -108,8 +109,10 @@ void ShellBrowserMainParts::PreMainMessageLoopRun() { |
false, net_log_.get())); |
// A ViewsDelegate is required. |
- if (!views::ViewsDelegate::views_delegate) |
- views::ViewsDelegate::views_delegate = new ShellViewsDelegate; |
+ if (!views::ViewsDelegate::views_delegate) { |
+ ShellViewsDelegate* views_delegate = new ShellViewsDelegate; |
+ views_delegate->set_context_factory(content::GetContextFactory()); |
+ } |
delegate_ = new ash::shell::ShellDelegateImpl; |
// The global message center state must be initialized absent |