summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 01:16:26 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-20 01:16:26 +0000
commitb15bc3e3d3c1aa31af7a772cc75dfdfe5f9c216e (patch)
treeb28b5e9c7d227fb34a1efdbf373de156cf4c91c6
parent543a79af21f69f050b7b640f6e93b3abc67830a7 (diff)
downloadchromium_src-b15bc3e3d3c1aa31af7a772cc75dfdfe5f9c216e.zip
chromium_src-b15bc3e3d3c1aa31af7a772cc75dfdfe5f9c216e.tar.gz
chromium_src-b15bc3e3d3c1aa31af7a772cc75dfdfe5f9c216e.tar.bz2
chromeos: Change bwsi to guest in a bunch of places.
BUG=chromium-os:7042 TEST=trybots Review URL: http://codereview.chromium.org/3795008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63156 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/chrome_dll_main.cc2
-rw-r--r--chrome/browser/chromeos/cros_settings_names.cc2
-rw-r--r--chrome/browser/chromeos/cros_settings_names.h2
-rw-r--r--chrome/browser/chromeos/cros_settings_provider_user.cc12
-rw-r--r--chrome/browser/chromeos/cros_settings_provider_user.h2
-rw-r--r--chrome/browser/chromeos/login/existing_user_controller.cc14
-rw-r--r--chrome/browser/chromeos/login/login_utils.cc6
-rw-r--r--chrome/browser/chromeos/login/user_controller.cc24
-rw-r--r--chrome/browser/chromeos/login/user_controller.h12
-rw-r--r--chrome/browser/chromeos/tab_closeable_state_watcher.cc11
-rw-r--r--chrome/browser/chromeos/tab_closeable_state_watcher.h4
-rw-r--r--chrome/browser/wrench_menu_model.cc4
-rw-r--r--chrome/common/chrome_switches.cc6
-rw-r--r--chrome/common/chrome_switches.h2
14 files changed, 52 insertions, 51 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index ca73937..d63c3ce 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -592,7 +592,7 @@ int ChromeMain(int argc, char** argv) {
}
#if defined(OS_CHROMEOS)
- if (parsed_command_line.HasSwitch(switches::kBWSI)) {
+ if (parsed_command_line.HasSwitch(switches::kGuestSession)) {
// Disable sync and extensions if we're in "browse without sign-in" mode.
CommandLine* singleton_command_line = CommandLine::ForCurrentProcess();
singleton_command_line->AppendSwitch(switches::kDisableSync);
diff --git a/chrome/browser/chromeos/cros_settings_names.cc b/chrome/browser/chromeos/cros_settings_names.cc
index 9f48495..a386847 100644
--- a/chrome/browser/chromeos/cros_settings_names.cc
+++ b/chrome/browser/chromeos/cros_settings_names.cc
@@ -8,7 +8,7 @@ namespace chromeos {
const char kCrosSettingsPrefix[] = "cros.";
-const char kAccountsPrefAllowBWSI[] = "cros.accounts.allowBWSI";
+const char kAccountsPrefAllowGuest[] = "cros.accounts.allowBWSI";
const char kAccountsPrefAllowNewUser[] = "cros.accounts.allowGuest";
const char kAccountsPrefShowUserNamesOnSignIn[]
= "cros.accounts.showUserNamesOnSignIn";
diff --git a/chrome/browser/chromeos/cros_settings_names.h b/chrome/browser/chromeos/cros_settings_names.h
index c28ec68..7fda3fe 100644
--- a/chrome/browser/chromeos/cros_settings_names.h
+++ b/chrome/browser/chromeos/cros_settings_names.h
@@ -10,7 +10,7 @@ namespace chromeos {
extern const char kCrosSettingsPrefix[];
-extern const char kAccountsPrefAllowBWSI[];
+extern const char kAccountsPrefAllowGuest[];
extern const char kAccountsPrefAllowNewUser[];
extern const char kAccountsPrefShowUserNamesOnSignIn[];
extern const char kAccountsPrefUsers[];
diff --git a/chrome/browser/chromeos/cros_settings_provider_user.cc b/chrome/browser/chromeos/cros_settings_provider_user.cc
index e5f4e94..f30e11b 100644
--- a/chrome/browser/chromeos/cros_settings_provider_user.cc
+++ b/chrome/browser/chromeos/cros_settings_provider_user.cc
@@ -70,7 +70,7 @@ bool GetUserWhitelist(ListValue* user_list) {
} // namespace
UserCrosSettingsProvider::UserCrosSettingsProvider() {
- StartFetchingBoolSetting(kAccountsPrefAllowBWSI);
+ StartFetchingBoolSetting(kAccountsPrefAllowGuest);
StartFetchingBoolSetting(kAccountsPrefAllowNewUser);
StartFetchingBoolSetting(kAccountsPrefShowUserNamesOnSignIn);
}
@@ -82,14 +82,14 @@ UserCrosSettingsProvider::~UserCrosSettingsProvider() {
void UserCrosSettingsProvider::RegisterPrefs(PrefService* local_state) {
// Cached signed settings values
- local_state->RegisterBooleanPref(kAccountsPrefAllowBWSI, true);
+ local_state->RegisterBooleanPref(kAccountsPrefAllowGuest, true);
local_state->RegisterBooleanPref(kAccountsPrefAllowNewUser, true);
local_state->RegisterBooleanPref(kAccountsPrefShowUserNamesOnSignIn, true);
local_state->RegisterListPref(kAccountsPrefUsers);
}
-bool UserCrosSettingsProvider::cached_allow_bwsi() {
- return g_browser_process->local_state()->GetBoolean(kAccountsPrefAllowBWSI);
+bool UserCrosSettingsProvider::cached_allow_guest() {
+ return g_browser_process->local_state()->GetBoolean(kAccountsPrefAllowGuest);
}
bool UserCrosSettingsProvider::cached_allow_new_user() {
@@ -125,7 +125,7 @@ void UserCrosSettingsProvider::Set(const std::string& path, Value* in_value) {
return;
}
- if (path == kAccountsPrefAllowBWSI ||
+ if (path == kAccountsPrefAllowGuest ||
path == kAccountsPrefAllowNewUser ||
path == kAccountsPrefShowUserNamesOnSignIn) {
bool bool_value = false;
@@ -146,7 +146,7 @@ void UserCrosSettingsProvider::Set(const std::string& path, Value* in_value) {
bool UserCrosSettingsProvider::Get(const std::string& path,
Value** out_value) const {
- if (path == kAccountsPrefAllowBWSI ||
+ if (path == kAccountsPrefAllowGuest ||
path == kAccountsPrefAllowNewUser ||
path == kAccountsPrefShowUserNamesOnSignIn) {
*out_value = CreateSettingsBooleanValue(
diff --git a/chrome/browser/chromeos/cros_settings_provider_user.h b/chrome/browser/chromeos/cros_settings_provider_user.h
index 0c7f9a1..215964a 100644
--- a/chrome/browser/chromeos/cros_settings_provider_user.h
+++ b/chrome/browser/chromeos/cros_settings_provider_user.h
@@ -27,7 +27,7 @@ class UserCrosSettingsProvider : public CrosSettingsProvider,
static void RegisterPrefs(PrefService* local_state);
// Helper functions to access cached settings.
- static bool cached_allow_bwsi();
+ static bool cached_allow_guest();
static bool cached_allow_new_user();
static bool cached_show_users_on_signin();
static const ListValue* cached_whitelist();
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc
index c3b038b..54f2a1b 100644
--- a/chrome/browser/chromeos/login/existing_user_controller.cc
+++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -91,7 +91,7 @@ void EnableTooltipsIfNeeded(const std::vector<UserController*>& controllers) {
const std::string& display_name =
controllers[i]->user().GetDisplayName();
bool show_tooltip = controllers[i]->is_new_user() ||
- controllers[i]->is_bwsi() ||
+ controllers[i]->is_guest() ||
visible_display_names[display_name] > 1;
controllers[i]->EnableNameTooltip(show_tooltip);
}
@@ -154,7 +154,7 @@ ExistingUserController::ExistingUserController(
}
}
- if (!controllers_.empty() && UserCrosSettingsProvider::cached_allow_bwsi())
+ if (!controllers_.empty() && UserCrosSettingsProvider::cached_allow_guest())
controllers_.push_back(new UserController(this, true));
// Add the view representing the new user.
@@ -179,12 +179,12 @@ void ExistingUserController::Init() {
background_window_->Show();
}
- // If there's only new user pod, show BWSI link on it.
- bool show_bwsi_link = controllers_.size() == 1;
+ // If there's only new user pod, show the guest session link on it.
+ bool show_guest_link = controllers_.size() == 1;
for (size_t i = 0; i < controllers_.size(); ++i) {
(controllers_[i])->Init(static_cast<int>(i),
static_cast<int>(controllers_.size()),
- show_bwsi_link);
+ show_guest_link);
}
EnableTooltipsIfNeeded(controllers_);
@@ -293,8 +293,8 @@ void ExistingUserController::WhiteListCheckFailed(const std::string& email) {
}
void ExistingUserController::LoginOffTheRecord() {
- // Check allow_bwsi in case this call is fired from key accelerator.
- if (!UserCrosSettingsProvider::cached_allow_bwsi())
+ // Check allow_guest in case this call is fired from key accelerator.
+ if (!UserCrosSettingsProvider::cached_allow_guest())
return;
// Disable clicking on other windows.
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 6a929d2..a818438 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -230,8 +230,8 @@ void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) {
UserManager::Get()->OffTheRecordUserLoggedIn();
if (CrosLibrary::Get()->EnsureLoaded()) {
- // For BWSI we ask session manager to restart Chrome with --bwsi flag.
- // We keep only some of the arguments of this process.
+ // For guest session we ask session manager to restart Chrome with --bwsi
+ // flag. We keep only some of the arguments of this process.
static const char* kForwardSwitches[] = {
switches::kLoggingLevel,
switches::kEnableLogging,
@@ -247,7 +247,7 @@ void LoginUtilsImpl::CompleteOffTheRecordLogin(const GURL& start_url) {
command_line.CopySwitchesFrom(browser_command_line,
kForwardSwitches,
arraysize(kForwardSwitches));
- command_line.AppendSwitch(switches::kBWSI);
+ command_line.AppendSwitch(switches::kGuestSession);
command_line.AppendSwitch(switches::kIncognito);
command_line.AppendSwitch(switches::kEnableTabbedOptions);
command_line.AppendSwitchASCII(
diff --git a/chrome/browser/chromeos/login/user_controller.cc b/chrome/browser/chromeos/login/user_controller.cc
index abc106a..ed542f4 100644
--- a/chrome/browser/chromeos/login/user_controller.cc
+++ b/chrome/browser/chromeos/login/user_controller.cc
@@ -133,11 +133,11 @@ const int UserController::kPadding = 20;
// Max size needed when an entry is not selected.
const int UserController::kUnselectedSize = 100;
-UserController::UserController(Delegate* delegate, bool is_bwsi)
+UserController::UserController(Delegate* delegate, bool is_guest)
: user_index_(-1),
is_user_selected_(false),
- is_new_user_(!is_bwsi),
- is_bwsi_(is_bwsi),
+ is_new_user_(!is_guest),
+ is_guest_(is_guest),
show_name_tooltip_(false),
delegate_(delegate),
controls_window_(NULL),
@@ -162,7 +162,7 @@ UserController::UserController(Delegate* delegate,
: user_index_(-1),
is_user_selected_(false),
is_new_user_(false),
- is_bwsi_(false),
+ is_guest_(false),
show_name_tooltip_(false),
user_(user),
delegate_(delegate),
@@ -222,7 +222,7 @@ void UserController::SetPasswordEnabled(bool enable) {
std::wstring UserController::GetNameTooltip() const {
if (is_new_user_)
return l10n_util::GetString(IDS_ADD_USER);
- if (is_bwsi_)
+ if (is_guest_)
return l10n_util::GetString(IDS_GO_INCOGNITO_BUTTON);
// Tooltip contains user's display name and his email domain to distinguish
@@ -255,7 +255,7 @@ void UserController::ClearAndEnablePassword() {
void UserController::ClearAndEnableFields() {
if (is_new_user_) {
new_user_view_->ClearAndEnableFields();
- } else if (is_bwsi_) {
+ } else if (is_guest_) {
guest_user_view_->FocusSignInButton();
} else {
ClearAndEnablePassword();
@@ -276,7 +276,7 @@ void UserController::EnableNameTooltip(bool enable) {
}
void UserController::ButtonPressed(views::Button* sender,
- const views::Event& event) {
+ const views::Event& event) {
Login();
}
@@ -318,7 +318,7 @@ void UserController::Observe(
}
void UserController::Login() {
- if (is_bwsi_) {
+ if (is_guest_) {
delegate_->LoginOffTheRecord();
} else {
// Delegate will reenable as necessary.
@@ -332,7 +332,7 @@ void UserController::IsActiveChanged(bool active) {
is_user_selected_ = active;
if (active) {
delegate_->OnUserSelected(this);
- user_view_->SetRemoveButtonVisible(!is_new_user_ && !is_bwsi_);
+ user_view_->SetRemoveButtonVisible(!is_new_user_ && !is_guest_);
// Background is NULL for inactive new user pod to make it transparent.
if (is_new_user_ && !border_window_->GetRootView()->background()) {
views::Painter* painter = CreateWizardPainter(
@@ -392,7 +392,7 @@ WidgetGtk* UserController::CreateControlsWindow(
new NewUserView(this, false, need_browse_without_signin);
new_user_view_->Init();
control_view = new_user_view_;
- } else if (is_bwsi_) {
+ } else if (is_guest_) {
guest_user_view_ = new GuestUserView(this);
guest_user_view_->RecreateFields();
control_view = guest_user_view_;
@@ -418,7 +418,7 @@ WidgetGtk* UserController::CreateControlsWindow(
WidgetGtk* UserController::CreateImageWindow(int index) {
user_view_ = new UserView(this, true, !is_new_user_);
- if (is_bwsi_) {
+ if (is_guest_) {
user_view_->SetImage(*ResourceBundle::GetSharedInstance().GetBitmapNamed(
IDR_LOGIN_GUEST));
} else if (is_new_user_) {
@@ -484,7 +484,7 @@ WidgetGtk* UserController::CreateLabelWindow(int index,
rb.GetFont(ResourceBundle::LargeFont).DeriveFont(0, gfx::Font::BOLD) :
rb.GetFont(ResourceBundle::BaseFont).DeriveFont(0, gfx::Font::BOLD);
std::wstring text;
- if (is_bwsi_) {
+ if (is_guest_) {
text = l10n_util::GetString(IDS_GUEST);
} else if (is_new_user_) {
// Add user should have label only in activated state.
diff --git a/chrome/browser/chromeos/login/user_controller.h b/chrome/browser/chromeos/login/user_controller.h
index 22aeda2..e73f701 100644
--- a/chrome/browser/chromeos/login/user_controller.h
+++ b/chrome/browser/chromeos/login/user_controller.h
@@ -57,8 +57,8 @@ class UserController : public views::ButtonListener,
virtual ~Delegate() {}
};
- // Creates a UserController representing new user or bwsi login.
- UserController(Delegate* delegate, bool is_bwsi);
+ // Creates a UserController representing new user or guest login.
+ UserController(Delegate* delegate, bool is_guest);
// Creates a UserController for the specified user.
UserController(Delegate* delegate, const UserManager::User& user);
@@ -77,7 +77,7 @@ class UserController : public views::ButtonListener,
int user_index() const { return user_index_; }
bool is_user_selected() const { return is_user_selected_; }
bool is_new_user() const { return is_new_user_; }
- bool is_bwsi() const { return is_bwsi_; }
+ bool is_guest() const { return is_guest_; }
NewUserView* new_user_view() const { return new_user_view_; }
const UserManager::User& user() const { return user_; }
@@ -181,14 +181,14 @@ class UserController : public views::ButtonListener,
// Is this the new user pod?
const bool is_new_user_;
- // Is this the bwsi pod?
- const bool is_bwsi_;
+ // Is this the guest pod?
+ const bool is_guest_;
// Should we show tooltips above user image and label to help distinguish
// users with the same display name.
bool show_name_tooltip_;
- // If is_new_user_ and is_bwsi_ are false, this is the user being shown.
+ // If is_new_user_ and is_guest_ are false, this is the user being shown.
UserManager::User user_;
Delegate* delegate_;
diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.cc b/chrome/browser/chromeos/tab_closeable_state_watcher.cc
index 9346e86..e54f374 100644
--- a/chrome/browser/chromeos/tab_closeable_state_watcher.cc
+++ b/chrome/browser/chromeos/tab_closeable_state_watcher.cc
@@ -63,8 +63,9 @@ void TabCloseableStateWatcher::TabStripWatcher::TabChangedAt(
TabCloseableStateWatcher::TabCloseableStateWatcher()
: can_close_tab_(true),
signing_off_(false),
- bwsi_session_(
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kBWSI)) {
+ guest_session_(
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kGuestSession)) {
BrowserList::AddObserver(this);
notification_registrar_.Add(this, NotificationType::APP_EXITING,
NotificationService::AllSources());
@@ -185,7 +186,7 @@ void TabCloseableStateWatcher::CheckAndUpdateState(
} else { // There's only 1 normal browser.
if (!browser_to_check)
browser_to_check = tabstrip_watchers_[0]->browser();
- if (browser_to_check->profile()->IsOffTheRecord() && !bwsi_session_) {
+ if (browser_to_check->profile()->IsOffTheRecord() && !guest_session_) {
new_can_close = true;
} else {
TabStripModel* tabstrip_model = browser_to_check->tabstrip_model();
@@ -231,8 +232,8 @@ bool TabCloseableStateWatcher::CanCloseBrowserImpl(const Browser* browser,
return true;
// If last normal browser is incognito, open a non-incognito window,
- // and allow closing of incognito one (if not BWSI).
- if (browser->profile()->IsOffTheRecord() && !bwsi_session_) {
+ // and allow closing of incognito one (if not guest).
+ if (browser->profile()->IsOffTheRecord() && !guest_session_) {
*action_type = OPEN_WINDOW;
return true;
}
diff --git a/chrome/browser/chromeos/tab_closeable_state_watcher.h b/chrome/browser/chromeos/tab_closeable_state_watcher.h
index 737cf46..4e028af 100644
--- a/chrome/browser/chromeos/tab_closeable_state_watcher.h
+++ b/chrome/browser/chromeos/tab_closeable_state_watcher.h
@@ -98,8 +98,8 @@ class TabCloseableStateWatcher : public ::TabCloseableStateWatcher,
// allow closing of all tabs and browsers in this situation.
bool signing_off_;
- // In BWSI session?
- bool bwsi_session_;
+ // Is in guest session?
+ bool guest_session_;
NotificationRegistrar notification_registrar_;
diff --git a/chrome/browser/wrench_menu_model.cc b/chrome/browser/wrench_menu_model.cc
index 61045a5..d308a4d 100644
--- a/chrome/browser/wrench_menu_model.cc
+++ b/chrome/browser/wrench_menu_model.cc
@@ -250,7 +250,7 @@ bool WrenchMenuModel::IsCommandIdEnabled(int command_id) const {
// Special case because IDC_NEW_WINDOW item should be disabled in BWSI mode,
// but accelerator should work.
if (command_id == IDC_NEW_WINDOW &&
- CommandLine::ForCurrentProcess()->HasSwitch(switches::kBWSI))
+ CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession))
return false;
#endif
@@ -399,7 +399,7 @@ void WrenchMenuModel::Build() {
if (browser_defaults::kShowExitMenuItem) {
AddSeparator();
#if defined(OS_CHROMEOS)
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kBWSI)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kGuestSession)) {
AddItemWithStringId(IDC_EXIT, IDS_EXIT_GUEST_MODE);
} else {
AddItemWithStringId(IDC_EXIT, IDS_SIGN_OUT);
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index ef593e9..b8026f5 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -1155,9 +1155,9 @@ const char kChromeosFrame[] = "chromeos-frame";
// Use the given language for UI in the input method candidate window.
const char kCandidateWindowLang[] = "lang";
-// Indicates that the browser is in "browse without sign-in" mode.
-// Should completely disable extensions, sync and bookmarks.
-const char kBWSI[] = "bwsi";
+// Indicates that the browser is in "browse without sign-in" (Guest session)
+// mode. Should completely disable extensions, sync and bookmarks.
+const char kGuestSession[] = "bwsi";
// Indicates that stub implementations of the libcros library should be used.
// This is typically used to test the chromeos build of chrome on the desktop.
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 1dcdc37..5a787e1 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -329,7 +329,7 @@ extern const char kLoginPassword[];
extern const char kParallelAuth[];
extern const char kChromeosFrame[];
extern const char kCandidateWindowLang[];
-extern const char kBWSI[];
+extern const char kGuestSession[];
extern const char kStubCros[];
extern const char kScreenSaverUrl[];
extern const char kCompressSystemFeedback[];