| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/views/athena/chrome_browser_main_extra_parts_athena.
h" | 5 #include "chrome/browser/ui/views/athena/chrome_browser_main_extra_parts_athena.
h" |
| 6 | 6 |
| 7 #include "athena/env/public/athena_env.h" | 7 #include "athena/env/public/athena_env.h" |
| 8 #include "athena/extensions/public/extensions_delegate.h" | 8 #include "athena/extensions/public/extensions_delegate.h" |
| 9 #include "athena/main/public/athena_launcher.h" | 9 #include "athena/main/public/athena_launcher.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 registrar_.Add(this, | 31 registrar_.Add(this, |
| 32 chrome::NOTIFICATION_APP_TERMINATING, | 32 chrome::NOTIFICATION_APP_TERMINATING, |
| 33 content::NotificationService::AllSources()); | 33 content::NotificationService::AllSources()); |
| 34 } | 34 } |
| 35 | 35 |
| 36 virtual ~ChromeBrowserMainExtraPartsAthena() {} | 36 virtual ~ChromeBrowserMainExtraPartsAthena() {} |
| 37 | 37 |
| 38 private: | 38 private: |
| 39 // Overridden from ChromeBrowserMainExtraParts: | 39 // Overridden from ChromeBrowserMainExtraParts: |
| 40 virtual void PreProfileInit() OVERRIDE { | 40 virtual void PreProfileInit() OVERRIDE { |
| 41 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread( | 41 athena::StartAthenaEnv(content::BrowserThread::GetBlockingPool()-> |
| 42 content::BrowserThread::FILE)); | 42 GetTaskRunnerWithShutdownBehavior( |
| 43 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| 43 } | 44 } |
| 44 virtual void PostProfileInit() OVERRIDE { | 45 virtual void PostProfileInit() OVERRIDE { |
| 45 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 46 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 46 switches::kDisableZeroBrowsersOpenForTests)) { | 47 switches::kDisableZeroBrowsersOpenForTests)) { |
| 47 chrome::IncrementKeepAliveCount(); | 48 chrome::IncrementKeepAliveCount(); |
| 48 } | 49 } |
| 49 Profile* profile = | 50 Profile* profile = |
| 50 g_browser_process->profile_manager()->GetActiveUserProfile(); | 51 g_browser_process->profile_manager()->GetActiveUserProfile(); |
| 51 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 52 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 52 chromeos::switches::kLoginManager)) { | 53 chromeos::switches::kLoginManager)) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 75 content::NotificationRegistrar registrar_; | 76 content::NotificationRegistrar registrar_; |
| 76 | 77 |
| 77 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); | 78 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // namespace | 81 } // namespace |
| 81 | 82 |
| 82 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { | 83 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { |
| 83 return new ChromeBrowserMainExtraPartsAthena(); | 84 return new ChromeBrowserMainExtraPartsAthena(); |
| 84 } | 85 } |
| OLD | NEW |