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

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

Issue 93603006: Move Translate-related files to components/translate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comments 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_script.h" 5 #include "chrome/browser/translate/translate_script.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/strings/string_piece.h" 11 #include "base/strings/string_piece.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "base/strings/stringprintf.h" 13 #include "base/strings/stringprintf.h"
14 #include "chrome/browser/translate/translate_url_fetcher.h" 14 #include "chrome/browser/translate/translate_url_fetcher.h"
15 #include "chrome/browser/translate/translate_url_util.h" 15 #include "chrome/browser/translate/translate_url_util.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "components/translate/common/translate_util.h" 17 #include "components/translate/core/common/translate_util.h"
18 #include "google_apis/google_api_keys.h" 18 #include "google_apis/google_api_keys.h"
19 #include "grit/browser_resources.h" 19 #include "grit/browser_resources.h"
20 #include "net/base/escape.h" 20 #include "net/base/escape.h"
21 #include "net/base/url_util.h" 21 #include "net/base/url_util.h"
22 #include "ui/base/resource/resource_bundle.h" 22 #include "ui/base/resource/resource_bundle.h"
23 23
24 namespace { 24 namespace {
25 25
26 const int kExpirationDelayDays = 1; 26 const int kExpirationDelayDays = 1;
27 27
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // scripts. 140 // scripts.
141 base::MessageLoop::current()->PostDelayedTask( 141 base::MessageLoop::current()->PostDelayedTask(
142 FROM_HERE, 142 FROM_HERE,
143 base::Bind(&TranslateScript::Clear, 143 base::Bind(&TranslateScript::Clear,
144 weak_method_factory_.GetWeakPtr()), 144 weak_method_factory_.GetWeakPtr()),
145 expiration_delay_); 145 expiration_delay_);
146 } 146 }
147 147
148 callback_.Run(success, data); 148 callback_.Run(success, data);
149 } 149 }
OLDNEW
« no previous file with comments | « chrome/browser/translate/translate_prefs.cc ('k') | chrome/browser/translate/translate_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698