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 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } else { | 150 } else { |
151 OnUnpackWebResourceFailed(unpacker.error_message()); | 151 OnUnpackWebResourceFailed(unpacker.error_message()); |
152 } | 152 } |
153 } | 153 } |
154 } | 154 } |
155 | 155 |
156 private: | 156 private: |
157 ~UnpackerClient() {} | 157 ~UnpackerClient() {} |
158 | 158 |
159 // UtilityProcessHost::Client | 159 // UtilityProcessHost::Client |
160 virtual void OnProcessCrashed() { | 160 virtual void OnProcessCrashed(int exit_code) { |
161 if (got_response_) | 161 if (got_response_) |
162 return; | 162 return; |
163 | 163 |
164 OnUnpackWebResourceFailed( | 164 OnUnpackWebResourceFailed( |
165 "Chrome crashed while trying to retrieve web resources."); | 165 "Chrome crashed while trying to retrieve web resources."); |
166 } | 166 } |
167 | 167 |
168 virtual void OnUnpackWebResourceSucceeded( | 168 virtual void OnUnpackWebResourceSucceeded( |
169 const DictionaryValue& parsed_json) { | 169 const DictionaryValue& parsed_json) { |
170 web_resource_service_->OnWebResourceUnpacked(parsed_json); | 170 web_resource_service_->OnWebResourceUnpacked(parsed_json); |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 profile->GetProfileSyncService()) == sync_ui_util::SYNCED) || | 527 profile->GetProfileSyncService()) == sync_ui_util::SYNCED) || |
528 has_extensions; | 528 has_extensions; |
529 | 529 |
530 return !promo_closed && | 530 return !promo_closed && |
531 promo_options && | 531 promo_options && |
532 g_browser_process->GetApplicationLocale() == "en-US"; | 532 g_browser_process->GetApplicationLocale() == "en-US"; |
533 } | 533 } |
534 | 534 |
535 } // namespace WebResourceService | 535 } // namespace WebResourceService |
536 | 536 |
OLD | NEW |