Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: ash/shell.cc

Issue 2795863002: Disable Shell from connecting to prefs service (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/shell.h" 5 #include "ash/shell.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 789
790 void Shell::Init(const ShellInitParams& init_params) { 790 void Shell::Init(const ShellInitParams& init_params) {
791 const bool is_mash = wm_shell_->IsRunningInMash(); 791 const bool is_mash = wm_shell_->IsRunningInMash();
792 const Config config = wm_shell_->GetConfig(); 792 const Config config = wm_shell_->GetConfig();
793 793
794 blocking_pool_ = init_params.blocking_pool; 794 blocking_pool_ = init_params.blocking_pool;
795 795
796 wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate(); 796 wallpaper_delegate_ = shell_delegate_->CreateWallpaperDelegate();
797 797
798 // Can be null in tests. 798 // Can be null in tests.
799 // TODO(jonross): reenable once the cause of crbug.com/707321 is determined.
800 /*
799 if (wm_shell_->IsRunningInMash() && shell_delegate_->GetShellConnector()) { 801 if (wm_shell_->IsRunningInMash() && shell_delegate_->GetShellConnector()) {
800 prefs::ConnectToPrefService( 802 prefs::ConnectToPrefService(
801 shell_delegate_->GetShellConnector(), 803 shell_delegate_->GetShellConnector(),
802 make_scoped_refptr(new PrefRegistrySimple()), 804 make_scoped_refptr(new PrefRegistrySimple()),
803 base::Bind(&Shell::OnPrefServiceInitialized, base::Unretained(this)), 805 base::Bind(&Shell::OnPrefServiceInitialized, base::Unretained(this)),
804 prefs::mojom::kForwarderServiceName); 806 prefs::mojom::kForwarderServiceName);
805 } 807 }*/
806 808
807 // Some delegates access WmShell during their construction. Create them here 809 // Some delegates access WmShell during their construction. Create them here
808 // instead of the WmShell constructor. 810 // instead of the WmShell constructor.
809 accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate()); 811 accessibility_delegate_.reset(shell_delegate_->CreateAccessibilityDelegate());
810 palette_delegate_ = shell_delegate_->CreatePaletteDelegate(); 812 palette_delegate_ = shell_delegate_->CreatePaletteDelegate();
811 toast_manager_ = base::MakeUnique<ToastManager>(); 813 toast_manager_ = base::MakeUnique<ToastManager>();
812 814
813 // Install the custom factory early on so that views::FocusManagers for Tray, 815 // Install the custom factory early on so that views::FocusManagers for Tray,
814 // Shelf, and WallPaper could be created by the factory. 816 // Shelf, and WallPaper could be created by the factory.
815 views::FocusManagerFactory::Install(new AshFocusManagerFactory); 817 views::FocusManagerFactory::Install(new AshFocusManagerFactory);
(...skipping 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1254
1253 void Shell::OnPrefServiceInitialized( 1255 void Shell::OnPrefServiceInitialized(
1254 std::unique_ptr<::PrefService> pref_service) { 1256 std::unique_ptr<::PrefService> pref_service) {
1255 if (!instance_) 1257 if (!instance_)
1256 return; 1258 return;
1257 DCHECK(pref_service); 1259 DCHECK(pref_service);
1258 pref_service_ = std::move(pref_service); 1260 pref_service_ = std::move(pref_service);
1259 } 1261 }
1260 1262
1261 } // namespace ash 1263 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698