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

Side by Side Diff: chrome/browser/web_resource/web_resource_service.cc

Issue 7006005: Move UrlFetcher to content. I originally thought that it's only used by chrome code, but turns o... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix linux Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/webui/active_downloads_ui.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/web_resource/web_resource_service.h" 5 #include "chrome/browser/web_resource/web_resource_service.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/string_number_conversions.h" 9 #include "base/string_number_conversions.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/threading/thread_restrictions.h" 11 #include "base/threading/thread_restrictions.h"
12 #include "base/time.h" 12 #include "base/time.h"
13 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/browser_process.h" 15 #include "chrome/browser/browser_process.h"
16 #include "chrome/browser/prefs/pref_service.h" 16 #include "chrome/browser/prefs/pref_service.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/sync/sync_ui_util.h" 18 #include "chrome/browser/sync/sync_ui_util.h"
19 #include "chrome/common/chrome_switches.h" 19 #include "chrome/common/chrome_switches.h"
20 #include "chrome/common/extensions/extension.h" 20 #include "chrome/common/extensions/extension.h"
21 #include "chrome/common/net/url_fetcher.h"
22 #include "chrome/common/web_resource/web_resource_unpacker.h" 21 #include "chrome/common/web_resource/web_resource_unpacker.h"
23 #include "content/browser/browser_thread.h" 22 #include "content/browser/browser_thread.h"
24 #include "content/common/notification_service.h" 23 #include "content/common/notification_service.h"
24 #include "content/common/url_fetcher.h"
25 #include "googleurl/src/gurl.h" 25 #include "googleurl/src/gurl.h"
26 #include "net/base/load_flags.h" 26 #include "net/base/load_flags.h"
27 #include "net/url_request/url_request_status.h" 27 #include "net/url_request/url_request_status.h"
28 28
29 class WebResourceService::WebResourceFetcher 29 class WebResourceService::WebResourceFetcher
30 : public URLFetcher::Delegate { 30 : public URLFetcher::Delegate {
31 public: 31 public:
32 explicit WebResourceFetcher(WebResourceService* web_resource_service) : 32 explicit WebResourceFetcher(WebResourceService* web_resource_service) :
33 ALLOW_THIS_IN_INITIALIZER_LIST(fetcher_factory_(this)), 33 ALLOW_THIS_IN_INITIALIZER_LIST(fetcher_factory_(this)),
34 web_resource_service_(web_resource_service) { 34 web_resource_service_(web_resource_service) {
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 } 283 }
284 284
285 void WebResourceService::UpdateResourceCache(const std::string& json_data) { 285 void WebResourceService::UpdateResourceCache(const std::string& json_data) {
286 UnpackerClient* client = new UnpackerClient(this, json_data); 286 UnpackerClient* client = new UnpackerClient(this, json_data);
287 client->Start(); 287 client->Start();
288 288
289 // Set cache update time in preferences. 289 // Set cache update time in preferences.
290 prefs_->SetString(last_update_time_pref_name_, 290 prefs_->SetString(last_update_time_pref_name_,
291 base::DoubleToString(base::Time::Now().ToDoubleT())); 291 base::DoubleToString(base::Time::Now().ToDoubleT()));
292 } 292 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/active_downloads_ui.cc ('k') | chrome/chrome_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698