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

Side by Side Diff: chrome/browser/views/sync/sync_setup_wizard.cc

Issue 193072: Move StringPiece into the base namespace. It is colliding (Closed)
Patch Set: take 2 Created 11 years, 3 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
« no previous file with comments | « chrome/browser/ssl/ssl_policy.cc ('k') | chrome/common/extensions/user_script.h » ('j') | 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 #ifdef CHROME_PERSONALIZATION 5 #ifdef CHROME_PERSONALIZATION
6 6
7 #include "chrome/browser/views/sync/sync_setup_wizard.h" 7 #include "chrome/browser/views/sync/sync_setup_wizard.h"
8 8
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes); 42 scoped_refptr<RefCountedBytes> html_bytes(new RefCountedBytes);
43 if (path_raw == chrome::kSyncThrobberPath) { 43 if (path_raw == chrome::kSyncThrobberPath) {
44 ResourceBundle::GetSharedInstance().LoadImageResourceBytes(IDR_THROBBER, 44 ResourceBundle::GetSharedInstance().LoadImageResourceBytes(IDR_THROBBER,
45 &html_bytes->data); 45 &html_bytes->data);
46 SendResponse(request_id, html_bytes); 46 SendResponse(request_id, html_bytes);
47 return; 47 return;
48 } 48 }
49 49
50 std::string response; 50 std::string response;
51 if (path_raw == chrome::kSyncGaiaLoginPath) { 51 if (path_raw == chrome::kSyncGaiaLoginPath) {
52 static const StringPiece html(ResourceBundle::GetSharedInstance() 52 static const base::StringPiece html(ResourceBundle::GetSharedInstance()
53 .GetRawDataResource(IDR_GAIA_LOGIN_HTML)); 53 .GetRawDataResource(IDR_GAIA_LOGIN_HTML));
54 response = html.as_string(); 54 response = html.as_string();
55 } else if (path_raw == chrome::kSyncMergeAndSyncPath) { 55 } else if (path_raw == chrome::kSyncMergeAndSyncPath) {
56 static const StringPiece html(ResourceBundle::GetSharedInstance() 56 static const base::StringPiece html(ResourceBundle::GetSharedInstance()
57 .GetRawDataResource(IDR_MERGE_AND_SYNC_HTML)); 57 .GetRawDataResource(IDR_MERGE_AND_SYNC_HTML));
58 response = html.as_string(); 58 response = html.as_string();
59 } else if (path_raw == chrome::kSyncSetupFlowPath) { 59 } else if (path_raw == chrome::kSyncSetupFlowPath) {
60 static const StringPiece html(ResourceBundle::GetSharedInstance() 60 static const base::StringPiece html(ResourceBundle::GetSharedInstance()
61 .GetRawDataResource(IDR_SYNC_SETUP_FLOW_HTML)); 61 .GetRawDataResource(IDR_SYNC_SETUP_FLOW_HTML));
62 response = html.as_string(); 62 response = html.as_string();
63 } 63 }
64 // Send the response. 64 // Send the response.
65 html_bytes->data.resize(response.size()); 65 html_bytes->data.resize(response.size());
66 std::copy(response.begin(), response.end(), html_bytes->data.begin()); 66 std::copy(response.begin(), response.end(), html_bytes->data.begin());
67 SendResponse(request_id, html_bytes); 67 SendResponse(request_id, html_bytes);
68 } 68 }
69 69
70 SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service) 70 SyncSetupWizard::SyncSetupWizard(ProfileSyncService* service)
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 // static 114 // static
115 SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun( 115 SyncSetupWizard::State SyncSetupWizard::GetEndStateForDiscreteRun(
116 State start_state) { 116 State start_state) {
117 State result = start_state == GAIA_LOGIN ? GAIA_SUCCESS : DONE; 117 State result = start_state == GAIA_LOGIN ? GAIA_SUCCESS : DONE;
118 DCHECK_NE(DONE, result) << 118 DCHECK_NE(DONE, result) <<
119 "Invalid start state for discrete run: " << start_state; 119 "Invalid start state for discrete run: " << start_state;
120 return result; 120 return result;
121 } 121 }
122 122
123 #endif // CHROME_PERSONALIZATION 123 #endif // CHROME_PERSONALIZATION
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_policy.cc ('k') | chrome/common/extensions/user_script.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698