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

Side by Side Diff: chrome/browser/extensions/api/i18n/i18n_api.cc

Issue 1658793002: Update chrome for new prefs location. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/i18n/i18n_api.h" 5 #include "chrome/browser/extensions/api/i18n/i18n_api.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/prefs/pref_service.h"
13 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
14 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
15 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/common/extensions/api/i18n.h" 15 #include "chrome/common/extensions/api/i18n.h"
17 #include "chrome/common/pref_names.h" 16 #include "chrome/common/pref_names.h"
17 #include "components/prefs/pref_service.h"
18 18
19 namespace GetAcceptLanguages = extensions::api::i18n::GetAcceptLanguages; 19 namespace GetAcceptLanguages = extensions::api::i18n::GetAcceptLanguages;
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 namespace { 23 namespace {
24 24
25 // Errors. 25 // Errors.
26 static const char kEmptyAcceptLanguagesError[] = "accept-languages is empty."; 26 static const char kEmptyAcceptLanguagesError[] = "accept-languages is empty.";
27 27
(...skipping 25 matching lines...) Expand all
53 if (languages.empty()) { 53 if (languages.empty()) {
54 error_ = kEmptyAcceptLanguagesError; 54 error_ = kEmptyAcceptLanguagesError;
55 return false; 55 return false;
56 } 56 }
57 57
58 results_ = GetAcceptLanguages::Results::Create(languages); 58 results_ = GetAcceptLanguages::Results::Create(languages);
59 return true; 59 return true;
60 } 60 }
61 61
62 } // namespace extensions 62 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698