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

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

Issue 15984016: Call scoped_refptr<T>::get() rather than relying on implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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
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 1747 matching lines...) Expand 10 before | Expand all | Expand 10 after
1758 std::vector<DictionaryValue*>* GetAppInfoFromExtensions( 1758 std::vector<DictionaryValue*>* GetAppInfoFromExtensions(
1759 const ExtensionSet* extensions, 1759 const ExtensionSet* extensions,
1760 ExtensionService* ext_service) { 1760 ExtensionService* ext_service) {
1761 std::vector<DictionaryValue*>* apps_list = 1761 std::vector<DictionaryValue*>* apps_list =
1762 new std::vector<DictionaryValue*>(); 1762 new std::vector<DictionaryValue*>();
1763 for (ExtensionSet::const_iterator ext = extensions->begin(); 1763 for (ExtensionSet::const_iterator ext = extensions->begin();
1764 ext != extensions->end(); ++ext) { 1764 ext != extensions->end(); ++ext) {
1765 // Only return information about extensions that are actually apps. 1765 // Only return information about extensions that are actually apps.
1766 if ((*ext)->is_app()) { 1766 if ((*ext)->is_app()) {
1767 DictionaryValue* app_info = new DictionaryValue(); 1767 DictionaryValue* app_info = new DictionaryValue();
1768 AppLauncherHandler::CreateAppInfo(*ext, ext_service, app_info); 1768 AppLauncherHandler::CreateAppInfo(ext->get(), ext_service, app_info);
1769 app_info->SetBoolean("is_component_extension", 1769 app_info->SetBoolean(
1770 "is_component_extension",
1770 (*ext)->location() == extensions::Manifest::COMPONENT); 1771 (*ext)->location() == extensions::Manifest::COMPONENT);
1771 1772
1772 // Convert the launch_type integer into a more descriptive string. 1773 // Convert the launch_type integer into a more descriptive string.
1773 int launch_type; 1774 int launch_type;
1774 const char* kLaunchType = "launch_type"; 1775 const char* kLaunchType = "launch_type";
1775 if (!app_info->GetInteger(kLaunchType, &launch_type)) { 1776 if (!app_info->GetInteger(kLaunchType, &launch_type)) {
1776 NOTREACHED() << "Can't get integer from key " << kLaunchType; 1777 NOTREACHED() << "Can't get integer from key " << kLaunchType;
1777 continue; 1778 continue;
1778 } 1779 }
1779 if (launch_type == extensions::ExtensionPrefs::LAUNCH_PINNED) { 1780 if (launch_type == extensions::ExtensionPrefs::LAUNCH_PINNED) {
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
2652 if (automation_.get()) { 2653 if (automation_.get()) {
2653 AutomationJSONReply(automation_.get(), reply_message_.release()) 2654 AutomationJSONReply(automation_.get(), reply_message_.release())
2654 .SendSuccess(NULL); 2655 .SendSuccess(NULL);
2655 } 2656 }
2656 delete this; 2657 delete this;
2657 } 2658 }
2658 } else { 2659 } else {
2659 NOTREACHED(); 2660 NOTREACHED();
2660 } 2661 }
2661 } 2662 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_provider.cc ('k') | chrome/browser/automation/testing_automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698