Commit a5fd318a authored by Collin Baker's avatar Collin Baker Committed by Commit Bot

Remove in_product_help namespace

Change-Id: Ib2200678698b6ed7c2a7cc22390ff3df58227add
Reviewed-on: https://chromium-review.googlesource.com/c/1313557
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604781}
parent 7cd7b168
......@@ -604,8 +604,7 @@ void NewTab(Browser* browser) {
#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
// Notify IPH that new tab was opened.
auto* reopen_tab_iph =
in_product_help::ReopenTabInProductHelpFactory::GetForProfile(
browser->profile());
ReopenTabInProductHelpFactory::GetForProfile(browser->profile());
reopen_tab_iph->NewTabOpened();
#endif
......
......@@ -105,8 +105,7 @@ void RestoreTab(Browser* browser) {
base::RecordAction(base::UserMetricsAction("RestoreTab"));
#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
auto* reopen_tab_iph =
in_product_help::ReopenTabInProductHelpFactory::GetForProfile(
browser->profile());
ReopenTabInProductHelpFactory::GetForProfile(browser->profile());
reopen_tab_iph->TabReopened();
#endif
......
......@@ -9,8 +9,6 @@
#include "base/time/tick_clock.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
namespace in_product_help {
ActiveTabTracker::ActiveTabTracker(const base::TickClock* clock,
ActiveTabClosedCallback callback)
: clock_(clock), active_tab_closed_callback_(std::move(callback)) {
......@@ -62,5 +60,3 @@ void ActiveTabTracker::OnTabStripModelChanged(
if (selection.active_tab_changed())
active_tab_changed_times_[model] = clock_->NowTicks();
}
} // namespace in_product_help
......@@ -17,8 +17,6 @@ class TickClock;
class TabStripModel;
namespace in_product_help {
// Tracks when tabs become active and notifies client when active tabs are
// closed. The client must register and unregister |TabStripModel|s and set a
// callback to be called when an active tab is closed.
......@@ -57,6 +55,4 @@ class ActiveTabTracker : public TabStripModelObserver {
DISALLOW_COPY_AND_ASSIGN(ActiveTabTracker);
};
} // namespace in_product_help
#endif // CHROME_BROWSER_UI_IN_PRODUCT_HELP_ACTIVE_TAB_TRACKER_H_
......@@ -38,8 +38,6 @@ constexpr base::TimeDelta kTimeStep = base::TimeDelta::FromSeconds(1);
} // namespace
namespace in_product_help {
class ActiveTabTrackerTest : public ::testing::Test {
protected:
void SetUp() override {
......@@ -194,5 +192,3 @@ TEST_F(ActiveTabTrackerTest, StopsObservingUponRemove) {
model.DetachWebContentsAt(0);
}
} // namespace in_product_help
......@@ -16,8 +16,6 @@
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/public/tracker.h"
namespace in_product_help {
ReopenTabInProductHelp::ReopenTabInProductHelp(Profile* profile,
const base::TickClock* clock)
: profile_(profile),
......@@ -82,5 +80,3 @@ void ReopenTabInProductHelp::OnBrowserRemoved(Browser* browser) {
feature_engagement::Tracker* ReopenTabInProductHelp::GetTracker() {
return feature_engagement::TrackerFactory::GetForBrowserContext(profile_);
}
} // namespace in_product_help
......@@ -25,8 +25,6 @@ class Tracker;
class TabStripModel;
namespace in_product_help {
// Listens for the triggering conditions for the reopen tab in-product help and
// starts the IPH flow at the appropriate time. This is a |Profile|-keyed
// service since we track interactions per user profile. Hooks throughout the
......@@ -72,6 +70,4 @@ class ReopenTabInProductHelp : public BrowserListObserver, public KeyedService {
DISALLOW_COPY_AND_ASSIGN(ReopenTabInProductHelp);
};
} // namespace in_product_help
#endif // CHROME_BROWSER_UI_IN_PRODUCT_HELP_REOPEN_TAB_IN_PRODUCT_HELP_H_
......@@ -14,8 +14,6 @@
#include "chrome/browser/ui/in_product_help/reopen_tab_in_product_help.h"
#include "components/keyed_service/content/browser_context_dependency_manager.h"
namespace in_product_help {
ReopenTabInProductHelpFactory::ReopenTabInProductHelpFactory()
: BrowserContextKeyedServiceFactory(
"ReopenTabInProductHelp",
......@@ -47,5 +45,3 @@ content::BrowserContext* ReopenTabInProductHelpFactory::GetBrowserContextToUse(
content::BrowserContext* context) const {
return chrome::GetBrowserContextRedirectedInIncognito(context);
}
} // namespace in_product_help
......@@ -19,8 +19,6 @@ namespace content {
class BrowserContext;
} // namespace content
namespace in_product_help {
class ReopenTabInProductHelp;
class ReopenTabInProductHelpFactory : public BrowserContextKeyedServiceFactory {
......@@ -44,6 +42,4 @@ class ReopenTabInProductHelpFactory : public BrowserContextKeyedServiceFactory {
DISALLOW_COPY_AND_ASSIGN(ReopenTabInProductHelpFactory);
};
} // namespace in_product_help
#endif // CHROME_BROWSER_UI_IN_PRODUCT_HELP_REOPEN_TAB_IN_PRODUCT_HELP_FACTORY_H_
......@@ -10,8 +10,6 @@
#include "components/feature_engagement/public/feature_constants.h"
#include "components/feature_engagement/public/tracker.h"
namespace in_product_help {
// static
const base::TimeDelta ReopenTabInProductHelpTrigger::kTabMinimumActiveDuration =
base::TimeDelta::FromSeconds(10);
......@@ -95,5 +93,3 @@ void ReopenTabInProductHelpTrigger::ResetTriggerState() {
time_of_last_step_ = base::TimeTicks();
trigger_state_ = NO_ACTIONS_SEEN;
}
} // namespace in_product_help
......@@ -12,8 +12,6 @@ namespace feature_engagement {
class Tracker;
} // namespace feature_engagement
namespace in_product_help {
// Contains the triggering logic for the reopen closed tab IPH. Determines when
// a user might have accidentally closed a tab based on user interactions
// reported to it. When this happens, this class asks the feature engagement
......@@ -77,6 +75,4 @@ class ReopenTabInProductHelpTrigger {
DISALLOW_COPY_AND_ASSIGN(ReopenTabInProductHelpTrigger);
};
} // namespace in_product_help
#endif // CHROME_BROWSER_UI_IN_PRODUCT_HELP_REOPEN_TAB_IN_PRODUCT_HELP_TRIGGER_H_
......@@ -18,8 +18,6 @@ using ::testing::Return;
using feature_engagement::test::MockTracker;
namespace in_product_help {
namespace {
void DismissImmediately(ReopenTabInProductHelpTrigger* trigger) {
......@@ -156,5 +154,3 @@ TEST(ReopenTabInProductHelpTriggerTest, TriggersTwice) {
EXPECT_TRUE(triggered);
}
} // namespace in_product_help
......@@ -28,8 +28,6 @@ using ::testing::Return;
using MockTracker = ::testing::NiceMock<feature_engagement::test::MockTracker>;
namespace in_product_help {
class ReopenTabInProductHelpTest : public BrowserWithTestWindowTest {
protected:
// We want to use |MockTracker| instead of |Tracker|, so we must override its
......@@ -79,5 +77,3 @@ TEST_F(ReopenTabInProductHelpTest, TriggersIPH) {
reopen_tab_iph.NewTabOpened();
reopen_tab_iph.OmniboxFocused();
}
} // namespace in_product_help
......@@ -334,8 +334,7 @@ void RecentTabsSubMenuModel::ExecuteCommand(int command_id, int event_flags) {
#if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
auto* reopen_tab_iph =
in_product_help::ReopenTabInProductHelpFactory::GetForProfile(
browser_->profile());
ReopenTabInProductHelpFactory::GetForProfile(browser_->profile());
reopen_tab_iph->TabReopened();
#endif
......
......@@ -1123,8 +1123,7 @@ void OmniboxViewViews::OnFocus() {
->OnOmniboxFocused();
}
auto* reopen_tab_iph =
in_product_help::ReopenTabInProductHelpFactory::GetForProfile(
auto* reopen_tab_iph = ReopenTabInProductHelpFactory::GetForProfile(
location_bar_view_->profile());
reopen_tab_iph->OmniboxFocused();
}
......
......@@ -323,8 +323,7 @@ void BrowserTabStripController::CreateNewTab() {
// after NewTabOpened. TODO(collinbaker): remove omnibox focusing from
// triggering conditions (since it is always focused for new tabs) and move
// this after AddTabAt() call.
auto* reopen_tab_iph =
in_product_help::ReopenTabInProductHelpFactory::GetForProfile(
auto* reopen_tab_iph = ReopenTabInProductHelpFactory::GetForProfile(
browser_view_->browser()->profile());
reopen_tab_iph->NewTabOpened();
#endif
......
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