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

Side by Side Diff: chrome/browser/extensions/api/principals_private/principals_private_api.cc

Issue 235813002: Add profile-switches to signin-internals; move switches to component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/extensions/api/principals_private/principals_private_ap i.h" 5 #include "chrome/browser/extensions/api/principals_private/principals_private_ap i.h"
6 6
7 #include "chrome/browser/browser_process.h" 7 #include "chrome/browser/browser_process.h"
8 #include "chrome/browser/profiles/avatar_menu.h" 8 #include "chrome/browser/profiles/avatar_menu.h"
9 #include "chrome/browser/profiles/profile_window.h" 9 #include "chrome/browser/profiles/profile_window.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
11 #include "chrome/browser/ui/browser_window.h" 11 #include "chrome/browser/ui/browser_window.h"
12 #include "chrome/common/profile_management_switches.h" 12 #include "components/signin/core/common/profile_management_switches.h"
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 bool PrincipalsPrivateExtensionFunction::RunImpl() { 16 bool PrincipalsPrivateExtensionFunction::RunImpl() {
17 if (!switches::IsNewProfileManagement()) { 17 if (!switches::IsNewProfileManagement()) {
18 SetError( 18 SetError(
19 "Need to enable new-profile-management to use principalsPrivate API."); 19 "Need to enable new-profile-management to use principalsPrivate API.");
20 return false; 20 return false;
21 } 21 }
22 return RunImplSafe(); 22 return RunImplSafe();
(...skipping 10 matching lines...) Expand all
33 bool PrincipalsPrivateShowAvatarBubbleFunction::RunImplSafe() { 33 bool PrincipalsPrivateShowAvatarBubbleFunction::RunImplSafe() {
34 Browser* browser = GetCurrentBrowser(); 34 Browser* browser = GetCurrentBrowser();
35 if (browser) { 35 if (browser) {
36 browser->window()->ShowAvatarBubbleFromAvatarButton( 36 browser->window()->ShowAvatarBubbleFromAvatarButton(
37 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT); 37 BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT);
38 } 38 }
39 return true; 39 return true;
40 } 40 }
41 41
42 } // namespace extensions 42 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/password_manager/save_password_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698