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

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

Issue 5915004: Introduce incognito preference settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed whitespaces in mac files Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 namespace { 547 namespace {
548 // TODO(akalin): Put this somewhere where both crx_installer.cc and 548 // TODO(akalin): Put this somewhere where both crx_installer.cc and
549 // this file can use it. 549 // this file can use it.
550 void DeleteFileHelper(const FilePath& path, bool recursive) { 550 void DeleteFileHelper(const FilePath& path, bool recursive) {
551 CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 551 CHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
552 file_util::Delete(path, recursive); 552 file_util::Delete(path, recursive);
553 } 553 }
554 } // namespace 554 } // namespace
555 555
556 void ExtensionService::UpdateExtension(const std::string& id, 556 void ExtensionService::UpdateExtension(const std::string& id,
557 const FilePath& extension_path, 557 const FilePath& extension_path,
558 const GURL& download_url) { 558 const GURL& download_url) {
559 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 559 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
560 560
561 PendingExtensionMap::const_iterator it = pending_extensions_.find(id); 561 PendingExtensionMap::const_iterator it = pending_extensions_.find(id);
562 bool is_pending_extension = (it != pending_extensions_.end()); 562 bool is_pending_extension = (it != pending_extensions_.end());
563 563
564 const Extension* extension = GetExtensionByIdInternal(id, true, true); 564 const Extension* extension = GetExtensionByIdInternal(id, true, true);
565 if (!is_pending_extension && !extension) { 565 if (!is_pending_extension && !extension) {
566 LOG(WARNING) << "Will not update extension " << id 566 LOG(WARNING) << "Will not update extension " << id
567 << " because it is not installed or pending"; 567 << " because it is not installed or pending";
568 // Delete extension_path since we're not creating a CrxInstaller 568 // Delete extension_path since we're not creating a CrxInstaller
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1985 } 1985 }
1986 1986
1987 void ExtensionService::SetBeingUpgraded(const Extension* extension, 1987 void ExtensionService::SetBeingUpgraded(const Extension* extension,
1988 bool value) { 1988 bool value) {
1989 extension_runtime_data_[extension->id()].being_upgraded = value; 1989 extension_runtime_data_[extension->id()].being_upgraded = value;
1990 } 1990 }
1991 1991
1992 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) { 1992 PropertyBag* ExtensionService::GetPropertyBag(const Extension* extension) {
1993 return &extension_runtime_data_[extension->id()].property_bag; 1993 return &extension_runtime_data_[extension->id()].property_bag;
1994 } 1994 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698