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

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

Issue 6385004: Fix uninitialized variables introduced in CL 72374. time_slice_hrs was causin... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 | « no previous file | no next file » | 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 <string> 7 #include <string>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 old_promo_end = prefs_->GetReal(prefs::kNTPPromoEnd); 392 old_promo_end = prefs_->GetReal(prefs::kNTPPromoEnd);
393 } 393 }
394 394
395 // Check for newly received start and end values. 395 // Check for newly received start and end values.
396 if (parsed_json.GetDictionary("topic", &topic_dict)) { 396 if (parsed_json.GetDictionary("topic", &topic_dict)) {
397 if (topic_dict->GetList("answers", &answer_list)) { 397 if (topic_dict->GetList("answers", &answer_list)) {
398 std::string promo_start_string = ""; 398 std::string promo_start_string = "";
399 std::string promo_end_string = ""; 399 std::string promo_end_string = "";
400 std::string promo_string = ""; 400 std::string promo_string = "";
401 std::string promo_build = ""; 401 std::string promo_build = "";
402 int promo_build_type; 402 int promo_build_type = 0;
403 int time_slice_hrs; 403 int time_slice_hrs = 0;
404 for (ListValue::const_iterator tip_iter = answer_list->begin(); 404 for (ListValue::const_iterator tip_iter = answer_list->begin();
405 tip_iter != answer_list->end(); ++tip_iter) { 405 tip_iter != answer_list->end(); ++tip_iter) {
406 if (!(*tip_iter)->IsType(Value::TYPE_DICTIONARY)) 406 if (!(*tip_iter)->IsType(Value::TYPE_DICTIONARY))
407 continue; 407 continue;
408 DictionaryValue* a_dic = 408 DictionaryValue* a_dic =
409 static_cast<DictionaryValue*>(*tip_iter); 409 static_cast<DictionaryValue*>(*tip_iter);
410 std::string promo_signal; 410 std::string promo_signal;
411 if (a_dic->GetString("name", &promo_signal)) { 411 if (a_dic->GetString("name", &promo_signal)) {
412 if (promo_signal == "promo_start") { 412 if (promo_signal == "promo_start") {
413 a_dic->GetString("question", &promo_build); 413 a_dic->GetString("question", &promo_build);
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } else { 571 } else {
572 is_promo_build = true; 572 is_promo_build = true;
573 } 573 }
574 } 574 }
575 575
576 return !promo_closed && !is_synced && is_promo_build; 576 return !promo_closed && !is_synced && is_promo_build;
577 } 577 }
578 578
579 } // namespace WebResourceService 579 } // namespace WebResourceService
580 580
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698