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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service.cc

Issue 2177663002: mash: Move ownership of ShelfDelegate to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix wallpaper tests again Created 4 years, 5 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/chromeos/arc/arc_auth_service.h" 5 #include "chrome/browser/chromeos/arc/arc_auth_service.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/shelf/shelf_delegate.h" 9 #include "ash/common/shelf/shelf_delegate.h"
10 #include "ash/shell.h" 10 #include "ash/common/wm_shell.h"
11 #include "base/auto_reset.h" 11 #include "base/auto_reset.h"
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/command_line.h" 13 #include "base/command_line.h"
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/strings/string16.h" 15 #include "base/strings/string16.h"
16 #include "chrome/browser/chromeos/arc/arc_android_management_checker.h" 16 #include "chrome/browser/chromeos/arc/arc_android_management_checker.h"
17 #include "chrome/browser/chromeos/arc/arc_auth_context.h" 17 #include "chrome/browser/chromeos/arc/arc_auth_context.h"
18 #include "chrome/browser/chromeos/arc/arc_auth_notification.h" 18 #include "chrome/browser/chromeos/arc/arc_auth_notification.h"
19 #include "chrome/browser/chromeos/arc/arc_optin_uma.h" 19 #include "chrome/browser/chromeos/arc/arc_optin_uma.h"
20 #include "chrome/browser/chromeos/arc/arc_support_host.h" 20 #include "chrome/browser/chromeos/arc/arc_support_host.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 } 75 }
76 76
77 bool IsArcDisabledForEnterprise() { 77 bool IsArcDisabledForEnterprise() {
78 return base::CommandLine::ForCurrentProcess()->HasSwitch( 78 return base::CommandLine::ForCurrentProcess()->HasSwitch(
79 chromeos::switches::kEnterpriseDisableArc); 79 chromeos::switches::kEnterpriseDisableArc);
80 } 80 }
81 81
82 ash::ShelfDelegate* GetShelfDelegate() { 82 ash::ShelfDelegate* GetShelfDelegate() {
83 if (g_shelf_delegate_for_testing) 83 if (g_shelf_delegate_for_testing)
84 return g_shelf_delegate_for_testing; 84 return g_shelf_delegate_for_testing;
85 if (ash::Shell::HasInstance()) 85 if (ash::WmShell::HasInstance()) {
86 return ash::Shell::GetInstance()->GetShelfDelegate(); 86 DCHECK(ash::WmShell::Get()->shelf_delegate());
87 return ash::WmShell::Get()->shelf_delegate();
88 }
87 return nullptr; 89 return nullptr;
88 } 90 }
89 91
90 } // namespace 92 } // namespace
91 93
92 ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service) 94 ArcAuthService::ArcAuthService(ArcBridgeService* bridge_service)
93 : ArcService(bridge_service), binding_(this), weak_ptr_factory_(this) { 95 : ArcService(bridge_service), binding_(this), weak_ptr_factory_(this) {
94 DCHECK_CURRENTLY_ON(content::BrowserThread::UI); 96 DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
95 DCHECK(!g_arc_auth_service); 97 DCHECK(!g_arc_auth_service);
96 98
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after
762 return os << kStateFetchingCode; 764 return os << kStateFetchingCode;
763 case ArcAuthService::State::ACTIVE: 765 case ArcAuthService::State::ACTIVE:
764 return os << kStateActive; 766 return os << kStateActive;
765 default: 767 default:
766 NOTREACHED(); 768 NOTREACHED();
767 return os; 769 return os;
768 } 770 }
769 } 771 }
770 772
771 } // namespace arc 773 } // namespace arc
OLDNEW
« no previous file with comments | « ash/test/test_shelf_delegate.h ('k') | chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698