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

Side by Side Diff: chrome/browser/background_mode_manager.cc

Issue 6037010: Enable background mode on Mac by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/app
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698