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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_remover.h

Issue 12500009: Add the ability to clear the shader disk cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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) 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 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 5 #ifndef CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 6 #define CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/gtest_prod_util.h" 10 #include "base/gtest_prod_util.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 REMOVE_FORM_DATA = 1 << 5, 75 REMOVE_FORM_DATA = 1 << 5,
76 // In addition to visits, REMOVE_HISTORY removes keywords and last session. 76 // In addition to visits, REMOVE_HISTORY removes keywords and last session.
77 REMOVE_HISTORY = 1 << 6, 77 REMOVE_HISTORY = 1 << 6,
78 REMOVE_INDEXEDDB = 1 << 7, 78 REMOVE_INDEXEDDB = 1 << 7,
79 REMOVE_LOCAL_STORAGE = 1 << 8, 79 REMOVE_LOCAL_STORAGE = 1 << 8,
80 REMOVE_PLUGIN_DATA = 1 << 9, 80 REMOVE_PLUGIN_DATA = 1 << 9,
81 REMOVE_PASSWORDS = 1 << 10, 81 REMOVE_PASSWORDS = 1 << 10,
82 REMOVE_WEBSQL = 1 << 11, 82 REMOVE_WEBSQL = 1 << 11,
83 REMOVE_SERVER_BOUND_CERTS = 1 << 12, 83 REMOVE_SERVER_BOUND_CERTS = 1 << 12,
84 REMOVE_CONTENT_LICENSES = 1 << 13, 84 REMOVE_CONTENT_LICENSES = 1 << 13,
85 REMOVE_SHADER_CACHE = 1 << 14,
85 // The following flag is used only in tests. In normal usage, hosted app 86 // The following flag is used only in tests. In normal usage, hosted app
86 // data is controlled by the REMOVE_COOKIES flag, applied to the 87 // data is controlled by the REMOVE_COOKIES flag, applied to the
87 // protected-web origin. 88 // protected-web origin.
88 REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31, 89 REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31,
89 90
90 // "Site data" includes cookies, appcache, file systems, indexedDBs, local 91 // "Site data" includes cookies, appcache, file systems, indexedDBs, local
91 // storage, webSQL, and plugin data. 92 // storage, webSQL, shader, and plugin data.
92 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | 93 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS |
93 REMOVE_INDEXEDDB | REMOVE_LOCAL_STORAGE | 94 REMOVE_INDEXEDDB | REMOVE_LOCAL_STORAGE |
94 REMOVE_PLUGIN_DATA | REMOVE_WEBSQL | 95 REMOVE_PLUGIN_DATA | REMOVE_WEBSQL |
95 REMOVE_SERVER_BOUND_CERTS 96 REMOVE_SERVER_BOUND_CERTS | REMOVE_SHADER_CACHE
96 }; 97 };
97 98
98 // When BrowsingDataRemover successfully removes data, a notification of type 99 // When BrowsingDataRemover successfully removes data, a notification of type
99 // NOTIFICATION_BROWSING_DATA_REMOVED is triggered with a Details object of 100 // NOTIFICATION_BROWSING_DATA_REMOVED is triggered with a Details object of
100 // this type. 101 // this type.
101 struct NotificationDetails { 102 struct NotificationDetails {
102 NotificationDetails(); 103 NotificationDetails();
103 NotificationDetails(const NotificationDetails& details); 104 NotificationDetails(const NotificationDetails& details);
104 NotificationDetails(base::Time removal_begin, 105 NotificationDetails(base::Time removal_begin,
105 int removal_mask, 106 int removal_mask,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 // NotifyAndDeleteIfDone. 333 // NotifyAndDeleteIfDone.
333 void OnClearedServerBoundCerts(); 334 void OnClearedServerBoundCerts();
334 335
335 // Callback on the DB thread so that we can wait for the form data to be 336 // Callback on the DB thread so that we can wait for the form data to be
336 // cleared. 337 // cleared.
337 void FormDataDBThreadHop(); 338 void FormDataDBThreadHop();
338 339
339 // Callback from the above method. 340 // Callback from the above method.
340 void OnClearedFormData(); 341 void OnClearedFormData();
341 342
343 // Callback when the shader cache has been deleted.
344 // Invokes NotifyAndDeleteIfDone.
345 void ClearedShaderCache();
346
347 // Invokes the ClearedShaderCache on the UI thread.
348 void ClearedShaderCacheOnIOThread();
349
350 // Invoked on the IO thread to delete from the shader cache.
351 void ClearShaderCacheOnIOThread(const base::FilePath path,
352 const base::Time delete_begin,
353 const base::Time delete_end);
jonathan.backer 2013/03/20 18:39:05 nit: formatting.
dsinclair 2013/03/21 17:46:59 Done.
354
355 // Performs the actual work to delete the shader cache.
356 void DoClearShaderCache(int rv);
jonathan.backer 2013/03/20 18:39:05 nix this.
dsinclair 2013/03/21 17:46:59 Done.
357
342 // Returns true if we're all done. 358 // Returns true if we're all done.
343 bool AllDone(); 359 bool AllDone();
344 360
345 content::NotificationRegistrar registrar_; 361 content::NotificationRegistrar registrar_;
346 362
347 // Profile we're to remove from. 363 // Profile we're to remove from.
348 Profile* profile_; 364 Profile* profile_;
349 365
350 // The QuotaManager is owned by the profile; we can use a raw pointer here, 366 // The QuotaManager is owned by the profile; we can use a raw pointer here,
351 // and rely on the profile to destroy the object whenever it's reasonable. 367 // and rely on the profile to destroy the object whenever it's reasonable.
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 bool waiting_for_clear_history_; 409 bool waiting_for_clear_history_;
394 bool waiting_for_clear_hostname_resolution_cache_; 410 bool waiting_for_clear_hostname_resolution_cache_;
395 bool waiting_for_clear_local_storage_; 411 bool waiting_for_clear_local_storage_;
396 bool waiting_for_clear_nacl_cache_; 412 bool waiting_for_clear_nacl_cache_;
397 bool waiting_for_clear_network_predictor_; 413 bool waiting_for_clear_network_predictor_;
398 bool waiting_for_clear_networking_history_; 414 bool waiting_for_clear_networking_history_;
399 bool waiting_for_clear_plugin_data_; 415 bool waiting_for_clear_plugin_data_;
400 bool waiting_for_clear_quota_managed_data_; 416 bool waiting_for_clear_quota_managed_data_;
401 bool waiting_for_clear_server_bound_certs_; 417 bool waiting_for_clear_server_bound_certs_;
402 bool waiting_for_clear_session_storage_; 418 bool waiting_for_clear_session_storage_;
419 bool waiting_for_clear_shader_cache_;
403 420
404 // Tracking how many origins need to be deleted, and whether we're finished 421 // Tracking how many origins need to be deleted, and whether we're finished
405 // gathering origins. 422 // gathering origins.
406 int quota_managed_origins_to_delete_count_; 423 int quota_managed_origins_to_delete_count_;
407 int quota_managed_storage_types_to_delete_count_; 424 int quota_managed_storage_types_to_delete_count_;
408 425
409 // The removal mask for the current removal operation. 426 // The removal mask for the current removal operation.
410 int remove_mask_; 427 int remove_mask_;
411 428
412 // The origin for the current removal operation. 429 // The origin for the current removal operation.
413 GURL remove_origin_; 430 GURL remove_origin_;
414 431
415 // From which types of origins should we remove data? 432 // From which types of origins should we remove data?
416 int origin_set_mask_; 433 int origin_set_mask_;
417 434
418 ObserverList<Observer> observer_list_; 435 ObserverList<Observer> observer_list_;
419 436
420 // Used if we need to clear history. 437 // Used if we need to clear history.
421 CancelableTaskTracker history_task_tracker_; 438 CancelableTaskTracker history_task_tracker_;
422 439
423 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 440 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
424 }; 441 };
425 442
426 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 443 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | content/browser/gpu/shader_disk_cache_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698