Commit abee4fef authored by dcheng's avatar dcheng Committed by Commit bot

Remove implicit conversions from scoped_refptr to T* in chrome/browser/ui

This patch was generated by running the rewrite_scoped_refptr clang tool
on a ChromeOS build.

BUG=110610

Review URL: https://codereview.chromium.org/556293004

Cr-Commit-Position: refs/heads/master@{#294940}
parent 3ca088e1
...@@ -2180,7 +2180,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2180,7 +2180,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
EXPECT_EQ(2, model_->item_count()); EXPECT_EQ(2, model_->item_count());
// Add a v2 app. // Add a v2 app.
V2App v2_app(profile(), extension1_); V2App v2_app(profile(), extension1_.get());
EXPECT_EQ(3, model_->item_count()); EXPECT_EQ(3, model_->item_count());
// After switching users the item should go away. // After switching users the item should go away.
...@@ -2210,7 +2210,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2210,7 +2210,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
// Add the v2 app to the inactive user and check that no item was added to // Add the v2 app to the inactive user and check that no item was added to
// the launcher. // the launcher.
{ {
V2App v2_app(profile(), extension1_); V2App v2_app(profile(), extension1_.get());
EXPECT_EQ(2, model_->item_count()); EXPECT_EQ(2, model_->item_count());
// Switch to the primary user and check that the item is shown. // Switch to the primary user and check that the item is shown.
...@@ -2248,13 +2248,13 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2248,13 +2248,13 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
// A v2 app for user #1 should be shown first and get hidden when switching to // A v2 app for user #1 should be shown first and get hidden when switching to
// desktop #2. // desktop #2.
V2App v2_app_1(profile1, extension1_); V2App v2_app_1(profile1, extension1_.get());
EXPECT_TRUE(v2_app_1.window()->GetNativeWindow()->IsVisible()); EXPECT_TRUE(v2_app_1.window()->GetNativeWindow()->IsVisible());
SwitchActiveUser(profile2->GetProfileName()); SwitchActiveUser(profile2->GetProfileName());
EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible());
// Add a v2 app for user #1 while on desktop #2 should not be shown. // Add a v2 app for user #1 while on desktop #2 should not be shown.
V2App v2_app_2(profile1, extension1_); V2App v2_app_2(profile1, extension1_.get());
EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible());
EXPECT_FALSE(v2_app_2.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_2.window()->GetNativeWindow()->IsVisible());
...@@ -2266,7 +2266,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2266,7 +2266,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
// Creating a new application for user #1 on desktop #2 should teleport it // Creating a new application for user #1 on desktop #2 should teleport it
// there automatically. // there automatically.
V2App v2_app_3(profile1, extension1_); V2App v2_app_3(profile1, extension1_.get());
EXPECT_TRUE(v2_app_1.window()->GetNativeWindow()->IsVisible()); EXPECT_TRUE(v2_app_1.window()->GetNativeWindow()->IsVisible());
EXPECT_FALSE(v2_app_2.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_2.window()->GetNativeWindow()->IsVisible());
EXPECT_TRUE(v2_app_3.window()->GetNativeWindow()->IsVisible()); EXPECT_TRUE(v2_app_3.window()->GetNativeWindow()->IsVisible());
...@@ -2274,7 +2274,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2274,7 +2274,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
// Switching back to desktop#1 and creating an app for user #1 should move // Switching back to desktop#1 and creating an app for user #1 should move
// the app on desktop #1. // the app on desktop #1.
SwitchActiveUser(profile1->GetProfileName()); SwitchActiveUser(profile1->GetProfileName());
V2App v2_app_4(profile1, extension1_); V2App v2_app_4(profile1, extension1_.get());
EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible());
EXPECT_TRUE(v2_app_2.window()->GetNativeWindow()->IsVisible()); EXPECT_TRUE(v2_app_2.window()->GetNativeWindow()->IsVisible());
EXPECT_FALSE(v2_app_3.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_3.window()->GetNativeWindow()->IsVisible());
...@@ -2283,7 +2283,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2283,7 +2283,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
// Switching to desktop #3 and create an app for user #1 there should land on // Switching to desktop #3 and create an app for user #1 there should land on
// his own desktop (#1). // his own desktop (#1).
SwitchActiveUser(profile3->GetProfileName()); SwitchActiveUser(profile3->GetProfileName());
V2App v2_app_5(profile1, extension1_); V2App v2_app_5(profile1, extension1_.get());
EXPECT_FALSE(v2_app_5.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_5.window()->GetNativeWindow()->IsVisible());
SwitchActiveUser(profile1->GetProfileName()); SwitchActiveUser(profile1->GetProfileName());
EXPECT_TRUE(v2_app_5.window()->GetNativeWindow()->IsVisible()); EXPECT_TRUE(v2_app_5.window()->GetNativeWindow()->IsVisible());
...@@ -2292,7 +2292,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2292,7 +2292,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
// teleport there automatically. // teleport there automatically.
SwitchActiveUser(profile2->GetProfileName()); SwitchActiveUser(profile2->GetProfileName());
v2_app_1.window()->Hide(); v2_app_1.window()->Hide();
V2App v2_app_6(profile1, extension1_); V2App v2_app_6(profile1, extension1_.get());
EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_1.window()->GetNativeWindow()->IsVisible());
EXPECT_FALSE(v2_app_2.window()->GetNativeWindow()->IsVisible()); EXPECT_FALSE(v2_app_2.window()->GetNativeWindow()->IsVisible());
EXPECT_TRUE(v2_app_6.window()->GetNativeWindow()->IsVisible()); EXPECT_TRUE(v2_app_6.window()->GetNativeWindow()->IsVisible());
...@@ -2308,7 +2308,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2308,7 +2308,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
SwitchActiveUser(profile()->GetProfileName()); SwitchActiveUser(profile()->GetProfileName());
EXPECT_EQ(2, model_->item_count()); EXPECT_EQ(2, model_->item_count());
V2App v2_app_1(profile(), extension1_); V2App v2_app_1(profile(), extension1_.get());
EXPECT_EQ(3, model_->item_count()); EXPECT_EQ(3, model_->item_count());
{ {
// Hide and show the app. // Hide and show the app.
...@@ -2348,7 +2348,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest, ...@@ -2348,7 +2348,7 @@ TEST_F(MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest,
} }
{ {
// Create a second app, hide and show it and then hide both apps. // Create a second app, hide and show it and then hide both apps.
V2App v2_app_2(profile(), extension1_); V2App v2_app_2(profile(), extension1_.get());
EXPECT_EQ(3, model_->item_count()); EXPECT_EQ(3, model_->item_count());
v2_app_2.window()->Hide(); v2_app_2.window()->Hide();
......
...@@ -180,9 +180,9 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, DragBrowserActions) { ...@@ -180,9 +180,9 @@ IN_PROC_BROWSER_TEST_F(BrowserActionsContainerTest, DragBrowserActions) {
// This order should be reflected in the underlying model. // This order should be reflected in the underlying model.
extensions::ExtensionToolbarModel* model = extensions::ExtensionToolbarModel* model =
extensions::ExtensionToolbarModel::Get(profile()); extensions::ExtensionToolbarModel::Get(profile());
EXPECT_EQ(extension_b, model->toolbar_items()[0]); EXPECT_EQ(extension_b, model->toolbar_items()[0].get());
EXPECT_EQ(extension_a, model->toolbar_items()[1]); EXPECT_EQ(extension_a, model->toolbar_items()[1].get());
EXPECT_EQ(extension_c, model->toolbar_items()[2]); EXPECT_EQ(extension_c, model->toolbar_items()[2].get());
// Simulate a drag and drop to the left. // Simulate a drag and drop to the left.
ui::OSExchangeData drop_data2; ui::OSExchangeData drop_data2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment