Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement update menu to trigger Lacros Data Migration.
If Lacros Data Migration can run, but it is not yet, we show the "update" icon at three-dot menu. Clicking it will check the disk space, and if it is enough relaunch Chrome to enter Lacros Data Migration mode. Otherwise, display the error message. BUG=1296174 TEST=Ran locally. Change-Id: Ied1dde0fc758b50353212d1ea2ea5ed5e9cf095d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3468884 Reviewed-by: Trent Apted <tapted@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Yuta Hijikata <ythjkt@chromium.org> Commit-Queue: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/main@{#984294}
- Loading branch information
Hidehiko Abe
authored and
Chromium LUCI CQ
committed
Mar 23, 2022
1 parent
0f6cd5b
commit eb06dc9
Showing
17 changed files
with
285 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
chrome/app/chromeos_strings_grdp/IDS_LACROS_DATA_MIGRATION_OUT_OF_DISK_ERROR_TEXT.png.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
22d35e002ba5b79cf11750e10feeba7f56c6bd5b |
1 change: 1 addition & 0 deletions
1
chrome/app/chromeos_strings_grdp/IDS_LACROS_DATA_MIGRATION_RELAUNCH.png.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
c376bfc2362a32dc3e72a9261ea6a1d4430228f6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
chrome/browser/ui/ash/browser_data_migration_error_dialog.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2022 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/ui/ash/browser_data_migration_error_dialog.h" | ||
|
||
#include <string> | ||
|
||
#include "chrome/browser/ui/simple_message_box.h" | ||
#include "chrome/grit/generated_resources.h" | ||
#include "ui/base/l10n/l10n_util.h" | ||
#include "ui/base/text/bytes_formatting.h" | ||
#include "ui/gfx/native_widget_types.h" | ||
|
||
namespace ash { | ||
|
||
void OpenBrowserDataMigrationErrorDialog(uint64_t required_size) { | ||
chrome::ShowWarningMessageBox( | ||
gfx::kNullNativeWindow, std::u16string(), | ||
l10n_util::GetStringFUTF16( | ||
IDS_LACROS_DATA_MIGRATION_OUT_OF_DISK_ERROR_TEXT, | ||
ui::FormatBytes(static_cast<int64_t>(required_size)))); | ||
} | ||
|
||
} // namespace ash |
18 changes: 18 additions & 0 deletions
18
chrome/browser/ui/ash/browser_data_migration_error_dialog.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright 2022 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. | ||
|
||
#ifndef CHROME_BROWSER_UI_ASH_BROWSER_DATA_MIGRATION_ERROR_DIALOG_H_ | ||
#define CHROME_BROWSER_UI_ASH_BROWSER_DATA_MIGRATION_ERROR_DIALOG_H_ | ||
|
||
#include <stdint.h> | ||
|
||
namespace ash { | ||
|
||
// Displays an error dialog to tell browser_data_migration error | ||
// due to out-of-disk. | ||
void OpenBrowserDataMigrationErrorDialog(uint64_t required_size); | ||
|
||
} // namespace ash | ||
|
||
#endif // CHROME_BROWSER_UI_ASH_BROWSER_DATA_MIGRATION_ERROR_DIALOG_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.