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

Side by Side Diff: chrome/browser/automation/automation_provider_observers.cc

Issue 9370013: Simplify the handling of crashed extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model.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 (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/automation/automation_provider_observers.h" 5 #include "chrome/browser/automation/automation_provider_observers.h"
6 6
7 #include <deque> 7 #include <deque>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after
2110 // Process disabled extensions. 2110 // Process disabled extensions.
2111 const ExtensionSet* disabled_extensions = ext_service->disabled_extensions(); 2111 const ExtensionSet* disabled_extensions = ext_service->disabled_extensions();
2112 std::vector<DictionaryValue*>* disabled_apps = GetAppInfoFromExtensions( 2112 std::vector<DictionaryValue*>* disabled_apps = GetAppInfoFromExtensions(
2113 disabled_extensions, ext_service); 2113 disabled_extensions, ext_service);
2114 for (std::vector<DictionaryValue*>::const_iterator app = 2114 for (std::vector<DictionaryValue*>::const_iterator app =
2115 disabled_apps->begin(); app != disabled_apps->end(); ++app) { 2115 disabled_apps->begin(); app != disabled_apps->end(); ++app) {
2116 (*app)->SetBoolean("is_disabled", true); 2116 (*app)->SetBoolean("is_disabled", true);
2117 apps_list->Append(*app); 2117 apps_list->Append(*app);
2118 } 2118 }
2119 delete disabled_apps; 2119 delete disabled_apps;
2120 // Process terminated extensions.
2121 const ExtensionSet* terminated_extensions =
2122 ext_service->terminated_extensions();
2123 std::vector<DictionaryValue*>* terminated_apps = GetAppInfoFromExtensions(
2124 terminated_extensions, ext_service);
2125 for (std::vector<DictionaryValue*>::const_iterator app =
2126 terminated_apps->begin(); app != terminated_apps->end(); ++app) {
2127 (*app)->SetBoolean("is_disabled", true);
2128 apps_list->Append(*app);
2129 }
2130 delete terminated_apps;
2131 ntp_info_->Set("apps", apps_list); 2120 ntp_info_->Set("apps", apps_list);
2132 2121
2133 // Get the info that would be displayed in the recently closed section. 2122 // Get the info that would be displayed in the recently closed section.
2134 ListValue* recently_closed_list = new ListValue; 2123 ListValue* recently_closed_list = new ListValue;
2135 RecentlyClosedTabsHandler::CreateRecentlyClosedValues(service->entries(), 2124 RecentlyClosedTabsHandler::CreateRecentlyClosedValues(service->entries(),
2136 recently_closed_list); 2125 recently_closed_list);
2137 ntp_info_->Set("recently_closed", recently_closed_list); 2126 ntp_info_->Set("recently_closed", recently_closed_list);
2138 2127
2139 // Add default site URLs. 2128 // Add default site URLs.
2140 ListValue* default_sites_list = new ListValue; 2129 ListValue* default_sites_list = new ListValue;
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 } 3183 }
3195 3184
3196 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr(); 3185 ExtensionHost* host = content::Details<ExtensionHost>(details).ptr();
3197 if (host->extension_id() == extension_id_ && 3186 if (host->extension_id() == extension_id_ &&
3198 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) { 3187 host->extension_host_type() == chrome::VIEW_TYPE_EXTENSION_POPUP) {
3199 AutomationJSONReply(automation_, reply_message_.release()) 3188 AutomationJSONReply(automation_, reply_message_.release())
3200 .SendSuccess(NULL); 3189 .SendSuccess(NULL);
3201 delete this; 3190 delete this;
3202 } 3191 }
3203 } 3192 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/background/background_application_list_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698