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

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

Issue 22885002: c/b/extensions, json_schema_compiler: Do not use Value::Create*. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed C-style casts. Created 7 years, 4 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/tabs/tabs_api.h" 5 #include "chrome/browser/extensions/api/tabs/tabs_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 1933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 } 1944 }
1945 1945
1946 registrar_.RemoveAll(); 1946 registrar_.RemoveAll();
1947 1947
1948 // Call GotLanguage in all cases as we want to guarantee the callback is 1948 // Call GotLanguage in all cases as we want to guarantee the callback is
1949 // called for every API call the extension made. 1949 // called for every API call the extension made.
1950 GotLanguage(language); 1950 GotLanguage(language);
1951 } 1951 }
1952 1952
1953 void TabsDetectLanguageFunction::GotLanguage(const std::string& language) { 1953 void TabsDetectLanguageFunction::GotLanguage(const std::string& language) {
1954 SetResult(Value::CreateStringValue(language.c_str())); 1954 SetResult(new base::StringValue(language.c_str()));
1955 SendResponse(true); 1955 SendResponse(true);
1956 1956
1957 Release(); // Balanced in Run() 1957 Release(); // Balanced in Run()
1958 } 1958 }
1959 1959
1960 ExecuteCodeInTabFunction::ExecuteCodeInTabFunction() 1960 ExecuteCodeInTabFunction::ExecuteCodeInTabFunction()
1961 : execute_tab_id_(-1) { 1961 : execute_tab_id_(-1) {
1962 } 1962 }
1963 1963
1964 ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {} 1964 ExecuteCodeInTabFunction::~ExecuteCodeInTabFunction() {}
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2065 execute_tab_id_ = tab_id; 2065 execute_tab_id_ = tab_id;
2066 details_ = details.Pass(); 2066 details_ = details.Pass();
2067 return true; 2067 return true;
2068 } 2068 }
2069 2069
2070 bool TabsInsertCSSFunction::ShouldInsertCSS() const { 2070 bool TabsInsertCSSFunction::ShouldInsertCSS() const {
2071 return true; 2071 return true;
2072 } 2072 }
2073 2073
2074 } // namespace extensions 2074 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698