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

Side by Side Diff: chrome/browser/profile_resetter/profile_resetter.cc

Issue 2578723002: Reduce BrowsingDataRemover's dependencies on Chrome (Closed)
Patch Set: A new callsite appeared through rebase - fixed the compilation error. Created 3 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/profile_resetter/profile_resetter.h" 5 #include "chrome/browser/profile_resetter/profile_resetter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 cookies_remover_ = BrowsingDataRemoverFactory::GetForBrowserContext(profile_); 250 cookies_remover_ = BrowsingDataRemoverFactory::GetForBrowserContext(profile_);
251 cookies_remover_->AddObserver(this); 251 cookies_remover_->AddObserver(this);
252 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA | 252 int remove_mask = BrowsingDataRemover::REMOVE_SITE_DATA |
253 BrowsingDataRemover::REMOVE_CACHE; 253 BrowsingDataRemover::REMOVE_CACHE;
254 PrefService* prefs = profile_->GetPrefs(); 254 PrefService* prefs = profile_->GetPrefs();
255 DCHECK(prefs); 255 DCHECK(prefs);
256 256
257 // Don't try to clear LSO data if it's not supported. 257 // Don't try to clear LSO data if it's not supported.
258 if (!prefs->GetBoolean(prefs::kClearPluginLSODataEnabled)) 258 if (!prefs->GetBoolean(prefs::kClearPluginLSODataEnabled))
259 remove_mask &= ~BrowsingDataRemover::REMOVE_PLUGIN_DATA; 259 remove_mask &= ~BrowsingDataRemover::REMOVE_PLUGIN_DATA;
260 cookies_remover_->RemoveAndReply(BrowsingDataRemover::Unbounded(), 260 cookies_remover_->RemoveAndReply(base::Time(), base::Time::Max(), remove_mask,
261 remove_mask,
262 BrowsingDataHelper::UNPROTECTED_WEB, this); 261 BrowsingDataHelper::UNPROTECTED_WEB, this);
263 } 262 }
264 263
265 void ProfileResetter::ResetExtensions() { 264 void ProfileResetter::ResetExtensions() {
266 DCHECK(CalledOnValidThread()); 265 DCHECK(CalledOnValidThread());
267 266
268 std::vector<std::string> brandcode_extensions; 267 std::vector<std::string> brandcode_extensions;
269 master_settings_->GetExtensions(&brandcode_extensions); 268 master_settings_->GetExtensions(&brandcode_extensions);
270 269
271 ExtensionService* extension_service = 270 ExtensionService* extension_service =
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 chrome_exe, 361 chrome_exe,
363 false, 362 false,
364 cancel, 363 cancel,
365 &shortcuts); 364 &shortcuts);
366 } 365 }
367 return shortcuts; 366 return shortcuts;
368 #else 367 #else
369 return std::vector<ShortcutCommand>(); 368 return std::vector<ShortcutCommand>();
370 #endif 369 #endif
371 } 370 }
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_browsertest.cc ('k') | chrome/browser/profiles/profiles_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698