Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5012)

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 812823002: Remove dependency of infobars component on the embedder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests by instanciating a TestConfirmInfoBarDelegateFactory Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 3f83021f5a3332aec15e72c0b9ea14fe8ece6097..1856414c44c2a306cedcc9744242475c1fc4680f 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -56,6 +56,7 @@
#include "chrome/browser/google/google_search_counter.h"
#include "chrome/browser/gpu/gl_string_manager.h"
#include "chrome/browser/gpu/three_d_api_observer.h"
+#include "chrome/browser/infobars/chrome_confirm_infobar_delegate_factory.h"
#include "chrome/browser/media/media_capture_devices_dispatcher.h"
#include "chrome/browser/metrics/field_trial_synchronizer.h"
#include "chrome/browser/metrics/thread_watcher.h"
@@ -104,6 +105,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "components/component_updater/component_updater_service.h"
#include "components/google/core/browser/google_util.h"
+#include "components/infobars/core/confirm_infobar_delegate_factory.h"
#include "components/language_usage_metrics/language_usage_metrics.h"
#include "components/metrics/metrics_service.h"
#include "components/metrics/profiler/tracking_synchronizer.h"
@@ -1307,6 +1309,8 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Post-profile init ---------------------------------------------------------
TranslateService::Initialize();
+ ConfirmInfoBarDelegateFactory::SetInstance(
+ ChromeConfirmInfoBarDelegateFactory::GetInstance());
// Needs to be done before PostProfileInit, since login manager on CrOS is
// called inside PostProfileInit.
@@ -1684,6 +1688,7 @@ void ChromeBrowserMainParts::PostMainMessageLoopRun() {
// language fetch that was never completed so we need to cleanup here
// otherwise it will be done by the destructor in a wrong thread.
TranslateService::Shutdown(parameters().ui_task == NULL);
+ ConfirmInfoBarDelegateFactory::SetInstance(nullptr);
if (notify_result_ == ProcessSingleton::PROCESS_NONE)
process_singleton_->Cleanup();

Powered by Google App Engine
This is Rietveld 408576698