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_process_manager.cc

Issue 12189018: <webview>: Implement WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with ToT + cleanup Created 7 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/webview/webview_guest.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_process_manager.h" 5 #include "chrome/browser/extensions/extension_process_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 422
423 return count; 423 return count;
424 } 424 }
425 425
426 int ExtensionProcessManager::DecrementLazyKeepaliveCount( 426 int ExtensionProcessManager::DecrementLazyKeepaliveCount(
427 const Extension* extension) { 427 const Extension* extension) {
428 if (!BackgroundInfo::HasLazyBackgroundPage(extension)) 428 if (!BackgroundInfo::HasLazyBackgroundPage(extension))
429 return 0; 429 return 0;
430 430
431 int& count = background_page_data_[extension->id()].lazy_keepalive_count; 431 int& count = background_page_data_[extension->id()].lazy_keepalive_count;
432 // TODO(fsamuel): What to do here? This fires when using WebRequests in
433 // <webview>.
Matt Perry 2013/05/16 21:16:38 still?
Fady Samuel 2013/05/17 03:02:33 No, this has been fixed. This is a stale comment.
432 DCHECK_GT(count, 0); 434 DCHECK_GT(count, 0);
433 if (--count == 0) { 435 if (--count == 0) {
434 MessageLoop::current()->PostDelayedTask( 436 MessageLoop::current()->PostDelayedTask(
435 FROM_HERE, 437 FROM_HERE,
436 base::Bind(&ExtensionProcessManager::OnLazyBackgroundPageIdle, 438 base::Bind(&ExtensionProcessManager::OnLazyBackgroundPageIdle,
437 weak_ptr_factory_.GetWeakPtr(), extension->id(), 439 weak_ptr_factory_.GetWeakPtr(), extension->id(),
438 ++background_page_data_[extension->id()].close_sequence_id), 440 ++background_page_data_[extension->id()].close_sequence_id),
439 event_page_idle_time_); 441 event_page_idle_time_);
440 } 442 }
441 443
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 if (service && service->is_ready()) 895 if (service && service->is_ready())
894 CreateBackgroundHostsForProfileStartup(); 896 CreateBackgroundHostsForProfileStartup();
895 } 897 }
896 break; 898 break;
897 } 899 }
898 default: 900 default:
899 ExtensionProcessManager::Observe(type, source, details); 901 ExtensionProcessManager::Observe(type, source, details);
900 break; 902 break;
901 } 903 }
902 } 904 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/webview/webview_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698