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

Side by Side Diff: chrome/browser/background/background_contents_service.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: browser_context Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/background/background_contents_service.h" 5 #include "chrome/browser/background/background_contents_service.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 prefs->RegisterDictionaryPref(prefs::kRegisteredBackgroundContents, 566 prefs->RegisterDictionaryPref(prefs::kRegisteredBackgroundContents,
567 PrefService::UNSYNCABLE_PREF); 567 PrefService::UNSYNCABLE_PREF);
568 } 568 }
569 569
570 void BackgroundContentsService::AddTabContents( 570 void BackgroundContentsService::AddTabContents(
571 TabContents* new_contents, 571 TabContents* new_contents,
572 WindowOpenDisposition disposition, 572 WindowOpenDisposition disposition,
573 const gfx::Rect& initial_pos, 573 const gfx::Rect& initial_pos,
574 bool user_gesture) { 574 bool user_gesture) {
575 Browser* browser = BrowserList::GetLastActiveWithProfile( 575 Browser* browser = BrowserList::GetLastActiveWithProfile(
576 new_contents->profile()); 576 static_cast<Profile*>(new_contents->browser_context()));
577 if (!browser) 577 if (!browser)
578 return; 578 return;
579 browser->AddTabContents(new_contents, disposition, initial_pos, user_gesture); 579 browser->AddTabContents(new_contents, disposition, initial_pos, user_gesture);
580 } 580 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698