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

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

Issue 27034009: Implement Google network speech synthesis (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Change client name, truncate utterance length Created 7 years, 2 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) 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/component_loader.h" 5 #include "chrome/browser/extensions/component_loader.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 if ((field_trial_result.compare( 503 if ((field_trial_result.compare(
504 0, 504 0,
505 enable_prefix.length(), 505 enable_prefix.length(),
506 enable_prefix) == 0) || 506 enable_prefix) == 0) ||
507 CommandLine::ForCurrentProcess()->HasSwitch( 507 CommandLine::ForCurrentProcess()->HasSwitch(
508 switches::kEnableGoogleNowIntegration)) { 508 switches::kEnableGoogleNowIntegration)) {
509 Add(IDR_GOOGLE_NOW_MANIFEST, 509 Add(IDR_GOOGLE_NOW_MANIFEST,
510 base::FilePath(FILE_PATH_LITERAL("google_now"))); 510 base::FilePath(FILE_PATH_LITERAL("google_now")));
511 } 511 }
512 #endif 512 #endif
513
514 #if defined(GOOGLE_CHROME_BUILD)
515 std::string network_speech_synthesis_id = Add(
David Tseng 2013/10/17 20:43:49 I'd love to see some tests (i.e. fetching the curr
dmazzoni 2013/10/18 16:23:19 Sure. I added a basic test to load the voices and
516 IDR_NETWORK_SPEECH_SYNTHESIS_MANIFEST,
517 base::FilePath(FILE_PATH_LITERAL("network_speech_synthesis")));
518 #endif // defined(GOOGLE_CHROME_BUILD)
513 } 519 }
514 520
515 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) { 521 void ComponentLoader::UnloadComponent(ComponentExtensionInfo* component) {
516 delete component->manifest; 522 delete component->manifest;
517 if (extension_service_->is_ready()) { 523 if (extension_service_->is_ready()) {
518 extension_service_-> 524 extension_service_->
519 RemoveComponentExtension(component->extension_id); 525 RemoveComponentExtension(component->extension_id);
520 } 526 }
521 } 527 }
522 528
523 } // namespace extensions 529 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698