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

Unified Diff: chrome/browser/importer/importer_host.h

Issue 10750018: Remove browser::FindLastActiveWithProfile call in importer code. There are many ways to create an I… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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
« no previous file with comments | « no previous file | chrome/browser/importer/importer_host.cc » ('j') | chrome/browser/importer/importer_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/importer_host.h
===================================================================
--- chrome/browser/importer/importer_host.h (revision 145643)
+++ chrome/browser/importer/importer_host.h (working copy)
@@ -14,6 +14,7 @@
#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
#include "chrome/browser/importer/importer_data_types.h"
#include "chrome/browser/importer/profile_writer.h"
+#include "chrome/browser/ui/browser_list.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/native_widget_types.h"
@@ -31,7 +32,8 @@
// the import process is done, ImporterHost deletes itself.
class ImporterHost : public base::RefCountedThreadSafe<ImporterHost>,
public BaseBookmarkModelObserver,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public BrowserList::Observer {
public:
ImporterHost();
@@ -63,6 +65,8 @@
parent_window_ = parent_window;
}
+ void set_browser(Browser* browser) { browser_ = browser; }
+
// Starts the process of importing the settings and data depending on what the
// user selected.
// |source_profile| - importer profile to import.
@@ -139,6 +143,9 @@
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // BrowserList::Observer
+ virtual void OnBrowserRemoved(Browser* browser) OVERRIDE;
+
// The task is the process of importing settings from other browsers.
base::Closure task_;
@@ -152,6 +159,9 @@
// warning dialog).
gfx::NativeWindow parent_window_;
+ // Used to add a new tab if we need the user to sign in.
+ Browser* browser_;
+
// The observer that we need to notify about changes in the import process.
importer::ImporterProgressObserver* observer_;
« no previous file with comments | « no previous file | chrome/browser/importer/importer_host.cc » ('j') | chrome/browser/importer/importer_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698