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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 2892403002: Introduce lock screen app context to extension features (Closed)
Patch Set: . 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
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/renderer/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 UMA_HISTOGRAM_TIMES("Extensions.DidCreateScriptContext_BlessedWebPage", 410 UMA_HISTOGRAM_TIMES("Extensions.DidCreateScriptContext_BlessedWebPage",
411 elapsed); 411 elapsed);
412 break; 412 break;
413 case Feature::WEBUI_CONTEXT: 413 case Feature::WEBUI_CONTEXT:
414 UMA_HISTOGRAM_TIMES("Extensions.DidCreateScriptContext_WebUI", elapsed); 414 UMA_HISTOGRAM_TIMES("Extensions.DidCreateScriptContext_WebUI", elapsed);
415 break; 415 break;
416 case Feature::SERVICE_WORKER_CONTEXT: 416 case Feature::SERVICE_WORKER_CONTEXT:
417 // Handled in DidInitializeServiceWorkerContextOnWorkerThread(). 417 // Handled in DidInitializeServiceWorkerContextOnWorkerThread().
418 NOTREACHED(); 418 NOTREACHED();
419 break; 419 break;
420 case Feature::LOCK_SCREEN_EXTENSION_CONTEXT:
421 UMA_HISTOGRAM_TIMES(
422 "Extensions.DidCreateScriptContext_LockScreenExtension", elapsed);
423 break;
420 } 424 }
421 425
422 VLOG(1) << "Num tracked contexts: " << script_context_set_->size(); 426 VLOG(1) << "Num tracked contexts: " << script_context_set_->size();
423 } 427 }
424 428
425 void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread( 429 void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
426 v8::Local<v8::Context> v8_context, 430 v8::Local<v8::Context> v8_context,
427 int64_t service_worker_version_id, 431 int64_t service_worker_version_id,
428 const GURL& url) { 432 const GURL& url) {
429 const base::TimeTicks start_time = base::TimeTicks::Now(); 433 const base::TimeTicks start_time = base::TimeTicks::Now();
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1473 // The "guestViewDeny" module must always be loaded last. It registers 1477 // The "guestViewDeny" module must always be loaded last. It registers
1474 // error-providing custom elements for the GuestView types that are not 1478 // error-providing custom elements for the GuestView types that are not
1475 // available, and thus all of those types must have been checked and loaded 1479 // available, and thus all of those types must have been checked and loaded
1476 // (or not loaded) beforehand. 1480 // (or not loaded) beforehand.
1477 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1481 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1478 module_system->Require("guestViewDeny"); 1482 module_system->Require("guestViewDeny");
1479 } 1483 }
1480 } 1484 }
1481 1485
1482 } // namespace extensions 1486 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698