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

Side by Side Diff: chrome/browser/extensions/api/autotest_private/autotest_private_api.cc

Issue 2624583002: Remove redundant c_str() calls. (Closed)
Patch Set: Created 3 years, 11 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) 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/api/autotest_private/autotest_private_api.h" 5 #include "chrome/browser/extensions/api/autotest_private/autotest_private_api.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 return permissions; 56 return permissions;
57 } 57 }
58 58
59 base::ListValue* GetAPIPermissions(const Extension* ext) { 59 base::ListValue* GetAPIPermissions(const Extension* ext) {
60 base::ListValue* permissions = new base::ListValue; 60 base::ListValue* permissions = new base::ListValue;
61 std::set<std::string> perm_list = 61 std::set<std::string> perm_list =
62 ext->permissions_data()->active_permissions().GetAPIsAsStrings(); 62 ext->permissions_data()->active_permissions().GetAPIsAsStrings();
63 for (std::set<std::string>::const_iterator perm = perm_list.begin(); 63 for (std::set<std::string>::const_iterator perm = perm_list.begin();
64 perm != perm_list.end(); ++perm) { 64 perm != perm_list.end(); ++perm) {
65 permissions->AppendString(perm->c_str()); 65 permissions->AppendString(*perm);
66 } 66 }
67 return permissions; 67 return permissions;
68 } 68 }
69 69
70 bool IsTestMode(content::BrowserContext* context) { 70 bool IsTestMode(content::BrowserContext* context) {
71 return AutotestPrivateAPI::GetFactoryInstance()->Get(context)->test_mode(); 71 return AutotestPrivateAPI::GetFactoryInstance()->Get(context)->test_mode();
72 } 72 }
73 73
74 } // namespace 74 } // namespace
75 75
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
394 return new AutotestPrivateAPI(); 394 return new AutotestPrivateAPI();
395 } 395 }
396 396
397 AutotestPrivateAPI::AutotestPrivateAPI() : test_mode_(false) { 397 AutotestPrivateAPI::AutotestPrivateAPI() : test_mode_(false) {
398 } 398 }
399 399
400 AutotestPrivateAPI::~AutotestPrivateAPI() { 400 AutotestPrivateAPI::~AutotestPrivateAPI() {
401 } 401 }
402 402
403 } // namespace extensions 403 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698