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

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

Issue 6335001: Cleanup: Remove unneeded chrome/browser/prefs/pref_service.h usage.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « chrome/browser/history/in_memory_history_backend.cc ('k') | chrome/browser/page_info_model.cc » ('j') | 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 "chrome/browser/notifications/notifications_prefs_cache.h" 5 #include "chrome/browser/notifications/notifications_prefs_cache.h"
6 6
7 #include <string>
8
7 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/values.h"
8 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/browser_thread.h" 12 #include "chrome/browser/browser_thread.h"
10 #include "chrome/browser/prefs/pref_service.h"
11 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h" 13 #include "third_party/WebKit/WebKit/chromium/public/WebNotificationPresenter.h"
12 14
13 NotificationsPrefsCache::NotificationsPrefsCache() 15 NotificationsPrefsCache::NotificationsPrefsCache()
14 : default_content_setting_(CONTENT_SETTING_DEFAULT), 16 : default_content_setting_(CONTENT_SETTING_DEFAULT),
15 is_initialized_(false) { 17 is_initialized_(false) {
16 } 18 }
17 19
18 void NotificationsPrefsCache::CacheAllowedOrigin( 20 void NotificationsPrefsCache::CacheAllowedOrigin(
19 const GURL& origin) { 21 const GURL& origin) {
20 CheckThreadAccess(); 22 CheckThreadAccess();
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 return denied_origins_.find(origin) != denied_origins_.end(); 95 return denied_origins_.find(origin) != denied_origins_.end();
94 } 96 }
95 97
96 void NotificationsPrefsCache::CheckThreadAccess() { 98 void NotificationsPrefsCache::CheckThreadAccess() {
97 if (is_initialized_) { 99 if (is_initialized_) {
98 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
99 } else { 101 } else {
100 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
101 } 103 }
102 } 104 }
OLDNEW
« no previous file with comments | « chrome/browser/history/in_memory_history_backend.cc ('k') | chrome/browser/page_info_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698