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

Unified Diff: ash/common/system/user/login_status.cc

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 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
« no previous file with comments | « ash/common/system/user/login_status.h ('k') | ash/common/system/user/rounded_image_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/login_status.cc
diff --git a/ash/common/system/user/login_status.cc b/ash/common/system/user/login_status.cc
deleted file mode 100644
index 742bb91ecd361489c63cbcc05ad0363bf519c2e0..0000000000000000000000000000000000000000
--- a/ash/common/system/user/login_status.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 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 "ash/common/system/user/login_status.h"
-
-#include "ash/common/session/session_state_delegate.h"
-#include "ash/common/wm_shell.h"
-#include "ash/strings/grit/ash_strings.h"
-#include "base/strings/string_util.h"
-#include "base/strings/utf_string_conversions.h"
-#include "ui/base/resource/resource_bundle.h"
-
-namespace ash {
-namespace user {
-
-base::string16 GetLocalizedSignOutStringForStatus(LoginStatus status,
- bool multiline) {
- int message_id;
- switch (status) {
- case LoginStatus::GUEST:
- message_id = IDS_ASH_STATUS_TRAY_EXIT_GUEST;
- break;
- case LoginStatus::PUBLIC:
- message_id = IDS_ASH_STATUS_TRAY_EXIT_PUBLIC;
- break;
- default:
- message_id =
- WmShell::Get()->GetSessionStateDelegate()->NumberOfLoggedInUsers() > 1
- ? IDS_ASH_STATUS_TRAY_SIGN_OUT_ALL
- : IDS_ASH_STATUS_TRAY_SIGN_OUT;
- break;
- }
- base::string16 message =
- ui::ResourceBundle::GetSharedInstance().GetLocalizedString(message_id);
- // Desirable line breaking points are marked using \n. As the resource
- // framework does not evaluate escape sequences, the \n need to be explicitly
- // handled. Depending on the value of |multiline|, actual line breaks or
- // spaces are substituted.
- base::string16 newline =
- multiline ? base::ASCIIToUTF16("\n") : base::ASCIIToUTF16(" ");
- base::ReplaceSubstringsAfterOffset(&message, 0, base::ASCIIToUTF16("\\n"),
- newline);
- return message;
-}
-
-} // namespace user
-} // namespace ash
« no previous file with comments | « ash/common/system/user/login_status.h ('k') | ash/common/system/user/rounded_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698