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

Side by Side Diff: chrome/browser/speech/speech_input_browsertest.cc

Issue 6308009: If user had consented for metrics reporting, send speech input request origin to the server. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/speech/speech_input_dispatcher_host.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
10 #include "chrome/browser/speech/speech_input_dispatcher_host.h" 10 #include "chrome/browser/speech/speech_input_dispatcher_host.h"
(...skipping 30 matching lines...) Expand all
41 return grammar_; 41 return grammar_;
42 } 42 }
43 43
44 // SpeechInputManager methods. 44 // SpeechInputManager methods.
45 void StartRecognition(Delegate* delegate, 45 void StartRecognition(Delegate* delegate,
46 int caller_id, 46 int caller_id,
47 int render_process_id, 47 int render_process_id,
48 int render_view_id, 48 int render_view_id,
49 const gfx::Rect& element_rect, 49 const gfx::Rect& element_rect,
50 const std::string& language, 50 const std::string& language,
51 const std::string& grammar) { 51 const std::string& grammar,
52 const std::string& origin_url) {
52 VLOG(1) << "StartRecognition invoked."; 53 VLOG(1) << "StartRecognition invoked.";
53 EXPECT_EQ(0, caller_id_); 54 EXPECT_EQ(0, caller_id_);
54 EXPECT_EQ(NULL, delegate_); 55 EXPECT_EQ(NULL, delegate_);
55 caller_id_ = caller_id; 56 caller_id_ = caller_id;
56 delegate_ = delegate; 57 delegate_ = delegate;
57 grammar_ = grammar; 58 grammar_ = grammar;
58 // Give the fake result in a short while. 59 // Give the fake result in a short while.
59 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, 60 MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this,
60 &FakeSpeechInputManager::SetFakeRecognitionResult)); 61 &FakeSpeechInputManager::SetFakeRecognitionResult));
61 } 62 }
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 #else 183 #else
183 #define MAYBE_GrammarAttribute GrammarAttribute 184 #define MAYBE_GrammarAttribute GrammarAttribute
184 #endif 185 #endif
185 IN_PROC_BROWSER_TEST_F(SpeechInputBrowserTest, MAYBE_GrammarAttribute) { 186 IN_PROC_BROWSER_TEST_F(SpeechInputBrowserTest, MAYBE_GrammarAttribute) {
186 LoadAndRunSpeechInputTest(FILE_PATH_LITERAL("grammar_attribute.html")); 187 LoadAndRunSpeechInputTest(FILE_PATH_LITERAL("grammar_attribute.html"));
187 EXPECT_EQ("http://example.com/grammar.xml", 188 EXPECT_EQ("http://example.com/grammar.xml",
188 fake_speech_input_manager_.grammar()); 189 fake_speech_input_manager_.grammar());
189 } 190 }
190 191
191 } // namespace speech_input 192 } // namespace speech_input
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/speech/speech_input_dispatcher_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698