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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator.cc

Issue 16290004: Update chrome/ to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/ui/startup/startup_browser_creator.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator.h"
6 6
7 #include <algorithm> // For max(). 7 #include <algorithm> // For max().
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 683 matching lines...) Expand 10 before | Expand all | Expand 10 after
694 size_t expected_tabs) { 694 size_t expected_tabs) {
695 #if defined(ENABLE_AUTOMATION) 695 #if defined(ENABLE_AUTOMATION)
696 scoped_refptr<AutomationProviderClass> automation = 696 scoped_refptr<AutomationProviderClass> automation =
697 new AutomationProviderClass(profile); 697 new AutomationProviderClass(profile);
698 if (!automation->InitializeChannel(channel_id)) 698 if (!automation->InitializeChannel(channel_id))
699 return false; 699 return false;
700 automation->SetExpectedTabCount(expected_tabs); 700 automation->SetExpectedTabCount(expected_tabs);
701 701
702 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); 702 AutomationProviderList* list = g_browser_process->GetAutomationProviderList();
703 DCHECK(list); 703 DCHECK(list);
704 list->AddProvider(automation); 704 list->AddProvider(automation.get());
705 #endif // defined(ENABLE_AUTOMATION) 705 #endif // defined(ENABLE_AUTOMATION)
706 706
707 return true; 707 return true;
708 } 708 }
709 709
710 // static 710 // static
711 void StartupBrowserCreator::ProcessCommandLineOnProfileCreated( 711 void StartupBrowserCreator::ProcessCommandLineOnProfileCreated(
712 const CommandLine& command_line, 712 const CommandLine& command_line,
713 const base::FilePath& cur_dir, 713 const base::FilePath& cur_dir,
714 Profile* profile, 714 Profile* profile,
(...skipping 25 matching lines...) Expand all
740 740
741 // static 741 // static
742 bool StartupBrowserCreator::ActivatedProfile() { 742 bool StartupBrowserCreator::ActivatedProfile() {
743 return profile_launch_observer.Get().activated_profile(); 743 return profile_launch_observer.Get().activated_profile();
744 } 744 }
745 745
746 bool HasPendingUncleanExit(Profile* profile) { 746 bool HasPendingUncleanExit(Profile* profile) {
747 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED && 747 return profile->GetLastSessionExitType() == Profile::EXIT_CRASHED &&
748 !profile_launch_observer.Get().HasBeenLaunched(profile); 748 !profile_launch_observer.Get().HasBeenLaunched(profile);
749 } 749 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698