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::GetBlockingPool()-> | 41 athena::StartAthenaEnv(content::BrowserThread::GetMessageLoopProxyForThread( |
42 GetTaskRunnerWithShutdownBehavior( | 42 content::BrowserThread::FILE)); |
43 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); | |
44 } | 43 } |
45 virtual void PostProfileInit() OVERRIDE { | 44 virtual void PostProfileInit() OVERRIDE { |
46 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 45 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
47 switches::kDisableZeroBrowsersOpenForTests)) { | 46 switches::kDisableZeroBrowsersOpenForTests)) { |
48 chrome::IncrementKeepAliveCount(); | 47 chrome::IncrementKeepAliveCount(); |
49 } | 48 } |
50 Profile* profile = | 49 Profile* profile = |
51 g_browser_process->profile_manager()->GetActiveUserProfile(); | 50 g_browser_process->profile_manager()->GetActiveUserProfile(); |
52 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 51 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
53 chromeos::switches::kLoginManager)) { | 52 chromeos::switches::kLoginManager)) { |
(...skipping 22 matching lines...) Expand all Loading... |
76 content::NotificationRegistrar registrar_; | 75 content::NotificationRegistrar registrar_; |
77 | 76 |
78 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); | 77 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainExtraPartsAthena); |
79 }; | 78 }; |
80 | 79 |
81 } // namespace | 80 } // namespace |
82 | 81 |
83 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { | 82 ChromeBrowserMainExtraParts* CreateChromeBrowserMainExtraPartsAthena() { |
84 return new ChromeBrowserMainExtraPartsAthena(); | 83 return new ChromeBrowserMainExtraPartsAthena(); |
85 } | 84 } |
OLD | NEW |