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

Side by Side Diff: chrome/browser/extensions/extension_storage_monitor.cc

Issue 421193002: Fix ExtensionServiceTest.ClearExtensionData flakiness (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use base::DoNothing for empty callbacks Created 6 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/extension_storage_monitor.h" 5 #include "chrome/browser/extensions/extension_storage_monitor.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 uninstall_extension_id_.clear(); 317 uninstall_extension_id_.clear();
318 if (!extension) 318 if (!extension)
319 return; 319 return;
320 320
321 ExtensionService* service = 321 ExtensionService* service =
322 ExtensionSystem::Get(context_)->extension_service(); 322 ExtensionSystem::Get(context_)->extension_service();
323 DCHECK(service); 323 DCHECK(service);
324 service->UninstallExtension( 324 service->UninstallExtension(
325 extension->id(), 325 extension->id(),
326 extensions::UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED, 326 extensions::UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED,
327 base::Bind(&base::DoNothing),
327 NULL); 328 NULL);
328 } 329 }
329 330
330 void ExtensionStorageMonitor::ExtensionUninstallCanceled() { 331 void ExtensionStorageMonitor::ExtensionUninstallCanceled() {
331 uninstall_extension_id_.clear(); 332 uninstall_extension_id_.clear();
332 } 333 }
333 334
334 std::string ExtensionStorageMonitor::GetNotificationId( 335 std::string ExtensionStorageMonitor::GetNotificationId(
335 const std::string& extension_id) { 336 const std::string& extension_id) {
336 std::vector<std::string> placeholders; 337 std::vector<std::string> placeholders;
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 void ExtensionStorageMonitor::SetStorageNotificationEnabled( 612 void ExtensionStorageMonitor::SetStorageNotificationEnabled(
612 const std::string& extension_id, 613 const std::string& extension_id,
613 bool enable_notifications) { 614 bool enable_notifications) {
614 extension_prefs_->UpdateExtensionPref( 615 extension_prefs_->UpdateExtensionPref(
615 extension_id, 616 extension_id,
616 kPrefDisableStorageNotifications, 617 kPrefDisableStorageNotifications,
617 enable_notifications ? NULL : new base::FundamentalValue(true)); 618 enable_notifications ? NULL : new base::FundamentalValue(true));
618 } 619 }
619 620
620 } // namespace extensions 621 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/external_install_error.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698