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

Side by Side Diff: chrome/browser/extensions/api/test/test_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/test/test_api.h" 5 #include "chrome/browser/extensions/api/test/test_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/memory/singleton.h" 10 #include "base/memory/singleton.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 content::NotificationService::current()->Notify( 110 content::NotificationService::current()->Notify(
111 chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE, 111 chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
112 content::Source<TestSendMessageFunction>(this), 112 content::Source<TestSendMessageFunction>(this),
113 content::Details<std::string>(&params->message)); 113 content::Details<std::string>(&params->message));
114 return true; 114 return true;
115 } 115 }
116 116
117 TestSendMessageFunction::~TestSendMessageFunction() {} 117 TestSendMessageFunction::~TestSendMessageFunction() {}
118 118
119 void TestSendMessageFunction::Reply(const std::string& message) { 119 void TestSendMessageFunction::Reply(const std::string& message) {
120 SetResult(Value::CreateStringValue(message)); 120 SetResult(new base::StringValue(message));
121 SendResponse(true); 121 SendResponse(true);
122 Release(); // balanced in RunImpl 122 Release(); // balanced in RunImpl
123 } 123 }
124 124
125 // static 125 // static
126 void TestGetConfigFunction::set_test_config_state( 126 void TestGetConfigFunction::set_test_config_state(
127 base::DictionaryValue* value) { 127 base::DictionaryValue* value) {
128 TestConfigState* test_config_state = TestConfigState::GetInstance(); 128 TestConfigState* test_config_state = TestConfigState::GetInstance();
129 test_config_state->set_config_state(value); 129 test_config_state->set_config_state(value);
130 } 130 }
(...skipping 15 matching lines...) Expand all
146 if (!test_config_state->config_state()) { 146 if (!test_config_state->config_state()) {
147 error_ = kNoTestConfigDataError; 147 error_ = kNoTestConfigDataError;
148 return false; 148 return false;
149 } 149 }
150 150
151 SetResult(test_config_state->config_state()->DeepCopy()); 151 SetResult(test_config_state->config_state()->DeepCopy());
152 return true; 152 return true;
153 } 153 }
154 154
155 } // namespace extensions 155 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/tabs/windows_event_router.cc ('k') | chrome/browser/extensions/api/usb/usb_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698