Skip to content

Commit

Permalink
Change namespace chromeos => ash for //c/b/ash/full_restore
Browse files Browse the repository at this point in the history
Code in //chrome/browser/ash/full_restore is a part of the ash-chrome,
so namespace is changed to ash from chromeos.

To avoid churn during other namespace transitions in future, this CL has
temporary 'using' declarations.

This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE.

Change-Id: I203e9b7378df2e6081d581f88caa7f4538d42190
Bug: 1164001
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3054274
Commit-Queue: Yeunjoo Choi <ychoi@igalia.com>
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Owners-Override: Hidehiko Abe <hidehiko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#906495}
  • Loading branch information
duswnchl authored and Chromium LUCI CQ committed Jul 29, 2021
1 parent 1122a46 commit 0842edf
Show file tree
Hide file tree
Showing 53 changed files with 129 additions and 134 deletions.
2 changes: 1 addition & 1 deletion ash/shell_delegate.h
Expand Up @@ -139,7 +139,7 @@ class ASH_EXPORT ShellDelegate {
// data can be constructed, which can happen if the |window| does not have
// an app id associated with it, or we're not in the primary active user
// session.
virtual std::unique_ptr<full_restore::AppLaunchInfo>
virtual std::unique_ptr<::full_restore::AppLaunchInfo>
GetAppLaunchDataForDeskTemplate(aura::Window* window) const = 0;
};

Expand Down
2 changes: 1 addition & 1 deletion ash/test_shell_delegate.cc
Expand Up @@ -93,7 +93,7 @@ base::FilePath TestShellDelegate::GetPrimaryUserDownloadsFolder() const {
return base::FilePath();
}

std::unique_ptr<full_restore::AppLaunchInfo>
std::unique_ptr<::full_restore::AppLaunchInfo>
TestShellDelegate::GetAppLaunchDataForDeskTemplate(aura::Window* window) const {
return nullptr;
}
Expand Down
4 changes: 2 additions & 2 deletions ash/test_shell_delegate.h
Expand Up @@ -55,8 +55,8 @@ class TestShellDelegate : public ShellDelegate {
bool IsLoggingRedirectDisabled() const override;
base::FilePath GetPrimaryUserDownloadsFolder() const override;
void OpenFeedbackPageForPersistentDesksBar() override {}
std::unique_ptr<full_restore::AppLaunchInfo> GetAppLaunchDataForDeskTemplate(
aura::Window* window) const override;
std::unique_ptr<::full_restore::AppLaunchInfo>
GetAppLaunchDataForDeskTemplate(aura::Window* window) const override;

private:
// True if the current top window can go back.
Expand Down
2 changes: 1 addition & 1 deletion ash/wm/desks/desks_controller.cc
Expand Up @@ -878,7 +878,7 @@ std::unique_ptr<DeskTemplate> DesksController::CaptureActiveDeskAsTemplate()
auto mru_windows =
shell->mru_window_tracker()->BuildMruWindowList(kActiveDesk);
for (auto* window : mru_windows) {
std::unique_ptr<full_restore::AppLaunchInfo> app_launch_info =
std::unique_ptr<::full_restore::AppLaunchInfo> app_launch_info =
shell->shell_delegate()->GetAppLaunchDataForDeskTemplate(window);
if (!app_launch_info)
continue;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/arc/session/arc_service_launcher.cc
Expand Up @@ -253,7 +253,7 @@ void ArcServiceLauncher::OnPrimaryUserProfilePrepared(Profile* profile) {
CertStoreService::GetForBrowserContext(profile);
apps::ArcAppsFactory::GetForProfile(profile);
ash::ApkWebAppService::Get(profile);
chromeos::full_restore::FullRestoreArcTaskHandler::GetForProfile(profile);
ash::full_restore::FullRestoreArcTaskHandler::GetForProfile(profile);

// ARC Container-only services.
if (!arc::IsArcVmEnabled()) {
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ash/full_restore/app_launch_handler.cc
Expand Up @@ -22,7 +22,7 @@
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"

namespace chromeos {
namespace ash {

namespace {

Expand Down Expand Up @@ -213,4 +213,4 @@ void AppLaunchHandler::LaunchSystemWebAppOrChromeApp(
}
}

} // namespace chromeos
} // namespace ash
6 changes: 3 additions & 3 deletions chrome/browser/ash/full_restore/app_launch_handler.h
Expand Up @@ -13,11 +13,11 @@
namespace apps {
class AppUpdate;
enum class AppTypeName;
}
} // namespace apps

class Profile;

namespace chromeos {
namespace ash {

// The AppLaunchHandler class launches apps from `restore_data_` as well as
// observes app updates.
Expand Down Expand Up @@ -62,6 +62,6 @@ class AppLaunchHandler : public apps::AppRegistryCache::Observer {
virtual void RecordRestoredAppLaunch(apps::AppTypeName app_type_name) = 0;
};

} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_APP_LAUNCH_HANDLER_H_
4 changes: 2 additions & 2 deletions chrome/browser/ash/full_restore/arc_app_launch_handler.cc
Expand Up @@ -75,7 +75,7 @@ constexpr char kArcGhostWindowLaunchHistogram[] = "Apps.ArcGhostWindowLaunch";

} // namespace

namespace chromeos {
namespace ash {
namespace full_restore {

ArcAppLaunchHandler::ArcAppLaunchHandler() {
Expand Down Expand Up @@ -747,4 +747,4 @@ void ArcAppLaunchHandler::RecordArcGhostWindowLaunch(bool is_arc_ghost_window) {
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
7 changes: 4 additions & 3 deletions chrome/browser/ash/full_restore/arc_app_launch_handler.h
Expand Up @@ -27,7 +27,7 @@ namespace apps {
class AppUpdate;
} // namespace apps

namespace chromeos {
namespace ash {
namespace full_restore {

class ArcAppLaunchHandlerArcAppBrowserTest;
Expand Down Expand Up @@ -234,7 +234,8 @@ class ArcAppLaunchHandler : public apps::AppRegistryCache::Observer,

bool should_apply_cpu_restirction_ = false;

mojo::Remote<cros_healthd::mojom::CrosHealthdProbeService> probe_service_;
mojo::Remote<chromeos::cros_healthd::mojom::CrosHealthdProbeService>
probe_service_;

// Cpu usage rate count window. It save the cpu usage in a time interval.
std::list<CpuTick> cpu_tick_window_;
Expand All @@ -253,6 +254,6 @@ class ArcAppLaunchHandler : public apps::AppRegistryCache::Observer,
};

} // namespace full_restore
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_ARC_APP_LAUNCH_HANDLER_H_
8 changes: 4 additions & 4 deletions chrome/browser/ash/full_restore/arc_ghost_window_delegate.cc
Expand Up @@ -10,14 +10,14 @@

namespace {
const int kNullWindowState = -1;
}
} // namespace

namespace chromeos {
namespace ash {
namespace full_restore {

ArcGhostWindowDelegate::ArcGhostWindowDelegate(
exo::ClientControlledShellSurface* shell_surface,
chromeos::full_restore::ArcWindowHandler* handler,
ArcWindowHandler* handler,
int window_id,
int64_t display_id,
gfx::Rect bounds)
Expand Down Expand Up @@ -169,4 +169,4 @@ void ArcGhostWindowDelegate::UpdateWindowInfoToArc() {
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
11 changes: 5 additions & 6 deletions chrome/browser/ash/full_restore/arc_ghost_window_delegate.h
Expand Up @@ -10,18 +10,18 @@
#include "components/exo/client_controlled_shell_surface.h"
#include "ui/gfx/geometry/rect.h"

namespace chromeos {
namespace ash {
namespace full_restore {

// The ArcGhostWindowDelegate class is a self controlled shell surface delegate
// to handle ARC ghost windows, e.g. when window bounds or window state is
// changed, notify ARC.
class ArcGhostWindowDelegate
: public exo::ClientControlledShellSurface::Delegate,
public chromeos::full_restore::ArcWindowHandler::Observer {
public ArcWindowHandler::Observer {
public:
ArcGhostWindowDelegate(exo::ClientControlledShellSurface* shell_surface,
chromeos::full_restore::ArcWindowHandler* handler,
ArcWindowHandler* handler,
int window_id,
int64_t display_id,
gfx::Rect bounds);
Expand Down Expand Up @@ -64,12 +64,11 @@ class ArcGhostWindowDelegate
exo::ClientControlledShellSurface* shell_surface_;

ArcWindowHandler* arc_handler_;
base::ScopedObservation<chromeos::full_restore::ArcWindowHandler,
chromeos::full_restore::ArcWindowHandler::Observer>
base::ScopedObservation<ArcWindowHandler, ArcWindowHandler::Observer>
observation_{this};
};

} // namespace full_restore
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_ARC_GHOST_WINDOW_DELEGATE_H_
Expand Up @@ -16,12 +16,10 @@
#include "ui/views/window/caption_button_types.h"

namespace {

constexpr int kDiameter = 24;

} // namespace

namespace chromeos {
namespace ash {
namespace full_restore {

std::unique_ptr<exo::ClientControlledShellSurface> InitArcGhostWindow(
Expand Down Expand Up @@ -155,4 +153,4 @@ void ArcGhostWindowShellSurface::SetShellAppId(
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
Expand Up @@ -10,7 +10,7 @@
#include "components/exo/client_controlled_shell_surface.h"
#include "ui/gfx/geometry/rect.h"

namespace chromeos {
namespace ash {
namespace full_restore {

class ArcWindowHandler;
Expand Down Expand Up @@ -58,6 +58,6 @@ class ArcGhostWindowShellSurface : public exo::ClientControlledShellSurface {
};

} // namespace full_restore
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_ARC_GHOST_WINDOW_SHELL_SURFACE_H_
6 changes: 3 additions & 3 deletions chrome/browser/ash/full_restore/arc_ghost_window_view.cc
Expand Up @@ -55,7 +55,7 @@ class Throbber : public views::View {

} // namespace

namespace chromeos {
namespace ash {
namespace full_restore {

ArcGhostWindowView::ArcGhostWindowView(int throbber_diameter,
Expand Down Expand Up @@ -88,7 +88,7 @@ void ArcGhostWindowView::InitLayout(uint32_t theme_color, int diameter) {
}

void ArcGhostWindowView::LoadIcon(const std::string& app_id) {
Profile* profile = chromeos::ProfileHelper::Get()->GetProfileByAccountId(
Profile* profile = ProfileHelper::Get()->GetProfileByAccountId(
user_manager::UserManager::Get()->GetPrimaryUser()->GetAccountId());
DCHECK(profile);

Expand Down Expand Up @@ -120,4 +120,4 @@ void ArcGhostWindowView::OnIconLoaded(apps::mojom::IconType icon_type,
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
6 changes: 3 additions & 3 deletions chrome/browser/ash/full_restore/arc_ghost_window_view.h
Expand Up @@ -11,9 +11,9 @@

namespace views {
class ImageView;
}
} // namespace views

namespace chromeos {
namespace ash {
namespace full_restore {

// The view of ARC ghost window content. It shows the icon of app and a
Expand Down Expand Up @@ -43,6 +43,6 @@ class ArcGhostWindowView : public views::View {
};

} // namespace full_restore
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_ARC_GHOST_WINDOW_VIEW_H_
Expand Up @@ -25,7 +25,7 @@
#include "ui/views/test/scoped_views_test_helper.h"
#include "ui/views/test/views_test_base.h"

namespace chromeos {
namespace ash {
namespace full_restore {

namespace {
Expand Down Expand Up @@ -128,4 +128,4 @@ TEST_F(ArcGhostWindowViewTest, IconLoadTest) {
#endif

} // namespace full_restore
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/full_restore/arc_window_handler.cc
Expand Up @@ -14,7 +14,7 @@
#include "components/full_restore/full_restore_utils.h"
#include "ui/views/window/caption_button_layout_constants.h"

namespace chromeos {
namespace ash {
namespace full_restore {

ArcWindowHandler::WindowSessionResolver::WindowSessionResolver(
Expand Down Expand Up @@ -142,4 +142,4 @@ void ArcWindowHandler::OnWindowInfoUpdated(int window_id,
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
6 changes: 3 additions & 3 deletions chrome/browser/ash/full_restore/arc_window_handler.h
Expand Up @@ -14,9 +14,9 @@

namespace full_restore {
struct AppRestoreData;
}
} // namespace full_restore

namespace chromeos {
namespace ash {
namespace full_restore {

// The ArcWindowHandler class provides control for ARC ghost window.
Expand Down Expand Up @@ -98,6 +98,6 @@ class ArcWindowHandler {
};

} // namespace full_restore
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_ARC_WINDOW_HANDLER_H_
4 changes: 2 additions & 2 deletions chrome/browser/ash/full_restore/arc_window_utils.cc
Expand Up @@ -27,7 +27,7 @@ void ScaleToRoundedRect(apps::mojom::Rect* rect, double scale_factor) {

} // namespace

namespace chromeos {
namespace ash {
namespace full_restore {

bool IsArcGhostWindowEnabled() {
Expand Down Expand Up @@ -75,4 +75,4 @@ const std::string WindowIdToAppId(int window_id) {
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
4 changes: 2 additions & 2 deletions chrome/browser/ash/full_restore/arc_window_utils.h
Expand Up @@ -8,7 +8,7 @@
#include "components/services/app_service/public/mojom/types.mojom.h"
#include "third_party/abseil-cpp/absl/types/optional.h"

namespace chromeos {
namespace ash {
namespace full_restore {

absl::optional<double> GetDisplayScaleFactor(int64_t display_id);
Expand All @@ -34,6 +34,6 @@ bool IsValidThemeColor(uint32_t theme_color);
const std::string WindowIdToAppId(int window_id);

} // namespace full_restore
} // namespace chromeos
} // namespace ash

#endif // CHROME_BROWSER_ASH_FULL_RESTORE_ARC_WINDOW_UTILS_H_
4 changes: 2 additions & 2 deletions chrome/browser/ash/full_restore/arc_window_utils_unittest.cc
Expand Up @@ -19,7 +19,7 @@ const int TEST_DISPLAY_HEIGHT = 1440;
const double TEST_SCALE_FACTOR = 2.0;
} // namespace

namespace chromeos {
namespace ash {
namespace full_restore {

class ArcWindowUtilsTest : public testing::Test {
Expand Down Expand Up @@ -97,4 +97,4 @@ TEST_F(ArcWindowUtilsTest, ArcWindowInfoValidDisplayAndBoundsTest) {
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash
Expand Up @@ -27,7 +27,7 @@
#include "components/full_restore/full_restore_save_handler.h"
#include "extensions/common/constants.h"

namespace chromeos {
namespace ash {
namespace full_restore {

namespace {
Expand Down Expand Up @@ -55,7 +55,7 @@ FullRestoreAppLaunchHandler::~FullRestoreAppLaunchHandler() = default;
void FullRestoreAppLaunchHandler::LaunchBrowserWhenReady() {
if (g_launch_browser_for_testing ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kForceLaunchBrowser)) {
switches::kForceLaunchBrowser)) {
ForceLaunchBrowserForTesting();
return;
}
Expand Down Expand Up @@ -224,4 +224,4 @@ ScopedLaunchBrowserForTesting::~ScopedLaunchBrowserForTesting() {
}

} // namespace full_restore
} // namespace chromeos
} // namespace ash

0 comments on commit 0842edf

Please sign in to comment.