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

Side by Side Diff: chrome/browser/extensions/extension_test_api.cc

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_test_api.h" 5 #include "chrome/browser/extensions/extension_test_api.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 AddRef(); // balanced in Reply 82 AddRef(); // balanced in Reply
83 NotificationService::current()->Notify( 83 NotificationService::current()->Notify(
84 chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE, 84 chrome::NOTIFICATION_EXTENSION_TEST_MESSAGE,
85 Source<ExtensionTestSendMessageFunction>(this), 85 Source<ExtensionTestSendMessageFunction>(this),
86 Details<std::string>(&message)); 86 Details<std::string>(&message));
87 return true; 87 return true;
88 } 88 }
89 ExtensionTestSendMessageFunction::~ExtensionTestSendMessageFunction() {} 89 ExtensionTestSendMessageFunction::~ExtensionTestSendMessageFunction() {}
90 90
91 void ExtensionTestSendMessageFunction::Reply(const std::string& message) { 91 void ExtensionTestSendMessageFunction::Reply(const std::string& message) {
92 result_.reset(Value::CreateStringValue(message)); 92 result_.reset(base::StringValue::New(message));
93 SendResponse(true); 93 SendResponse(true);
94 Release(); // balanced in RunImpl 94 Release(); // balanced in RunImpl
95 } 95 }
96 96
97 // static 97 // static
98 void ExtensionTestGetConfigFunction::set_test_config_state( 98 void ExtensionTestGetConfigFunction::set_test_config_state(
99 DictionaryValue* value) { 99 DictionaryValue* value) {
100 TestConfigState* test_config_state = TestConfigState::GetInstance(); 100 TestConfigState* test_config_state = TestConfigState::GetInstance();
101 test_config_state->set_config_state(value); 101 test_config_state->set_config_state(value);
102 } 102 }
(...skipping 13 matching lines...) Expand all
116 TestConfigState* test_config_state = TestConfigState::GetInstance(); 116 TestConfigState* test_config_state = TestConfigState::GetInstance();
117 117
118 if (!test_config_state->config_state()) { 118 if (!test_config_state->config_state()) {
119 error_ = kNoTestConfigDataError; 119 error_ = kNoTestConfigDataError;
120 return false; 120 return false;
121 } 121 }
122 122
123 result_.reset(test_config_state->config_state()->DeepCopy()); 123 result_.reset(test_config_state->config_state()->DeepCopy());
124 return true; 124 return true;
125 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | chrome/browser/extensions/extension_tts_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698