OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/l10n_util.h" | 5 #include "app/l10n_util.h" |
6 #include "app/resource_bundle.h" | 6 #include "app/resource_bundle.h" |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 | 361 |
362 // static | 362 // static |
363 bool BackgroundModeManager::IsBackgroundModeEnabled( | 363 bool BackgroundModeManager::IsBackgroundModeEnabled( |
364 const CommandLine* command_line) { | 364 const CommandLine* command_line) { |
365 | 365 |
366 // Background mode is disabled if the appropriate flag is passed, or if | 366 // Background mode is disabled if the appropriate flag is passed, or if |
367 // extensions are disabled. | 367 // extensions are disabled. |
368 bool background_mode_enabled = | 368 bool background_mode_enabled = |
369 !command_line->HasSwitch(switches::kDisableBackgroundMode) && | 369 !command_line->HasSwitch(switches::kDisableBackgroundMode) && |
370 !command_line->HasSwitch(switches::kDisableExtensions); | 370 !command_line->HasSwitch(switches::kDisableExtensions); |
371 #if !defined(OS_WIN) | 371 #if !(defined(OS_WIN) || defined(OS_MACOSX)) |
372 // BackgroundMode is enabled by default on windows. On other platforms, it | 372 // BackgroundMode is enabled by default on windows and mac. On other |
373 // is enabled via about:flags. | 373 // platforms, it is enabled via about:flags. |
374 background_mode_enabled = background_mode_enabled && | 374 background_mode_enabled = background_mode_enabled && |
375 command_line->HasSwitch(switches::kEnableBackgroundMode); | 375 command_line->HasSwitch(switches::kEnableBackgroundMode); |
376 #endif | 376 #endif |
377 | 377 |
378 return background_mode_enabled; | 378 return background_mode_enabled; |
379 } | 379 } |
380 | 380 |
OLD | NEW |