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

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

Issue 13949011: Cleanup: Remove unnecessary ".get()" from scoped_ptrs<>. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/media_galleries_handler.h" 5 #include "chrome/browser/extensions/media_galleries_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 for (ListValue::const_iterator iter = extension_actions->begin(); 84 for (ListValue::const_iterator iter = extension_actions->begin();
85 iter != extension_actions->end(); 85 iter != extension_actions->end();
86 ++iter) { 86 ++iter) {
87 if (!(*iter)->IsType(Value::TYPE_DICTIONARY)) { 87 if (!(*iter)->IsType(Value::TYPE_DICTIONARY)) {
88 *error = ASCIIToUTF16(errors::kInvalidMediaGalleriesHandler); 88 *error = ASCIIToUTF16(errors::kInvalidMediaGalleriesHandler);
89 return false; 89 return false;
90 } 90 }
91 scoped_ptr<MediaGalleriesHandler> action( 91 scoped_ptr<MediaGalleriesHandler> action(
92 LoadMediaGalleriesHandler( 92 LoadMediaGalleriesHandler(
93 extension_id, reinterpret_cast<DictionaryValue*>(*iter), error)); 93 extension_id, reinterpret_cast<DictionaryValue*>(*iter), error));
94 if (!action.get()) 94 if (!action)
95 return false; // Failed to parse media galleries action definition. 95 return false; // Failed to parse media galleries action definition.
96 result->push_back(linked_ptr<MediaGalleriesHandler>(action.release())); 96 result->push_back(linked_ptr<MediaGalleriesHandler>(action.release()));
97 } 97 }
98 return true; 98 return true;
99 } 99 }
100 100
101 } // namespace 101 } // namespace
102 102
103 MediaGalleriesHandler::MediaGalleriesHandler() { 103 MediaGalleriesHandler::MediaGalleriesHandler() {
104 } 104 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 return false; // Failed to parse media galleries actions definition. 138 return false; // Failed to parse media galleries actions definition.
139 } 139 }
140 140
141 extension->SetManifestData(keys::kMediaGalleriesHandlers, info.release()); 141 extension->SetManifestData(keys::kMediaGalleriesHandlers, info.release());
142 return true; 142 return true;
143 } 143 }
144 144
145 const std::vector<std::string> MediaGalleriesHandlerParser::Keys() const { 145 const std::vector<std::string> MediaGalleriesHandlerParser::Keys() const {
146 return SingleKey(keys::kMediaGalleriesHandlers); 146 return SingleKey(keys::kMediaGalleriesHandlers);
147 } 147 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/installed_loader.cc ('k') | chrome/browser/extensions/menu_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698