OLD | NEW |
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.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "chrome/browser/translate/translate_url_fetcher.h" | 12 #include "chrome/browser/translate/translate_url_fetcher.h" |
13 #include "chrome/browser/translate/translate_url_util.h" | 13 #include "chrome/browser/translate/translate_url_util.h" |
14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
15 #include "google_apis/google_api_keys.h" | 15 #include "google_apis/google_api_keys.h" |
16 #include "grit/browser_resources.h" | 16 #include "grit/browser_resources.h" |
17 #include "net/base/escape.h" | 17 #include "net/base/escape.h" |
18 #include "net/base/url_util.h" | 18 #include "net/base/url_util.h" |
19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
20 | 20 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 // scripts. | 112 // scripts. |
113 base::MessageLoop::current()->PostDelayedTask( | 113 base::MessageLoop::current()->PostDelayedTask( |
114 FROM_HERE, | 114 FROM_HERE, |
115 base::Bind(&TranslateScript::Clear, | 115 base::Bind(&TranslateScript::Clear, |
116 weak_method_factory_.GetWeakPtr()), | 116 weak_method_factory_.GetWeakPtr()), |
117 expiration_delay_); | 117 expiration_delay_); |
118 } | 118 } |
119 | 119 |
120 callback_.Run(success, data); | 120 callback_.Run(success, data); |
121 } | 121 } |
OLD | NEW |