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

Side by Side Diff: chrome/browser/web_resource/gpu_blacklist_updater.cc

Issue 6657003: Update a bunch of files to the new location of notification files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/web_resource/gpu_blacklist_updater.h" 5 #include "chrome/browser/web_resource/gpu_blacklist_updater.h"
6 6
7 #include "base/values.h" 7 #include "base/values.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/profiles/profile_manager.h" 11 #include "chrome/browser/profiles/profile_manager.h"
12 #include "chrome/common/notification_type.h"
13 #include "chrome/common/pref_names.h" 12 #include "chrome/common/pref_names.h"
14 #include "content/browser/browser_thread.h" 13 #include "content/browser/browser_thread.h"
14 #include "content/common/notification_type.h"
15 15
16 namespace { 16 namespace {
17 17
18 // Delay on first fetch so we don't interfere with startup. 18 // Delay on first fetch so we don't interfere with startup.
19 static const int kStartGpuBlacklistFetchDelay = 6000; 19 static const int kStartGpuBlacklistFetchDelay = 6000;
20 20
21 // Delay between calls to update the gpu blacklist (48 hours). 21 // Delay between calls to update the gpu blacklist (48 hours).
22 static const int kCacheUpdateDelay = 48 * 60 * 60 * 1000; 22 static const int kCacheUpdateDelay = 48 * 60 * 60 * 1000;
23 23
24 } // namespace 24 } // namespace
(...skipping 16 matching lines...) Expand all
41 41
42 void GpuBlacklistUpdater::Unpack(const DictionaryValue& parsed_json) { 42 void GpuBlacklistUpdater::Unpack(const DictionaryValue& parsed_json) {
43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 43 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
44 DictionaryValue* gpu_blacklist_cache = 44 DictionaryValue* gpu_blacklist_cache =
45 prefs_->GetMutableDictionary(prefs::kGpuBlacklist); 45 prefs_->GetMutableDictionary(prefs::kGpuBlacklist);
46 DCHECK(gpu_blacklist_cache); 46 DCHECK(gpu_blacklist_cache);
47 gpu_blacklist_cache->Clear(); 47 gpu_blacklist_cache->Clear();
48 gpu_blacklist_cache->MergeDictionary(&parsed_json); 48 gpu_blacklist_cache->MergeDictionary(&parsed_json);
49 } 49 }
50 50
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app.cc ('k') | chrome/browser/web_resource/promo_resource_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698