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

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

Issue 1329083002: Clear webapp storage when site data is cleared (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix silly test mistake Created 5 years, 3 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
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_WEBSQL = 1 << 11, 75 REMOVE_WEBSQL = 1 << 11,
76 REMOVE_CHANNEL_IDS = 1 << 12, 76 REMOVE_CHANNEL_IDS = 1 << 12,
77 REMOVE_CONTENT_LICENSES = 1 << 13, 77 REMOVE_CONTENT_LICENSES = 1 << 13,
78 REMOVE_SERVICE_WORKERS = 1 << 14, 78 REMOVE_SERVICE_WORKERS = 1 << 14,
79 REMOVE_SITE_USAGE_DATA = 1 << 15, 79 REMOVE_SITE_USAGE_DATA = 1 << 15,
80 // REMOVE_NOCHECKS intentionally does not check if the Profile's prohibited 80 // REMOVE_NOCHECKS intentionally does not check if the Profile's prohibited
81 // from deleting history or downloads. 81 // from deleting history or downloads.
82 REMOVE_NOCHECKS = 1 << 16, 82 REMOVE_NOCHECKS = 1 << 16,
83 REMOVE_WEBRTC_IDENTITY = 1 << 17, 83 REMOVE_WEBRTC_IDENTITY = 1 << 17,
84 REMOVE_CACHE_STORAGE = 1 << 18, 84 REMOVE_CACHE_STORAGE = 1 << 18,
85 #if defined(OS_ANDROID)
86 REMOVE_WEBAPP_DATA = 1 << 19,
87 #endif
85 // The following flag is used only in tests. In normal usage, hosted app 88 // 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 89 // data is controlled by the REMOVE_COOKIES flag, applied to the
87 // protected-web origin. 90 // protected-web origin.
88 REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31, 91 REMOVE_HOSTED_APP_DATA_TESTONLY = 1 << 31,
89 92
90 // "Site data" includes cookies, appcache, file systems, indexedDBs, local 93 // "Site data" includes cookies, appcache, file systems, indexedDBs, local
91 // storage, webSQL, service workers, cache storage, and plugin data. 94 // storage, webSQL, service workers, cache storage, plugin data, and web app
95 // data (on Android).
92 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS | 96 REMOVE_SITE_DATA = REMOVE_APPCACHE | REMOVE_COOKIES | REMOVE_FILE_SYSTEMS |
93 REMOVE_INDEXEDDB | 97 REMOVE_INDEXEDDB |
94 REMOVE_LOCAL_STORAGE | 98 REMOVE_LOCAL_STORAGE |
95 REMOVE_PLUGIN_DATA | 99 REMOVE_PLUGIN_DATA |
96 REMOVE_SERVICE_WORKERS | 100 REMOVE_SERVICE_WORKERS |
97 REMOVE_CACHE_STORAGE | 101 REMOVE_CACHE_STORAGE |
98 REMOVE_WEBSQL | 102 REMOVE_WEBSQL |
99 REMOVE_CHANNEL_IDS | 103 REMOVE_CHANNEL_IDS |
100 REMOVE_SITE_USAGE_DATA | 104 REMOVE_SITE_USAGE_DATA |
105 #if defined(OS_ANDROID)
106 REMOVE_WEBAPP_DATA |
107 #endif
101 REMOVE_WEBRTC_IDENTITY, 108 REMOVE_WEBRTC_IDENTITY,
102 109
103 // Includes all the available remove options. Meant to be used by clients 110 // Includes all the available remove options. Meant to be used by clients
104 // that wish to wipe as much data as possible from a Profile, to make it 111 // that wish to wipe as much data as possible from a Profile, to make it
105 // look like a new Profile. 112 // look like a new Profile.
106 REMOVE_ALL = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS | 113 REMOVE_ALL = REMOVE_SITE_DATA | REMOVE_CACHE | REMOVE_DOWNLOADS |
107 REMOVE_FORM_DATA | 114 REMOVE_FORM_DATA |
108 REMOVE_HISTORY | 115 REMOVE_HISTORY |
109 REMOVE_PASSWORDS | 116 REMOVE_PASSWORDS |
110 REMOVE_CONTENT_LICENSES, 117 REMOVE_CONTENT_LICENSES,
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 void OnClearedStoragePartitionData(); 386 void OnClearedStoragePartitionData();
380 387
381 #if defined(ENABLE_WEBRTC) 388 #if defined(ENABLE_WEBRTC)
382 // Callback on UI thread when the WebRTC logs have been deleted. 389 // Callback on UI thread when the WebRTC logs have been deleted.
383 void OnClearedWebRtcLogs(); 390 void OnClearedWebRtcLogs();
384 #endif 391 #endif
385 392
386 #if defined(OS_ANDROID) 393 #if defined(OS_ANDROID)
387 // Callback on UI thread when the precache history has been cleared. 394 // Callback on UI thread when the precache history has been cleared.
388 void OnClearedPrecacheHistory(); 395 void OnClearedPrecacheHistory();
396
397 // Callback on UI thread when the webapp data has been cleared.
398 void OnClearedWebappData();
389 #endif 399 #endif
390 400
391 void OnClearedDomainReliabilityMonitor(); 401 void OnClearedDomainReliabilityMonitor();
392 402
393 // Returns true if we're all done. 403 // Returns true if we're all done.
394 bool AllDone(); 404 bool AllDone();
395 405
396 // Profile we're to remove from. 406 // Profile we're to remove from.
397 Profile* profile_; 407 Profile* profile_;
398 408
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 bool waiting_for_clear_keyword_data_ = false; 449 bool waiting_for_clear_keyword_data_ = false;
440 bool waiting_for_clear_nacl_cache_ = false; 450 bool waiting_for_clear_nacl_cache_ = false;
441 bool waiting_for_clear_network_predictor_ = false; 451 bool waiting_for_clear_network_predictor_ = false;
442 bool waiting_for_clear_networking_history_ = false; 452 bool waiting_for_clear_networking_history_ = false;
443 bool waiting_for_clear_passwords_ = false; 453 bool waiting_for_clear_passwords_ = false;
444 bool waiting_for_clear_platform_keys_ = false; 454 bool waiting_for_clear_platform_keys_ = false;
445 bool waiting_for_clear_plugin_data_ = false; 455 bool waiting_for_clear_plugin_data_ = false;
446 bool waiting_for_clear_pnacl_cache_ = false; 456 bool waiting_for_clear_pnacl_cache_ = false;
447 #if defined(OS_ANDROID) 457 #if defined(OS_ANDROID)
448 bool waiting_for_clear_precache_history_ = false; 458 bool waiting_for_clear_precache_history_ = false;
459 bool waiting_for_clear_webapp_data_ = false;
449 #endif 460 #endif
450 bool waiting_for_clear_storage_partition_data_ = false; 461 bool waiting_for_clear_storage_partition_data_ = false;
451 #if defined(ENABLE_WEBRTC) 462 #if defined(ENABLE_WEBRTC)
452 bool waiting_for_clear_webrtc_logs_ = false; 463 bool waiting_for_clear_webrtc_logs_ = false;
453 #endif 464 #endif
454 465
455 // The removal mask for the current removal operation. 466 // The removal mask for the current removal operation.
456 int remove_mask_ = 0; 467 int remove_mask_ = 0;
457 468
458 // From which types of origins should we remove data? 469 // From which types of origins should we remove data?
459 int origin_type_mask_ = 0; 470 int origin_type_mask_ = 0;
460 471
461 base::ObserverList<Observer> observer_list_; 472 base::ObserverList<Observer> observer_list_;
462 473
463 // Used if we need to clear history. 474 // Used if we need to clear history.
464 base::CancelableTaskTracker history_task_tracker_; 475 base::CancelableTaskTracker history_task_tracker_;
465 476
466 scoped_ptr<TemplateURLService::Subscription> template_url_sub_; 477 scoped_ptr<TemplateURLService::Subscription> template_url_sub_;
467 478
468 // We do not own this. 479 // We do not own this.
469 content::StoragePartition* storage_partition_for_testing_ = nullptr; 480 content::StoragePartition* storage_partition_for_testing_ = nullptr;
470 481
471 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover); 482 DISALLOW_COPY_AND_ASSIGN(BrowsingDataRemover);
472 }; 483 };
473 484
474 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_ 485 #endif // CHROME_BROWSER_BROWSING_DATA_BROWSING_DATA_REMOVER_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/webapps/webapp_registry.cc ('k') | chrome/browser/browsing_data/browsing_data_remover.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698