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

Side by Side Diff: chrome/browser/extensions/extension_action_icon_factory_unittest.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 (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_action_icon_factory.h" 5 #include "chrome/browser/extensions/extension_action_icon_factory.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/json/json_file_value_serializer.h" 9 #include "base/json/json_file_value_serializer.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 std::string error; 107 std::string error;
108 JSONFileValueSerializer serializer(test_file.AppendASCII("manifest.json")); 108 JSONFileValueSerializer serializer(test_file.AppendASCII("manifest.json"));
109 scoped_ptr<DictionaryValue> valid_value( 109 scoped_ptr<DictionaryValue> valid_value(
110 static_cast<DictionaryValue*>(serializer.Deserialize(&error_code, 110 static_cast<DictionaryValue*>(serializer.Deserialize(&error_code,
111 &error))); 111 &error)));
112 EXPECT_EQ(0, error_code) << error; 112 EXPECT_EQ(0, error_code) << error;
113 if (error_code != 0) 113 if (error_code != 0)
114 return NULL; 114 return NULL;
115 115
116 EXPECT_TRUE(valid_value.get()); 116 EXPECT_TRUE(valid_value.get());
117 if (!valid_value.get()) 117 if (!valid_value)
118 return NULL; 118 return NULL;
119 119
120 scoped_refptr<Extension> extension = 120 scoped_refptr<Extension> extension =
121 Extension::Create(test_file, location, *valid_value, 121 Extension::Create(test_file, location, *valid_value,
122 Extension::NO_FLAGS, &error); 122 Extension::NO_FLAGS, &error);
123 EXPECT_TRUE(extension) << error; 123 EXPECT_TRUE(extension) << error;
124 if (extension) 124 if (extension)
125 extension_service_->AddExtension(extension); 125 extension_service_->AddExtension(extension);
126 return extension; 126 return extension;
127 } 127 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 icon = icon_factory.GetIcon(1); 282 icon = icon_factory.GetIcon(1);
283 283
284 EXPECT_TRUE(ImageRepsAreEqual( 284 EXPECT_TRUE(ImageRepsAreEqual(
285 default_icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P), 285 default_icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P),
286 icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P))); 286 icon.ToImageSkia()->GetRepresentation(ui::SCALE_FACTOR_100P)));
287 287
288 } 288 }
289 289
290 } // namespace 290 } // namespace
291 } // namespace extensions 291 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_action_icon_factory.cc ('k') | chrome/browser/extensions/extension_creator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698