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

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

Issue 369863002: Revert 281130 "Replace "external_install" boolean parameter with..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 312
313 const Extension* extension = GetExtensionById(context_, 313 const Extension* extension = GetExtensionById(context_,
314 uninstall_extension_id_); 314 uninstall_extension_id_);
315 uninstall_extension_id_.clear(); 315 uninstall_extension_id_.clear();
316 if (!extension) 316 if (!extension)
317 return; 317 return;
318 318
319 ExtensionService* service = 319 ExtensionService* service =
320 ExtensionSystem::Get(context_)->extension_service(); 320 ExtensionSystem::Get(context_)->extension_service();
321 DCHECK(service); 321 DCHECK(service);
322 service->UninstallExtension( 322 service->UninstallExtension(extension->id(), false, NULL);
323 extension->id(),
324 ExtensionService::UNINSTALL_REASON_STORAGE_THRESHOLD_EXCEEDED,
325 NULL);
326 } 323 }
327 324
328 void ExtensionStorageMonitor::ExtensionUninstallCanceled() { 325 void ExtensionStorageMonitor::ExtensionUninstallCanceled() {
329 uninstall_extension_id_.clear(); 326 uninstall_extension_id_.clear();
330 } 327 }
331 328
332 std::string ExtensionStorageMonitor::GetNotificationId( 329 std::string ExtensionStorageMonitor::GetNotificationId(
333 const std::string& extension_id) { 330 const std::string& extension_id) {
334 std::vector<std::string> placeholders; 331 std::vector<std::string> placeholders;
335 placeholders.push_back(context_->GetPath().BaseName().MaybeAsASCII()); 332 placeholders.push_back(context_->GetPath().BaseName().MaybeAsASCII());
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 void ExtensionStorageMonitor::SetStorageNotificationEnabled( 606 void ExtensionStorageMonitor::SetStorageNotificationEnabled(
610 const std::string& extension_id, 607 const std::string& extension_id,
611 bool enable_notifications) { 608 bool enable_notifications) {
612 extension_prefs_->UpdateExtensionPref( 609 extension_prefs_->UpdateExtensionPref(
613 extension_id, 610 extension_id,
614 kPrefDisableStorageNotifications, 611 kPrefDisableStorageNotifications,
615 enable_notifications ? NULL : new base::FundamentalValue(true)); 612 enable_notifications ? NULL : new base::FundamentalValue(true));
616 } 613 }
617 614
618 } // namespace extensions 615 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698