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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs_api.cc

Issue 2781443005: Remove unnecessary calls to std::basic_string<>::c_str() (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_helpers.cc ('k') | no next file » | 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/extensions/api/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <algorithm> 8 #include <algorithm>
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after
1782 } 1782 }
1783 1783
1784 registrar_.RemoveAll(); 1784 registrar_.RemoveAll();
1785 1785
1786 // Call GotLanguage in all cases as we want to guarantee the callback is 1786 // Call GotLanguage in all cases as we want to guarantee the callback is
1787 // called for every API call the extension made. 1787 // called for every API call the extension made.
1788 GotLanguage(language); 1788 GotLanguage(language);
1789 } 1789 }
1790 1790
1791 void TabsDetectLanguageFunction::GotLanguage(const std::string& language) { 1791 void TabsDetectLanguageFunction::GotLanguage(const std::string& language) {
1792 SetResult(base::MakeUnique<base::Value>(language.c_str())); 1792 SetResult(base::MakeUnique<base::Value>(language));
1793 SendResponse(true); 1793 SendResponse(true);
1794 1794
1795 Release(); // Balanced in Run() 1795 Release(); // Balanced in Run()
1796 } 1796 }
1797 1797
1798 ExecuteCodeInTabFunction::ExecuteCodeInTabFunction() 1798 ExecuteCodeInTabFunction::ExecuteCodeInTabFunction()
1799 : chrome_details_(this), execute_tab_id_(-1) { 1799 : chrome_details_(this), execute_tab_id_(-1) {
1800 } 1800 }
1801 1801
1802 ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {} 1802 ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {}
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
2122 params->tab_id 2122 params->tab_id
2123 ? ErrorUtils::FormatErrorMessage(keys::kCannotDiscardTab, 2123 ? ErrorUtils::FormatErrorMessage(keys::kCannotDiscardTab,
2124 base::IntToString(*params->tab_id)) 2124 base::IntToString(*params->tab_id))
2125 : keys::kCannotFindTabToDiscard)); 2125 : keys::kCannotFindTabToDiscard));
2126 } 2126 }
2127 2127
2128 TabsDiscardFunction::TabsDiscardFunction() {} 2128 TabsDiscardFunction::TabsDiscardFunction() {}
2129 TabsDiscardFunction::~TabsDiscardFunction() {} 2129 TabsDiscardFunction::~TabsDiscardFunction() {}
2130 2130
2131 } // namespace extensions 2131 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/preference/preference_helpers.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698