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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/extension_registry.h » ('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 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 "extensions/browser/extension_host.h" 5 #include "extensions/browser/extension_host.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 242
243 void ExtensionHost::OnExtensionReady(content::BrowserContext* browser_context, 243 void ExtensionHost::OnExtensionReady(content::BrowserContext* browser_context,
244 const Extension* extension) { 244 const Extension* extension) {
245 if (is_render_view_creation_pending_) 245 if (is_render_view_creation_pending_)
246 CreateRenderViewNow(); 246 CreateRenderViewNow();
247 } 247 }
248 248
249 void ExtensionHost::OnExtensionUnloaded( 249 void ExtensionHost::OnExtensionUnloaded(
250 content::BrowserContext* browser_context, 250 content::BrowserContext* browser_context,
251 const Extension* extension, 251 const Extension* extension,
252 UnloadedExtensionInfo::Reason reason) { 252 UnloadedExtensionReason reason) {
253 // The extension object will be deleted after this notification has been sent. 253 // The extension object will be deleted after this notification has been sent.
254 // Null it out so that dirty pointer issues don't arise in cases when multiple 254 // Null it out so that dirty pointer issues don't arise in cases when multiple
255 // ExtensionHost objects pointing to the same Extension are present. 255 // ExtensionHost objects pointing to the same Extension are present.
256 if (extension_ == extension) { 256 if (extension_ == extension) {
257 extension_ = nullptr; 257 extension_ = nullptr;
258 } 258 }
259 } 259 }
260 260
261 void ExtensionHost::RenderProcessGone(base::TerminationStatus status) { 261 void ExtensionHost::RenderProcessGone(base::TerminationStatus status) {
262 // During browser shutdown, we may use sudden termination on an extension 262 // During browser shutdown, we may use sudden termination on an extension
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 } 483 }
484 } else if (extension_host_type_ == VIEW_TYPE_EXTENSION_POPUP) { 484 } else if (extension_host_type_ == VIEW_TYPE_EXTENSION_POPUP) {
485 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupLoadTime2", 485 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupLoadTime2",
486 load_start_->Elapsed()); 486 load_start_->Elapsed());
487 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupCreateTime", 487 UMA_HISTOGRAM_MEDIUM_TIMES("Extensions.PopupCreateTime",
488 create_start_.Elapsed()); 488 create_start_.Elapsed());
489 } 489 }
490 } 490 }
491 491
492 } // namespace extensions 492 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/extension_host.h ('k') | extensions/browser/extension_registry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698