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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 } else { | 131 } else { |
132 OnUnpackWebResourceFailed(unpacker.error_message()); | 132 OnUnpackWebResourceFailed(unpacker.error_message()); |
133 } | 133 } |
134 } | 134 } |
135 } | 135 } |
136 | 136 |
137 private: | 137 private: |
138 ~UnpackerClient() {} | 138 ~UnpackerClient() {} |
139 | 139 |
140 // UtilityProcessHost::Client | 140 // UtilityProcessHost::Client |
141 virtual void OnProcessCrashed() { | 141 virtual void OnProcessCrashed(int exit_code) { |
142 if (got_response_) | 142 if (got_response_) |
143 return; | 143 return; |
144 | 144 |
145 OnUnpackWebResourceFailed( | 145 OnUnpackWebResourceFailed( |
146 "Chrome crashed while trying to retrieve web resources."); | 146 "Chrome crashed while trying to retrieve web resources."); |
147 } | 147 } |
148 | 148 |
149 virtual void OnUnpackWebResourceSucceeded( | 149 virtual void OnUnpackWebResourceSucceeded( |
150 const DictionaryValue& parsed_json) { | 150 const DictionaryValue& parsed_json) { |
151 web_resource_service_->OnWebResourceUnpacked(parsed_json); | 151 web_resource_service_->OnWebResourceUnpacked(parsed_json); |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 if (!(old_logo_start == logo_start) || | 358 if (!(old_logo_start == logo_start) || |
359 !(old_logo_end == logo_end)) { | 359 !(old_logo_end == logo_end)) { |
360 prefs_->SetReal(prefs::kNTPCustomLogoStart, logo_start); | 360 prefs_->SetReal(prefs::kNTPCustomLogoStart, logo_start); |
361 prefs_->SetReal(prefs::kNTPCustomLogoEnd, logo_end); | 361 prefs_->SetReal(prefs::kNTPCustomLogoEnd, logo_end); |
362 NotificationService* service = NotificationService::current(); | 362 NotificationService* service = NotificationService::current(); |
363 service->Notify(NotificationType::BROWSER_THEME_CHANGED, | 363 service->Notify(NotificationType::BROWSER_THEME_CHANGED, |
364 Source<WebResourceService>(this), | 364 Source<WebResourceService>(this), |
365 NotificationService::NoDetails()); | 365 NotificationService::NoDetails()); |
366 } | 366 } |
367 } | 367 } |
OLD | NEW |