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

Side by Side Diff: chrome/utility/web_resource_unpacker.cc

Issue 635623003: Cleanup: Better constify some strings in chrome. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 6 years, 1 month 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
« no previous file with comments | « chrome/utility/web_resource_unpacker.h ('k') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/utility/web_resource_unpacker.h" 5 #include "chrome/utility/web_resource_unpacker.h"
6 6
7 #include "base/json/json_reader.h" 7 #include "base/json/json_reader.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 9
10 const char* WebResourceUnpacker::kInvalidDataTypeError = 10 const char WebResourceUnpacker::kInvalidDataTypeError[] =
11 "Data from web resource server is missing or not valid JSON."; 11 "Data from web resource server is missing or not valid JSON.";
12 12
13 const char* WebResourceUnpacker::kUnexpectedJSONFormatError = 13 const char WebResourceUnpacker::kUnexpectedJSONFormatError[] =
14 "Data from web resource server does not have expected format."; 14 "Data from web resource server does not have expected format.";
15 15
16 WebResourceUnpacker::WebResourceUnpacker(const std::string &resource_data) 16 WebResourceUnpacker::WebResourceUnpacker(const std::string &resource_data)
17 : resource_data_(resource_data) { 17 : resource_data_(resource_data) {
18 } 18 }
19 19
20 WebResourceUnpacker::~WebResourceUnpacker() { 20 WebResourceUnpacker::~WebResourceUnpacker() {
21 } 21 }
22 22
23 // TODO(mrc): Right now, this reads JSON data from the experimental popgadget 23 // TODO(mrc): Right now, this reads JSON data from the experimental popgadget
(...skipping 12 matching lines...) Expand all
36 error_message_ = kUnexpectedJSONFormatError; 36 error_message_ = kUnexpectedJSONFormatError;
37 return false; 37 return false;
38 } 38 }
39 parsed_json_.reset(static_cast<base::DictionaryValue*>(value.release())); 39 parsed_json_.reset(static_cast<base::DictionaryValue*>(value.release()));
40 return true; 40 return true;
41 } 41 }
42 error_message_ = kInvalidDataTypeError; 42 error_message_ = kInvalidDataTypeError;
43 return false; 43 return false;
44 } 44 }
45 45
OLDNEW
« no previous file with comments | « chrome/utility/web_resource_unpacker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698