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

Side by Side Diff: extensions/browser/info_map.cc

Issue 67253003: Reland: Move ExtensionProcessManager to src/extensions, part 4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase process_manager Created 7 years, 1 month 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
« no previous file with comments | « extensions/browser/DEPS ('k') | extensions/browser/lazy_background_task_queue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "extensions/browser/info_map.h" 5 #include "extensions/browser/info_map.h"
6 6
7 #include "chrome/common/extensions/extension.h" 7 #include "chrome/common/extensions/extension.h"
8 #include "chrome/common/extensions/extension_set.h" 8 #include "chrome/common/extensions/extension_set.h"
9 #include "content/public/browser/browser_thread.h" 9 #include "content/public/browser/browser_thread.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 } 77 }
78 78
79 base::Time InfoMap::GetInstallTime(const std::string& extension_id) const { 79 base::Time InfoMap::GetInstallTime(const std::string& extension_id) const {
80 ExtraDataMap::const_iterator iter = extra_data_.find(extension_id); 80 ExtraDataMap::const_iterator iter = extra_data_.find(extension_id);
81 if (iter != extra_data_.end()) 81 if (iter != extra_data_.end())
82 return iter->second.install_time; 82 return iter->second.install_time;
83 return base::Time(); 83 return base::Time();
84 } 84 }
85 85
86 bool InfoMap::IsIncognitoEnabled(const std::string& extension_id) const { 86 bool InfoMap::IsIncognitoEnabled(const std::string& extension_id) const {
87 // Keep in sync with duplicate in extension_process_manager.cc. 87 // Keep in sync with duplicate in extensions/browser/process_manager.cc.
88 ExtraDataMap::const_iterator iter = extra_data_.find(extension_id); 88 ExtraDataMap::const_iterator iter = extra_data_.find(extension_id);
89 if (iter != extra_data_.end()) 89 if (iter != extra_data_.end())
90 return iter->second.incognito_enabled; 90 return iter->second.incognito_enabled;
91 return false; 91 return false;
92 } 92 }
93 93
94 bool InfoMap::CanCrossIncognito(const Extension* extension) const { 94 bool InfoMap::CanCrossIncognito(const Extension* extension) const {
95 // This is duplicated from ExtensionService :(. 95 // This is duplicated from ExtensionService :(.
96 return IsIncognitoEnabled(extension->id()) && 96 return IsIncognitoEnabled(extension->id()) &&
97 !IncognitoInfo::IsSplitMode(extension); 97 !IncognitoInfo::IsSplitMode(extension);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 } 172 }
173 173
174 InfoMap::~InfoMap() { 174 InfoMap::~InfoMap() {
175 if (quota_service_) { 175 if (quota_service_) {
176 BrowserThread::DeleteSoon( 176 BrowserThread::DeleteSoon(
177 BrowserThread::IO, FROM_HERE, quota_service_.release()); 177 BrowserThread::IO, FROM_HERE, quota_service_.release());
178 } 178 }
179 } 179 }
180 180
181 } // namespace extensions 181 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/DEPS ('k') | extensions/browser/lazy_background_task_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698