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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "apps/app_load_service.h" 7 #include "apps/app_load_service.h"
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 frame_name, 510 frame_name,
511 UTF8ToUTF16(extension_id)); 511 UTF8ToUTF16(extension_id));
512 } 512 }
513 513
514 void BackgroundContentsService::LoadBackgroundContentsFromManifests( 514 void BackgroundContentsService::LoadBackgroundContentsFromManifests(
515 Profile* profile) { 515 Profile* profile) {
516 const ExtensionSet* extensions = extensions::ExtensionSystem::Get(profile)-> 516 const ExtensionSet* extensions = extensions::ExtensionSystem::Get(profile)->
517 extension_service()->extensions(); 517 extension_service()->extensions();
518 ExtensionSet::const_iterator iter = extensions->begin(); 518 ExtensionSet::const_iterator iter = extensions->begin();
519 for (; iter != extensions->end(); ++iter) { 519 for (; iter != extensions->end(); ++iter) {
520 const Extension* extension = *iter; 520 const Extension* extension = iter->get();
521 if (extension->is_hosted_app() && 521 if (extension->is_hosted_app() &&
522 BackgroundInfo::HasBackgroundPage(extension)) { 522 BackgroundInfo::HasBackgroundPage(extension)) {
523 LoadBackgroundContents(profile, 523 LoadBackgroundContents(profile,
524 BackgroundInfo::GetBackgroundURL(extension), 524 BackgroundInfo::GetBackgroundURL(extension),
525 ASCIIToUTF16("background"), 525 ASCIIToUTF16("background"),
526 UTF8ToUTF16(extension->id())); 526 UTF8ToUTF16(extension->id()));
527 } 527 }
528 } 528 }
529 } 529 }
530 530
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 bool user_gesture, 681 bool user_gesture,
682 bool* was_blocked) { 682 bool* was_blocked) {
683 Browser* browser = chrome::FindLastActiveWithProfile( 683 Browser* browser = chrome::FindLastActiveWithProfile(
684 Profile::FromBrowserContext(new_contents->GetBrowserContext()), 684 Profile::FromBrowserContext(new_contents->GetBrowserContext()),
685 chrome::GetActiveDesktop()); 685 chrome::GetActiveDesktop());
686 if (browser) { 686 if (browser) {
687 chrome::AddWebContents(browser, NULL, new_contents, disposition, 687 chrome::AddWebContents(browser, NULL, new_contents, disposition,
688 initial_pos, user_gesture, was_blocked); 688 initial_pos, user_gesture, was_blocked);
689 } 689 }
690 } 690 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698