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

Side by Side Diff: chrome/browser/notifications/desktop_notification_service.cc

Issue 10690031: Turn of ash notification tray by default for M21. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1180/src/
Patch Set: Created 8 years, 5 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/notifications/desktop_notification_service.h" 5 #include "chrome/browser/notifications/desktop_notification_service.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/threading/thread.h" 8 #include "base/threading/thread.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "ui/base/layout.h" 45 #include "ui/base/layout.h"
46 #include "ui/base/resource/resource_bundle.h" 46 #include "ui/base/resource/resource_bundle.h"
47 47
48 #if defined(USE_ASH) 48 #if defined(USE_ASH)
49 #include "ash/ash_switches.h" 49 #include "ash/ash_switches.h"
50 #include "base/command_line.h" 50 #include "base/command_line.h"
51 51
52 namespace { 52 namespace {
53 53
54 bool IsAshNotifyEnabled() { 54 bool IsAshNotifyEnabled() {
55 return !CommandLine::ForCurrentProcess()->HasSwitch( 55 return CommandLine::ForCurrentProcess()->HasSwitch(ash::switches::kAshNotify);
56 ash::switches::kAshNotifyDisabled);
57 } 56 }
58 57
59 } // namespace 58 } // namespace
60 #endif 59 #endif
61 60
62 using content::BrowserThread; 61 using content::BrowserThread;
63 using content::RenderViewHost; 62 using content::RenderViewHost;
64 using content::WebContents; 63 using content::WebContents;
65 using WebKit::WebNotificationPresenter; 64 using WebKit::WebNotificationPresenter;
66 using WebKit::WebTextDirection; 65 using WebKit::WebTextDirection;
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 522
524 if (setting == CONTENT_SETTING_ALLOW) 523 if (setting == CONTENT_SETTING_ALLOW)
525 return WebKit::WebNotificationPresenter::PermissionAllowed; 524 return WebKit::WebNotificationPresenter::PermissionAllowed;
526 if (setting == CONTENT_SETTING_BLOCK) 525 if (setting == CONTENT_SETTING_BLOCK)
527 return WebKit::WebNotificationPresenter::PermissionDenied; 526 return WebKit::WebNotificationPresenter::PermissionDenied;
528 if (setting == CONTENT_SETTING_ASK) 527 if (setting == CONTENT_SETTING_ASK)
529 return WebKit::WebNotificationPresenter::PermissionNotAllowed; 528 return WebKit::WebNotificationPresenter::PermissionNotAllowed;
530 NOTREACHED() << "Invalid notifications settings value: " << setting; 529 NOTREACHED() << "Invalid notifications settings value: " << setting;
531 return WebKit::WebNotificationPresenter::PermissionNotAllowed; 530 return WebKit::WebNotificationPresenter::PermissionNotAllowed;
532 } 531 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/sms_observer.cc ('k') | chrome/browser/ui/views/ash/balloon_collection_impl_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698