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

Unified Diff: chrome/browser/extensions/api/principals_private/principals_private_api.cc

Issue 1806723003: [Extensions] Remove principalsPrivate API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove extraneous mods Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/principals_private/principals_private_api.cc
diff --git a/chrome/browser/extensions/api/principals_private/principals_private_api.cc b/chrome/browser/extensions/api/principals_private/principals_private_api.cc
deleted file mode 100644
index 867990d120f9f7e021831f55bf492ce7057a355d..0000000000000000000000000000000000000000
--- a/chrome/browser/extensions/api/principals_private/principals_private_api.cc
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/extensions/api/principals_private/principals_private_api.h"
-
-#include "chrome/browser/browser_process.h"
-#include "chrome/browser/profiles/avatar_menu.h"
-#include "chrome/browser/profiles/profile_window.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_window.h"
-#include "components/signin/core/browser/signin_header_helper.h"
-#include "components/signin/core/browser/signin_metrics.h"
-#include "components/signin/core/common/profile_management_switches.h"
-
-namespace extensions {
-
-bool PrincipalsPrivateExtensionFunction::RunSync() {
- if (!switches::IsEnableAccountConsistency()) {
- SetError(
- "Need to enable account consistency to use principalsPrivate API.");
- return false;
- }
- return RunSyncSafe();
-}
-
-bool PrincipalsPrivateSignOutFunction::RunSyncSafe() {
- Browser* browser = GetCurrentBrowser();
- if (browser) {
- profiles::LockProfile(browser->profile());
- }
- return true;
-}
-
-bool PrincipalsPrivateShowAvatarBubbleFunction::RunSyncSafe() {
- Browser* browser = GetCurrentBrowser();
- if (browser) {
- browser->window()->ShowAvatarBubbleFromAvatarButton(
- BrowserWindow::AVATAR_BUBBLE_MODE_ACCOUNT_MANAGEMENT,
- signin::ManageAccountsParams(),
- signin_metrics::AccessPoint::ACCESS_POINT_AVATAR_BUBBLE_SIGN_IN);
- }
- return true;
-}
-
-} // namespace extensions
« no previous file with comments | « chrome/browser/extensions/api/principals_private/principals_private_api.h ('k') | chrome/chrome_browser_extensions.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698