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

Unified Diff: chrome/browser/bookmarks/bookmark_utils.cc

Issue 7205004: Change BrowserList::GetLastActive to respect the profile for which it's launched in the bookmark ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/bookmarks/bookmark_utils.cc
===================================================================
--- chrome/browser/bookmarks/bookmark_utils.cc (revision 89481)
+++ chrome/browser/bookmarks/bookmark_utils.cc (working copy)
@@ -126,6 +126,7 @@
void OpenAllImpl(const BookmarkNode* node,
WindowOpenDisposition initial_disposition,
PageNavigator** navigator,
+ Profile* profile,
bool* opened_url) {
if (node->is_url()) {
WindowOpenDisposition disposition;
@@ -139,7 +140,7 @@
*opened_url = true;
// We opened the first URL which may have opened a new window or clobbered
// the current page, reset the navigator just to be sure.
- Browser* new_browser = BrowserList::GetLastActive();
+ Browser* new_browser = BrowserList::GetLastActiveWithProfile(profile);
if (new_browser) {
TabContents* current_tab = new_browser->GetSelectedTabContents();
DCHECK(new_browser && current_tab);
@@ -152,7 +153,8 @@
for (int i = 0; i < node->child_count(); ++i) {
const BookmarkNode* child_node = node->GetChild(i);
if (child_node->is_url())
- OpenAllImpl(child_node, initial_disposition, navigator, opened_url);
+ OpenAllImpl(child_node, initial_disposition, navigator, profile,
+ opened_url);
}
}
}
@@ -383,7 +385,8 @@
bool opened_url = false;
for (size_t i = 0; i < nodes.size(); ++i)
- OpenAllImpl(nodes[i], initial_disposition, &navigator, &opened_url);
+ OpenAllImpl(nodes[i], initial_disposition, &navigator, profile,
+ &opened_url);
}
void OpenAll(gfx::NativeWindow parent,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698