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

Side by Side Diff: chrome/common/extensions/api/speech/tts_engine_manifest_handler.cc

Issue 105473003: Add explicit base namespace to string16 users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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/common/extensions/api/speech/tts_engine_manifest_handler.h" 5 #include "chrome/common/extensions/api/speech/tts_engine_manifest_handler.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 29 matching lines...) Expand all
40 extension->GetManifestData(keys::kTtsVoices)); 40 extension->GetManifestData(keys::kTtsVoices));
41 return info ? &info->voices : NULL; 41 return info ? &info->voices : NULL;
42 } 42 }
43 43
44 TtsEngineManifestHandler::TtsEngineManifestHandler() { 44 TtsEngineManifestHandler::TtsEngineManifestHandler() {
45 } 45 }
46 46
47 TtsEngineManifestHandler::~TtsEngineManifestHandler() { 47 TtsEngineManifestHandler::~TtsEngineManifestHandler() {
48 } 48 }
49 49
50 bool TtsEngineManifestHandler::Parse(Extension* extension, string16* error) { 50 bool TtsEngineManifestHandler::Parse(Extension* extension,
51 base::string16* error) {
51 scoped_ptr<TtsVoices> info(new TtsVoices); 52 scoped_ptr<TtsVoices> info(new TtsVoices);
52 const base::DictionaryValue* tts_dict = NULL; 53 const base::DictionaryValue* tts_dict = NULL;
53 if (!extension->manifest()->GetDictionary(keys::kTtsEngine, &tts_dict)) { 54 if (!extension->manifest()->GetDictionary(keys::kTtsEngine, &tts_dict)) {
54 *error = ASCIIToUTF16(errors::kInvalidTts); 55 *error = ASCIIToUTF16(errors::kInvalidTts);
55 return false; 56 return false;
56 } 57 }
57 58
58 if (!tts_dict->HasKey(keys::kTtsVoices)) 59 if (!tts_dict->HasKey(keys::kTtsVoices))
59 return true; 60 return true;
60 61
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 142
142 extension->SetManifestData(keys::kTtsVoices, info.release()); 143 extension->SetManifestData(keys::kTtsVoices, info.release());
143 return true; 144 return true;
144 } 145 }
145 146
146 const std::vector<std::string> TtsEngineManifestHandler::Keys() const { 147 const std::vector<std::string> TtsEngineManifestHandler::Keys() const {
147 return SingleKey(keys::kTtsEngine); 148 return SingleKey(keys::kTtsEngine);
148 } 149 }
149 150
150 } // namespace extensions 151 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698