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

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

Issue 890083002: [Extensions] Propagate activeTab hosts to extension background pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/browser/extensions/extension_service.h" 5 #include "chrome/browser/extensions/extension_service.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 #include <set> 9 #include <set>
10 10
(...skipping 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 if (!extension->is_theme()) { 1025 if (!extension->is_theme()) {
1026 for (content::RenderProcessHost::iterator i( 1026 for (content::RenderProcessHost::iterator i(
1027 content::RenderProcessHost::AllHostsIterator()); 1027 content::RenderProcessHost::AllHostsIterator());
1028 !i.IsAtEnd(); i.Advance()) { 1028 !i.IsAtEnd(); i.Advance()) {
1029 content::RenderProcessHost* host = i.GetCurrentValue(); 1029 content::RenderProcessHost* host = i.GetCurrentValue();
1030 Profile* host_profile = 1030 Profile* host_profile =
1031 Profile::FromBrowserContext(host->GetBrowserContext()); 1031 Profile::FromBrowserContext(host->GetBrowserContext());
1032 if (host_profile->GetOriginalProfile() == 1032 if (host_profile->GetOriginalProfile() ==
1033 profile_->GetOriginalProfile()) { 1033 profile_->GetOriginalProfile()) {
1034 std::vector<ExtensionMsg_Loaded_Params> loaded_extensions( 1034 std::vector<ExtensionMsg_Loaded_Params> loaded_extensions(
1035 1, ExtensionMsg_Loaded_Params(extension)); 1035 1, ExtensionMsg_Loaded_Params(extension, false));
not at google - send to devlin 2015/02/05 00:16:13 document this (what does false mean / why is it se
Devlin 2015/02/05 19:54:50 Done.
1036 host->Send( 1036 host->Send(
1037 new ExtensionMsg_Loaded(loaded_extensions)); 1037 new ExtensionMsg_Loaded(loaded_extensions));
1038 } 1038 }
1039 } 1039 }
1040 } 1040 }
1041 1041
1042 // Tell subsystems that use the EXTENSION_LOADED notification about the new 1042 // Tell subsystems that use the EXTENSION_LOADED notification about the new
1043 // extension. 1043 // extension.
1044 // 1044 //
1045 // NOTE: It is important that this happen after notifying the renderers about 1045 // NOTE: It is important that this happen after notifying the renderers about
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2544 } 2544 }
2545 2545
2546 void ExtensionService::OnProfileDestructionStarted() { 2546 void ExtensionService::OnProfileDestructionStarted() {
2547 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs(); 2547 ExtensionIdSet ids_to_unload = registry_->enabled_extensions().GetIDs();
2548 for (ExtensionIdSet::iterator it = ids_to_unload.begin(); 2548 for (ExtensionIdSet::iterator it = ids_to_unload.begin();
2549 it != ids_to_unload.end(); 2549 it != ids_to_unload.end();
2550 ++it) { 2550 ++it) {
2551 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN); 2551 UnloadExtension(*it, UnloadedExtensionInfo::REASON_PROFILE_SHUTDOWN);
2552 } 2552 }
2553 } 2553 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698