OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_util.h" | 9 #include "base/string_util.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 } else { | 134 } else { |
135 OnUnpackWebResourceFailed(unpacker.error_message()); | 135 OnUnpackWebResourceFailed(unpacker.error_message()); |
136 } | 136 } |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 private: | 140 private: |
141 ~UnpackerClient() {} | 141 ~UnpackerClient() {} |
142 | 142 |
143 // UtilityProcessHost::Client | 143 // UtilityProcessHost::Client |
144 virtual void OnProcessCrashed() { | 144 virtual void OnProcessCrashed(int exit_code) { |
145 if (got_response_) | 145 if (got_response_) |
146 return; | 146 return; |
147 | 147 |
148 OnUnpackWebResourceFailed( | 148 OnUnpackWebResourceFailed( |
149 "Chrome crashed while trying to retrieve web resources."); | 149 "Chrome crashed while trying to retrieve web resources."); |
150 } | 150 } |
151 | 151 |
152 virtual void OnUnpackWebResourceSucceeded( | 152 virtual void OnUnpackWebResourceSucceeded( |
153 const DictionaryValue& parsed_json) { | 153 const DictionaryValue& parsed_json) { |
154 web_resource_service_->OnWebResourceUnpacked(parsed_json); | 154 web_resource_service_->OnWebResourceUnpacked(parsed_json); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 if (!(old_logo_start == logo_start) || | 359 if (!(old_logo_start == logo_start) || |
360 !(old_logo_end == logo_end)) { | 360 !(old_logo_end == logo_end)) { |
361 prefs_->SetReal(prefs::kNTPCustomLogoStart, logo_start); | 361 prefs_->SetReal(prefs::kNTPCustomLogoStart, logo_start); |
362 prefs_->SetReal(prefs::kNTPCustomLogoEnd, logo_end); | 362 prefs_->SetReal(prefs::kNTPCustomLogoEnd, logo_end); |
363 NotificationService* service = NotificationService::current(); | 363 NotificationService* service = NotificationService::current(); |
364 service->Notify(NotificationType::WEB_RESOURCE_AVAILABLE, | 364 service->Notify(NotificationType::WEB_RESOURCE_AVAILABLE, |
365 Source<WebResourceService>(this), | 365 Source<WebResourceService>(this), |
366 NotificationService::NoDetails()); | 366 NotificationService::NoDetails()); |
367 } | 367 } |
368 } | 368 } |
OLD | NEW |