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

Side by Side Diff: chrome/browser/translate/translate_language_list.cc

Issue 131203002: Move LanguageUsageMetrics and TranslateBrowserMetrics to components (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/translate/translate_language_list.h" 5 #include "chrome/browser/translate/translate_language_list.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/json/json_reader.h" 10 #include "base/json/json_reader.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/strings/string_util.h" 13 #include "base/strings/string_util.h"
14 #include "base/strings/stringprintf.h" 14 #include "base/strings/stringprintf.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "chrome/browser/browser_process.h" 16 #include "chrome/browser/browser_process.h"
17 #include "chrome/browser/translate/translate_browser_metrics.h"
18 #include "chrome/browser/translate/translate_manager.h" 17 #include "chrome/browser/translate/translate_manager.h"
19 #include "chrome/browser/translate/translate_url_fetcher.h" 18 #include "chrome/browser/translate/translate_url_fetcher.h"
20 #include "chrome/browser/translate/translate_url_util.h" 19 #include "chrome/browser/translate/translate_url_util.h"
20 #include "components/translate/core/browser/translate_browser_metrics.h"
21 #include "components/translate/core/browser/translate_event_details.h" 21 #include "components/translate/core/browser/translate_event_details.h"
22 #include "net/base/url_util.h" 22 #include "net/base/url_util.h"
23 #include "ui/base/l10n/l10n_util.h" 23 #include "ui/base/l10n/l10n_util.h"
24 #include "url/gurl.h" 24 #include "url/gurl.h"
25 25
26 namespace { 26 namespace {
27 27
28 // The default list of languages the Google translation server supports. 28 // The default list of languages the Google translation server supports.
29 // We use this list until we receive the list that the server exposes. 29 // We use this list until we receive the list that the server exposes.
30 // For information, here is the list of languages that Chrome can be run in 30 // For information, here is the list of languages that Chrome can be run in
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 320
321 NotifyEvent(__LINE__, "Language list is updated"); 321 NotifyEvent(__LINE__, "Language list is updated");
322 322
323 DCHECK_EQ(kFetcherId, id); 323 DCHECK_EQ(kFetcherId, id);
324 324
325 SetSupportedLanguages(data, &all_supported_languages_, &alpha_languages_); 325 SetSupportedLanguages(data, &all_supported_languages_, &alpha_languages_);
326 language_list_fetcher_.reset(); 326 language_list_fetcher_.reset();
327 327
328 last_updated_ = base::Time::Now(); 328 last_updated_ = base::Time::Now();
329 } 329 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_browser_metrics_unittest.cc ('k') | chrome/browser/translate/translate_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698